  /* ---------- Phosphor palettes ---------- */
  :root,
  :root[data-phosphor="amber"] {
    --fg: #ffb000;
    --dim: #b57a00;
    --faint: rgba(255, 176, 0, 0.16);
    --bg: #120a00;
    --glow: rgba(255, 176, 0, 0.55);
  }
  :root[data-phosphor="green"] {
    --fg: #39ff6a;
    --dim: #2fb554;
    --faint: rgba(57, 255, 106, 0.14);
    --bg: #020f05;
    --glow: rgba(57, 255, 106, 0.5);
  }
  :root[data-phosphor="white"] {
    --fg: #d9e8ff;
    --dim: #8fa0b8;
    --faint: rgba(217, 232, 255, 0.14);
    --bg: #05070a;
    --glow: rgba(190, 215, 255, 0.45);
  }

  :root { --term: "VT323", "Courier New", ui-monospace, monospace; }

  *, *::before, *::after { box-sizing: border-box; }

  html {
    -webkit-text-size-adjust: 100%;
    background: #030302;
    scrollbar-color: var(--dim) var(--bg);
  }

  body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--term);
    font-size: 1.375rem;
    line-height: 1.2;
    text-shadow: 0 0 2px var(--glow), 0 0 9px var(--glow);
  }

  ::selection { background: var(--fg); color: var(--bg); text-shadow: none; }

  :focus-visible { outline: 2px dashed var(--fg); outline-offset: 3px; }

  /* ---------- CRT overlays ---------- */
  body::before,
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
  }
  body::before {
    background: repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.24) 3px
    );
  }
  body::after {
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.6) 100%);
  }

  /* Monitor bezel: black frame with rounded screen corners */
  .bezel {
    position: fixed;
    inset: clamp(3px, 0.9vw, 12px);
    border-radius: clamp(14px, 3vw, 30px);
    box-shadow: 0 0 0 100vmax #030302, inset 0 0 70px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 110;
  }

  /* Slow refresh band */
  .roll {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 140px;
    background: linear-gradient(to bottom, transparent, var(--faint), transparent);
    opacity: 0.55;
    pointer-events: none;
    z-index: 99;
    animation: roll 9s linear infinite;
  }
  @keyframes roll {
    from { transform: translateY(-160px); }
    to   { transform: translateY(100vh); }
  }

  /* ---------- Screen ---------- */
  .screen {
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px clamp(18px, 4.5vw, 48px) 64px;
    animation: warmup 1.1s ease-out both;
  }

  @keyframes warmup {
    0%   { opacity: 0; filter: brightness(3) blur(3px); }
    35%  { opacity: 1; filter: brightness(1.8) blur(1.5px); }
    100% { opacity: 1; filter: none; }
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 6px 12px;
    background: var(--fg);
    color: var(--bg);
    text-shadow: none;
  }

  .brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
  .brand:focus-visible { outline: 2px dashed var(--bg); outline-offset: 4px; }

  /* JWA monogram: one shared <symbol>, drawn in the current text colour so it follows the phosphor */
  .logo-mark {
    display: block;
    height: 32px;
    width: auto;
    aspect-ratio: 150.97151 / 64.631889;
    fill: currentColor;
  }
  .logo-mark.small { height: 22px; }

  .brand-name { font-size: 1.5rem; }

  .phosphor { display: flex; align-items: center; gap: 6px; font-size: 1.125rem; }
  .phosphor button {
    padding: 0 8px;
    border: 2px solid var(--bg);
    background: transparent;
    color: var(--bg);
    font: inherit;
    cursor: pointer;
  }
  .phosphor button[aria-pressed="true"] { background: var(--bg); color: var(--fg); text-shadow: none; }
  .phosphor button:focus-visible { outline: 2px dashed var(--bg); outline-offset: 3px; }

  .statusline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 20px;
    margin: 14px 0 0;
    color: var(--dim);
  }
  .statusline strong { color: var(--fg); font-weight: 400; }

  /* ---------- Prompt lines ---------- */
  .prompt { margin: 44px 0 14px; font-size: 1.375rem; font-weight: 400; line-height: 1.2; }
  .prompt .path { color: var(--dim); }
  .first { margin-top: 30px; }

  .cursor {
    display: inline-block;
    width: 0.5em;
    height: 0.85em;
    margin-left: 4px;
    vertical-align: -0.06em;
    background: var(--fg);
    box-shadow: 0 0 8px var(--glow);
    animation: blink 1.1s steps(1) infinite;
  }
  @keyframes blink { 50% { opacity: 0; } }

  /* ---------- Hero ---------- */
  h1 {
    margin: 0;
    font-size: clamp(3.4rem, 15vw, 9.5rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-shadow: 0 0 3px var(--glow), 0 0 16px var(--glow), 0 0 40px var(--glow);
    overflow-wrap: anywhere;
    animation: glitch 8s infinite;
  }
  h1 .cursor { width: 0.42em; height: 0.72em; margin-left: 8px; }

  @keyframes glitch {
    0%, 91%, 100% { transform: none; }
    92% { transform: translateX(-5px) skewX(-5deg); text-shadow: 4px 0 rgba(255, 70, 70, 0.55), -4px 0 rgba(70, 200, 255, 0.55), 0 0 16px var(--glow); }
    93% { transform: translateX(6px); text-shadow: -4px 0 rgba(255, 70, 70, 0.55), 4px 0 rgba(70, 200, 255, 0.55), 0 0 16px var(--glow); }
    94% { transform: translateX(-2px) skewX(2deg); }
    95% { transform: none; }
  }

  .kind { margin: 16px 0 0; font-size: 1.625rem; }

  .lede {
    max-width: 62ch;
    margin: 14px 0 0;
    color: var(--dim);
    font-size: 1.375rem;
    line-height: 1.25;
  }

  .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-block;
    padding: 8px 18px 6px;
    border: 2px solid var(--fg);
    border-radius: 0;
    background: transparent;
    color: var(--fg);
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    text-decoration: none;
    text-shadow: inherit;
    cursor: pointer;
  }
  .btn:hover,
  .btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); text-shadow: none; }
  .btn[disabled] { opacity: 0.6; cursor: progress; }

  /* ---------- Instrument ---------- */
  .instrument {
    margin: 0;
    padding: 16px;
    border: 2px solid var(--fg);
    box-shadow: 0 0 14px var(--faint), inset 0 0 18px var(--faint);
  }

  .instrument-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 24px;
  }

  .display { min-width: 0; }

  /* Keep the display in view while scrolling through the controls (desktop, tall enough windows) */
  @media (min-width: 821px) and (min-height: 800px) {
    .instrument-grid { align-items: start; }
    .display { position: sticky; top: 24px; }
  }

  .readouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 8px;
  }
  .readouts dt { color: var(--dim); font-size: 1.125rem; }
  .readouts dd { margin: 0; font-size: 1.75rem; line-height: 1; white-space: nowrap; }

  .display svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 5px var(--glow));
  }

  .seg-off   { fill: var(--faint); }
  .seg-ghost { fill: none; stroke: var(--dim); stroke-width: 1.5; stroke-dasharray: 3 3; }
  .seg-lit   { fill: var(--fg); }
  .frame     { fill: none; stroke: var(--dim); stroke-width: 1.5; }
  .mark      { fill: var(--fg); }
  .lbl-k, .lbl-hz { fill: var(--fg); font-family: var(--term); text-anchor: middle; text-shadow: none; }
  .lbl-k  { font-size: 20px; }
  .lbl-hz { font-size: 16px; fill: var(--dim); }

  .playline {
    margin: 8px 0 0;
    min-height: 3.6em;
    font-size: 1.25rem;
    line-height: 1.2;
  }
  .playline span { display: block; }
  .playline .match { color: var(--dim); }

  .wave {
    display: block;
    width: 100%;
    height: 150px;
    margin-top: 12px;
    border: 2px solid var(--dim);
  }

  .controls { display: grid; align-content: start; gap: 22px; }

  fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

  legend, .ctl-label {
    display: block;
    padding: 0;
    margin: 0 0 4px;
    font-size: 1.375rem;
  }

  .hint { margin: 0 0 8px; color: var(--dim); font-size: 1.0625rem; line-height: 1.15; }

  .keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .keys label { position: relative; display: block; }
  .keys input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }
  .keys span {
    display: block;
    min-height: 44px;
    padding: 9px 0 0;
    border: 2px solid var(--fg);
    font-size: 1.5rem;
    line-height: 1;
    text-align: center;
    user-select: none;
  }
  .keys input:checked + span { background: var(--fg); color: var(--bg); text-shadow: none; }
  .keys input:focus-visible + span { outline: 2px dashed var(--fg); outline-offset: 3px; }

  .keys.oct,
  .keys.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .keys.chords { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .keys.chords span { font-size: 1.25rem; padding-top: 11px; }

  .fader-ends {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--dim);
    font-size: 1.125rem;
  }

  input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 36px;
    margin: 0;
    background:
      linear-gradient(var(--fg), var(--fg)) center / 100% 2px no-repeat,
      repeating-linear-gradient(90deg, var(--dim) 0 2px, transparent 2px 10%) center / 100% 16px no-repeat;
    cursor: ew-resize;
  }
  input[type="range"]::-webkit-slider-runnable-track { height: 36px; background: transparent; }
  input[type="range"]::-moz-range-track { height: 36px; background: transparent; }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 30px;
    margin-top: 3px;
    border: 0;
    border-radius: 0;
    background: var(--fg);
    box-shadow: 0 0 10px var(--glow);
  }
  input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 30px;
    border: 0;
    border-radius: 0;
    background: var(--fg);
    box-shadow: 0 0 10px var(--glow);
  }
  input[type="range"]:focus-visible { outline: 2px dashed var(--fg); outline-offset: 3px; }

  .audio-row { display: flex; flex-wrap: wrap; gap: 10px; }
  .audio-status { margin: 8px 0 0; color: var(--dim); font-size: 1.125rem; min-height: 1.2em; }

  .caption { margin: 18px 0 0; color: var(--dim); font-size: 1.125rem; }

  /* ---------- Spec ---------- */
  .spec { margin: 0; }
  .spec div {
    display: grid;
    grid-template-columns: 11ch minmax(0, 1fr);
    gap: 16px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--dim);
  }
  .spec dt { margin: 0; }
  .spec dd { margin: 0; max-width: 64ch; color: var(--dim); }
  .spec-note { margin: 12px 0 0; color: var(--dim); font-size: 1.125rem; }

  /* ---------- Signup ---------- */
  .signup { max-width: 640px; }
  .signup label { display: block; margin-bottom: 8px; }

  .field,
  .cmdrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    border: 2px solid var(--fg);
  }
  .field span { color: var(--dim); }

  .field input,
  .cmdrow input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--fg);
    caret-color: var(--fg);
    font: inherit;
    font-size: 1.5rem;
    text-shadow: inherit;
  }
  .field input::placeholder,
  .cmdrow input::placeholder { color: var(--dim); opacity: 0.8; }
  .field input:focus-visible,
  .cmdrow input:focus-visible { outline: none; }
  .field:focus-within,
  .cmdrow:focus-within { outline: 2px dashed var(--fg); outline-offset: 3px; }

  .signup .btn { margin-top: 12px; }
  .form-msg { min-height: 1.2em; margin: 12px 0 0; }
  .form-note { margin: 4px 0 0; color: var(--dim); font-size: 1.125rem; }

  /* ---------- Command line ---------- */
  .console { max-width: 760px; }
  .log {
    max-height: 20rem;
    overflow-y: auto;
    margin: 0 0 12px;
    padding: 0 4px 0 0;
  }
  .log div { white-space: pre-wrap; overflow-wrap: anywhere; }
  .log .echo { color: var(--dim); }
  .cmdrow label { color: var(--dim); white-space: nowrap; }

  /* ---------- Footer ---------- */
  footer {
    margin-top: 52px;
    padding-top: 10px;
    border-top: 2px solid var(--fg);
    color: var(--dim);
    font-size: 1.125rem;
  }
  footer p { margin: 0; }
  .legal { display: flex; align-items: center; gap: 12px; }
  .end { margin-top: 18px; color: var(--fg); font-size: 1.375rem; }

  /* ---------- Boot overlay ---------- */
  .boot-mark {
    display: block;
    width: clamp(170px, 40vw, 300px);
    height: auto;
    margin: 0 0 26px;
    fill: var(--fg);
    filter: drop-shadow(0 0 10px var(--glow));
    animation: mark-in 0.8s steps(14, end) both;
  }
  @keyframes mark-in {
    from { clip-path: inset(-24px 100% -24px -24px); }
    to   { clip-path: inset(-24px); }
  }

  #boot {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: 36px clamp(20px, 5vw, 48px);
    background: var(--bg);
    color: var(--fg);
    transition: opacity 0.35s ease;
  }
  #boot.done { opacity: 0; }
  #boot pre {
    margin: 0;
    font: inherit;
    font-size: clamp(1.1rem, 4.2vw, 1.5rem);
    line-height: 1.25;
    white-space: pre-wrap;
  }
  #boot p {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 36px;
    margin: 0;
    text-align: center;
    color: var(--dim);
    font-size: 1.125rem;
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 820px) {
    .instrument-grid { grid-template-columns: minmax(0, 1fr); }
    .keys { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  }

  @media (max-width: 520px) {
    body { font-size: 1.25rem; }
    .spec div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .readouts { grid-template-columns: auto auto auto; justify-content: space-between; gap: 8px; }
    .readouts dt { font-size: 1rem; }
    .readouts dd { font-size: 1.35rem; }
    .instrument { padding: 10px; }
    .brand-name { font-size: 1.25rem; }
    .wave { height: 120px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .screen { animation: none; }
    .cursor { animation: none; }
    .roll { display: none; }
    h1 { animation: none; }
    #boot { transition: none; }
    .boot-mark { animation: none; }
  }

/* =====================================================================
   Multi-page additions: navigation, landing page, about, product row
   ===================================================================== */

/* ---------- Navigation ---------- */
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
.menu a {
  display: inline-block;
  padding: 6px 16px 3px;
  border: 2px solid var(--fg);
  color: var(--fg);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  text-shadow: inherit;
}
.menu a:hover,
.menu a[aria-current="page"] { background: var(--fg); color: var(--bg); text-shadow: none; }

/* ---------- Landing hero ---------- */
.landing-hero { position: relative; }

.hero-mark {
  display: block;
  width: min(460px, 100%);
  height: auto;
  aspect-ratio: 150.97151 / 64.631889;
  margin: 22px 0 20px;
  fill: var(--fg);
  filter: drop-shadow(0 0 14px var(--glow));
}

.landing-hero h1 {
  font-size: clamp(2rem, 8.4vw, 5.4rem);
  line-height: 0.95;
  overflow-wrap: normal; /* never split ELECTROACOUSTICS, even if the font is slow to load */
}
.landing-hero h1 .cursor { width: 0.36em; height: 0.66em; }

.hero-wave {
  display: block;
  width: 100%;
  height: 84px;
  margin-top: 30px;
  border-top: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}

.about-text h2 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  font-weight: 400;
  line-height: 0.95;
  text-shadow: 0 0 3px var(--glow), 0 0 14px var(--glow);
}

.quote {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.7rem, 3.3vw, 2.2rem);
  line-height: 1.12;
}

.photo-fig { margin: 0; }

.photo {
  position: relative;
  isolation: isolate;
  background: var(--fg);
  border: 2px solid var(--fg);
  box-shadow: 0 0 14px var(--faint), inset 0 0 18px var(--faint);
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.12) brightness(1.55);
  mix-blend-mode: multiply;
}
/* original colours */
.photo.is-color { background: transparent; }
.photo.is-color img { filter: none; mix-blend-mode: normal; }

.photo-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 10px;
  color: var(--dim);
  font-size: 1.125rem;
}
.btn.small { padding: 4px 12px 2px; font-size: 1.125rem; }

/* ---------- Products list ---------- */
.product-row {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 22px;
  padding: 14px 18px 10px;
  border: 2px solid var(--fg);
  color: var(--fg);
  text-decoration: none;
  text-shadow: inherit;
  box-shadow: 0 0 14px var(--faint), inset 0 0 18px var(--faint);
}
.product-row .p-name { font-size: 1.9rem; line-height: 1; }
.product-row .p-desc { color: var(--dim); }
.product-row .p-status { color: var(--dim); font-size: 1.125rem; white-space: nowrap; }
.product-row .p-go { font-size: 1.5rem; white-space: nowrap; }
.product-row:hover,
.product-row:focus-visible { background: var(--fg); color: var(--bg); text-shadow: none; }
.product-row:hover .p-desc,
.product-row:hover .p-status,
.product-row:focus-visible .p-desc,
.product-row:focus-visible .p-status { color: var(--bg); }
.product-row:focus-visible { outline-offset: 5px; }

@media (max-width: 820px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .quote { max-width: 30ch; }
  .product-row { grid-template-columns: minmax(0, 1fr) auto; }
  .product-row .p-desc { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 520px) {
  .menu a { font-size: 1.25rem; padding: 5px 12px 2px; }
  .hero-wave { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wave { animation: none; }
}

/* =====================================================================
   Lab, About, research registry, hardware recordings, test program
   ===================================================================== */

/* ---------- Shared bits ---------- */
.section-note {
  max-width: 64ch;
  margin: -4px 0 16px;
  color: var(--dim);
  font-size: 1.125rem;
  line-height: 1.25;
}

.panel {
  padding: 16px 18px;
  border: 2px solid var(--fg);
  box-shadow: 0 0 14px var(--faint), inset 0 0 18px var(--faint);
}

h3 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.2;
}

/* Text for screen readers only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.registry-note { margin: 10px 0 0; }

/* Redaction bar: a visual block; the page carries a screen-reader label beside it */
.redact {
  display: inline-block;
  min-width: 7ch;
  padding: 0 4px;
  background: var(--dim);
  color: transparent;
  text-shadow: none;
  user-select: none;
}

/* Status tags used on Home, Lab and in the research registry */
.tag {
  display: inline-block;
  padding: 1px 7px 0;
  border: 1px solid var(--dim);
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: none;
}
.tag-done     { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.tag-active   { border-color: var(--fg); color: var(--fg); text-shadow: 0 0 6px var(--glow); }
.tag-test     { border-color: var(--fg); color: var(--fg); border-style: dashed; }
.tag-todo     { border-style: solid; }
.tag-planned  { border-style: dashed; }
.tag-research { border-style: dotted; }
.tag-classified { border-color: transparent; background: var(--dim); color: var(--bg); }

/* ---------- Navigation: five items ---------- */
.foot-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.foot-menu a { color: var(--dim); text-decoration: none; }
.foot-menu a:hover,
.foot-menu a[aria-current="page"] { color: var(--fg); }

@media (max-width: 520px) {
  .menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .menu a { text-align: center; padding: 6px 4px 3px; }
}

/* ---------- Home: hero subtitle and current project ---------- */
.landing-hero .kind {
  margin-top: 14px;
  font-size: clamp(1.35rem, 3.4vw, 2.2rem);
  letter-spacing: 0.14em;
  line-height: 1.15;
}
.landing-hero .hero-mark { width: min(380px, 100%); }

.project { position: relative; }
.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
}
.project-name {
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 0.9;
  color: var(--fg);
  text-decoration: none;
  text-shadow: 0 0 3px var(--glow), 0 0 14px var(--glow);
}
.project-name:hover { text-decoration: underline; text-underline-offset: 6px; }
.project-desc { margin: 10px 0 0; font-size: 1.5rem; }
.project .lede { margin-top: 6px; }
.project .hero-wave { height: 70px; margin-top: 16px; border-color: var(--dim); }

.readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 14px 0 0;
}
.readout div { min-width: 0; }
.readout dt { color: var(--dim); font-size: 1rem; }
.readout dd { margin: 0; font-size: 1.375rem; line-height: 1.1; }

/* ---------- Research registry ---------- */
.registry { margin: 0; padding: 0; list-style: none; border-top: 1px dashed var(--dim); }
.registry li {
  display: grid;
  grid-template-columns: 11ch 15ch minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 16px;
  padding: 7px 0 5px;
  border-bottom: 1px dashed var(--dim);
  color: var(--dim);
}
.registry .code { color: var(--fg); font-size: 1.5rem; line-height: 1; }
.registry a.code { text-decoration: none; }
.registry a.code:hover { text-decoration: underline; text-underline-offset: 4px; }
.registry .area { font-size: 1.125rem; }
.registry.compact li { padding: 5px 0 3px; }
.registry.compact .code { font-size: 1.3rem; }

/* ---------- Signup: test program checkbox ---------- */
.signup .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0;
  cursor: pointer;
}
.check input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.check input:checked {
  background: var(--fg);
  box-shadow: inset 0 0 0 3px var(--bg), 0 0 8px var(--glow);
}
.check input:focus-visible { outline: 2px dashed var(--fg); outline-offset: 3px; }

/* ---------- Lab ---------- */
.lab-top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 22px 32px;
  align-items: start;
}
.lab-top .spec div { grid-template-columns: 12ch minmax(0, 1fr); }
.checklist-count { margin: 0; color: var(--dim); font-size: 1.125rem; }
.checklist-count strong { color: var(--fg); font-weight: 400; font-size: 2.6rem; line-height: 1; display: block; text-shadow: 0 0 10px var(--glow); }

.tracks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.track h3 { margin-bottom: 10px; }
.track h3 .count { color: var(--dim); }
.track ul { margin: 0; padding: 0; list-style: none; }
.track li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 8px 0 7px;
  border-top: 1px dashed var(--dim);
  line-height: 1.15;
}
.track li .tag { justify-self: start; }
.track li .what { font-size: 1.25rem; }

.devlog { margin: 0; padding: 0; list-style: none; }
.entry {
  display: grid;
  grid-template-columns: 11ch minmax(0, 1fr);
  gap: 4px 18px;
  padding: 12px 0 10px;
  border-top: 1px dashed var(--dim);
}
.entry:last-child { border-bottom: 1px dashed var(--dim); }
.entry-id { color: var(--dim); }
.entry-id b { display: block; color: var(--fg); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.entry-id time { display: block; font-size: 1rem; }
.entry h3 { margin-bottom: 4px; }
.entry p { margin: 0; max-width: 66ch; color: var(--dim); line-height: 1.25; }
.entry p + p { margin-top: 6px; }
.entry a { color: var(--fg); }

.plates {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.plates .plate-main { grid-row: 1 / span 2; }
.plate-label { color: var(--fg); }
.plate-empty {
  position: relative;
  display: grid;
  place-content: center;
  gap: 4px;
  min-height: 150px;
  height: 100%;
  margin: 0;
  padding: 16px;
  border: 2px dashed var(--dim);
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--faint) 10px 11px);
  color: var(--dim);
  text-align: center;
}
.plate-empty::before,
.plate-empty::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--fg);
}
.plate-empty::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.plate-empty::after { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }
.plate-empty b { color: var(--fg); font-weight: 400; font-size: 1.375rem; }

.tnotes { display: grid; gap: 16px; }
.tnote h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 8px; }
.tnote p { margin: 0; max-width: 70ch; color: var(--dim); line-height: 1.25; }
.tnote p + p { margin-top: 8px; }
.tnote strong { color: var(--fg); font-weight: 400; }
.tnote code { color: var(--fg); font-family: inherit; }
.tnote pre {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 2px solid var(--dim);
  color: var(--fg);
  font: inherit;
  font-size: 1.125rem;
  line-height: 1.25;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- Hardware recordings ---------- */
.recordings {
  padding: 14px 16px 16px;
  border: 2px solid var(--fg);
  box-shadow: 0 0 14px var(--faint), inset 0 0 18px var(--faint);
}
.rec-monitor {
  display: block;
  width: 100%;
  height: 92px;
  margin: 0 0 14px;
  border: 2px solid var(--dim);
}
.rec-empty-title { margin: 0; font-size: 1.375rem; }
.rec-empty-text { margin: 4px 0 12px; max-width: 62ch; color: var(--dim); font-size: 1.125rem; }
.rec-slots { margin: 0; padding: 0; list-style: none; }
.rec-slots li {
  display: grid;
  grid-template-columns: 9ch 7ch minmax(0, 1fr);
  gap: 12px;
  padding: 6px 0 4px;
  border-top: 1px dashed var(--dim);
  color: var(--dim);
  opacity: 0.75;
}

.takes { margin: 0; padding: 0; list-style: none; }
.take { padding: 12px 0 10px; border-top: 1px dashed var(--dim); }
.take:first-child { border-top: 0; padding-top: 0; }
.take-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 14px;
}
.take-no { color: var(--dim); }
.take-title { font-size: 1.375rem; line-height: 1.15; }
.take-time { color: var(--dim); white-space: nowrap; }
.take.is-playing .take-no,
.take.is-playing .take-time { color: var(--fg); }
.take-meta,
.take-notes { margin: 4px 0 0; max-width: 72ch; color: var(--dim); font-size: 1.125rem; line-height: 1.2; }
.take-ctl { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 4px; }
.take-ab { display: inline-flex; gap: 6px; }
/* plain line for the seek bar (the faders keep their tick marks) */
input[type="range"].take-seek { height: 26px; background: linear-gradient(var(--dim), var(--dim)) center / 100% 2px no-repeat; }
input[type="range"].take-seek::-webkit-slider-runnable-track { height: 26px; }
input[type="range"].take-seek::-moz-range-track { height: 26px; }
input[type="range"].take-seek::-webkit-slider-thumb { width: 10px; height: 20px; margin-top: 3px; }
input[type="range"].take-seek::-moz-range-thumb { width: 10px; height: 20px; }
.take-status { margin: 4px 0 0; min-height: 0; font-size: 1.125rem; }
.take.is-broken .take-status { color: var(--fg); }

/* ---------- About ---------- */
.about-intro { max-width: 60ch; margin: 18px 0 0; font-size: 1.625rem; line-height: 1.2; }
.focus div { grid-template-columns: 19ch minmax(0, 1fr); }
.focus dt { font-size: 1.375rem; }
.contact-lines div { grid-template-columns: 10ch minmax(0, 1fr); }
.contact-lines a { color: var(--fg); }
.pending { color: var(--dim); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tracks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .lab-top { grid-template-columns: minmax(0, 1fr); }
  .plates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plates .plate-main { grid-column: 1 / -1; grid-row: auto; }
  .registry li { grid-template-columns: 9ch minmax(0, 1fr); }
  .registry .area { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .readout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-id b { display: inline; margin-right: 10px; }
  .entry-id time { display: inline; }
  .plates { grid-template-columns: minmax(0, 1fr); }
  .focus div,
  .contact-lines div { grid-template-columns: minmax(0, 1fr); }
  .take-head { grid-template-columns: auto minmax(0, 1fr); }
  .take-time { grid-column: 1 / -1; }
  .rec-slots li { grid-template-columns: 8ch 6ch minmax(0, 1fr); }
}

/* Links inside running text */
main p a,
main dd a,
main .what a { color: var(--fg); text-underline-offset: 3px; }
main p a:hover,
main dd a:hover,
main .what a:hover { background: var(--fg); color: var(--bg); text-shadow: none; text-decoration: none; }

/* Sub-headings that use the prompt look */
h3.prompt { margin: 36px 0 12px; }

/* ---------- Lab: PCB viewer and prototype video ---------- */
.pcb-view { position: relative; margin: 0; }
.pcb-stage {
  position: relative;
  width: 100%;
  height: clamp(320px, 56vw, 560px);
  border: 2px solid var(--fg);
  background:
    radial-gradient(ellipse at center, var(--faint) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 31px, var(--faint) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--faint) 31px 32px),
    var(--bg);
  box-shadow: 0 0 14px var(--faint), inset 0 0 18px var(--faint);
  cursor: grab;
  touch-action: pan-y;
}
.pcb-stage:active { cursor: grabbing; }
.pcb-stage canvas { display: block; width: 100%; height: 100%; }
.pcb-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--fg); font-size: 1.25rem; }
.pcb-hud {
  position: absolute; left: 10px; right: 10px; top: 8px;
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--dim); font-size: 1rem; pointer-events: none;
}
.plates .plate-video { margin: 0; grid-row: 1 / span 2; }
.video-frame video { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #000; }
