/*
 * Editorial instrument panels.
 *
 * The article owns the surrounding canvas, typography, and bronze accent. The
 * diagrams keep a small amount of console language for measurements, while the
 * frame, labels, controls, and spacing follow the marketing site.
 */
:root {
  --panel: #e4e4e0;
  --panel-2: rgba(1, 1, 1, 0.045);
  --panel-edge: rgba(1, 1, 1, 0.24);
}

.inst {
  --text: #010101;
  --text-2: rgba(1, 1, 1, 0.84);
  --text-3: rgba(1, 1, 1, 0.62);
  --line: rgba(1, 1, 1, 0.22);
  --line-2: rgba(1, 1, 1, 0.11);
  --silver: #5c626a;
  --silver-fill: rgba(70, 76, 84, 0.16);
  --gold: #7c5634;
  --bronze: #7c5634;
  --rain-1: rgba(124, 86, 52, 0.8);
  --rain-2: rgba(150, 65, 34, 0.94);
  --cloud: rgba(64, 70, 78, 0.38);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  color: var(--text-2);
}

.inst::before {
  position: absolute;
  z-index: 3;
  top: -1px;
  left: -1px;
  width: 5rem;
  height: 2px;
  background: var(--bronze);
  content: "";
  pointer-events: none;
}

.inst :focus-visible {
  outline: 1px solid var(--bronze);
  outline-offset: 3px;
}

.inst-head {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.inst-head .t {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inst-head .chips {
  display: flex;
  gap: 8px;
}

.inst-head .clock {
  color: var(--text);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0;
  white-space: nowrap;
}

.chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip[data-tone="degraded"] {
  border-color: var(--bronze);
  color: var(--bronze);
}

.chip[data-tone="down"] {
  border-color: var(--bronze);
  background: var(--bronze);
  color: var(--panel);
}

.inst-stage {
  position: relative;
  background: rgba(255, 255, 255, 0.18);
}

.inst-stage canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.inst-stage svg {
  position: relative;
  display: block;
  width: 100%;
}

.inst svg {
  fill: var(--text-2);
}

.inst svg .m {
  font: 400 12px var(--mono);
  font-variant-numeric: tabular-nums;
}

.inst svg .mc {
  font: 500 11.5px var(--mono);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.inst svg .lb {
  fill: var(--text-2);
  font: 500 13px var(--sans);
}

.inst svg .eb {
  fill: var(--text-3);
  font: 600 11px var(--sans);
  letter-spacing: 0.18em;
}

.inst svg .halo {
  stroke: var(--panel);
  stroke-width: 4;
  paint-order: stroke;
}

.inst svg [role="slider"] {
  outline: none;
}

.inst svg [role="slider"] .ring {
  display: none;
}

.inst svg [role="slider"]:focus-visible .ring {
  display: inline;
}

.inst-ctl {
  display: flex;
  min-height: 50px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font: 500 11.5px/1.35 var(--sans);
  letter-spacing: 0.025em;
}

.inst-ctl .note,
.inst-ctl .read {
  white-space: nowrap;
}

.inst-ctl .note {
  color: var(--text-3);
}

.inst-ctl .read {
  margin-left: auto;
  color: var(--text);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.inst .btn {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 600 11.5px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  transition:
    background-color 150ms cubic-bezier(0.2, 0, 0, 1),
    border-color 150ms cubic-bezier(0.2, 0, 0, 1),
    color 150ms cubic-bezier(0.2, 0, 0, 1);
}

.inst .btn:hover,
.inst .btn[aria-pressed="true"] {
  border-color: var(--bronze);
  background: var(--bronze);
  color: var(--panel);
}

.inst .btn:disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--text-3);
  opacity: 1;
}

.inst .seg {
  display: inline-flex;
}

.inst .seg .btn + .btn {
  margin-left: -1px;
}

.fig figcaption {
  max-width: 44rem;
  margin-top: 14px;
  color: rgba(1, 1, 1, 0.72);
  font-size: 14px;
  line-height: 1.55;
}

.fig figcaption .n {
  margin-right: 8px;
  color: var(--bronze);
  font: 700 10.5px var(--sans);
  letter-spacing: 0.12em;
}

@media (max-width: 520px) {
  .inst-head {
    min-height: 42px;
    padding-inline: 12px;
  }

  .inst-head .clock {
    display: none;
  }

  .inst-ctl {
    padding-inline: 10px;
  }

  .inst-ctl .read {
    width: 100%;
    margin-left: 0;
  }

  .inst svg .m {
    font-size: 11px;
  }

  .inst svg .lb {
    font-size: 12px;
  }

  .inst svg .eb {
    font-size: 10px;
  }

  .fig figcaption {
    font-size: 13px;
  }
}
