.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desk-lab-page {
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --paper: #121418;
  --paper-2: #1b1f27;
  --paper-3: #242a34;
  --ink: #e8edf4;
  --ink-soft: #c5ccd8;
  --muted: #9aa3b2;
  --line: #2c3340;
  --line-hot: #f0b429;
  --copper: #8eb6ff;
  --copper-deep: #b9d2ff;
  --power: #f0b429;
  --video: #6aa7ff;
  --usbc: #3dcec3;
  --usb: #9aa3b2;
  --net: #4caf7a;
  --audio: #c792ea;
  --hot: #ff8a4c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  --max: 1240px;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(240, 180, 41, 0.08), transparent 50%),
    radial-gradient(800px 380px at 100% 0%, rgba(106, 167, 255, 0.07), transparent 46%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.desk-lab-page .wrap {
  width: min(var(--max), calc(100% - 2rem));
}

.desk-lab-page .hero {
  padding: 2rem 0 1.2rem;
}

.desk-lab-page h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  letter-spacing: -0.03em;
}

.desk-lab-page .lede {
  max-width: 46rem;
  margin-bottom: 0.7rem;
  color: var(--ink-soft);
}

.desk-lab-page a {
  color: var(--copper-deep);
}

.desk-lab-page a:hover {
  color: var(--copper);
}

.desk-lab-page .site-header {
  background: rgba(18, 20, 24, 0.9);
}

.desk-lab-page .site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.desk-lab-page .nav-links a,
.desk-lab-page .nav-toggle,
.desk-lab-page .brand {
  color: var(--ink-soft);
}

.desk-lab-page .nav-links a:hover,
.desk-lab-page .nav-toggle:hover,
.desk-lab-page .brand:hover,
.desk-lab-page .nav-links a[aria-current="page"] {
  color: var(--ink);
}

.desk-lab-page .button-primary {
  background: #e8edf4;
  color: #121418;
}

.desk-lab-page .button-primary:hover {
  background: #fff;
  color: #121418;
}

.desk-lab-page .button-ghost {
  color: var(--ink);
  border-color: #4a5260;
}

.desk-lab-page .button-ghost:hover {
  border-color: var(--ink);
}

.desk-lab-page .site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.desk-lab-page .section {
  padding-top: 0.4rem;
  padding-bottom: 2.4rem;
}

.lab-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.lab-card,
.lab-stage,
.lab-detail {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.lab-card,
.lab-detail {
  padding: 1rem 1rem 1.1rem;
}

.lab-card h2,
.lab-detail h2 {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 1.05rem;
}

.lab-card legend,
.detail-kicker,
.coach-kicker,
.lab-card .eyebrow-mini {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.picker-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.picker-list label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-3);
  cursor: pointer;
  font-size: 0.95rem;
}

.picker-list input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--power);
}

.lab-card + .lab-card {
  margin-top: 1rem;
}

.playbook-list {
  display: grid;
  gap: 0.45rem;
}

.playbook-btn {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-3);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.playbook-btn strong {
  font-size: 0.95rem;
}

.playbook-btn span,
.playbook-btn em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.playbook-btn:hover:not(:disabled),
.playbook-btn.is-active {
  border-color: var(--line-hot);
  box-shadow: inset 0 0 0 1px var(--line-hot);
}

.playbook-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lab-stage {
  padding: 0.85rem;
}

.coach {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--power);
  border-radius: 12px;
  background: #221c12;
}

.coach-text {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.coach-ask {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.desk-frame {
  overflow: auto;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #171b22 0%, #14181e 100%);
}

.desk-svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.desk-svg .wall {
  fill: #161a21;
}

.desk-svg .desk-top {
  fill: #2a241c;
  stroke: #3d3428;
  stroke-width: 2;
}

.desk-svg .desk-edge {
  fill: #1d1914;
}

.desk-unit {
  cursor: pointer;
}

.desk-unit .body,
.desk-unit .screen,
.desk-unit .bezel,
.desk-unit .lid,
.desk-unit .base {
  stroke: #5b6576;
  stroke-width: 1.5;
}

.desk-unit .body {
  fill: #2b313c;
}

.desk-unit .screen {
  fill: #0d1117;
}

.desk-unit .bezel,
.desk-unit .lid {
  fill: #3a4250;
}

.desk-unit .base {
  fill: #343b48;
}

.desk-unit .label,
.desk-svg .cable-label {
  fill: #e8edf4;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.desk-unit .sublabel {
  fill: #9aa3b2;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
}

.desk-unit.is-selected .body,
.desk-unit.is-selected .bezel,
.desk-unit.is-selected .lid,
.desk-unit.is-selected .base {
  stroke: #f0b429;
  stroke-width: 2.4;
}

.desk-unit.is-absent,
.cable.is-absent {
  display: none;
}

.port-chip {
  fill: #121418;
  stroke: #6a7384;
  stroke-width: 1;
}

.port-chip.is-hot,
.io-port.is-hot,
.port-row.is-hot {
  stroke: var(--power);
}

.port-mark {
  cursor: pointer;
}

.port-mark.is-hot .port-chip,
.cable.is-hot path {
  stroke: #f0b429;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 6px rgba(240, 180, 41, 0.55));
}

.port-mark.is-selected .port-chip,
.io-port.is-selected {
  fill: #3a2d12;
  stroke: #ffd36a;
}

.cable path {
  fill: none;
  stroke: #6a7384;
  stroke-width: 2;
  stroke-dasharray: 5 6;
}

.kind-power { --kind: var(--power); }
.kind-video { --kind: var(--video); }
.kind-usbc { --kind: var(--usbc); }
.kind-usb { --kind: var(--usb); }
.kind-net { --kind: var(--net); }
.kind-audio { --kind: var(--audio); }

.io-plate {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0.85rem;
}

.io-port {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--kind, var(--line));
  border-radius: 8px;
  background: #151920;
  color: var(--ink);
  font: 650 0.78rem/1.2 var(--mono);
  cursor: pointer;
}

.io-port abbr {
  text-decoration: none;
}

.port-list {
  display: grid;
  gap: 0.4rem;
}

.port-row {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--kind, var(--line));
  border-radius: 10px;
  background: #151920;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.port-row.is-selected,
.port-row.is-hot {
  border-color: var(--kind);
}

.port-kind {
  color: var(--kind);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.port-label {
  font-weight: 700;
}

.port-ticket,
.say-line,
.playbook-steps {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.say-line {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  background: #221c12;
  color: var(--ink);
}

.playbook-steps {
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
}

.playbook-steps li + li {
  margin-top: 0.3rem;
}

.lab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.copy-status {
  color: var(--net);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.lab-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1080px) {
  .lab-shell {
    grid-template-columns: 1fr;
  }

  .lab-card + .lab-card {
    margin-top: 0;
  }

  .lab-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

@media (max-width: 720px) {
  .lab-controls {
    grid-template-columns: 1fr;
  }

  .desk-svg {
    min-width: 640px;
  }
}
