  /* ── @page setup for PDF export ── */
  @page { size: A4; margin: 18mm 16mm 18mm 16mm; }

  /* ── Context-Aware Print / PDF Styles ── */
  @media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    body {
      background: white !important;
      color: black !important;
      font-size: 9pt !important;
    }

    /* Hide all UI navigation elements */
    header, .progress-bar, .btn-row, .btn-row-wrap, .cs-try-another, #startOverBtn {
      display: none !important;
    }

    /* Hide all pages by default, ONLY print the active one */
    .page {
      display: none !important;
    }
    .page.active {
      display: block !important;
    }

    /* Ensure containers stretch fully for PDF layout */
    .container, .cs-page-inner {
      max-width: 100% !important;
      padding: 0 !important;
      margin: 0 !important;
    }

    /* Prevent page breaks inside important cards */
    .card, .ddx-card, .rec-box, .cs-dx-row, .cs-key-finding, .cs-debrief-section {
      page-break-inside: avoid;
    }

    /* ── Debrief-specific print styles (only active when pagCS6 is printing) ── */
    .cs-debrief-hero {
      display: flex !important;
      align-items: center !important;
      gap: 20pt !important;
      text-align: left !important;
      padding: 12pt 0 12pt !important;
      border-bottom: 1pt solid #d0dae0 !important;
      margin-bottom: 16pt !important;
    }
    .cs-debrief-score-ring {
      width: 58pt !important; height: 58pt !important;
      border: 1.5pt solid #4a8fa8 !important;
      flex-shrink: 0 !important;
      border-radius: 50% !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
    }
    .cs-debrief-score-num { font-size: 18pt !important; color: #1a2630 !important; line-height: 1 !important; }
    .cs-debrief-score-den { font-size: 6.5pt !important; color: #7a8f9e !important; }
    .cs-debrief-verdict { font-size: 13pt !important; font-style: italic !important; margin-bottom: 3pt !important; color: #1a2630 !important; }
    .cs-debrief-verdict-sub { font-size: 7.5pt !important; color: #7a8f9e !important; }
    .cs-debrief-section { margin-bottom: 16pt !important; }
    .cs-debrief-section-title {
      font-size: 6pt !important;
      letter-spacing: 0.18em !important;
      text-transform: uppercase !important;
      color: #7a8f9e !important;
      display: block !important;
      padding-bottom: 5pt !important;
      border-bottom: 1pt solid #d0dae0 !important;
      margin-bottom: 10pt !important;
    }
    .cs-dx-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8pt !important; margin-bottom: 8pt !important; }
    .cs-dx-block { padding: 8pt 10pt !important; border: 1pt solid #d0dae0 !important; }
    .cs-dx-block-label { font-size: 6pt !important; letter-spacing: 0.14em !important; color: #7a8f9e !important; display: block !important; margin-bottom: 3pt !important; }
    .cs-dx-block-value { font-size: 8pt !important; color: #1a2630 !important; display: block !important; }
    .cs-dx-block-value.correct { color: #3d7a50 !important; }
    .cs-dx-block-value.incorrect { color: #904040 !important; }
    .cs-dx-differentials { margin-top: 6pt !important; }
    .cs-dx-diff-label { font-size: 6pt !important; color: #7a8f9e !important; letter-spacing: 0.1em !important; text-transform: uppercase !important; display: block !important; margin-bottom: 4pt !important; }
    .cs-dx-diff-tag { display: inline-block !important; font-size: 6.5pt !important; padding: 1.5pt 6pt !important; border: 1pt solid #d0dae0 !important; color: #4e6375 !important; margin: 0 3pt 3pt 0 !important; }
    .cs-key-findings { gap: 5pt !important; }
    .cs-key-finding { padding: 6pt 9pt !important; border: 1pt solid #d0dae0 !important; gap: 8pt !important; }
    .cs-key-finding-icon { font-size: 7pt !important; }
    .cs-key-finding-text { font-size: 7.5pt !important; }
    .cs-rubric-table { font-size: 7.5pt !important; }
    .cs-rubric-table th { font-size: 6pt !important; padding: 5pt 8pt !important; }
    .cs-rubric-table td { padding: 6pt 8pt !important; }
    .cs-score-pill { font-size: 6pt !important; padding: 0 4pt !important; min-width: 22pt !important; height: 14pt !important; }
    .cs-score-full { background: rgba(80,140,100,0.15) !important; color: #3d7a50 !important; }
    .cs-score-part { background: rgba(200,160,60,0.15) !important; color: #a07820 !important; }
    .cs-score-zero { background: rgba(180,80,80,0.1) !important; color: #904040 !important; }
    .cs-ai-feedback {
      border: 1pt solid #d0dae0 !important;
      border-left: 2.5pt solid #4a8fa8 !important;
      padding: 10pt 12pt !important;
      font-size: 7.5pt !important;
      line-height: 1.55 !important;
    }
    .cs-ai-section-label { font-size: 6pt !important; margin-bottom: 6pt !important; }
    .cs-ai-feedback p { margin: 0 0 5pt 0 !important; }

    /* PDF injected header/footer (only visible when JS injects them) */
    .cs-pdf-header {
      display: flex !important;
      align-items: flex-start;
      justify-content: space-between;
      border-bottom: 1.5pt solid #1a2630;
      padding-bottom: 10pt;
      margin-bottom: 16pt;
    }
    .cs-pdf-header-title {
      font-family: 'Cormorant Garamond', Georgia, serif !important;
      font-size: 18pt !important;
      font-weight: 300 !important;
      color: #1a2630 !important;
      line-height: 1.15 !important;
      margin: 0 !important;
    }
    .cs-pdf-header-meta {
      text-align: right;
      font-size: 7pt !important;
      color: #7a8f9e !important;
      line-height: 1.6 !important;
    }
    .cs-pdf-header-wordmark {
      font-size: 7pt !important;
      letter-spacing: 0.22em !important;
      text-transform: uppercase !important;
      color: #1a2630 !important;
      font-weight: 500 !important;
      display: block !important;
      margin-bottom: 2pt !important;
    }
    .cs-pdf-footer {
      display: block !important;
      margin-top: 14pt !important;
      padding-top: 8pt !important;
      border-top: 1pt solid #d0dae0 !important;
      font-size: 6.5pt !important;
      color: #7a8f9e !important;
      line-height: 1.5 !important;
    }

    /* Force debrief exports to remain legible on white paper */
    #pagCS6, #pagCS6 .cs-page-inner {
      background: #ffffff !important;
      color: #1a2630 !important;
    }
    #pagCS6 .cs-debrief-section,
    #pagCS6 .cs-dx-block,
    #pagCS6 .cs-key-finding,
    #pagCS6 .cs-ai-feedback {
      background: #ffffff !important;
      border-color: #d0dae0 !important;
    }
    #pagCS6 .cs-debrief-section-title,
    #pagCS6 .cs-dx-block-label,
    #pagCS6 .cs-dx-block-meta,
    #pagCS6 .cs-dx-diff-label,
    #pagCS6 .cs-ai-section-label,
    #pagCS6 .cs-rubric-table th,
    #pagCS6 .cs-debrief-score-den,
    #pagCS6 .cs-debrief-verdict-sub,
    #pagCS6 .cs-rubric-table td:nth-child(2) {
      color: #4e6375 !important;
    }
    #pagCS6 .cs-rubric-table th,
    #pagCS6 .cs-rubric-table td {
      border-bottom: 1pt solid #d0dae0 !important;
    }
    #pagCS6 .cs-rubric-table td,
    #pagCS6 .cs-key-finding-text,
    #pagCS6 .cs-ai-feedback,
    #pagCS6 .cs-ai-feedback p,
    #pagCS6 .cs-dx-block-value,
    #pagCS6 .cs-dx-diff-tag,
    #pagCS6 .cs-debrief-score-num,
    #pagCS6 .cs-debrief-verdict {
      color: #1a2630 !important;
    }
    #pagCS6 .cs-rubric-score.full { color: #2f6c47 !important; }
    #pagCS6 .cs-rubric-score.partial { color: #8a6d18 !important; }
    #pagCS6 .cs-rubric-score.zero { color: #904040 !important; }
  }
  :root {
    --bg: #132635;
    --surface: #1a3042;
    --surface2: #233d50;
    --border: rgba(95,168,196,0.18);
    --border-light: rgba(95,168,196,0.11);
    --text: #e8f2f8;
    --muted: #7aA3b8;
    --muted2: #a8c8d8;
    --accent: #4f9ab8;
    --accent-light: #6ab8d4;
    --accent-dim: rgba(79,154,184,0.14);
    --accent-border: rgba(79,154,184,0.32);
    --chip-bg: #274156;
    --positive: #4aaa7a;
    --negative: #c07070;
    --warn: #c0a050;
    --positive-dim: rgba(74,170,122,0.12);
    --negative-dim: rgba(192,112,112,0.10);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* No halo needed — body background and header are now the same dark tone */

  /* ── HEADER ── */
  header {
    width: 100%;
    background: rgba(17,34,46,0.62);
    border-bottom: 1px solid rgba(95,168,196,0.15);
    box-shadow: 0 1px 24px rgba(0,0,0,0.18);
    padding: 0 40px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .header-left { display: flex; align-items: center; }
  .header-logo { display: none; }
  header h1 { display: none; }

  /* ── EIDOS Wordmark lockup ── */
  .header-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    line-height: 1;
    gap: 3px;
  }
  .wm-eidos {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(244,247,249,0.95);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    line-height: 1;
  }
  .wm-tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.64rem;
    font-weight: 400;
    color: rgba(205,228,238,0.86);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
  }
  .wm-sub {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.7rem;
    font-weight: 300;
    font-style: italic;
    color: rgba(202,226,237,0.82);
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    opacity: 0.94;
  }
  body.header-post-collect .wm-sub,
  body.header-post-collect #headerAboutBtn,
  body.header-post-collect #headerHomeBtn {
    display: none !important;
  }
  /* Legacy wordmark classes — hidden */
  .wm-ortho, .wm-dd, .wm-x, .wm-slash { display: none; }
  .header-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--muted);
    letter-spacing: 0.08em;
    display: none;
  }
  .rf-header-badge {
    display: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--negative);
    border: 1px solid rgba(139,58,58,0.3);
    padding: 3px 10px;
    cursor: pointer;
  }
  .rf-header-badge:focus-visible {
    outline: 2px solid var(--negative);
    outline-offset: 2px;
  }
  .header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .header-nav-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(180,210,224,0.65);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    transition: color 0.15s;
  }
  .header-nav-btn:hover,
  .header-nav-btn:focus-visible {
    color: rgba(244,247,249,0.95);
  }
  .header-nav-divider {
    width: 1px;
    height: 12px;
    background: rgba(180,210,224,0.2);
    display: inline-block;
  }

  /* ── LAYOUT ── */
  .container {
    width: 100%;
    max-width: 760px;
    padding: 48px 24px 100px;
  }

  /* ── PROGRESS ── */
  .progress-bar {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
    overflow: hidden;
    width: 100%;
  }
  .step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
  }
  .step-dot:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%; top: 9px;
    width: 100%; height: 1px;
    background: var(--border);
    z-index: 0;
  }
  /* Hide connector line from step dot when its next sibling is hidden (patient mode hides steps 6+7) */
  .step-dot[style*="display: none"] + .step-dot::before,
  .step-dot:has(+ .step-dot[style*="display: none"])::after { display: none !important; }
  /* Patient mode hides steps 6/7, so force step 5 connector to remain visible toward results (visual step 6). */
  .progress-bar.patient-mode .step-dot[data-step="5"]::after { display: block !important; }
  .step-dot.done:not(:last-child)::after { background: var(--accent); opacity: 0.4; }
  .dot-circle {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    transition: all 0.2s;
  }
  .step-dot.active .dot-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-dim);
  }
  .step-dot.done .dot-circle {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
    opacity: 0.7;
  }
  .dot-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 300;
  }
  .step-dot.active .dot-label { color: var(--accent); font-weight: 500; }

  /* ── CARDS ── */
  .card {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    padding: 36px 0;
    margin-bottom: 0;
  }
  .card-header {
    margin-bottom: 32px;
  }
  .card h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.2;
  }
  .card .subtitle {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.02em;
  }

  /* ── AREA GRID ── */
  .area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
  }
  .area-btn {
    border: none;
    padding: 20px 18px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
    background: var(--surface);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .area-btn .icon { display: none; }
  .area-btn .area-label {
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.02em;
  }
  .area-btn .area-abbr {
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 300;
  }
  .area-btn::before { display: none; }
  .area-btn:hover { background: var(--surface2); }
  .area-btn.selected { background: var(--accent); }
  .area-btn.selected .area-label { color: #fff; }
  .area-btn.selected .area-abbr { color: rgba(255,255,255,0.55); }

  /* ── PATIENT PAIN MAP ── */
  .pain-map {
    display: none;
    border: none;
    background: transparent;
    padding: 0 0 12px;
    margin-bottom: 18px;
  }
  .pain-map-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .pain-map-panel {
    position: relative;
    border: none;
    background: transparent;
    padding: 2px 0 0;
  }
  .pain-map-view-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.57rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6c8498;
    text-align: center;
    margin-bottom: 2px;
  }
  .pain-figure-wrap {
    position: relative;
    width: min(100%, 220px);
    margin: 0 auto;
    aspect-ratio: var(--figure-aspect, 220 / 500);
  }
  .pain-pin-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
  }
  .pain-diagram-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
  }
  .pain-figure {
    display: block;
    width: 100%;
    height: 100%;
  }
  .pain-figure .outline {
    fill: none;
    stroke: #2f6f99;
    stroke-opacity: 0.68;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .pain-figure .body-fill {
    stroke: #2f6f99;
    stroke-opacity: 0.48;
    stroke-width: 2.2;
  }
  .pain-figure .hair {
    fill: #1f5e84;
    stroke: none;
    opacity: 0.95;
  }
  .pain-figure .shadow {
    fill: rgba(88,128,153,0.18);
    stroke: none;
  }
  .pain-figure .detail {
    fill: none;
    stroke: rgba(39,90,127,0.28);
    stroke-width: 1.9;
    stroke-linecap: round;
  }
  .pain-pin {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: rgba(255,255,255,0.01);
    cursor: pointer;
    padding: 0;
    z-index: 3;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .pain-pin::before, .pain-pin::after { display: none; content: none; }
  .pain-pin.pin-orange { --pin-color: #ee8f3d; }
  .pain-pin.pin-teal { --pin-color: #2fae9a; }
  .pain-pin.pin-blue { --pin-color: #3e8dc2; }
  .pain-pin:hover,
  .pain-pin:focus-visible,
  .pain-pin.selected {
    outline: none;
    border-color: var(--pin-color, #3e8dc2);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.72), 0 0 0 5px rgba(62,141,194,0.22);
  }
  .pain-pin.area-match {
    border-color: rgba(74,143,168,0.48);
  }
  .pain-pin-created {
    border-color: #ee8f3d;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.72), 0 0 0 5px rgba(238,143,61,0.22);
  }
  .pain-map-copy {
    margin-top: 0;
    text-align: center;
  }
  .pain-map-caption {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #34556c;
    letter-spacing: 0.02em;
  }
  .pain-map-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: #6a8498;
    margin-top: 6px;
  }
  .pain-tooltip {
    position: fixed;
    z-index: 80;
    pointer-events: none;
    background: rgba(26,38,48,0.94);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    padding: 5px 8px;
    border-radius: 3px;
    opacity: 0;
    transform: translate(-50%, -6px);
    transition: opacity 0.12s ease;
    white-space: nowrap;
  }
  .pain-tooltip.show {
    opacity: 1;
  }

  /* ── CHIPS ── */
  .chip-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
  .chip {
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 6px 14px;
    font-size: 0.76rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.12s;
    background: transparent;
    color: var(--muted2);
    letter-spacing: 0.03em;
  }
  .chip:hover { border-color: var(--accent); color: var(--accent); }
  .chip.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 400;
  }
  .cs-pool-status {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: var(--muted2);
    letter-spacing: 0.03em;
    margin: -6px 0 2px;
  }
  .cs-pool-progress {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 4px;
  }
  .cs-pool-empty {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.5;
    letter-spacing: 0.01em;
    min-height: 1.1rem;
    margin-bottom: 0;
  }

  /* ── INPUTS ── */
  textarea, input[type="text"], input[type="number"] {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    resize: none;
    transition: border-color 0.15s;
    outline: none;
    letter-spacing: 0.02em;
  }
  textarea::placeholder, input::placeholder { color: var(--muted); }
  textarea:focus, input:focus { border-color: var(--text); }

  /* ── SECTION LABEL ── */
  .section-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin: 28px 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* ── OBJECTIVE FIELDS ── */
  .objective-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .field-group {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  .field-group label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .norm-badge {
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
  }
  .field-group input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 6px 0;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.15s;
  }
  .field-group input:focus { border-color: var(--text); }

  /* ── SPECIAL TESTS ── */
  .test-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    gap: 20px;
  }
  .test-info { flex: 1; min-width: 0; }
  .test-name {
    font-weight: 400;
    font-size: 0.86rem;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: 0.01em;
  }
  .test-purpose {
    font-size: 0.71rem;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.01em;
  }
  .test-dx-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
  }
  .test-dx-badge {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 2px 9px;
    border: 1px solid;
    white-space: nowrap;
  }
  .badge-rule-in {
    color: var(--positive);
    border-color: rgba(74,124,90,0.35);
    background: var(--positive-dim);
  }
  .badge-rule-out {
    color: var(--warn);
    border-color: rgba(122,96,48,0.35);
    background: rgba(122,96,48,0.05);
  }
  .toggle-group {
    display: flex;
    border: 1px solid var(--border);
    flex-shrink: 0;
  }
  .toggle-btn {
    padding: 5px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--muted);
    transition: all 0.12s;
    letter-spacing: 0.04em;
  }
  .toggle-btn + .toggle-btn { border-left: 1px solid var(--border); }
  .toggle-btn.pos.active { background: var(--text); color: var(--bg); border-color: var(--text); }
  .toggle-btn.neg.active { background: var(--surface2); color: var(--muted2); border: 1px solid var(--border); }
  .toggle-btn:not(.active):hover { background: var(--surface2); color: var(--text); }

  /* ── RESULTS ── */
  .ddx-card {
    border-top: 1px solid var(--border);
    border-bottom: none;
    background: transparent;
    padding: 20px 0;
    margin-bottom: 0;
  }
  .ddx-card.rank-1 {
    border-top: 1px solid var(--accent-border);
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-left: -20px;
    background: var(--accent-dim);
    padding: 20px 0 20px 20px;
  }
  .ddx-card.rank-1 h3 {
    font-size: 1.4rem;
    font-weight: 400;
  }
  .ddx-card.rank-2 { border-top-color: var(--border); }
  .ddx-card.rank-other { border-top-color: var(--border-light); opacity: 0.8; }
  .ddx-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }
  .ddx-card h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 1.35rem;
    color: var(--text);
    letter-spacing: 0;
  }
  .likelihood {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    padding: 3px 10px;
    border: 1px solid var(--border);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--muted);
    background: transparent;
  }
  .lk-high { border-color: rgba(74,124,90,0.45); color: var(--positive); background: var(--positive-dim); }
  .lk-med { border-color: rgba(122,96,48,0.35); color: var(--warn); background: rgba(122,96,48,0.06); }
  .lk-low { border-color: var(--border); color: var(--muted); }
  .ddx-card .age-note {
    font-size: 0.68rem;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 300;
    letter-spacing: 0.02em;
    font-style: italic;
  }
  .ddx-card p { font-size: 0.82rem; color: var(--muted2); line-height: 1.7; font-weight: 300; }

  /* ── RECOMMENDATION BOX ── */
  .rec-box {
    background: rgba(255,255,255,0.05);
    border: none;
    outline: 1px solid rgba(95,168,196,0.18);
    outline-offset: -1px;
    padding: 36px 40px;
    margin: 28px 0 8px;
    position: relative;
    overflow: hidden;
  }
  @media (max-width: 520px) {
    .rec-box { padding: 28px 24px; }
  }
  .rec-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(180,210,230,0.2);
  }
  .rec-box-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(180,210,230,0.5);
    margin-bottom: 14px;
  }
  .rec-box h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 16px;
    color: #e8f2f8;
    line-height: 1.25;
    letter-spacing: 0;
  }
  .rec-box p { font-size: 0.83rem; line-height: 1.8; color: rgba(200,225,240,0.75); font-weight: 300; }
  .rec-box p:last-child { color: rgba(200,225,240,0.82); font-size: 0.72rem; margin-top: 16px; border-top: 1px solid rgba(180,210,230,0.18); padding-top: 14px; }

  /* ── EDU ITEMS ── */
  .edu-section { margin-bottom: 0; }
  .edu-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 20px 0 12px;
    display: flex; align-items: center; gap: 12px;
  }
  .edu-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .edu-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
    margin-bottom: 0;
    font-size: 0.83rem;
    line-height: 1.7;
    color: var(--muted2);
    font-weight: 300;
  }
  .edu-item strong {
    display: block;
    margin-bottom: 8px;
    margin-top: 2px;
    font-size: 0.82rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
    text-transform: none;
  }

  /* ── EXERCISE CARDS ── */
  .exercise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 4px; }
  @media (max-width: 580px) { .exercise-grid { grid-template-columns: 1fr; } }
  .ex-card {
    background: var(--surface);
    padding: 0;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
  }
  .ex-card:hover { background: var(--surface2); }
  .ex-card-inner {
    display: flex;
    flex-direction: row;
    gap: 0;
    flex: 1;
  }
  .ex-text { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 0; }
  .ex-number {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.52rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    margin-bottom: 6px;
    font-weight: 300;
    text-transform: uppercase;
  }
  .ex-card strong {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.3;
  }
  .ex-focus {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 300;
    font-style: italic;
    line-height: 1.45;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .ex-card p { font-size: 0.73rem; color: var(--muted2); line-height: 1.5; font-weight: 300; margin: 4px 0 0; }
  .ex-card .sets {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--muted);
    margin-top: 8px;
    letter-spacing: 0.04em;
  }

  /* ── BUTTONS ── */
  .btn-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
  .btn-row-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
  .btn-row-wrap .btn-row { margin-top: 0; padding-top: 0; border-top: none; }
  .start-over-link { font-family: 'DM Sans', sans-serif; font-size: 0.62rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; transition: color 0.15s; }
  .start-over-link:hover { color: var(--text); }
  .btn {
    padding: 10px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 400;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.15s;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: transparent;
    color: var(--muted2);
  }
  .btn:hover { border-color: var(--text); color: var(--text); }
  .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
  .btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
  .btn-secondary { background: transparent; }
  .btn-print { background: transparent; }

  /* ── PAGE TRANSITIONS ── */

  /* ══════════════════════════════════════════
     HOMEPAGE (pageHome)
  ══════════════════════════════════════════ */
  #pageHome {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #pageHome.hidden {
    animation: homeExit 0.55s cubic-bezier(0.4,0,0.2,1) forwards;
    pointer-events: none;
  }
  @keyframes homeExit {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.03); }
  }

  /* Photo background */
  .home-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('./home-bg.jpg?v=20260305-1058');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    pointer-events: none;
  }
  .home-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to bottom,
        rgba(12,26,36,0.78) 0%,
        rgba(12,26,36,0.38) 24%,
        rgba(12,26,36,0.12) 48%,
        transparent 64%
      ),
      linear-gradient(to top,
        rgba(12,26,36,0.54) 0%,
        rgba(12,26,36,0.30) 24%,
        transparent 48%
      ),
      radial-gradient(ellipse 120% 100% at 50% 50%,
        transparent 40%,
        rgba(12,26,36,0.24) 100%
      ),
      rgba(20,46,62,0.14);
  }

  /* Home header */
  .home-header {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 56px;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(95,168,196,0.15);
    background: rgba(17,34,46,0.62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-shrink: 0;
  }
  .home-wordmark {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
  }
  .home-wm-eidos {
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(244,247,249,0.95);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    line-height: 1;
  }
  .home-wm-tag {
    font-size: 0.62rem;
    font-weight: 400;
    color: rgba(214,235,244,0.88);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
  }
  .home-nav {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  .home-nav-link {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(180,210,224,0.70);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-family: 'DM Sans', sans-serif;
  }
  .home-nav-link:hover { color: rgba(244,247,249,0.95); }

  /* Hero content */
  .home-hero {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 36px 24px 68px;
    text-align: center;
  }

  .home-eyebrow {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
    opacity: 0;
    animation: hFadeUp 0.8s ease forwards 0.2s;
  }
  .home-eyebrow-rule {
    width: 36px; height: 1px;
    background: rgba(95,168,196,0.6);
    display: block;
  }
  .home-eyebrow-text {
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(140,200,220,0.85);
    letter-spacing: 0.28em;
    text-transform: uppercase;
  }

  .home-logotype {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(6rem, 14vw, 11rem);
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.22em;
    line-height: 0.9;
    text-shadow: 0 2px 40px rgba(0,0,0,0.30);
    position: relative;
    display: inline-block;
    opacity: 0;
    animation: hFadeUp 1s ease forwards 0.4s;
    margin-bottom: 0;
  }
  .home-logotype::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    width: 48px; height: 1px;
    background: rgba(95,168,196,0.7);
  }

  .home-descriptor {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.76rem, 1.45vw, 0.96rem);
    font-weight: 500;
    color: rgba(230,245,252,0.9);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 32px;
    margin-bottom: 30px;
    max-width: none;
    line-height: 1.35;
    text-shadow: none;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: static;
    z-index: auto;
    opacity: 0;
    animation: hFadeUp 1s ease forwards 0.65s;
  }
  .home-descriptor::before {
    display: none;
    content: none;
  }

  .home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    opacity: 0;
    animation: hFadeUp 1s ease forwards 0.85s;
    width: 100%;
  }

  /* Cards */
  .home-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.10);
    width: 100%;
    max-width: 700px;
  }
  .home-card {
    background: rgba(17,36,48,0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.25s;
    cursor: pointer;
    border: none;
    text-align: left;
    font-family: 'DM Sans', sans-serif;
  }
  @media (hover: hover) and (pointer: fine) {
    .home-card:hover { background: rgba(17,36,48,0.58); }
  }
  .home-card-num {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 300;
    color: rgba(95,168,196,0.9);
    line-height: 1;
  }
  .home-card-label {
    font-size: 0.66rem;
    font-weight: 500;
    color: rgba(215,235,245,0.86);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.2;
  }
  .home-card-body {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(223,238,246,0.8);
    line-height: 1.6;
    margin-top: 4px;
  }

  /* CTA row */
  .home-cta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .home-btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 38px;
    background: rgba(244,247,249,0.95);
    color: #0e1e2a;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    border: 1px solid rgba(244,247,249,0.8);
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    cursor: pointer;
  }
  .home-btn-explore:hover {
    background: #4a8fa8;
    color: #fff;
    border-color: #4a8fa8;
  }
  .home-btn-explore svg { opacity: 0.55; transition: transform 0.3s, opacity 0.25s; }
  .home-btn-explore:hover svg { transform: translateX(3px); opacity: 1; }

  .home-btn-about {
    font-size: 0.72rem;
    font-weight: 300;
    color: rgba(180,210,224,0.70);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: color 0.2s, border-color 0.2s;
    padding-bottom: 1px;
  }
  .home-btn-about:hover {
    color: rgba(244,247,249,0.9);
    border-color: rgba(255,255,255,0.25);
  }
  .home-subheader {
    max-width: 700px;
    margin: 2px auto 0;
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.68rem, 1.15vw, 0.8rem);
    font-weight: 400;
    color: rgba(218,236,245,0.88);
    line-height: 1.6;
    letter-spacing: 0.03em;
    text-align: center;
    text-wrap: balance;
  }

  /* Bottom bar */
  .home-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 48px 16px;
    pointer-events: none;
  }
  .home-bottom-text {
    font-size: 0.65rem;
    font-weight: 300;
    color: rgba(180,210,224,0.40);
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .home-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: hFadeIn 1s ease forwards 1.6s;
  }
  .home-scroll span {
    font-size: 0.6rem;
    font-weight: 300;
    color: rgba(180,210,224,0.45);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
  }
  .home-scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, rgba(180,210,224,0.5), transparent);
    animation: scrollPulseH 2.2s ease-in-out infinite 1.8s;
  }
  @keyframes scrollPulseH {
    0%, 100% { opacity: 0.2; transform: scaleY(0.8); }
    50%       { opacity: 0.6; transform: scaleY(1); }
  }

  @keyframes hFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes hFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @media (max-width: 700px) {
    .home-header {
      padding: 0 24px;
      background: rgba(12,28,39,0.56);
      border-bottom-color: rgba(232,242,248,0.20);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
    .home-wm-eidos {
      color: rgba(248,252,255,0.98);
      text-shadow: 0 1px 10px rgba(0,0,0,0.34);
    }
    .home-wm-tag {
      color: rgba(232,243,250,0.95);
      font-size: 0.76rem;
      font-weight: 400;
      text-shadow: 0 1px 8px rgba(0,0,0,0.38);
    }
    .home-nav-link {
      font-size: 0.78rem;
      letter-spacing: 0.12em;
    }
    .home-card-label {
      font-size: 0.75rem;
      letter-spacing: 0.12em;
    }
    .home-eyebrow-text {
      font-size: 0.75rem;
      letter-spacing: 0.16em;
    }
    .home-btn-about { font-size: 0.75rem; }
    .home-descriptor {
      color: rgba(236,248,253,0.92);
      text-shadow: none;
      letter-spacing: 0.18em;
      margin-bottom: 26px;
    }
    .home-descriptor::before {
      display: none;
      content: none;
    }
    .home-bottom { padding: 0 24px 14px; }
    .home-content { gap: 20px; }
    .home-cards { grid-template-columns: 1fr; }
    .home-card { padding: 16px 16px; gap: 6px; }
    .home-card-body {
      font-size: 0.82rem;
      line-height: 1.55;
      margin-top: 2px;
    }
    .home-subheader {
      max-width: 94%;
      margin-top: 4px;
      font-size: 0.78rem;
      line-height: 1.55;
      letter-spacing: 0.02em;
    }
    .subtitle,
    .disclaimer,
    .wm-tagline,
    .wm-sub,
    .dot-label {
      font-size: 0.75rem;
    }
    .home-hero { padding: 24px 16px 40px; }
    .home-bottom-text { display: none; }
  }

  .page { display: none; }
  .page.active { display: block; }
  .page.slide-fwd { animation: slideFwd 0.26s cubic-bezier(0.4,0,0.2,1) both; }
  .page.slide-back { animation: slideBack 0.26s cubic-bezier(0.4,0,0.2,1) both; }
  @keyframes slideFwd {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes slideBack {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: none; }
  }

  /* ── DISCLAIMER ── */
  .disclaimer {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-light);
    padding: 12px 0 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--muted2);
    margin-top: 20px;
    line-height: 1.6;
    letter-spacing: 0.02em;
  }
  .disclaimer strong { color: var(--muted2); font-weight: 400; }

  /* ── SLR SECTION ── */
  .slr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }

  /* ── SCORE BAR ── */
  .score-bar-wrap { margin-top: 16px; }
  .score-bar-bg {
    height: 7px;
    background: var(--border-light);
    overflow: hidden;
    border-radius: 2px;
  }
  .score-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0 !important;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
    opacity: 0.35;
  }
  .score-bar-fill.animate { width: var(--bar-target) !important; }
  .ddx-card.rank-1 .score-bar-fill { opacity: 1; }
  .ddx-card.rank-2 .score-bar-fill { opacity: 0.75; }
  .ddx-card.rank-other .score-bar-fill { opacity: 0.55; }

  /* ── LANDING PAGE ── */
  .landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 60px 24px;
    text-align: center;
  }
  .landing-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
  }
  .landing h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 16px;
    max-width: 480px;
  }
  .landing-sub {
    font-size: 0.84rem;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 56px;
    max-width: 360px;
    line-height: 1.7;
    letter-spacing: 0.02em;
  }
  /* ── Wave background ── */
  .landing-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    pointer-events: none;
    z-index: 0;
  }
  .landing-wave svg { width: 100%; height: 100%; }

  .role-cards {
    display: flex;
    flex-direction: row;
    position: fixed;
    inset: 56px 0 0 0;
    z-index: 10;
    isolation: isolate;
  }
  .role-card {
    flex: 1;
    padding: 0;
    cursor: pointer;
    background: var(--bg);
    border: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
    overflow: hidden;
  }
  .role-card::after { display: none; }
  .role-card:first-child { border-right: none; }
  .role-card:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 86px;
    width: 1px;
    background: linear-gradient(
      to bottom,
      rgba(180,210,224,0.12) 0%,
      rgba(180,210,224,0.34) 16%,
      rgba(180,210,224,0.34) 84%,
      rgba(180,210,224,0.12) 100%
    );
    opacity: 0.66;
    pointer-events: none;
    z-index: 1;
  }
  .role-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    z-index: 2;
  }
  .role-card:focus-visible .role-card-inner { transform: translateY(0); }
  .role-card:focus-visible .role-card-line { width: 56px; background: var(--muted2); }
  .role-card:focus-visible .role-card-desc { opacity: 1; transform: translateY(0); }
  .role-card:focus-visible .role-card-arrow { opacity: 1; }
  .role-cards:has(.role-card:first-child:hover) .role-card:first-child,
  .role-cards:has(.role-card:first-child:active) .role-card:first-child { flex: 1.6; background: var(--surface2); }
  .role-cards:has(.role-card:last-child:hover) .role-card:last-child,
  .role-cards:has(.role-card:last-child:active) .role-card:last-child { flex: 1.6; background: var(--surface2); }
  .role-card:first-child:hover,
  .role-card:first-child:active,
  .role-card:first-child:focus-within { flex: 1.6; background: var(--surface2); }
  .role-card:last-child:hover,
  .role-card:last-child:active,
  .role-card:last-child:focus-within { flex: 1.6; background: var(--surface2); }
  .role-cards.is-hover-left .role-card:first-child,
  .role-cards.is-focus-left .role-card:first-child { flex: 1.6; background: var(--surface2); }
  .role-cards.is-hover-right .role-card:last-child,
  .role-cards.is-focus-right .role-card:last-child { flex: 1.6; background: var(--surface2); }
  .role-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 40px;
    width: min(560px, 88%);
    margin-inline: auto;
    transform: translateY(4px);
    transition: transform 0.4s ease, opacity 0.3s ease;
  }
  .role-card:hover .role-card-inner,
  .role-card:active .role-card-inner,
  .role-card:focus-visible .role-card-inner { transform: translateY(0); }
  .role-card-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    transition: color 0.25s ease, opacity 0.25s ease;
  }
  .role-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    line-height: 1.1;
    display: block;
    transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
  }
  .role-card-line {
    width: 32px;
    height: 1px;
    background: var(--border);
    display: block;
    transition: width 0.3s ease, background 0.3s ease;
  }
  .role-card:hover .role-card-line,
  .role-card:active .role-card-line { width: 56px; background: var(--muted2); }
  .role-card-desc {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 300;
    letter-spacing: 0.01em;
    max-width: 220px;
    min-height: 5.1rem;
    display: block;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
  }
  .role-card:hover .role-card-desc,
  .role-card:active .role-card-desc { opacity: 1; transform: translateY(0); }
  .role-card-arrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
  }
  .role-card:hover .role-card-arrow,
  .role-card:active .role-card-arrow { opacity: 1; }

  .role-card-sub-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 0.9rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease 0.08s, transform 0.3s ease 0.08s;
  }
  .role-card:hover .role-card-sub-tags,
  .role-card:active .role-card-sub-tags { opacity: 1; transform: translateY(0); }
  .role-card-sub-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.56rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .role-card:first-child:hover .role-card-title,
  .role-card:first-child:focus-within .role-card-title,
  .role-card:last-child:hover .role-card-title,
  .role-card:last-child:focus-within .role-card-title,
  .role-cards:has(.role-card:first-child:hover) .role-card:first-child .role-card-title,
  .role-cards.is-hover-left .role-card:first-child .role-card-title,
  .role-cards.is-focus-left .role-card:first-child .role-card-title,
  .role-cards:has(.role-card:last-child:hover) .role-card:last-child .role-card-title,
  .role-cards.is-hover-right .role-card:last-child .role-card-title,
  .role-cards.is-focus-right .role-card:last-child .role-card-title {
    color: #f4fbff;
    text-shadow: 0 2px 22px rgba(20,46,62,0.44);
    transform: translateY(-1px);
  }
  .role-card:first-child:hover .role-card-tag,
  .role-card:first-child:focus-within .role-card-tag,
  .role-card:last-child:hover .role-card-tag,
  .role-card:last-child:focus-within .role-card-tag,
  .role-cards:has(.role-card:first-child:hover) .role-card:first-child .role-card-tag,
  .role-cards.is-hover-left .role-card:first-child .role-card-tag,
  .role-cards.is-focus-left .role-card:first-child .role-card-tag,
  .role-cards:has(.role-card:last-child:hover) .role-card:last-child .role-card-tag,
  .role-cards.is-hover-right .role-card:last-child .role-card-tag,
  .role-cards.is-focus-right .role-card:last-child .role-card-tag {
    color: var(--muted2);
  }
  .role-card:first-child:hover .role-card-desc,
  .role-card:first-child:focus-within .role-card-desc,
  .role-card:last-child:hover .role-card-desc,
  .role-card:last-child:focus-within .role-card-desc,
  .role-cards:has(.role-card:first-child:hover) .role-card:first-child .role-card-desc,
  .role-cards.is-hover-left .role-card:first-child .role-card-desc,
  .role-cards.is-focus-left .role-card:first-child .role-card-desc,
  .role-cards:has(.role-card:last-child:hover) .role-card:last-child .role-card-desc,
  .role-cards.is-hover-right .role-card:last-child .role-card-desc,
  .role-cards.is-focus-right .role-card:last-child .role-card-desc {
    opacity: 1;
    transform: translateY(0);
    color: rgba(232,242,248,0.86);
  }
  .role-card:first-child:hover .role-card-arrow,
  .role-card:first-child:focus-within .role-card-arrow,
  .role-card:last-child:hover .role-card-arrow,
  .role-card:last-child:focus-within .role-card-arrow,
  .role-cards:has(.role-card:first-child:hover) .role-card:first-child .role-card-arrow,
  .role-cards.is-hover-left .role-card:first-child .role-card-arrow,
  .role-cards.is-focus-left .role-card:first-child .role-card-arrow,
  .role-cards:has(.role-card:last-child:hover) .role-card:last-child .role-card-arrow,
  .role-cards.is-hover-right .role-card:last-child .role-card-arrow,
  .role-cards.is-focus-right .role-card:last-child .role-card-arrow,
  .role-card:first-child:hover .role-card-sub-tags,
  .role-card:first-child:focus-within .role-card-sub-tags,
  .role-card:last-child:hover .role-card-sub-tags,
  .role-card:last-child:focus-within .role-card-sub-tags,
  .role-cards:has(.role-card:first-child:hover) .role-card:first-child .role-card-sub-tags,
  .role-cards.is-hover-left .role-card:first-child .role-card-sub-tags,
  .role-cards.is-focus-left .role-card:first-child .role-card-sub-tags,
  .role-cards:has(.role-card:last-child:hover) .role-card:last-child .role-card-sub-tags,
  .role-cards.is-hover-right .role-card:last-child .role-card-sub-tags,
  .role-cards.is-focus-right .role-card:last-child .role-card-sub-tags {
    opacity: 1;
    transform: translateY(0);
  }
  .role-cards:has(.role-card:first-child:hover) .role-card:last-child .role-card-inner,
  .role-cards.is-hover-left .role-card:last-child .role-card-inner,
  .role-cards.is-focus-left .role-card:last-child .role-card-inner,
  .role-cards:has(.role-card:last-child:hover) .role-card:first-child .role-card-inner,
  .role-cards.is-hover-right .role-card:first-child .role-card-inner,
  .role-cards.is-focus-right .role-card:first-child .role-card-inner {
    opacity: 0.64;
  }
  .landing-byline {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.82rem;
    font-weight: 400;
    font-style: italic;
    color: var(--muted2);
    letter-spacing: 0.06em;
    width: min(92vw, 520px);
    padding: 0 8px;
    white-space: normal;
    text-align: center;
    opacity: 0.85;
  }

  .role-card-sub-dot {
    font-size: 0.56rem;
    color: var(--border);
  }

  /* Hide the old landing text since the split is full screen */
  .landing { display: none; }

  /* ══════════════════════════════════════════════════════════
     CLINICIAN GATEWAY
     ══════════════════════════════════════════════════════════ */
  .cg-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .cg-overlay.active { opacity: 1; pointer-events: all; }
  .cg-header {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .cg-header-lockup { flex-shrink: 0; }
  .cg-back {
    margin-left: auto;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s;
  }
  .cg-back:hover { color: var(--text); }
  .cg-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cg-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
  }
  .cg-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text);
    text-align: center;
    line-height: 1.15;
    margin-bottom: 10px;
  }
  .cg-sub {
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 300;
    text-align: center;
    max-width: 340px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    margin-bottom: 52px;
  }
  .cg-options {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    max-width: 700px;
  }
  .cg-option {
    flex: 1;
    padding: 36px 28px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: rgba(224,237,246,0.9);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
  }
  .cg-option::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  .cg-option:hover { border-color: var(--muted2); background: var(--surface2); transform: translateY(-2px); }
  .cg-option:hover::before { transform: scaleX(1); }
  .cg-option-icon {
    font-size: 1.4rem;
    line-height: 1;
    color: rgba(224,237,246,0.88);
  }
  .cg-option-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cg-option-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text);
    line-height: 1.1;
  }
  .cg-option-desc {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.01em;
  }
  .cg-option-arrow {
    margin-top: auto;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 8px;
    transition: color 0.2s ease;
  }
  .cg-option:hover .cg-option-arrow { color: var(--accent); }
  @media (max-width: 600px) {
    .cg-options { flex-direction: column; }
    .cg-option { padding: 28px 22px; }
    .cg-title { font-size: 1.7rem; }
  }

  /* ══════════════════════════════════════════════════════════
     CASE STUDY SYSTEM — pages pagCS0, pagCS1…pagCS6
     ══════════════════════════════════════════════════════════ */

  /* Shared case study page wrapper */
  .cs-page-inner {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 24px;
  }

  /* ─ CS flow progress indicator ─ */
  .cs-flow-progress {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 16px 0 28px;
    margin-bottom: 4px;
  }
  .cs-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    position: relative;
  }
  .cs-flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 9px;
    width: 100%;
    height: 1px;
    background: var(--border);
    z-index: 0;
  }
  .cs-flow-step.done:not(:last-child)::after { background: var(--accent); opacity: 0.35; }
  .cs-flow-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.55rem;
    font-weight: 400;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    transition: all 0.2s;
    position: relative;
  }
  .cs-flow-step.active .cs-flow-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-dim);
  }
  .cs-flow-step.done .cs-flow-dot {
    border-color: var(--accent);
    color: var(--accent);
    opacity: 0.65;
    font-size: 0.6rem;
  }
  .cs-flow-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.56rem;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 300;
    line-height: 1.2;
  }
  .cs-flow-step.active .cs-flow-label { color: var(--accent); font-weight: 500; }
  @media (max-width: 540px) {
    .cs-flow-label { display: none; }
    .cs-flow-progress { padding-bottom: 20px; }
  }

  /* ─ Level select (pagCS0) ─ */
  .cs-level-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 36px;
  }
  .cs-level-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 28px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
  }
  .cs-level-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.25s ease;
  }
  .cs-level-card:hover { border-color: var(--muted2); background: var(--surface2); }
  .cs-level-card:hover::after { transform: scaleY(1); }
  .cs-level-badge {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--muted);
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
  }
  .cs-level-card:hover .cs-level-badge { border-color: var(--accent); color: var(--accent); }
  .cs-level-info { flex: 1; }
  .cs-level-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
    display: block;
    margin-bottom: 4px;
  }
  .cs-level-desc {
    font-size: 0.71rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.5;
  }
  .cs-level-meta {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: right;
    flex-shrink: 0;
  }

  /* ─ Case vignette (pagCS1) ─ */
  .cs-vignette {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 28px 32px;
    margin: 24px 0;
    line-height: 1.75;
  }
  .cs-vignette-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 14px;
  }
  .cs-vignette p {
    font-size: 0.83rem;
    color: var(--text);
    font-weight: 300;
    margin: 0 0 10px;
    line-height: 1.75;
  }
  .cs-vignette p:last-child { margin-bottom: 0; }
  .cs-vignette strong { font-weight: 500; color: var(--text); }
  .cs-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 20px 0 28px;
  }
  .cs-info-item {
    border: 1px solid var(--border);
    padding: 14px 16px;
    background: var(--surface);
  }
  .cs-info-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
  }
  .cs-info-value {
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 400;
  }

  /* ─ Differential input (pagCS2) ─ */
  .cs-ddx-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
  }
  .cs-ddx-slot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .cs-slot-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--muted);
    width: 20px;
    flex-shrink: 0;
    text-align: center;
  }
  .cs-slot-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text);
    padding: 4px 0;
    outline: none;
    transition: border-color 0.2s;
  }
  .cs-slot-input::placeholder { color: var(--muted2); }
  .cs-slot-input:focus { border-bottom-color: var(--accent); }
  .cs-slot-priority {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
  }
  @media (max-width: 760px) {
    .cs-ddx-slot {
      display: grid;
      grid-template-columns: 22px 1fr auto;
      gap: 12px;
      padding: 16px 14px;
    }
    .cs-slot-input {
      font-size: 16px;
      border-bottom-width: 2px;
      padding: 8px 0;
    }
    .cs-slot-priority {
      font-size: 0.56rem;
      letter-spacing: 0.14em;
    }
  }
  body.cs-mobile-ddx-open {
    overflow: hidden;
    touch-action: none;
  }
  .cs-mobile-ddx-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(14, 24, 36, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .cs-mobile-ddx-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  .cs-mobile-ddx-sheet {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--cs-mobile-kb-offset, 0px) + 10px);
    max-height: min(74vh, 620px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(64, 108, 134, 0.28);
    box-shadow: 0 22px 40px rgba(6, 18, 30, 0.22);
    transform: translateY(20px);
    transition: transform 0.18s ease;
  }
  .cs-mobile-ddx-overlay.open .cs-mobile-ddx-sheet { transform: translateY(0); }
  .cs-mobile-ddx-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 6px;
  }
  .cs-mobile-ddx-kicker {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #33566f;
  }
  .cs-mobile-ddx-close {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 11px;
    cursor: pointer;
  }
  .cs-mobile-ddx-title {
    margin: 0;
    padding: 0 16px 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    font-weight: 400;
    color: #0f2636;
    line-height: 1.5;
  }
  .cs-mobile-ddx-search {
    margin: 0 16px 10px;
    width: calc(100% - 32px);
    box-sizing: border-box;
    border: 1px solid rgba(64, 108, 134, 0.28);
    background: #fff;
    color: #1a3243;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 300;
    padding: 12px 13px;
    outline: none;
  }
  .cs-mobile-ddx-search::placeholder {
    color: rgba(62, 98, 122, 0.86);
  }
  .cs-mobile-ddx-search:focus { border-color: var(--accent); }
  .cs-mobile-ddx-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 10px;
  }
  .cs-mobile-ddx-action {
    border: 1px solid rgba(64, 108, 134, 0.28);
    background: #fff;
    color: #18384f;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.67rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 9px 11px;
    cursor: pointer;
    white-space: nowrap;
  }
  .cs-mobile-ddx-action:disabled {
    opacity: 0.58;
    color: rgba(24, 56, 79, 0.72);
    border-color: rgba(64, 108, 134, 0.26);
    pointer-events: none;
  }
  .cs-mobile-ddx-list {
    overflow-y: auto;
    border-top: 1px solid rgba(64, 108, 134, 0.24);
    -webkit-overflow-scrolling: touch;
  }
  .cs-mobile-ddx-option {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(64, 108, 134, 0.18);
    text-align: left;
    background: transparent;
    color: #0f2b3d;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
    padding: 13px 16px;
    cursor: pointer;
  }
  .cs-mobile-ddx-option:active {
    background: var(--accent-dim);
    color: var(--accent);
  }
  .cs-mobile-ddx-empty {
    padding: 16px;
    color: #35566d;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    line-height: 1.5;
  }
  .cs-inline-ddx-dropdown {
    position: fixed;
    z-index: 11900;
    background: #fff;
    border: 1px solid rgba(64, 108, 134, 0.28);
    box-shadow: 0 16px 36px rgba(12, 24, 36, 0.16);
    max-height: min(42vh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cs-inline-ddx-dropdown.hidden { display: none; }
  .cs-inline-ddx-option {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(64, 108, 134, 0.18);
    text-align: left;
    background: transparent;
    color: #1b3445;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 11px 14px;
    cursor: pointer;
  }
  .cs-inline-ddx-option:last-child { border-bottom: none; }
  .cs-inline-ddx-option:hover,
  .cs-inline-ddx-option.active {
    background: rgba(74,143,168,0.08);
    color: var(--accent);
  }
  .cs-inline-ddx-empty {
    padding: 12px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    color: #607d92;
    line-height: 1.5;
  }
  @media (max-width: 900px) and (pointer: coarse) {
    .cs-slot-input.cs-mobile-ddx-target,
    .cs-commit-input.cs-mobile-ddx-target {
      font-size: 16px;
      cursor: pointer;
      caret-color: transparent;
      background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
      background-position:
        calc(100% - 13px) calc(50% - 2px),
        calc(100% - 8px) calc(50% - 2px);
      background-size: 5px 5px, 5px 5px;
      background-repeat: no-repeat;
      padding-right: 24px;
    }
  }
  .cs-reasoning-box {
    margin: 0 0 28px;
  }
  .cs-reasoning-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
  }
  .cs-reasoning-textarea {
    width: 100%;
    min-height: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text);
    padding: 14px 16px;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s;
    box-sizing: border-box;
  }
  .cs-reasoning-textarea::placeholder { color: var(--muted2); }
  .cs-reasoning-textarea:focus { border-color: var(--accent); }

  /* ─ Examination phase (pagCS3) ─ */
  .cs-token-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
  }
  .cs-token-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 4px;
  }
  .cs-token {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    transition: background 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
  }
  .cs-token.used { background: var(--border); }
  .cs-token.pulse { transform: scale(1.4); }
  .cs-token-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    color: var(--muted);
    margin-left: 6px;
  }
  .cs-exam-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .cs-exam-category {
    border: 1px solid var(--border);
  }
  .cs-exam-cat-header {
    padding: 12px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
  }
  .cs-exam-cat-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    flex: 1;
  }
  .cs-exam-cat-chevron {
    font-size: 0.6rem;
    color: var(--muted);
    transition: transform 0.2s ease;
  }
  .cs-exam-category.open .cs-exam-cat-chevron { transform: rotate(90deg); }
  .cs-exam-items {
    display: none;
    flex-direction: column;
  }
  .cs-exam-category.open .cs-exam-items { display: flex; }
  .cs-exam-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.05));
    cursor: pointer;
    transition: background 0.15s;
  }
  .cs-exam-item:last-child { border-bottom: none; }
  .cs-exam-item:hover { background: var(--surface2); }
  .cs-exam-item.revealed { cursor: default; background: var(--surface); }
  .cs-exam-item.revealed:hover { background: var(--surface); }
  .cs-exam-item-name {
    flex: 1;
    font-size: 0.76rem;
    color: var(--text);
    font-weight: 300;
  }
  .cs-exam-item-cost {
    font-size: 0.6rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    font-family: 'DM Sans', sans-serif;
    transition: opacity 0.2s;
  }
  .cs-exam-item.revealed .cs-exam-item-cost { display: none; }
  .cs-exam-result {
    display: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 2px;
    letter-spacing: 0.04em;
  }
  .cs-exam-item.revealed .cs-exam-result { display: block; }
  .cs-result-pos { background: rgba(80,140,100,0.12); color: #3d7a50; }
  .cs-result-neg { background: rgba(74,143,168,0.10); color: var(--accent); }
  .cs-result-neutral { background: var(--surface2); color: var(--muted); }
  .cs-reveal-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 0;
    transition: opacity 0.2s;
  }
  .cs-exam-item.no-tokens .cs-reveal-btn { opacity: 0.35; pointer-events: none; }
  .cs-exam-item.no-tokens { opacity: 0.5; cursor: not-allowed; }

  /* ─ Redesigned flat exam list ─ */
  /* Tab navigation for exam categories */
  .cs-exam-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }
  .cs-exam-tab {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--muted2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
  }
  .cs-exam-tab:hover { color: var(--accent); border-color: var(--accent-border); }
  .cs-exam-tab.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
    font-weight: 500;
  }
  .cs-exam-tab .cs-tab-badge {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.6rem;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    padding: 0px 5px;
    vertical-align: middle;
    line-height: 1.5;
  }
  @media (max-width: 480px) {
    .cs-exam-tab { font-size: 0.68rem; padding: 5px 10px; }
  }
  /* Category group wrapper */
  .cs-exam-group {
    margin-bottom: 24px;
  }
  .cs-exam-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
  }
  .cs-exam-group-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cs-exam-group-line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
  }
  .cs-exam-group-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    color: var(--muted);
    letter-spacing: 0.06em;
  }
  /* Row-style test item */
  .cs-exam-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: opacity 0.12s;
    gap: 12px;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    font-family: 'DM Sans', sans-serif;
  }
  .cs-exam-row:last-child { border-bottom: none; }
  .cs-exam-row:hover .cs-exam-row-name { color: var(--accent); }
  .cs-exam-row:disabled { opacity: 0.38; cursor: not-allowed; }
  .cs-exam-row:disabled:hover .cs-exam-row-name { color: var(--text); }
  .cs-exam-row-name {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--text);
    flex: 1;
    transition: color 0.12s;
    letter-spacing: 0.01em;
  }
  .cs-exam-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .cs-exam-row-cost {
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    font-family: 'DM Sans', sans-serif;
  }
  .cs-exam-row-result {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 3px;
    letter-spacing: 0.01em;
    white-space: normal;
    max-width: 55vw;
    display: inline-block;
    line-height: 1.45;
  }
  .cs-exam-row { align-items: flex-start; }
  .cs-exam-row-name { padding-top: 3px; }
  @media (max-width: 600px) {
    .cs-exam-row {
      flex-direction: column;
      gap: 4px;
    }
    .cs-exam-row-result {
      max-width: 100%;
      font-size: 0.74rem;
      display: block;
    }
    .cs-exam-row-right { align-self: flex-start; }
  }
  .cs-exam-row-result.positive { background: rgba(45,110,80,0.12); color: #1e5c3a; border: 1px solid rgba(45,110,80,0.22); }
  .cs-exam-row-result.negative { background: rgba(45,100,130,0.12); color: #1e4d6b; border: 1px solid rgba(45,100,130,0.22); }
  .cs-exam-row-result.neutral  { background: rgba(60,80,100,0.10); color: #2d4052; border: 1px solid rgba(60,80,100,0.18); }
  .cs-exam-row.wasted .cs-exam-row-name { color: var(--muted); text-decoration: line-through; }
  .cs-exam-row-wasted-tag {
    font-size: 0.62rem;
    color: var(--negative);
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.04em;
  }
  .cs-update-note {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.65;
    margin-bottom: 24px;
    padding: 14px 18px;
    border-left: 2px solid var(--border);
    background: var(--surface);
  }
  .cs-revealed-summary {
    margin-bottom: 24px;
  }
  .cs-revealed-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 10px;
  }
  .cs-revealed-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .cs-rtag {
    font-size: 0.68rem;
    padding: 4px 10px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
  }
  .cs-rtag.pos { border-color: rgba(80,140,100,0.3); color: #3d7a50; background: rgba(80,140,100,0.06); }
  .cs-rtag.neg { border-color: rgba(74,143,168,0.3); color: var(--accent); background: rgba(74,143,168,0.07); }

  /* ─ Commit diagnosis (pagCS5) ─ */
  .cs-commit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0 20px;
  }
  .cs-commit-field { display: flex; flex-direction: column; gap: 8px; }
  .cs-commit-field.full { grid-column: 1 / -1; }
  .cs-commit-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cs-commit-input {
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text);
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
  }
  .cs-commit-input:focus { border-color: var(--accent); }
  .cs-commit-textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text);
    padding: 10px 14px;
    outline: none;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
  }
  .cs-commit-textarea:focus { border-color: var(--accent); }
  .cs-confidence-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
  }
  .cs-confidence-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: var(--border);
    outline: none;
    margin: 2px 0;
  }
  .cs-confidence-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 0 0 2px rgba(74,143,168,0.16);
    cursor: pointer;
  }
  .cs-confidence-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 0 0 2px rgba(74,143,168,0.16);
    cursor: pointer;
  }
  .cs-confidence-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cs-confidence-value {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .cs-redflags-check {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 24px;
    grid-column: 1 / -1;
  }
  .cs-rf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 0;
  }
  .cs-rf-cb {
    width: 16px; height: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
  }
  .cs-rf-item input[type=checkbox] { display: none; }
  .cs-rf-item input[type=checkbox]:checked ~ .cs-rf-cb { background: var(--accent); border-color: var(--accent); }
  .cs-rf-item input[type=checkbox]:checked ~ .cs-rf-cb::after { content: '✓'; font-size: 0.6rem; color: white; }
  .cs-rf-text {
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 300;
    line-height: 1.4;
  }
  @media (max-width: 560px) { .cs-commit-grid { grid-template-columns: 1fr; } }

  /* ─ Debrief (pagCS6) ─ */
  .cs-debrief-hero {
    text-align: center;
    padding: 36px 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
  }
  .cs-debrief-score-ring {
    width: 96px; height: 96px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
  }
  .cs-debrief-score-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1;
  }
  .cs-debrief-score-den {
    font-size: 0.62rem;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    text-align: center;
    padding: 0 6px;
  }
  .cs-debrief-verdict {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text);
    margin-bottom: 6px;
  }
  .cs-debrief-verdict-sub {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 300;
  }
  .cs-debrief-section {
    margin-bottom: 32px;
  }
  .cs-debrief-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .cs-debrief-dx-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  .cs-dx-box {
    padding: 16px 18px;
    border: 1px solid var(--border);
  }
  .cs-dx-box-label {
    font-size: 0.55rem;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
  }
  .cs-dx-box-name {
    font-size: 0.82rem;
    color: var(--text);
    font-weight: 400;
    line-height: 1.3;
  }
  .cs-dx-box.correct { border-color: rgba(80,140,100,0.4); background: rgba(80,140,100,0.05); }
  .cs-dx-box.correct .cs-dx-box-label { color: #3d7a50; }
  .cs-dx-box.match { border-color: rgba(80,140,100,0.4); background: rgba(80,140,100,0.05); }
  .cs-dx-box.near { border-color: rgba(200,160,60,0.4); background: rgba(200,160,60,0.04); }
  .cs-dx-box.miss { border-color: var(--border); }
  .cs-ai-feedback {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 20px 24px;
    margin-bottom: 16px;
    font-size: 0.78rem;
    color: var(--text);
    font-weight: 300;
    line-height: 1.7;
  }
  .cs-ai-feedback.loading {
    color: var(--muted);
    font-style: italic;
  }
  .cs-ai-loading-dots::after {
    content: '';
    animation: csLoadingDots 1.4s infinite;
  }
  @keyframes csLoadingDots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
  }
  .cs-ai-section-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
  }
  .cs-key-findings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  /* .cs-finding-row / .cs-finding-icon / .cs-finding-text consolidated into .cs-key-finding below */
  .cs-rubric-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
    margin-bottom: 16px;
  }
  .cs-rubric-table th {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted2);
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
  }
  .cs-rubric-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.06));
    color: var(--text);
    font-weight: 300;
    line-height: 1.4;
    vertical-align: top;
  }
  .cs-rubric-table tr:last-child td { border-bottom: none; }
  .cs-score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    border-radius: 2px;
    font-size: 0.62rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    padding: 0 6px;
  }
  .cs-score-full { background: rgba(80,140,100,0.15); color: #3d7a50; }
  .cs-score-part { background: rgba(200,160,60,0.15); color: #a07820; }
  .cs-score-zero { background: rgba(180,80,80,0.1); color: #904040; }
  .cs-try-another {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  .cs-pdf-btn { display: inline-flex; align-items: center; gap: 6px; }
  .cs-share-btn { display: inline-flex; align-items: center; gap: 6px; }
  .cs-pdf-btn:disabled { opacity: 0.5; cursor: default; }
  .cs-pdf-header { display: none; }
  .cs-pdf-footer { display: none; }
  @media (max-width: 560px) {
    .cs-debrief-dx-comparison { grid-template-columns: 1fr; }
  }
  /* New debrief elements */
  .cs-dx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
  @media (max-width:540px) { .cs-dx-row { grid-template-columns: 1fr; } }
  .cs-dx-block { padding: 16px 18px; border: 1px solid var(--border); }
  .cs-dx-block-label { font-family: 'DM Sans', sans-serif; font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
  .cs-dx-block-value { font-size: 0.82rem; font-weight: 400; color: var(--text); display: block; }
  .cs-dx-block-meta { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 8px; display: block; }
  .cs-dx-block-value.correct { color: #3d7a50; }
  .cs-dx-block-value.incorrect { color: #904040; }
  .cs-dx-differentials { margin-top: 12px; }
  .cs-dx-diff-label { font-family: 'DM Sans', sans-serif; font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
  .cs-dx-diff-tag { display: inline-block; font-size: 0.68rem; padding: 3px 10px; border: 1px solid var(--border); color: var(--muted); margin: 3px 4px 3px 0; font-family: 'DM Sans', sans-serif; font-weight: 300; }
  .cs-key-finding { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); background: var(--surface); }
  .cs-key-finding-icon { font-size: 0.8rem; flex-shrink: 0; margin-top: 1px; }
  .cs-key-finding-text { font-size: 0.74rem; color: var(--text); font-weight: 300; line-height: 1.5; }
  .cs-key-finding-text strong { font-weight: 500; }
  .cs-rubric-score { font-family: 'DM Sans', sans-serif; font-size: 0.68rem; font-weight: 500; white-space: nowrap; }
  .cs-rubric-score.full { color: #3d7a50; }
  .cs-rubric-score.partial { color: #a07820; }
  .cs-rubric-score.zero { color: #904040; }
  .cs-redflag-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.76rem; color: var(--muted); font-weight: 300; cursor: pointer; line-height: 1.45; padding: 4px 0; }
  .cs-redflag-item input[type="checkbox"] { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }

  /* ── PATIENT FOOTER DISCLAIMER ── */
  .patient-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--muted);
    letter-spacing: 0.04em;
    line-height: 1.7;
  }
  .patient-footer strong { font-weight: 500; color: var(--muted2); }

  .rf-hard-stop {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.83rem;
    font-weight: 400;
    color: var(--negative);
    background: var(--negative-dim);
    border: 1px solid rgba(139,58,58,0.2);
    padding: 16px 18px;
    line-height: 1.65;
    margin-bottom: 16px;
  }
  /* ── RED FLAG MODAL ── */
  .rf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28,26,24,0.55);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .rf-overlay.active { opacity: 1; pointer-events: all; }
  .rf-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    max-width: 600px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: translateY(14px);
    transition: transform 0.25s ease;
  }
  .rf-overlay.active .rf-modal { transform: translateY(0); }
  .rf-badge {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--negative);
    border: 1px solid var(--negative);
    padding: 3px 10px;
    margin-bottom: 16px;
  }
  .rf-modal h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 8px;
  }
  .rf-sub {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.65;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
  }
  .rf-items { display: flex; flex-direction: column; }
  .rf-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: padding 0.12s;
    user-select: none;
  }
  .rf-checkbox {
    width: 16px; height: 16px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
  }
  .rf-item.flagged .rf-checkbox { background: var(--negative); border-color: var(--negative); }
  .rf-item.flagged .rf-checkbox::after { content: '✓'; color: var(--bg); font-size: 0.65rem; }
  .rf-item-label {
    font-size: 0.84rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 2px;
  }
  .rf-item-note {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.5;
  }
  .rf-alert {
    display: none;
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(139,58,58,0.05);
    border-left: 3px solid var(--negative);
  }
  .rf-alert.show { display: block; }
  .rf-alert-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--negative);
    margin-bottom: 6px;
  }
  .rf-alert p { font-size: 0.8rem; color: var(--muted2); font-weight: 300; line-height: 1.65; }
  .rf-btn-row { display: flex; gap: 12px; margin-top: 28px; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 20px; }

  /* ── CONFIDENCE / WHY PANEL ── */
  .why-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.15s;
    width: 100%;
    text-align: left;
    margin-top: 4px;
  }
  .why-toggle:hover { color: var(--text); }
  .why-toggle-icon {
    width: 15px; height: 15px;
    border: 1px solid currentColor;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; flex-shrink: 0;
    transition: transform 0.2s;
    line-height: 1;
  }
  .why-toggle.open .why-toggle-icon { transform: rotate(45deg); }
  .why-panel { display: none; padding: 14px 0 6px; border-top: 1px solid var(--border-light); }
  .why-panel.open { display: block; }
  /* Default open for rank-1 card */
  .ddx-card.rank-1 .why-panel { display: block; }
  .why-section { margin-bottom: 16px; }
  .why-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
  }
  .why-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
  .why-tags { display: flex; flex-wrap: wrap; gap: 5px; }
  .why-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    padding: 3px 10px;
    border: 1px solid var(--border-light);
    color: var(--muted2);
    letter-spacing: 0.01em;
  }
  .why-tag.pos { border-color: rgba(74,124,90,0.4); color: var(--positive); background: var(--positive-dim); }
  .why-tag.neg { color: var(--muted); opacity: 0.65; text-decoration: line-through; }
  .why-tag.disc { border-color: rgba(122,96,48,0.4); color: var(--warn); background: rgba(122,96,48,0.06); }
  .why-confidence-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  }
  .why-conf-label {
    font-family: 'DM Sans', sans-serif; font-size: 0.6rem; font-weight: 400;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
    width: 72px; flex-shrink: 0;
  }
  .why-conf-bar { flex: 1; height: 4px; background: var(--border-light); overflow: hidden; border-radius: 2px; }
  .why-conf-fill { height: 100%; background: var(--accent); transition: width 0.5s ease; }
  .why-tier-label { font-family: 'DM Sans', sans-serif; font-size: 0.62rem; font-weight: 400; letter-spacing: 0.06em; color: var(--accent); text-transform: uppercase; margin: 4px 0 10px; }
  .why-conf-pct { display: none; }
  .why-conf-tier { font-family: 'DM Sans', sans-serif; font-size: 0.6rem; font-weight: 400; letter-spacing: 0.06em; color: var(--accent); white-space: nowrap; padding-left: 8px; }

  @media (max-width: 520px) {
    .role-cards {
      flex-direction: column;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 18px;
    }
    .role-card:first-child::before { display: none; }
    .role-card:first-child { border-right: none; border-bottom: 1px solid rgba(168,200,216,0.26); }
    .role-card {
      flex: 0 0 auto !important;
      min-height: 42vh;
      justify-content: flex-start;
      padding: 34px 0 20px;
    }
    .role-cards:has(.role-card:first-child:hover) .role-card:first-child,
    .role-cards:has(.role-card:first-child:focus-within) .role-card:first-child,
    .role-cards:has(.role-card:last-child:hover) .role-card:last-child,
    .role-cards:has(.role-card:last-child:focus-within) .role-card:last-child,
    .role-cards.is-hover-left .role-card:first-child,
    .role-cards.is-focus-left .role-card:first-child,
    .role-cards.is-hover-right .role-card:last-child,
    .role-cards.is-focus-right .role-card:last-child {
      flex: 0 0 auto !important;
    }
    .role-card-title { font-size: 1.3rem; }
    .role-card-inner {
      opacity: 1 !important;
      transform: translateY(0) !important;
      width: min(92vw, 430px);
      padding: 0 28px;
      gap: 10px;
    }
    .role-card-desc {
      min-height: 0;
      max-width: 360px;
      line-height: 1.55;
      margin-top: 6px;
      margin-bottom: 8px;
    }
    /* On touch, always show desc and arrow */
    .role-card-desc { opacity: 1; transform: translateY(0); }
    .role-card-arrow { opacity: 1; margin-top: 0; }
    .role-card-sub-tags { display: none !important; }
    .landing-byline {
      position: static;
      transform: none;
      width: min(92vw, 520px);
      margin: 14px auto 24px;
      padding: 0;
      text-align: center;
    }
    .objective-grid { grid-template-columns: 1fr; }
    .exercise-grid { grid-template-columns: 1fr; }
    .area-grid { grid-template-columns: repeat(2, 1fr); }
    header { padding: 0 18px; }
    .header-tag { display: none; }
    .container { padding: 32px 20px 80px; }
  }

  @media (max-width: 900px) {
    #pageHome .home-header {
      background: rgba(6,20,30,0.78) !important;
      border-bottom-color: rgba(240,248,252,0.28) !important;
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }
    #pageHome .home-wordmark {
      padding: 0;
      border-radius: 0;
      background: transparent;
    }
    #pageHome .home-wm-eidos {
      color: rgba(248,252,255,0.99) !important;
      text-shadow: 0 1px 12px rgba(0,0,0,0.50);
    }
    #pageHome .home-wm-tag {
      color: rgba(245,252,255,0.99) !important;
      font-size: 0.70rem;
      font-weight: 500;
      letter-spacing: 0.16em;
      text-shadow: 0 1px 10px rgba(0,0,0,0.56);
    }
    .landing-wave { display: none; }
    .role-cards {
      flex-direction: column;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 18px;
    }
    .role-card:first-child::before { display: none; }
    .role-card:first-child { border-right: none; border-bottom: 1px solid rgba(168,200,216,0.26); }
    .role-card,
    .role-cards:has(.role-card:first-child:hover) .role-card:first-child,
    .role-cards:has(.role-card:first-child:focus-within) .role-card:first-child,
    .role-cards:has(.role-card:last-child:hover) .role-card:last-child,
    .role-cards:has(.role-card:last-child:focus-within) .role-card:last-child,
    .role-cards.is-hover-left .role-card:first-child,
    .role-cards.is-focus-left .role-card:first-child,
    .role-cards.is-hover-right .role-card:last-child,
    .role-cards.is-focus-right .role-card:last-child {
      flex: 0 0 auto !important;
      min-height: 42vh;
      justify-content: flex-start;
      padding: 34px 0 20px;
    }
    .role-card-title { font-size: 1.3rem; }
    .role-card-inner {
      opacity: 1 !important;
      transform: translateY(0) !important;
      width: min(92vw, 430px);
      padding: 0 28px;
      gap: 10px;
    }
    .role-card-desc {
      min-height: 0;
      max-width: 360px;
      line-height: 1.55;
      margin-top: 6px;
      margin-bottom: 8px;
      opacity: 1;
      transform: translateY(0);
    }
    .role-card-arrow { opacity: 1; margin-top: 0; }
    .role-card-sub-tags { display: none !important; }
    .landing-byline {
      position: static;
      left: auto;
      right: auto;
      transform: none;
      width: min(92vw, 520px);
      max-width: 92vw;
      margin: 14px auto 24px;
      padding: 0;
      text-align: center;
      text-shadow: none;
      background: none;
      box-shadow: none;
      filter: none;
    }
  }

  /* ── USER COLLECTION PAGE ── */
  .collect-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 60px 24px;
    text-align: center;
  }
  .collect-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
  }
  .collect-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 300;
    letter-spacing: 0;
    font-style: italic;
    color: var(--text);
    line-height: 1.15;
    margin-bottom: 12px;
    max-width: 420px;
  }
  .collect-sub {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.7;
    max-width: 340px;
    margin-bottom: 48px;
    letter-spacing: 0.01em;
  }
  .collect-form {
    width: 100%;
    max-width: 400px;
    text-align: left;
  }
  .collect-field {
    margin-bottom: 28px;
  }
  .collect-field label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 8px;
  }
  .collect-field input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.15s;
    letter-spacing: 0.01em;
  }
  .collect-field input:focus { border-color: var(--accent); }
  .collect-field input::placeholder { color: var(--muted); font-style: italic; }
  .collect-skip {
    display: inline-block;
    margin-top: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--muted);
    letter-spacing: 0.06em;
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border);
    transition: color 0.15s;
    text-align: center;
  }
  .collect-skip:hover { color: var(--text); }
  .collect-privacy {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted2);
    margin-top: 32px;
    line-height: 1.6;
    text-align: center;
    max-width: 340px;
  }

  /* ── EMAIL RESULTS MODAL ── */
  .email-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28,26,24,0.5);
    backdrop-filter: blur(3px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .email-overlay.active { opacity: 1; pointer-events: all; }

  /* ── ABOUT OVERLAY ── */
  .about-overlay {
    position: fixed; inset: 0;
    background: rgba(20,32,40,0.55);
    z-index: 300;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
  }
  .about-overlay.active { opacity: 1; pointer-events: all; }
  .about-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    max-width: 540px;
    width: 100%;
    padding: 40px 40px 36px;
    position: relative;
    transform: translateY(16px);
    transition: transform 0.25s;
    max-height: 90vh;
    overflow-y: auto;
  }
  .about-overlay.active .about-modal { transform: translateY(0); }
  .about-modal-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 12px;
  }
  .about-modal h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.2;
  }
  .about-modal p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    font-weight: 300;
    color: var(--muted2);
    line-height: 1.7;
    margin-bottom: 16px;
  }
  .about-modal-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.66rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin: 22px 0 10px;
  }
  .about-modal-section-title:first-of-type {
    margin-top: 4px;
  }
  .about-modal-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
  }
  .about-modal-contact {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.6;
  }
  .about-modal-contact a {
    color: var(--accent);
    text-decoration: none;
  }
  .about-modal-contact a:hover { text-decoration: underline; }
  .about-modal-social {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
  .about-modal-social-text {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--muted2);
    line-height: 1.55;
    letter-spacing: 0.01em;
  }
  .about-modal-social-text a {
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .about-modal-social-qr {
    width: 112px;
    height: auto;
    border: 1px solid rgba(95,168,196,0.24);
    border-radius: 6px;
    display: block;
  }
  .about-modal-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none; border: none;
    font-size: 1.2rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.15s;
  }
  .about-modal-close:hover { color: var(--text); }

  .email-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    max-width: 480px;
    width: 100%;
    padding: 40px;
    position: relative;
    transform: translateY(14px);
    transition: transform 0.25s ease;
  }
  .email-overlay.active .email-modal { transform: translateY(0); }
  .email-modal-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
  }
  .email-modal h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 8px;
  }
  .email-modal p {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.65;
    margin-bottom: 28px;
  }
  .email-modal-field { margin-bottom: 20px; }
  .email-modal-field label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 8px;
  }
  .email-modal-field input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.15s;
  }
  .email-modal-field input:focus { border-color: var(--accent); }
  .email-modal-btns { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; border-top: 1px solid var(--border); padding-top: 20px; }
  .email-success {
    display: none;
    text-align: center;
    padding: 20px 0;
  }
  .email-success.show { display: block; }
  .email-success-icon {
    width: 40px; height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent);
    font-size: 1.1rem;
  }
  .email-success h4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 8px;
  }
  .email-success p {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
  }


  /* ── RESULTS PAGE TYPOGRAPHY ── */
  .h2-results {
    font-size: 1.9rem;
    font-weight: 300;
    letter-spacing: 0;
    font-style: italic;
    color: var(--muted);
    text-transform: none;
    font-family: 'Cormorant Garamond', Georgia, serif;
    margin-bottom: 4px;
  }
  .results-card .card-header { margin-bottom: 8px; }

  /* ── REC-BOX DISCLAIMER PARAGRAPH ── */
  .rec-disclaimer {
    color: rgba(232,228,223,0.4) !important;
    font-size: 0.72rem !important;
    margin-top: 18px;
    border-top: 1px solid rgba(232,228,223,0.1);
    padding-top: 14px;
    line-height: 1.75;
    font-style: italic;
  }

  /* ── FOCUS RINGS ── */
  .chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .area-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  .btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .toggle-btn:focus-visible {
    outline: 2px solid var(--muted);
    outline-offset: -1px;
  }
  .home-nav-link,
  .home-card,
  .home-btn-explore,
  .home-btn-about,
  .role-card,
  .area-btn,
  .pain-pin {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* ── PROGRESS BAR MOBILE FIX ── */
  @media (max-width: 600px) {
    .progress-bar { margin-bottom: 32px; }
    .step-dot { gap: 3px; }
    .pain-map { padding: 4px 10px; }
    .pain-map-panels { grid-template-columns: 1fr; }
    .pain-map-panel { padding: 2px 0 0; }
    .pain-figure-wrap { width: min(100%, 190px); }
    .pain-pin {
      width: 38px;
      height: 38px;
    }
    .pain-map-caption { font-size: 0.72rem; }
    .dot-label {
      display: inline-block;
      max-width: 40px;
      font-size: 0.54rem;
      line-height: 1.1;
      letter-spacing: 0.03em;
      overflow: hidden;
      text-overflow: clip;
      white-space: nowrap;
      text-align: center;
    }
    /* On narrow screens use the short label from data-short attribute */
    .dot-label[data-short]::before {
      content: attr(data-short);
    }
    .dot-label[data-short] > * { display: none; }
    .dot-label[data-short] {
      font-size: 0;
    }
    .dot-label[data-short]::before {
      font-size: 0.54rem;
      display: inline;
    }
  }

  /* ── HEADER-TAG HIDE ON MEDIUM SCREENS ── */
  @media (max-width: 680px) {
    .header-tag { display: none; }
  }

  /* ── TOAST NOTIFICATION ── */
  #eidos-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--surface2);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    padding: 10px 22px;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    white-space: nowrap;
  }
  #eidos-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
