.panel-face {
  --panel-surface: #17242d;
  --panel-edge: #364a53;
  --panel-text: #e8f0f2;
  --panel-secondary: #aabdc4;
  --panel-accent: #75dfba;
  --panel-font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  container: instrument / inline-size;
  display: grid;
  min-inline-size: 0;
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  overflow: clip;
  color: var(--panel-text);
  background: linear-gradient(135deg, #293840 0, #202e37 28%, #1b2a33 62%, #1b2730 100%);
  box-shadow: 0 6px 17px #14273220, inset 0 1px #ffffff12;
}

.panel-face *,
.panel-face *::before,
.panel-face *::after {
  box-sizing: border-box;
}

.panel-face [hidden] {
  display: none !important;
}

.panel-face button,
.panel-face select,
.panel-face input {
  font: inherit;
}

.panel-face button {
  color: inherit;
  cursor: pointer;
}

.panel-face button:focus-visible,
.panel-face select:focus-visible,
.panel-face input:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

.panel-face-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.78rem;
}

.panel-heading-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-inline-size: 0;
}

.panel-emblem {
  position: relative;
  flex: none;
  inline-size: 2.15rem;
  aspect-ratio: 1;
  border: 1px solid #607d84;
  border-radius: 0.55rem;
  background: linear-gradient(150deg, #40535b, #293a44);
  box-shadow: inset 0 1px #ffffff19, 0 2px #111f2680;
}

.panel-emblem::before,
.panel-emblem::after {
  content: '';
  position: absolute;
  border-radius: 1px;
}

.panel-emblem::before {
  inset: 0.55rem 0.38rem;
  border: 1px solid #aabdc4;
}

.panel-emblem::after {
  inset: 0.86rem 0.45rem 0.8rem;
  background: var(--panel-accent);
  clip-path: polygon(0 55%, 16% 55%, 30% 12%, 45% 60%, 55% 93%, 75% 28%, 100% 28%, 100% 50%, 80% 50%, 56% 100%, 42% 79%, 29% 33%, 19% 73%, 0 73%);
}

.panel-face[data-category="thermal"] .panel-emblem::after {
  inset: 0.45rem 0.88rem;
  clip-path: polygon(34% 0, 67% 0, 67% 61%, 100% 79%, 100% 100%, 0 100%, 0 79%, 34% 61%);
}

.panel-face[data-category="mechanics"] .panel-emblem::after {
  inset: 0.82rem 0.53rem;
  clip-path: polygon(0 50%, 18% 50%, 18% 0, 35% 0, 35% 50%, 51% 50%, 51% 0, 68% 0, 68% 50%, 83% 50%, 83% 0, 100% 0, 100% 100%, 0 100%);
}

.panel-face[data-category="optics"] .panel-emblem::after,
.panel-face[data-category="modern"] .panel-emblem::after {
  inset: 0.56rem 0.43rem;
  clip-path: polygon(0 36%, 40% 42%, 53% 0, 65% 40%, 100% 30%, 100% 43%, 64% 52%, 100% 58%, 100% 71%, 63% 59%, 54% 100%, 41% 54%, 0 51%);
}

.panel-face-title {
  margin: 0;
  color: var(--panel-text);
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.panel-face-title .panel-en {
  margin-block-start: 0.16rem;
  color: #bccdd3;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.panel-bilingual,
.panel-field-label {
  display: grid;
  gap: 0.13rem;
  min-inline-size: 0;
}

.panel-en {
  display: block;
  color: var(--panel-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.15;
}

.panel-terminal-count {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.65rem;
  border: 1px solid #69838a58;
  border-radius: 7px;
  color: #dbe7eb;
  font-size: 0.75rem;
  line-height: 1;
  background: #16232a61;
}

.panel-terminal-count .panel-en {
  font-size: 0.75rem;
}

.panel-link-indicator {
  inline-size: 0.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #87969d;
  box-shadow: inset 0 1px #ffffff55;
}

.panel-terminal-count-active .panel-link-indicator {
  background: var(--panel-accent);
  box-shadow: 0 0 8px #79f3b669;
}

.panel-desk {
  display: grid;
  gap: 0.78rem;
  min-inline-size: 0;
  padding: 0 1rem 0.9rem;
}

.panel-telemetry {
  display: grid;
  align-content: start;
  gap: 0.52rem;
  min-inline-size: 0;
}

.panel-screen {
  position: relative;
  display: grid;
  min-inline-size: 0;
  padding: 3px;
  border: 1px solid #4b5c66;
  border-radius: 10px;
  background: #10191f;
  box-shadow: inset 0 2px 8px #0008, 0 1px #ffffff12;
  overflow: hidden;
}

.panel-screen[data-theme="crt"] {
  border-color: #4b6a56;
  background: #101f1a;
}

.panel-screen[data-theme="dso"] {
  border-color: #4d6675;
  background: #0c1721;
}

.panel-preview {
  display: block;
  inline-size: 100%;
  block-size: clamp(11.5rem, 32cqw, 18rem);
  border-radius: 7px;
}

.panel-face-scope .panel-preview {
  block-size: clamp(13.8rem, 31cqw, 17rem);
}

.panel-screen[data-display="meter"] .panel-preview {
  block-size: clamp(9rem, 26cqw, 13rem);
}

.panel-digital {
  min-inline-size: 0;
  display: grid;
  align-content: center;
  min-block-size: 6.8rem;
  padding: 0.7rem 1.1rem 0.85rem;
  border-radius: 7px;
  background: linear-gradient(125deg, #152b22, #10241f 70%, #192d23);
  box-shadow: inset 0 0 11px #091412;
}

.panel-digital-mark {
  color: #91b6a6;
  font-family: var(--panel-font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.025em;
}

.panel-digital-body {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}

.panel-digital-text {
  color: #adf8d5;
  font-family: var(--panel-font-mono);
  font-size: clamp(1.7rem, 6cqw, 2.5rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px #8bf0bd40;
}

.panel-digital-unit {
  color: #add3bd;
  font-family: var(--panel-font-mono);
  font-size: 0.85rem;
}

.panel-screen-caption {
  display: grid;
  gap: 0.36rem;
}

.panel-series-row,
.panel-annotations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem 0.65rem;
  color: #d5e4e8;
  font-size: 0.74rem;
}

.panel-series {
  display: flex;
  align-items: center;
  gap: 0.28rem;
}

.panel-series-mark {
  flex: none;
  inline-size: 0.75rem;
  block-size: 0.14rem;
  border-radius: 2px;
}

.panel-annotations {
  align-items: baseline;
  font-family: var(--panel-font-mono);
}

.panel-annotation {
  padding: 0.23rem 0.32rem;
  border: 1px solid #536b7666;
  border-radius: 5px;
  background: #1b2933;
}

.panel-readings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr));
  gap: 0.33rem;
}

.panel-reading {
  display: grid;
  align-content: space-between;
  gap: 0.25rem;
  min-inline-size: 0;
  padding: 0.42rem 0.48rem;
  border: 1px solid #40555f;
  border-radius: 6px;
  background: #16242d;
  color: #e0e9ed;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.panel-reading .panel-en {
  font-size: 0.75rem;
}

.panel-reading-number {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.3rem;
  font-family: var(--panel-font-mono);
}

.panel-reading-value {
  color: #aaf1d3;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.panel-reading-unit,
.panel-unit {
  color: var(--panel-secondary);
  font-family: var(--panel-font-mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.panel-status {
  border-inline-start: 2px solid #68bda7;
  padding: 0.25rem 0.47rem;
  color: #dce9ec;
  font-size: 0.78rem;
  line-height: 1.35;
}

.panel-controls {
  display: grid;
  align-content: start;
  gap: 0.52rem;
  min-inline-size: 0;
}

.panel-controls-group {
  min-inline-size: 0;
  padding: 0.6rem;
  border: 1px solid #4d64708c;
  border-radius: 8px;
  background: #30414b52;
  box-shadow: inset 0 1px #ffffff0e;
}

.panel-section-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.4rem;
  margin-block-end: 0.48rem;
  color: #e4eef0;
  font-size: 0.77rem;
  font-weight: 660;
  line-height: 1.2;
}

.panel-section-label .panel-en {
  color: #b6c8ce;
  font-size: 0.75rem;
}

.panel-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.4rem), 1fr));
  gap: 0.55rem 0.62rem;
}

.panel-field {
  display: grid;
  align-content: end;
  gap: 0.22rem;
  min-inline-size: 0;
}

.panel-field-label {
  gap: 0.1rem;
  font-size: 0.875rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.panel-field-label .panel-en {
  font-size: 0.75rem;
}

.panel-number {
  display: grid;
  grid-template-columns: 1.63rem minmax(0, 1fr) auto;
  gap: 0.23rem;
  align-items: center;
  min-inline-size: 0;
}

.panel-face .panel-number-input,
.panel-face .panel-select {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 1.9rem;
  color: var(--panel-text);
  color-scheme: dark;
  padding: 0.21rem 0.32rem;
  border: 1px solid #667f8b;
  border-radius: 5px;
  background: #17252d;
  box-shadow: inset 0 1px 3px #111c2570;
  font-size: 0.78rem;
  line-height: 1.15;
}

.panel-face .panel-number-input {
  font-family: var(--panel-font-mono);
  font-variant-numeric: tabular-nums;
}

.panel-number-input::-webkit-inner-spin-button,
.panel-number-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.panel-number-input {
  appearance: textfield;
}

.panel-face .panel-select {
  appearance: none;
  padding-inline-end: 0.98rem;
  background:
    linear-gradient(45deg, transparent 50%, #a8bfc6 50%) calc(100% - 0.57rem) 52% / 4px 4px no-repeat,
    linear-gradient(135deg, #a8bfc6 50%, transparent 50%) calc(100% - 0.34rem) 52% / 4px 4px no-repeat,
    #17252d;
}

.panel-knob {
  position: relative;
  inline-size: 1.58rem;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #778891;
  border-radius: 50%;
  background:
    radial-gradient(circle, #485963 0 53%, transparent 57%),
    repeating-conic-gradient(#6a7a81 0 10deg, #4f5d64 10deg 20deg);
  box-shadow: inset 0 1px #ffffff26, 0 1px 3px #080f15ab;
  touch-action: none;
}

.panel-knob::after {
  content: '';
  position: absolute;
  inset: 0.12rem;
  transform: rotate(var(--panel-knob-angle, 0deg));
  background: linear-gradient(to bottom, #d4ebec 0 25%, transparent 25%) center top / 2px 100% no-repeat;
  border-radius: 50%;
}

.panel-knob:hover {
  border-color: #a1b9c3;
  cursor: grab;
}

.panel-knob:active {
  cursor: grabbing;
}

.panel-switch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.34rem;
  min-block-size: 1.9rem;
  padding: 0 0.28rem;
  border: 1px solid #657f88;
  border-radius: 5px;
  background: linear-gradient(#2d4049, #23323c);
  box-shadow: 0 1px #111d25, inset 0 1px #ffffff17;
  font-size: 0.74rem !important;
  line-height: 1;
}

.panel-switch .panel-bilingual {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.13rem 0.3rem;
}

.panel-switch .panel-en {
  font-size: 0.75rem;
}

.panel-rocker {
  flex: none;
  position: relative;
  inline-size: 1.58rem;
  block-size: 0.85rem;
  border: 1px solid #738790;
  border-radius: 4px;
  background: #17242c;
}

.panel-rocker::before {
  content: '';
  position: absolute;
  inset: 0.07rem auto 0.07rem 0.07rem;
  inline-size: 0.55rem;
  border-radius: 2px;
  background: linear-gradient(#a9b8bc, #71828b);
}

.panel-switch[aria-checked="true"] .panel-rocker {
  background: #235846;
  border-color: #6ccd9e;
}

.panel-switch[aria-checked="true"] .panel-rocker::before {
  inset-inline-start: auto;
  inset-inline-end: 0.07rem;
  background: linear-gradient(#a6edd1, #70c4a5);
}

.panel-action-row,
.panel-jack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.panel-action {
  min-block-size: 2.18rem;
  padding: 0.3rem 0.56rem;
  border: 1px solid #69838c;
  border-radius: 6px;
  background: linear-gradient(#49606c, #304650 75%);
  box-shadow: inset 0 1px #ffffff28, 0 2px #101f29;
  font-size: 0.74rem !important;
  text-align: start;
}

.panel-action:hover {
  background: #4e6875;
}

.panel-action:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px #121d26;
}

.panel-terminals {
  padding: 0.68rem 1rem 0.84rem;
  min-inline-size: 0;
  background: linear-gradient(#17262e, #17232c);
  border-top: 1px solid #4b616c;
  box-shadow: inset 0 1px #08171f80;
}

.panel-jack {
  --panel-jack-color: #df936c;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.43rem;
  min-block-size: 2.5rem;
  padding: 0.32rem 0.51rem;
  border: 1px solid #526c78;
  border-radius: 6px;
  background: #263942;
  box-shadow: inset 0 1px #ffffff10;
  font-size: 0.75rem !important;
  text-align: start;
}

.panel-jack[data-medium="optical"] { --panel-jack-color: #e9cf86; }
.panel-jack[data-medium="mechanical"] { --panel-jack-color: #9abacb; }
.panel-jack[data-medium="thermal"] { --panel-jack-color: #e7a47e; }
.panel-jack[data-medium="magnetic"] { --panel-jack-color: #cfb0ed; }
.panel-jack[data-medium="acoustic"] { --panel-jack-color: #87cbce; }
.panel-jack[data-medium="data"] { --panel-jack-color: #96c6e9; }
.panel-jack.panel-jack-common { --panel-jack-color: #8795a2; }

.panel-jack-well {
  flex: none;
  inline-size: 1.04rem;
  aspect-ratio: 1;
  border: 3px solid var(--panel-jack-color);
  border-radius: 50%;
  background: #0d151d;
  box-shadow: 0 0 0 1px #18252a, inset 0 2px 2px #000a;
}

.panel-jack[data-medium="data"] .panel-jack-well,
.panel-jack[data-medium="mechanical"] .panel-jack-well {
  border-radius: 4px;
}

.panel-jack-connected .panel-jack-well {
  background: var(--panel-jack-color);
  box-shadow: 0 0 0 1px #16232b, inset 0 1px 3px #17293988;
}

.panel-jack-connected .panel-jack-well::after {
  content: '';
  display: block;
  inline-size: 0.29rem;
  aspect-ratio: 1;
  margin: 0.18rem auto;
  border-radius: 50%;
  background: #f8fafa;
}

.panel-jack:hover {
  border-color: #9ebec8;
}

.panel-jack[aria-pressed="true"] {
  border-color: var(--panel-accent);
  box-shadow: 0 0 0 1px var(--panel-accent), inset 0 1px #ffffff14;
  background: #244741;
}

@container instrument (min-width: 545px) {
  .panel-desk-split {
    grid-template-columns: minmax(0, 1.22fr) minmax(12rem, 1fr);
    align-items: start;
  }

  .panel-face-scope .panel-desk-split {
    grid-template-columns: minmax(0, 1.55fr) minmax(13.3rem, 1fr);
  }

  .panel-desk-split > .panel-controls {
    max-block-size: 28.8rem;
    overflow: auto;
    padding: 0 0.18rem 0.19rem 0;
    scrollbar-width: thin;
    scrollbar-color: #728b96 #1a2a32;
  }

  .panel-face-scope .panel-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.44rem;
  }
}

@container instrument (max-width: 350px) {
  .panel-face-header,
  .panel-terminals {
    padding-inline: 0.65rem;
  }

  .panel-desk {
    padding-inline: 0.65rem;
  }

  .panel-terminal-count {
    padding-inline: 0.42rem;
  }

  .panel-face-title {
    font-size: 0.93rem;
  }
}

.panel-control-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
}

.panel-control-summary::-webkit-details-marker {
  display: none;
}

.panel-control-summary::after {
  content: '+';
  flex: none;
  color: #a1c7ba;
  font: 1rem/1 var(--panel-font-mono);
  padding-inline: 0.16rem;
}

details[open] > .panel-control-summary::after {
  content: '−';
}

.panel-control-summary .panel-section-label {
  margin-block-end: 0;
}

details[open] > .panel-control-summary {
  margin-block-end: 0.62rem;
}

.panel-control-summary:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 3px;
}

.panel-metric-detail {
  padding: 0.52rem 0.62rem;
  border: 1px solid #405864;
  border-radius: 7px;
  background: #182831;
}
