/* Self-hosted so no page makes a third-party request. Both are variable fonts,
   so one file per subset covers every weight we use. See fonts/LICENSE.txt. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: oklch(22% 0.02 60);
  --ink-soft: oklch(46% 0.02 60);
  --paper: oklch(98% 0.006 85);
  --paper-raised: oklch(100% 0 0);
  --paper-band: oklch(96.5% 0.009 85);
  --line: oklch(89% 0.015 80);
  --rust: oklch(58% 0.14 40);
  --rust-deep: oklch(48% 0.15 40);
  --mustard: oklch(80% 0.12 85);
  --mustard-block: oklch(90% 0.07 85);
  --font-sans: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.5em; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}
/* The removed ad slots used to space these apart. */
main > section { margin-top: 2.75rem; }

a { color: var(--rust); }
a:hover { color: var(--ink); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}

.site-nav .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.logo-mark {
  display: grid;
  grid-template-columns: repeat(4, 4px);
  align-items: end;
  gap: 3px;
  padding: 5px;
  height: 26px;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  border-radius: 7px;
  flex: none;
  box-sizing: border-box;
}
.logo-mark span { border-radius: 1px; width: 100%; }
.logo-mark span:nth-child(1) { height: 40%; background: var(--rust); }
.logo-mark span:nth-child(2) { height: 75%; background: var(--ink); }
.logo-mark span:nth-child(3) { height: 55%; background: var(--mustard); }
.logo-mark span:nth-child(4) { height: 90%; background: var(--rust); }

.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:not(.logo) { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--rust-deep);
  font-weight: 700;
  border-bottom-color: var(--rust-deep);
}

.brand-stripe {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  padding: 0 1.5rem;
}
.brand-stripe > div { height: 100%; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-footer a { color: var(--ink-soft); margin: 0 0.5rem; }
.site-footer a:hover { color: var(--ink); }

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.btn-primary {
  background: var(--rust);
  color: var(--paper);
  border-color: var(--rust);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}
.card h2, .card h3 { font-size: 1.1rem; }
.card p { color: var(--ink-soft); }

/* Whole card is the target. Guide cards are a real <a> (so focus, middle-click
   and open-in-new-tab work); test cards keep their heading and get a real
   <button> stretched over the card instead. */
.card-clickable {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card-clickable h2, .card-clickable h3 { margin: 0; }
.card-clickable p { margin: 0; }
.card-clickable:hover {
  border-color: var(--ink);
  box-shadow: 0 8px 24px -16px oklch(22% 0.02 60 / 0.45);
}
.card-clickable:has(.card-hit:focus-visible),
.card-clickable:focus-visible {
  outline: 2px solid var(--rust-deep);
  outline-offset: 3px;
}

/* A still picture of what each tool plays, like dpt's mode previews. Decorative:
   the heading and copy beside it already say the same thing. */
.tool-preview {
  display: block;
  width: 100%;
  height: 56px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-band);
}
.tp-line,
.tp-line-ink,
.tp-line-thin,
.tp-tick { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tp-line { stroke: var(--rust); stroke-width: 2.5; }
.tp-line-ink { stroke: var(--ink); stroke-width: 2.5; }
.tp-line-thin { stroke: var(--rust); stroke-width: 1.5; }
.tp-tick { stroke: var(--paper-raised); stroke-width: 2.5; }
.tp-fill-rust { fill: var(--rust); }
.tp-fill-ink { fill: var(--ink); }
.tp-fill-mustard { fill: var(--mustard); }
.tp-box { fill: var(--paper-raised); stroke: var(--ink); stroke-width: 2; }
.tp-cone { fill: var(--mustard-block); stroke: var(--ink); stroke-width: 2; }
.tp-ring { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 4; }
.tp-dot { fill: var(--paper-raised); stroke: var(--ink-soft); stroke-width: 1.5; }
.tp-bracket,
.tp-stem,
.tp-divider { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-linecap: round; }
.tp-divider { stroke: var(--line); }
.tp-cross { fill: none; stroke: var(--rust); stroke-width: 3; stroke-linecap: round; }
.tp-slash { fill: none; stroke: var(--rust); stroke-width: 4; stroke-linecap: round; }
.tp-triangle { fill: var(--mustard-block); stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tp-noise-white,
.tp-noise-pink,
.tp-noise-brown { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.tp-noise-white { stroke: var(--ink-soft); }
.tp-noise-pink { stroke: var(--rust); }
.tp-noise-brown { stroke: var(--ink); }
.tp-label.tp-omega { font-size: 30px; }
.fc-dim { opacity: 0.35; }
.tp-label { fill: var(--ink); font-family: var(--font-display); font-size: 14px; font-weight: 700; }

/* Up to the section's index, above the heading: a page reached from a search
   result has no "back" into the site. */
.back-link { margin: 0 0 0.75rem; font-size: 0.95rem; }
.back-link a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.back-link a:hover { color: var(--rust); text-decoration: underline; }

.card-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}
.card-hit:focus { outline: none; }

.hero {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 1.5rem 0 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--mustard-block);
}
.hero-copy {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 3.5rem 2.5rem;
}
.hero-copy h1 { font-size: 2.6rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.hero-copy h1 .accent { color: var(--rust); }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-secondary-link { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; text-decoration: none; }
.hero-secondary-link:hover { color: var(--rust); border-color: var(--rust); }

.device-mockup-wrap {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.device-mockup {
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  padding: 1rem;
}
.device-screen {
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-band);
  border: 1px solid var(--line);
  /* The trace's own proportions, so a phone gets a smaller scope, not a squeezed one. */
  aspect-ratio: 400 / 220;
  position: relative;
}
/* Stretched to fill the screen at any width; the stroke stays one weight. */
.scope-trace { display: block; width: 100%; height: 100%; }
.tp-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tp-line-bold { fill: none; stroke: var(--rust); stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.device-screen .corner-label {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(20, 15, 10, 0.55);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
/* Where dpt's mockup has a strip of test colours, this one has level bars. */
.spectrum-strip { display: block; width: 100%; height: auto; margin-top: 0.75rem; }

/* Guide articles. All text shares one measure so left and right edges line up;
   a rem value rather than ch, since ch scales with each element's font size and
   would give every heading a different width. Wide content like the policy
   table opts out and uses the full column. */
.article { --measure: 40rem; }
.article > .back-link,
.article > h1,
.article > h2,
.article > p,
.article > ul,
.article > ol {
  max-width: var(--measure);
  margin-inline: auto;
}
.article > h2 {
  font-size: 1.4rem;
  line-height: 1.25;
  margin-block: 2.75rem 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.article > h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin-block: 0 0.85rem;
}
.article > p {
  margin-block: 0 1.2rem;
  text-wrap: pretty;
}
/* Lead paragraph */
.article > h1 + p {
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-block: 0 1.75rem;
}
.article > ul,
.article > ol {
  margin-block: 0 1.2rem;
  padding-left: 1.35rem;
}
.article li {
  margin-bottom: 0.55rem;
  text-wrap: pretty;
}
.article li::marker { color: var(--rust); }
.article a { text-underline-offset: 2px; }
.article .symptom-table { margin: 1.75rem 0 2rem; }
.article > p > small { color: var(--ink-soft); line-height: 1.5; display: inline-block; }

.symptom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.symptom-table th, .symptom-table td {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  text-align: left;
}
.symptom-table thead th { font-family: var(--font-display); background: var(--paper-raised); }
.symptom-table tbody tr:nth-child(even) { background: var(--paper-band); }
.symptom-table tbody tr:last-child td { border-bottom: none; }

/* A table cannot shrink below its min-content width. Rather than let one push
   the whole page into horizontal scroll, each sits in its own scroll box. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.symptom-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}
@media (max-width: 820px) {
  .picker-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

  /* The hero is the site's only two-column flex layout and never wrapped, so on
     a phone the copy and the mockup each took half the width — a headline
     breaking one word per line beside an ~80px sliver of device. Stacking puts
     the copy (and the Start Test button) first; the mockup is decorative and
     follows. The padding matters as much as the stacking: 2.5rem of side
     padding on a 390px screen left ~133px of text. */
  .hero { flex-direction: column; }
  .hero-copy { padding: 2.5rem 1.5rem; }
  .hero-copy h1 { font-size: 2rem; }
  .device-mockup-wrap { padding: 0 1.5rem 2rem; }
  .device-mockup { max-width: 100%; }

  /* The nav already wrapped, but the logo's margin-right:auto pushed the break
     so a single link was orphaned on its own line under the logo. Giving the
     logo a full row lets all four links wrap together as one group. */
  .site-nav { gap: 0.75rem 1.25rem; padding: 1rem 1.5rem; }
  .site-nav .logo { flex: 0 0 100%; margin-right: 0; }

  /* The 4-column table in the dead-vs-stuck guide was 417px wide against a
     399px viewport. Tightening the cells fits it on common phone widths so the
     scroll container never has to engage above ~320px. */
  .symptom-table th, .symptom-table td { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
}

.mode-preview {
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.fullscreen-stage {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  /* Swipe-to-exit fires on pointerup. If the browser claims the gesture for
     panning it sends pointercancel instead and the swipe never registers —
     which is precisely what happens on iOS, where the stage cannot go
     fullscreen and the document rubber-bands behind it. */
  touch-action: none;
}
.fullscreen-stage[hidden] { display: none; }

.corner-label {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-sans);
  transition: opacity 0.5s ease;
}

/* Sits low and centered so it clears the corners (backlight bleed) and the
   middle of the screen (the warning card and the flashing square). */
.mode-guidance {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 3rem));
  box-sizing: border-box;
  background: rgba(16, 12, 8, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.mode-guidance[hidden] { display: none; }
.mode-guidance.faded { opacity: 0; }
.mode-guidance a { color: #f0d81e; font-weight: 600; pointer-events: auto; }
.mode-guidance .guidance-recall {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ---- Tool pages ---------------------------------------------------------- */
/* The widget sits above the prose: the tool is why people arrive, the
   troubleshooting copy below is why the page ranks. */
.tool-stage {
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

/* Readout before controls: the spec requires the page to always show what it
   is playing, because "I hear nothing" is a valid result of a hardware test. */
.tool-readout {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.25rem;
}
.tool-readout-sub { color: var(--ink-soft); margin: 0 0 1.25rem; }
/* A microphone level: shown, never announced, so it is not the live readout.
   Tabular figures stop the line jittering sideways 23 times a second. */
.tool-level {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tool-state {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
}
.tool-state[data-playing="false"] { background: var(--paper-band); color: var(--ink-soft); }
.tool-state[data-playing="true"] { background: var(--mustard-block); color: var(--ink); }

.tool-controls { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
/* A grid stretches its items to the column, so a button placed here directly ran
   the full width of the stage. On a phone the transport still widens, below. */
.tool-controls > button { justify-self: start; }
.tool-control { display: grid; gap: 0.4rem; }
.tool-control label { font-weight: 600; font-size: 0.95rem; }

/* Every range input, wherever it sits, not just the ones inside .tool-control.
   Without touch-action:none the browser claims the drag, fires pointercancel,
   stops delivering pointermove, and the slider silently stops working on every
   touch device while behaving perfectly with a mouse. Scoping this to one
   wrapper class left the next slider written under any other selector exposed
   to a bug that has already hit the sibling site twice. */
input[type="range"] {
  touch-action: none;
}

.tool-control input[type="range"] {
  width: 100%;
  accent-color: var(--rust);
}
.tool-control input[type="number"],
.tool-control select {
  font: inherit;
  padding: 0.5rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
}
.tool-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.tool-transport {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.7rem 1.6rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--rust);
  color: var(--paper-raised);
  cursor: pointer;
  touch-action: manipulation;
}
.tool-transport:hover { background: var(--rust-deep); }
.tool-transport:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* The hearing test's result. Empty until a run finishes, and an empty element
   must take up no space at all — a gap under the controls that appears for no
   reason reads as a rendering fault. :empty is the whole mechanism. */
.tool-verdict {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--rust);
  background: var(--paper-band);
  font-weight: 600;
}
.tool-verdict:empty { display: none; }

.tool-note {
  background: var(--paper-band);
  border-left: 4px solid var(--mustard);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  color: var(--ink-soft);
}

.mic-meter {
  height: 1.5rem;
  margin: 1.25rem 0 0.75rem;
  border: 1px solid var(--line);
  background: var(--paper-band);
  overflow: hidden;
}
.mic-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--rust);
  /* No transition. The bar is redrawn ~23 times a second from real readings,
     and an eased width would show a level the microphone is not hearing. */
}
.mic-scope {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}
.mic-signal { margin: 0.75rem 0 0; color: var(--ink-soft); }

@media (max-width: 640px) {
  .tool-stage { padding: 1rem; }
  .tool-readout { font-size: 1.9rem; }
  .tool-transport { width: 100%; }
}

/* A hidden control inside a tool stage stays hidden whatever its class sets
   display to — .btn's inline-block would otherwise beat the attribute. */
.tool-stage [hidden] { display: none; }

/* The full check. A wizard, so it reads as one: where you are in the run, what
   is playing, the step with a picture of it, then the question in its own
   band. The readout still leads and still always names what is playing; it is
   smaller than on the tools because here the step, not the signal, is the
   subject. */
.fc-stage { padding: 0; overflow: hidden; }

.fc-stepper {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 1.1rem 1.5rem;
  list-style: none;
  counter-reset: fc-step;
  border-bottom: 1px solid var(--line);
}
.fc-stepper li {
  counter-increment: fc-step;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.fc-stepper li:last-child { flex: 0 0 auto; }
.fc-stepper li::before {
  content: counter(fc-step);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper-raised);
  font-size: 0.8rem;
}
.fc-stepper li:not(:last-child)::after {
  content: '';
  flex: 1 1 0;
  min-width: 0.5rem;
  height: 2px;
  background: var(--line);
}
.fc-stepper li[data-state="current"] { color: var(--ink); }
.fc-stepper li[data-state="current"]::before { background: var(--mustard); border-color: var(--ink); color: var(--ink); }
.fc-stepper li[data-state="pass"] { color: var(--ink); }
.fc-stepper li[data-state="pass"]::before { content: '✓'; background: var(--rust); border-color: var(--rust); color: var(--paper-raised); }
.fc-stepper li[data-state="pass"]::after { background: var(--rust); }
.fc-stepper li[data-state="fail"] { color: var(--ink); }
.fc-stepper li[data-state="fail"]::before { content: '!'; background: var(--ink); border-color: var(--ink); color: var(--paper-raised); }
.fc-stepper li[data-state="fail"]::after { background: var(--ink); }

.fc-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  background: var(--paper-band);
  border-bottom: 1px solid var(--line);
}
.fc-stage .tool-readout { font-size: 1.15rem; margin: 0; }

.fc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 1.5rem;
}
.fc-main { display: grid; gap: 0.85rem; align-content: start; }
.fc-main h2 { font-size: 1.8rem; line-height: 1.15; margin: 0; }
.fc-main p { margin: 0; }
.fc-main .tool-row { margin-top: 0.4rem; }
.fc-progress {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust-deep);
}

.fc-art {
  aspect-ratio: 320 / 200;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-band);
}
.fc-art svg { display: none; width: 100%; height: 100%; }
.fc-art[data-step="left"] [data-art="left"],
.fc-art[data-step="right"] [data-art="right"],
.fc-art[data-step="balance"] [data-art="balance"],
.fc-art[data-step="polarity"] [data-art="polarity"],
.fc-art[data-step="bass"] [data-art="bass"],
.fc-art[data-step="treble"] [data-art="treble"],
.fc-art[data-step="microphone"] [data-art="microphone"] { display: block; }
.fc-art-label { fill: var(--ink); font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.fc-track { stroke: var(--line); stroke-width: 4; stroke-dasharray: 2 8; stroke-linecap: round; }
.fc-grille { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

.fc-answer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--mustard-block);
  border-top: 2px solid var(--ink);
}
.fc-question { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.fc-answer-btn { min-width: 7rem; border-color: var(--ink); }

.fc-summary { padding: 1.75rem 1.5rem; }
.fc-summary h2 { margin: 0; }
.fc-results { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
/* Heading, then the meaning a failure carries, then the link. Wrapping puts a
   passed row's link at its right and a failed row's under its explanation. */
.fc-results li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  position: relative;
  padding: 0.9rem 0 0.9rem 2.6rem;
  border-bottom: 1px solid var(--line);
}
.fc-results li::before {
  position: absolute;
  left: 0;
  top: 0.8rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
}
.fc-results li[data-result="pass"]::before { content: '✓'; background: var(--rust); color: var(--paper-raised); }
.fc-results li[data-result="fail"]::before { content: '!'; background: var(--ink); color: var(--paper-raised); }
.fc-results li[data-result="skipped"]::before { content: '–'; border: 2px solid var(--line); color: var(--ink-soft); }
.fc-results li[data-result="fail"] strong { color: var(--rust-deep); }
.fc-results strong { flex: 1 1 auto; }
.fc-results p { flex: 1 1 100%; margin: 0; color: var(--ink-soft); }
.fc-results a { font-weight: 600; }

@media (max-width: 640px) {
  /* Six labels do not fit across a phone. The numbered dots stay, and
     "Step 2 of 6" under them says the same thing in words. */
  .fc-stepper { padding: 0.9rem 1rem; gap: 0.25rem; }
  .fc-stepper li { font-size: 0; gap: 0.25rem; }
  .fc-stepper li::before { font-size: 0.75rem; width: 1.5rem; height: 1.5rem; }
  .fc-status { padding: 0.6rem 1rem; }
  .fc-body { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem 1rem; }
  .fc-main h2 { font-size: 1.5rem; }
  .fc-answer { padding: 1rem; }
  .fc-answer .tool-row { width: 100%; }
  .fc-answer-btn { flex: 1 1 0; }
  .fc-summary { padding: 1.25rem 1rem; }
}

/* Four links and the logo do not fit across a phone. Wrapping keeps them all
   reachable without scrolling the page sideways. */
.site-nav { flex-wrap: wrap; row-gap: 0.5rem; }
.site-footer a { color: var(--ink-soft); }
