/* ════════════════════════════════════════════════════════════════
   AI Decision Fluency Framework · presentation layer

   Written for reading, not for looking at. The audience is senior and
   busy, often on a phone, frequently over 45. Priorities in order:
   text contrast, comfortable measure, generous tap targets, and as
   little decorative chrome as possible between them and the words.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Neutrals. text and text-dim clear 12:1 and 8:1 on the page
     background; text-muted clears 5.5:1, so it is safe for the small
     labels but is never used for body prose. */
  --bg:          #ffffff;
  --surface:     #f6f8fc;
  --surface-2:   #edf1fa;
  --border:      #d8dfee;
  --border-firm: #b9c4dc;
  --text:        #14171d;
  --text-dim:    #333a47;
  --text-muted:  #555f70;

  --accent:       #1a46c8;
  --accent-hover: #14369e;
  --accent-tint:  rgba(26, 70, 200, 0.08);
  --accent-ink:   #ffffff;

  --green:      #12693a;
  --green-tint: rgba(18, 105, 58, 0.10);
  --amber:      #8a4d08;
  --amber-tint: rgba(138, 77, 8, 0.11);
  --red:        #a01820;
  --red-tint:   rgba(160, 24, 32, 0.09);

  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Roughly 66 characters, which is where long prose stops being tiring. */
  --measure: 34rem;

  --radius:    10px;
  --radius-lg: 14px;
  --shadow:    0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #12151b;
    --surface:     #191d26;
    --surface-2:   #212734;
    --border:      #2d3542;
    --border-firm: #414b5c;
    --text:        #eceef4;
    --text-dim:    #c5cbd8;
    --text-muted:  #98a1b2;

    --accent:       #8fabff;
    --accent-hover: #a9beff;
    --accent-tint:  rgba(143, 171, 255, 0.14);
    --accent-ink:   #0d1017;

    --green:      #57cd89;
    --green-tint: rgba(87, 205, 137, 0.14);
    --amber:      #e2a455;
    --amber-tint: rgba(226, 164, 85, 0.14);
    --red:        #ff9296;
    --red-tint:   rgba(255, 146, 150, 0.13);

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;          /* 17px base. 16px is too small for this. */
  font-weight: 400;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

/* Constrain prose, not layout. Cards may be wide; sentences may not. */
.narrative-text,
.feedback-text,
.principle-ref,
.intro-body p,
.intro-lead,
.intro-aside,
.how-item p,
.results-commentary p,
.legend-note,
.panel-note,
.menu-note,
.consequence-text,
.next-up p { max-width: var(--measure); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── HEADER ───────────────────────────────────────────────────── */

.site-header {
  text-align: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.site-header .brand {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.site-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.site-header .subtitle {
  font-size: 1.0625rem;
  color: var(--text-dim);
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Once past the introduction the masthead is chrome. On a phone it was
   pushing the actual question below the fold on every single step. */
body.in-app .site-header { padding: 1.1rem 0 0.9rem; margin-bottom: 1.5rem; }
body.in-app .site-header .brand { margin-bottom: 0; }
body.in-app .site-header h1,
body.in-app .site-header .subtitle { display: none; }

/* ── INTRO ────────────────────────────────────────────────────── */

.intro-view { display: none; }
.intro-view.active { display: block; }
.intro-step { display: none; }
.intro-step.active { display: block; }

.intro-hook {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.6vw, 1.75rem);
  line-height: 1.4;
  color: var(--text);
  border-left: 4px solid var(--accent);
  padding: 0.3rem 0 0.3rem 1.4rem;
  margin-bottom: 1.75rem;
  max-width: 32rem;
  text-wrap: pretty;
}

.intro-body p { margin-bottom: 1.1rem; color: var(--text-dim); }
.intro-body p:last-child { margin-bottom: 0; }

.view-h {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.intro-lead { color: var(--text-dim); margin-bottom: 1.75rem; }

.intro-aside {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.intro-skip { text-align: center; margin-top: 2rem; }

.d-grid { display: grid; gap: 0.75rem; }

.d-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.35rem;
}

.d-card .d-name {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.d-card .d-question {
  font-size: 1.09rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.4rem;
  text-wrap: pretty;
}

.d-card .d-org { color: var(--text-dim); line-height: 1.6; }

.how-list { counter-reset: how; }

.how-item {
  counter-increment: how;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.6rem;
}

.how-item:last-child { margin-bottom: 0; }

.how-item::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border-firm);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-item h3 { font-size: 1.09rem; font-weight: 600; margin-bottom: 0.3rem; }
.how-item p { color: var(--text-dim); }

.cta-row { margin-top: 2.5rem; text-align: center; }
.cta-time { display: block; margin-top: 0.85rem; font-size: 0.92rem; color: var(--text-muted); }

/* ── BUTTONS ──────────────────────────────────────────────────── */

.cta-btn, .next-btn, .restart-btn, .next-up button {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: 3rem;
  padding: 0.8rem 1.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cta-btn, .next-btn {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.restart-btn, .next-up button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-firm);
}

.next-btn { display: none; margin-top: 1.5rem; }
.next-btn.visible { display: inline-block; }
.restart-btn { margin-top: 1.5rem; }

.reset-link, .footer-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 2.75rem;          /* 44px tap target */
  padding: 0.7rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reset-link { margin-top: 0.5rem; }

@media (hover: hover) and (pointer: fine) {
  .cta-btn:hover, .next-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .restart-btn:hover, .next-up button:hover { border-color: var(--accent); background: var(--accent-tint); }
  .reset-link:hover, .footer-link:hover { color: var(--accent); }
}

/* ── MENU ─────────────────────────────────────────────────────── */

#scenarioSelector { display: none; }
#scenarioSelector.active { display: block; }

.menu-note { color: var(--text-dim); margin-bottom: 2rem; }

.track-heading {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.scenario-grid { display: grid; gap: 0.9rem; margin-bottom: 1.5rem; }

.scenario-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.5rem 1.6rem;
  cursor: pointer;
  position: relative;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .scenario-card:hover { background: var(--surface-2); box-shadow: var(--shadow); }
}

.scenario-card.done { border-left-color: var(--green); }

.scenario-card.done::after {
  content: '✓ Completed';
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--green);
}

.scenario-card .card-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-right: 6.5rem;         /* clears the completed flag */
}

.scenario-card h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.55rem;
  color: var(--text);
  text-wrap: balance;
}

.scenario-card p { color: var(--text-dim); line-height: 1.6; }

.scenario-card .tags { margin-top: 0.9rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  background: var(--accent-tint);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent);
}

.card-facets {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card-facets strong { color: var(--text-dim); font-weight: 600; }

/* ── PLAY ─────────────────────────────────────────────────────── */

.scenario-play { display: none; }
.scenario-play.active { display: block; }

/* Sticky so there is always an answer to "how far in am I?" */
.progress-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.step-counter {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.consequence-box {
  border-left: 4px solid var(--amber);
  background: var(--amber-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.consequence-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.4rem;
}

.consequence-text { color: var(--text-dim); line-height: 1.65; }

.narrative-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.narrative-box .context-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.narrative-box .narrative-text {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
}

.narrative-box .narrative-text strong { font-weight: 600; color: var(--text); }

/* Was mono uppercase at 11px. It is a signal, so it should be legible. */
.tests-label {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.9rem;
}

.tests-label strong { color: var(--accent); font-weight: 700; }

.question-text {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.4vw, 1.55rem);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.options-list { display: grid; gap: 0.7rem; }

.option-btn {
  background: var(--bg);
  border: 1px solid var(--border-firm);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.option-btn .option-key {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--accent-tint);
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

@media (hover: hover) and (pointer: fine) {
  .option-btn:hover { background: var(--surface); border-color: var(--accent); }
}

.option-btn.revealed-good { border-color: var(--green); background: var(--green-tint); }
.option-btn.revealed-ok   { border-color: var(--amber); background: var(--amber-tint); }
.option-btn.revealed-poor { border-color: var(--red);   background: var(--red-tint); }

.option-btn.selected { border-width: 2px; padding: calc(1.15rem - 1px) calc(1.35rem - 1px); }

.option-btn .score-badge {
  display: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.option-btn.revealed-good .score-badge,
.option-btn.revealed-ok .score-badge,
.option-btn.revealed-poor .score-badge { display: inline-block; }

.option-btn.revealed-good .score-badge { background: var(--green-tint); color: var(--green); }
.option-btn.revealed-ok .score-badge   { background: var(--amber-tint); color: var(--amber); }
.option-btn.revealed-poor .score-badge { background: var(--red-tint);   color: var(--red); }

/* ── FEEDBACK ─────────────────────────────────────────────────── */

.feedback-box {
  display: none;
  margin-top: 1.5rem;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scroll-margin-top: 1.5rem;
}

.feedback-box.visible { display: block; animation: fadeSlideUp 0.35s ease; }

.feedback-box .feedback-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0.7rem;
}

.feedback-box .feedback-title.good { color: var(--green); }
.feedback-box .feedback-title.ok   { color: var(--amber); }
.feedback-box .feedback-title.poor { color: var(--red); }

/* The most important prose in the tool. It used to be the smallest. */
.feedback-box .feedback-text {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-dim);
}

.feedback-box .principle-ref {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.feedback-box .principle-ref em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ── RESULTS ──────────────────────────────────────────────────── */

.results-view { display: none; }
.results-view.active { display: block; }

.results-header { text-align: center; margin-bottom: 1.5rem; }

.results-header h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.6vw, 2.1rem);
  font-weight: 400;
}

.score-ring { width: 10rem; height: 10rem; margin: 1.75rem auto; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }

.score-ring .ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s ease;
}

.score-ring .score-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring .score-number { font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.score-ring .score-total { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }

.dimension-scores { display: grid; gap: 0.6rem; margin: 1.75rem 0; }

.dim-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dim-row .dim-name { font-size: 1rem; font-weight: 600; width: 9.5rem; flex-shrink: 0; }
.dim-row .dim-bar { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.dim-row .dim-bar-fill { height: 100%; border-radius: 4px; transition: width 0.9s ease; }

.dim-row .dim-score {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dim);
  width: 3rem;
  text-align: right;
  flex-shrink: 0;
}

.results-commentary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.75rem 0;
}

.results-commentary h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.results-commentary p { color: var(--text-dim); line-height: 1.75; margin-bottom: 0.9rem; }
.results-commentary p:last-child { margin-bottom: 0; }

.dim-legend, .profile-panel, .next-up {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  background: var(--surface);
}

.dim-legend { margin: 1.75rem 0; }
.profile-panel { margin-bottom: 2rem; }
.next-up { margin: 1.75rem 0; }

.dim-legend h4, .profile-panel h4, .next-up h4 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.dim-legend dt { font-weight: 700; font-size: 1.02rem; color: var(--text); margin-top: 0.9rem; }
.dim-legend dt:first-of-type { margin-top: 0; }
.dim-legend dd { color: var(--text-dim); line-height: 1.6; }

.legend-note, .panel-note { color: var(--text-muted); line-height: 1.65; margin-bottom: 1rem; }
.panel-note { margin-top: 1rem; margin-bottom: 0; }
.legend-note strong, .panel-note strong { color: var(--text-dim); font-weight: 600; }

.profile-panel .dim-row { background: transparent; border: none; padding: 0.35rem 0; }
.next-up p { color: var(--text-dim); margin-bottom: 1rem; }

/* ── FOOTER ───────────────────────────────────────────────────── */

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.site-footer p { margin-bottom: 0.35rem; max-width: 36rem; margin-left: auto; margin-right: auto; }
.site-footer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── DEV ──────────────────────────────────────────────────────── */

.validation-banner {
  border: 1px solid var(--red);
  background: var(--red-tint);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--red);
}

.validation-banner strong { display: block; margin-bottom: 0.5rem; }

/* ── MOTION ───────────────────────────────────────────────────── */

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeSlideUp 0.35s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── SMALL SCREENS ────────────────────────────────────────────── */

@media (max-width: 40rem) {
  .container { padding: 1rem 1.1rem 2.5rem; }

  .site-header { padding: 1.75rem 0 1.5rem; margin-bottom: 2rem; }

  .narrative-box { padding: 1.25rem; border-radius: var(--radius); }
  .narrative-box .narrative-text { font-size: 1.0625rem; }

  .scenario-card { padding: 1.25rem 1.3rem; }
  .scenario-card .card-meta { padding-right: 0; }
  .scenario-card.done::after { position: static; display: block; margin-bottom: 0.5rem; }

  .feedback-box, .results-commentary, .dim-legend, .profile-panel, .next-up { padding: 1.25rem; }

  .option-btn { padding: 1rem 1.1rem; gap: 0.75rem; flex-wrap: wrap; }
  .option-btn.selected { padding: calc(1rem - 1px) calc(1.1rem - 1px); }
  .option-btn .score-badge { margin-left: 0; margin-top: 0.6rem; width: 100%; text-align: center; }

  /* A fixed name column squeezed the bar to nothing on a phone. */
  .dim-row { flex-wrap: wrap; gap: 0.35rem 0.75rem; padding: 0.85rem 1rem; }
  .dim-row .dim-name { width: auto; flex: 1 1 auto; }
  .dim-row .dim-score { width: auto; }
  .dim-row .dim-bar { flex: 1 1 100%; order: 3; }

  .score-ring { width: 8.5rem; height: 8.5rem; }
  .score-ring .score-number { font-size: 2.2rem; }

  .cta-btn, .next-btn, .restart-btn { width: 100%; }
  .cta-row { margin-top: 2rem; }

  .how-item { padding-left: 2.6rem; }
  .d-card { padding: 1rem 1.15rem; }
}
