:root {
  --bg: #202020;
  --fg: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #6cf;
  --warn: #fb6;
  --err: #f66;
  --gray-mid: #808080;
  --surface: #2a2a2a;
  --border: #3a3a3a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  padding: 2rem 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.screen.active {
  display: block;
}

/* On test screen, take over the viewport */
#screen-test.active {
  display: flex;
  max-width: none;
  padding: 0;
  background: var(--gray-mid);
  height: 100vh;
  width: 100vw;
  align-items: center;
  justify-content: center;
  /* No pinch-zoom / pan during the stimulus screen. Use touch-action
     rather than maximum-scale on the viewport meta — touch-action only
     locks the stimulus, leaving pinch-zoom available everywhere else
     for accessibility. */
  touch-action: none;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 500;
}

p { margin: 0.5rem 0; }

.tagline {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.caption {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 1.5rem;
}

#campbell-robson {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #888;
  image-rendering: auto;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

button {
  font: inherit;
  padding: 0.85rem 1.25rem;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  /* Remove the 300 ms iOS tap-delay on all primary controls. */
  touch-action: manipulation;
}

button:hover { background: #333; }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button.primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
button.primary:hover { background: #8df; }

button.secondary {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
button.secondary:hover { background: rgba(102, 204, 255, 0.08); }

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}
.disclaimer summary { cursor: pointer; color: var(--fg); }
.disclaimer p { margin: 0.5rem 0; }
.disclaimer strong { color: var(--warn); }

/* Calibration & test step layout */
.step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step h2 { margin-bottom: 0; }

.step .instructions {
  color: var(--muted);
}

.step .field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step input[type="range"] {
  width: 100%;
  /* Enforce a 44 px-tall tap surface for the slider (touch target),
     even though the visual thumb stays small. */
  min-height: 44px;
  touch-action: manipulation;
}

.progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}

.value-display {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--accent);
  font-size: 1.1rem;
}

.calib-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.9rem;
}
.calib-summary dt { color: var(--muted); }
.calib-summary dd { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* Test response area */
.test-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stimulus-canvas {
  background: var(--gray-mid);
  display: block;
  touch-action: none;
}

.test-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #000;
}

.test-corner {
  position: absolute;
  top: 0.75rem;
  font-size: 0.85rem;
  color: #444;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.test-corner.left { left: 0.75rem; }
.test-corner.right { right: 0.75rem; pointer-events: auto; }
.test-corner button {
  background: rgba(0,0,0,0.15);
  border-color: #444;
  color: #000;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  /* Tap-target floor for the test-screen Stop button. */
  min-height: 44px;
  min-width: 44px;
}

.tap-zones {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 40%;
  display: flex;
  pointer-events: auto;
}
.tap-zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(0,0,0,0.25);
  font-size: 3rem;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* Kill the 300 ms tap delay so left/right responses are crisp. */
  touch-action: manipulation;
}
.tap-zone:active { background: rgba(0,0,0,0.05); }
.tap-zone.left { border-right: 1px solid rgba(0,0,0,0.1); }

.fixation {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000;
  opacity: 0.6;
}

/* Result page */
.result-summary {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.result-summary .big {
  font-size: 2.5rem;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--accent);
}
.result-summary .small { color: var(--muted); font-size: 0.9rem; }

#result-chart {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  border-radius: 8px;
  margin: 1rem 0;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.history-list .meta { color: var(--muted); font-size: 0.9rem; }

/* Stripe pattern for gamma calibration */
.gamma-stripes {
  background-image: repeating-linear-gradient(
    0deg,
    #000 0,
    #000 1px,
    #fff 1px,
    #fff 2px
  );
  image-rendering: pixelated;
}

/* Card outline for calibration */
.card-rect {
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  position: relative;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  /* Without this, dragging on a touchscreen scrolls the page instead
     of resizing the card. */
  touch-action: none;
}
.card-rect::after {
  content: "Drag the right edge →";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 0.85rem;
  pointer-events: none;
}

.card-handle {
  position: absolute;
  right: -8px;
  top: 0;
  width: 16px;
  height: 100%;
  cursor: ew-resize;
  background: rgba(0,0,0,0.0);
}

/* Blind spot stage — must span the full viewport so the dot can start well
   outside the blind spot (~13.5 deg eccentricity). The negative-margin
   trick lets the stage break out of the .screen max-width container. */
.blindspot-stage {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 280px;
  background: #fff;
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 1rem;
  touch-action: none;
}
.blindspot-fix {
  position: absolute;
  top: 50%; left: 4vw;
  transform: translate(-50%, -50%);
  font-family: ui-monospace, monospace;
  font-size: 2rem;
  font-weight: 600;
  color: #000;
}
.blindspot-dot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c33;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}
.blindspot-side-toggle {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Gamma stage */
.gamma-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}
.gamma-half { display: block; height: 100%; }

/* Adaptation screen */
.adapt-overlay {
  position: fixed;
  inset: 0;
  background: var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.adapt-info {
  text-align: center;
  color: #000;
}
.adapt-info .count {
  font-family: ui-monospace, monospace;
  font-size: 3.5rem;
  font-weight: 300;
}
.adapt-fix {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #000;
  opacity: 0.6;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.error-banner {
  padding: 0.75rem 1rem;
  background: rgba(255, 102, 102, 0.1);
  border: 1px solid var(--err);
  color: var(--err);
  border-radius: 6px;
  margin: 0.5rem 0;
}

.warn-banner {
  padding: 0.75rem 1rem;
  background: rgba(255, 187, 102, 0.1);
  border: 1px solid var(--warn);
  color: var(--warn);
  border-radius: 6px;
  margin: 0.5rem 0;
}

/* Results page: interpretation styling */
.interpretation {
  padding: 1rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  margin: 1rem 0;
}
.interpretation p { margin: 0; }

table.per-freq {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.94rem;
}
table.per-freq th, table.per-freq td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
table.per-freq th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cat-below-typical { color: var(--err); }
.cat-lower-typical { color: var(--warn); }
.cat-within-typical { color: var(--fg); }
.cat-above-typical { color: var(--accent); }

.band-explainers {
  display: grid;
  gap: 0.75rem;
  margin: 0.5rem 0 1.5rem;
}
.band-row {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: 6px;
  border-left: 3px solid var(--border);
}
.band-row h4 { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 600; }
.band-row p { margin: 0.25rem 0; font-size: 0.92rem; }
.band-row .band-points { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.85rem; }
.band-row.band-reduced { border-left-color: var(--err); }
.band-row.band-low-normal { border-left-color: var(--warn); }
.band-row.band-ok { border-left-color: var(--accent); }

ul.explainer {
  padding-left: 1.25rem;
  font-size: 0.94rem;
}
ul.explainer li { margin: 0.4rem 0; }

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--fg);
}

@media (min-width: 600px) {
  .actions { flex-direction: row; }
  .actions button { flex: 1; }
}

/* T303 — shared-result viewing affordances */
.shared-result-banner .link-inline {
  background: none; border: 0; padding: 0; margin-left: 0.4rem;
  color: var(--warn); text-decoration: underline; cursor: pointer;
  font: inherit;
}
.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--surface); color: var(--fg);
  padding: 0.6rem 1rem; border-radius: 6px; border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); font-size: 0.95rem; z-index: 1000;
}
.toast[hidden] { display: none; }

/* Print-header — injected by results.js, hidden on screen, shown in print.
   Keeps brand + URL + test date at the top of the printed page. */
.print-header { display: none; }

/* Print styles — used by the PDF download (window.print) and by users
   hitting Cmd+P on the results screen. Goal: single Letter page, no chrome,
   ink-economical black/white with category color cues. */
@media print {
  @page { size: Letter; margin: 0.5in; }
  html, body { background: #fff !important; color: #000 !important; }
  body { font-size: 10pt; line-height: 1.35; margin: 0 !important; padding: 0 !important; }

  /* Suppress every non-results section + non-essential affordance. The
     INCLUDE list (per T304): print-header, AULCSF/big number, interpretation
     paragraph, CSF chart, per-frequency table, calibration block. Everything
     else (band-explainers, ul.explainer, shared-result-banner, warn-banner,
     buttons, disclaimer, footer, modals, analytics banners, privacy strip,
     toasts) is suppressed to fit a single page. */
  .no-print, .no-screenshot, .disclaimer, .test-corner, .tap-zones,
  #screen-landing, #screen-calibrate, #screen-test,
  .app-footer, .site-footer, .privacy-strip, .privacy-modal,
  .analytics-banner, .toast, .modal, .modal-backdrop,
  .shared-result-banner, .error-banner, .notify-card,
  .band-explainers, ul.explainer,
  button, .actions { display: none !important; }

  /* Keep the dropped-frequencies warn-banner visible (it's material to
     reading the result) but force it to monochrome so it doesn't burn ink. */
  .warn-banner {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #888 !important;
    padding: 6pt 10pt !important;
    margin: 6pt 0 !important;
    border-radius: 0 !important;
    font-size: 9.5pt !important;
    page-break-inside: avoid;
  }

  /* Suppress the two "h3" sections whose content lives in suppressed blocks
     (band-explainers + the two ul.explainer lists). Keep the per-frequency
     and calibration headings. Targeted by adjacency via :has() where
     supported; otherwise the lists below them stay hidden but the heading
     would orphan — accept that tradeoff (browsers without :has() are old). */
  h3:has(+ .band-explainers),
  h3:has(+ ul.explainer) { display: none !important; }

  #screen-results { display: block !important; max-width: none !important; padding: 0 !important; }
  #results-host { padding: 0 !important; margin: 0 !important; }

  .print-header {
    display: block !important;
    border-bottom: 1px solid #000;
    padding-bottom: 6pt;
    margin-bottom: 10pt;
    page-break-after: avoid;
  }
  .print-header .print-brand {
    font-weight: 600;
    font-size: 11pt;
    color: #000 !important;
  }
  .print-header .print-meta {
    font-size: 9pt;
    color: #444 !important;
    margin-top: 2pt;
    font-family: ui-monospace, monospace;
  }

  /* Strip background fills so we don't burn ink on tinted surfaces. Borders
     keep the visual structure. */
  .interpretation, .result-summary, .calib-summary {
    background: #fff !important; color: #000 !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 8pt 10pt !important;
    margin: 6pt 0 !important;
    border-radius: 0 !important;
  }
  .interpretation { border-left: 3px solid #000 !important; }
  .result-summary .big { color: #000 !important; font-size: 28pt !important; }
  .result-summary .small { color: #333 !important; }

  /* Category colors stay (small ink cost, big legibility win). */
  .cat-below-typical { color: #b3261e !important; font-weight: 600; }
  .cat-lower-typical { color: #8a5a00 !important; font-weight: 600; }
  .cat-within-typical { color: #000 !important; }
  .cat-above-typical { color: #1d4d4f !important; font-weight: 600; }

  table.per-freq {
    background: #fff !important;
    border: 1px solid #ccc !important;
    margin: 6pt 0 !important;
    font-size: 9.5pt;
    page-break-inside: auto; /* allow break if needed */
  }
  table.per-freq th, table.per-freq td {
    color: #000 !important; border-color: #ccc !important;
    padding: 4pt 8pt !important;
  }
  table.per-freq th { background: #f0f0f0 !important; }
  table.per-freq tr { page-break-inside: avoid; }

  /* Chart: canvas was drawn dark-on-dark; invert to black-on-white. Clamp
     height so chart + table + summary + calibration fit on one page. */
  #result-chart {
    display: block !important;
    width: 100% !important;
    max-height: 2.8in !important;
    height: auto !important;
    filter: invert(1) hue-rotate(180deg);
    background: #fff !important;
    border: 1px solid #ccc !important;
    margin: 6pt 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Force the calibration <details> open at print time. */
  #results-host details { display: block !important; }
  #results-host details > summary { display: none !important; }
  #results-host details > *:not(summary) { display: block !important; }
  .calib-summary {
    font-size: 9pt;
    page-break-inside: avoid;
  }

  /* Headings */
  h2 { color: #000 !important; font-size: 14pt !important; margin: 4pt 0 !important; page-break-after: avoid; }
  h3 { color: #000 !important; font-size: 11pt !important; margin: 8pt 0 4pt !important; page-break-after: avoid; }
  h4 { color: #000 !important; page-break-after: avoid; }
  .caption, .meta { color: #555 !important; font-size: 9pt !important; }

  /* Suppress URL expansion next to anchors. */
  a, a:link, a:visited { color: #000 !important; text-decoration: none !important; }
  a[href]:after { content: "" !important; }
}

/* Screenshot mode — used by the design/screenshot harness to remove chrome */
body.screenshot-mode .no-screenshot { display: none !important; }

/* ───────────── Analytics consent UI (T202) ─────────────
   Banner on the landing screen, footer link + status, and a privacy modal.
   Deliberately understated — privacy-as-marketing means the consent prompt
   stays small and honest, not loud.                                       */

.analytics-banner {
  margin-top: 1.5rem;
  padding: 0.8rem 1rem;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--fg-muted, #bbb);
}
.analytics-banner p { margin: 0 0 0.6rem; }
.analytics-banner .row {
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
}
.analytics-banner button { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
.analytics-banner #analytics-consent-close {
  margin-left: auto; background: transparent; border: none; color: #888;
  font-size: 1.2rem; cursor: pointer; padding: 0 0.3rem;
}

.app-footer {
  max-width: 760px; margin: 2rem auto 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.8rem;
  color: #888;
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  border-top: 1px solid #2a2a2a;
}
.app-footer .link-button {
  background: transparent; border: none; color: #aaa;
  cursor: pointer; padding: 0; font: inherit;
}
.app-footer .link-button:hover { color: #ddd; text-decoration: underline; }
.app-footer .muted { color: #666; font-style: italic; }
.app-footer .footer-sep { color: #444; }

.privacy-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 1rem;
}
.privacy-modal[hidden] { display: none; }
.privacy-modal-card {
  background: #181818; color: var(--fg, #e0e0e0);
  border: 1px solid #333; border-radius: 8px;
  max-width: 520px; width: 100%;
  padding: 1.2rem 1.4rem;
  position: relative;
  max-height: 85vh; overflow-y: auto;
  font-size: 0.9rem;
}
.privacy-modal-card h3 { margin-top: 0.2rem; }
.privacy-modal-card ul { padding-left: 1.2rem; }
.privacy-modal-card code {
  background: #222; padding: 0 0.3em; border-radius: 3px;
  font-size: 0.85em;
}
.privacy-modal-close {
  position: absolute; top: 0.4rem; right: 0.6rem;
  background: transparent; border: none; color: #888;
  font-size: 1.3rem; cursor: pointer;
}
.privacy-modal-card .row {
  display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem;
}
.privacy-modal-card .row button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ───────────── Privacy assurance strip (T302) ─────────────
   One-line band at the very top of #screen-landing. Asserts the broader
   "data-stays-local" guarantee of the whole product — distinct from the
   analytics-consent banner above, which is a Yes/No prompt for the
   optional anonymous-events stream. The strip is informational +
   dismissible; sticks dismissed via localStorage.vcs_privacy_strip_dismissed.
   Lives only on the landing screen (parent .active toggle hides it on
   calibration/test/results without extra JS).                              */

.privacy-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 -1.25rem 1.25rem;   /* break out of the .screen padding to feel banner-like */
  padding: 0.55rem 1.25rem;
  background: #2a2a2a;            /* mid-gray surface, matches --surface */
  border-bottom: 1px solid #333;
  color: #d6d6d6;                 /* slightly cooler than --fg for inline-strip */
  font-size: 0.88rem;
  line-height: 1.3;
}
.privacy-strip[hidden] { display: none; }
.privacy-strip-text { flex: 1 1 auto; min-width: 0; }
.privacy-strip-why {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-strip-why:hover { color: #8df; }
.privacy-strip-close {
  background: transparent;
  border: 0;
  padding: 0 0.4rem;
  margin: 0;
  color: #888;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  /* Keep a real tap target (44 px) without making the strip taller than
     one line: the button absorbs the vertical padding visually. */
  min-height: 44px;
  min-width: 44px;
}
.privacy-strip-close:hover { color: #ddd; }

.privacy-modal-status {
  margin: 0.8rem 0 0;
  font-size: 0.85rem;
  color: #aaa;
}
.privacy-modal-status #privacy-modal-status-value { color: var(--fg); font-weight: 500; }

/* ───────────── "Stay in the loop" notify-me card (T305) ─────────────
   Lives between the calibration <details>/caption and the .actions row on
   the results screen. Suppressed on shared-result views (rendered only
   when !sharedView) and suppressed in print (see suppression list above).
   Tone is understated — privacy-as-marketing.                          */

.notify-card {
  margin: 1.25rem 0 1rem;
  padding: 1rem 1.1rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.notify-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}
.notify-card .notify-lede {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}
.notify-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: stretch;
}
.notify-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
}
.notify-form input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.notify-form input[type="email"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notify-form button {
  min-height: 44px;
  padding: 0.55rem 1rem;
  flex: 0 0 auto;
}
.notify-status {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  min-height: 1.1em;
  color: var(--muted);
}
.notify-status[data-kind="success"] { color: var(--accent); }
.notify-status[data-kind="error"] { color: var(--err); }
.notify-foot {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.notify-privacy {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.notify-privacy:hover { color: #8df; }

/* Screen-reader-only utility used by the form's email label. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

