/*
 * Copilot Reality Check — public flow styles.
 *
 * Ported byte-for-byte from the Academy's
 * src/app/(public)/copilot-reality-check/reality-check.css so the quiz
 * looks identical in its new home. Every rule is scoped under `.crc`, which
 * also keeps it from colliding with this site's own stylesheets. The only
 * addition is the outcome card's optional second button at the bottom of
 * this file — the Academy card had a single action; ours recommends a
 * product with a primary and a secondary.
 */

.crc {
  --bg: #e9eff2; --bg2: #dbe6ea; --screen: #ffffff; --ink: #0f2731; --ink-soft: #4d626d;
  --line: #dae5ea; --card: #f3f8fa; --accent: #1690c9; --accent-ink: #0b3b52;
  --muted: #9aabb3; --muted-soft: #c7d4da; --amber: #c67a1e; --good: #1a8f6a;
  --radius: 22px; --maxw: 410px;
  --fs-eyebrow: .72rem; --fs-body: 1rem; --fs-h: 1.42rem; --fs-hero: clamp(2.6rem, 15vw, 3.4rem);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;

  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(120% 80% at 50% -10%, var(--bg2), var(--bg));
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
}

@media (prefers-color-scheme: dark) {
  .crc {
    --bg: #071a22; --bg2: #0a2530; --screen: #0f2c38; --ink: #eaf3f7; --ink-soft: #9db4bf;
    --line: #1d4051; --card: #123340; --accent: #3bb7e8; --accent-ink: #bfe7f7;
    --muted: #5f7c89; --muted-soft: #33505d; --amber: #e9a94a; --good: #38c495;
  }
  /* Guard against the app's global `@layer base` heading rule (globals.css:
   * `h1,h2,h3,h4,h5,h6 { color: var(--heading-color) }`) bleeding through in
   * OS dark mode: headings below never set their own `color`, so without
   * this they'd silently pick up the site-wide heading color instead of
   * this dark palette's --ink, rendering invisible against the dark screen.
   * More specific rules (e.g. `.crc .pathcard h3`, `.crc .crc-start .door
   * h3`) still win. Scoped to this media query only — light mode (default
   * and `prefers-color-scheme: light`) must stay byte-for-byte unchanged. */
  .crc h1, .crc h2, .crc h3, .crc h4 { color: inherit; }
}
.crc[data-theme="light"] {
  --bg: #e9eff2; --bg2: #dbe6ea; --screen: #ffffff; --ink: #0f2731; --ink-soft: #4d626d;
  --line: #dae5ea; --card: #f3f8fa; --accent: #1690c9; --accent-ink: #0b3b52;
  --muted: #9aabb3; --muted-soft: #c7d4da; --amber: #c67a1e; --good: #1a8f6a;
}
.crc[data-theme="dark"] {
  --bg: #071a22; --bg2: #0a2530; --screen: #0f2c38; --ink: #eaf3f7; --ink-soft: #9db4bf;
  --line: #1d4051; --card: #123340; --accent: #3bb7e8; --accent-ink: #bfe7f7;
  --muted: #5f7c89; --muted-soft: #33505d; --amber: #e9a94a; --good: #38c495;
}
.crc[data-theme="dark"] h1, .crc[data-theme="dark"] h2, .crc[data-theme="dark"] h3, .crc[data-theme="dark"] h4 {
  color: inherit;
}

.crc * { box-sizing: border-box; }

/* device */
.crc .phone {
  position: relative; width: 100%; max-width: var(--maxw); height: min(880px, 92vh);
  background: var(--screen); border-radius: 44px; border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55), 0 0 0 11px rgba(10, 30, 40, .55);
  overflow: hidden; display: flex; flex-direction: column;
}
.crc .notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 26px;
  background: rgba(10, 30, 40, .55); border-radius: 0 0 16px 16px; z-index: 40;
}

/* top bar */
.crc .bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 34px 16px 10px;
  background: var(--screen); border-bottom: 1px solid var(--line); z-index: 30;
}
.crc .bar button.nav {
  all: unset; cursor: pointer; color: var(--ink-soft); font-size: 1.15rem;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
}
.crc .bar button.nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crc .bar button.nav[disabled] { opacity: .35; cursor: default; }
.crc .bar .wordmark {
  font-weight: 800; letter-spacing: -.02em; font-size: .98rem; flex: 1;
  display: flex; align-items: center; gap: 7px; min-width: 0;
}
.crc .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.crc .bar .wordmark span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* scroll body */
.crc .body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.crc .screen {
  display: flex; flex-direction: column; min-height: 100%; padding: 22px 20px 30px;
  animation: crcRise .4s cubic-bezier(.2, .7, .2, 1);
}
@keyframes crcRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.crc .eyebrow {
  font-size: var(--fs-eyebrow); text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent); font-weight: 700; margin: 0 0 10px;
}
.crc h1 { font-size: 1.72rem; line-height: 1.1; letter-spacing: -.025em; margin: 0 0 12px; text-wrap: balance; font-weight: 800; }
.crc h2 { font-size: var(--fs-h); line-height: 1.16; letter-spacing: -.02em; margin: 0 0 10px; text-wrap: balance; font-weight: 800; }
.crc p { margin: 0 0 14px; line-height: 1.5; color: var(--ink-soft); font-size: var(--fs-body); }
.crc p strong, .crc .ink { color: var(--ink); }
.crc .spacer { flex: 1 1 auto; min-height: 14px; }

.crc .chiprow { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.crc .chip {
  font-size: .7rem; font-weight: 600; color: var(--ink-soft); background: var(--card);
  border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px;
}

/* buttons */
.crc .btn {
  all: unset; cursor: pointer; display: block; text-align: center; font-weight: 700; font-size: 1rem;
  padding: 15px 18px; border-radius: 15px; background: var(--accent); color: #fff;
  box-shadow: 0 10px 24px -12px var(--accent); transition: transform .12s, filter .12s;
}
.crc .btn:hover { filter: brightness(1.06); }
.crc .btn:active { transform: translateY(1px); }
.crc .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.crc .btn[disabled] { opacity: .55; cursor: default; }
.crc .btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.crc .btn.small { padding: 11px 14px; font-size: .9rem; border-radius: 12px; }
.crc .stack { display: flex; flex-direction: column; gap: 10px; }

/* door cards */
.crc .doors { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.crc .door {
  all: unset; cursor: pointer; border: 1.5px solid var(--line); border-radius: 18px; padding: 16px;
  background: var(--card); display: flex; gap: 13px; align-items: center; transition: border-color .15s, transform .12s;
}
.crc .door:hover { border-color: var(--accent); transform: translateY(-1px); }
.crc .door:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crc .door .ic {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 1.3rem; font-weight: 800;
}
.crc .door .ic.alt { background: var(--accent-ink); }
.crc .door h3 { margin: 0 0 3px; font-size: 1.02rem; letter-spacing: -.01em; }
.crc .door small { color: var(--ink-soft); font-size: .82rem; line-height: 1.3; display: block; }
.crc .door .arr { margin-left: auto; color: var(--muted); font-size: 1.2rem; }

/* progress */
.crc .prog { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.crc .prog .track { flex: 1; height: 6px; border-radius: 999px; background: var(--muted-soft); overflow: hidden; }
.crc .prog .fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.crc .prog .lbl { font-size: .72rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.crc .tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, transparent); padding: 5px 10px; border-radius: 999px; margin-bottom: 14px;
}
.crc .qmark {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 700; margin-bottom: 12px;
}

/* answer options */
.crc .opts { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.crc .opt {
  all: unset; cursor: pointer; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 15px;
  background: var(--screen); font-weight: 600; font-size: .96rem; display: flex; align-items: center; gap: 11px;
  transition: border-color .14s, background .14s, transform .1s;
}
.crc .opt:hover { border-color: var(--accent); }
.crc .opt:active { transform: scale(.99); }
.crc .opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crc .opt .k {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--card); color: var(--ink-soft); font-size: .9rem; border: 1px solid var(--line);
}
.crc .opt.reveal-yes .k { background: var(--good); color: #fff; border-color: transparent; }
.crc .opt.reveal-no .k { background: var(--amber); color: #fff; border-color: transparent; }

/* slider */
.crc .rate-num {
  font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.03em; text-align: center;
  color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1;
}
.crc .rate-num b { color: var(--accent); }
.crc .rate-cap { text-align: center; font-size: .8rem; color: var(--ink-soft); margin: 6px 0 22px; }
.crc input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--p, 60%), var(--muted-soft) var(--p, 60%)); outline: none;
}
.crc input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); cursor: pointer;
}
.crc input[type=range]::-moz-range-thumb {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer;
}
.crc input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.crc .ends { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 8px; }

/* reveal */
.crc .gap { display: flex; gap: 12px; margin: 6px 0 8px; }
.crc .gcol { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 15px 12px; text-align: center; }
.crc .gcol .cap { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.crc .gcol .big { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.crc .gcol.self .big { color: var(--muted); }
.crc .gcol.real .big { color: var(--accent); }
.crc .gcol .u { font-size: .78rem; color: var(--ink-soft); margin-top: 3px; }
.crc .barwrap { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 15px; margin: 12px 0; }
.crc .barwrap .l { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; margin-bottom: 8px; }
.crc .meter { height: 12px; border-radius: 999px; background: var(--muted-soft); overflow: hidden; }
.crc .meter i {
  display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  border-radius: 999px; transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}
.crc .reclaim {
  background: color-mix(in srgb, var(--amber) 12%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: 16px; padding: 16px; margin: 6px 0 16px;
}
.crc .reclaim .h { font-size: 1.75rem; font-weight: 800; color: var(--amber); letter-spacing: -.02em; margin-bottom: 2px; }
.crc .reclaim p { margin: 0; color: var(--ink); }

.crc .flags { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.crc .flag {
  display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px; font-size: .9rem; font-weight: 600;
}
.crc .flag .x { color: var(--amber); font-weight: 800; flex: 0 0 auto; }

/* share card */
.crc .sharecard {
  border-radius: 18px; padding: 18px; color: #fff; margin: 4px 0 8px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f2c38, #1b6b8c 120%); border: 1px solid rgba(255, 255, 255, .12);
}
.crc .sharecard .sc-brand { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.crc .sharecard .sc-score { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.crc .sharecard .sc-score small { font-size: 1.1rem; opacity: .7; }
.crc .sharecard .sc-line { font-size: .98rem; font-weight: 600; margin-top: 6px; line-height: 1.3; }
.crc .sharecard .sc-foot { font-size: .72rem; opacity: .7; margin-top: 14px; }
.crc .sharecard .glow {
  position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 183, 232, .6), transparent 70%);
}

/* lock */
.crc .lock { border: 1.5px dashed var(--line); border-radius: 16px; padding: 16px; text-align: center; margin-top: 6px; position: relative; }
.crc .lock .ic { font-size: 1.3rem; }
.crc .lock h3 { margin: 6px 0 4px; font-size: 1rem; }
.crc .lock p { font-size: .85rem; margin-bottom: 12px; }
.crc .field {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 14px; font-size: 1rem;
  background: var(--screen); color: var(--ink); margin-bottom: 10px; font-family: inherit;
}
.crc .field:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.crc .fineprint { font-size: .72rem; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.4; }
.crc .consent { display: flex; gap: 9px; align-items: flex-start; font-size: .8rem; color: var(--ink-soft); text-align: left; margin: 2px 0 4px; cursor: pointer; }
.crc .consent input { margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); width: 16px; height: 16px; }
.crc .err { color: var(--amber); font-size: .82rem; font-weight: 600; margin: 4px 0 0; text-align: center; }

/* report */
.crc .ring {
  display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px; margin-bottom: 16px;
}
.crc .ring .num { font-size: 2.4rem; font-weight: 800; color: var(--accent); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.crc .ring small { color: var(--ink-soft); font-size: .82rem; }
.crc .winlist { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 16px; }
.crc .win { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--screen); }
.crc .win .app {
  font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff;
  background: var(--accent-ink); padding: 4px 7px; border-radius: 6px; flex: 0 0 auto; margin-top: 2px;
}
.crc .win h4 { margin: 0 0 3px; font-size: .95rem; letter-spacing: -.01em; }
.crc .win small { color: var(--ink-soft); font-size: .82rem; line-height: 1.35; display: block; }
.crc .win .save { color: var(--good); font-weight: 700; font-size: .78rem; margin-top: 5px; display: block; }
.crc .pathcard { background: linear-gradient(135deg, var(--accent), var(--accent-ink)); color: #fff; border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.crc .pathcard .e { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; opacity: .85; font-weight: 700; margin-bottom: 8px; }
.crc .pathcard h3 { margin: 0 0 6px; font-size: 1.2rem; color: #fff; }
.crc .pathcard p { color: rgba(255, 255, 255, .9); margin-bottom: 14px; font-size: .9rem; }
.crc .pathcard .btn { background: #fff; color: var(--accent-ink); }
.crc .statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 6px; }
.crc .stat { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.crc .stat b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.crc .stat small { font-size: .72rem; color: var(--ink-soft); line-height: 1.3; display: block; margin-top: 2px; }
.crc .src { font-size: .64rem; color: var(--muted); margin-top: 12px; line-height: 1.4; }

/* toast */
.crc .toast {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--screen); padding: 11px 18px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  transition: transform .25s, opacity .25s; z-index: 50; pointer-events: none;
  max-width: min(88%, 340px); text-align: center;
}
.crc .toast.show { transform: translateX(-50%); opacity: 1; }

/* Landing content groups (Task 1 of the desktop redesign): invisible to
 * layout at base (≤899px) so the landing stacks exactly as before; a future
 * desktop breakpoint turns these into the two split-landing grid columns. */
.crc .crc-story, .crc .crc-start { display: contents; }

.crc .modepill {
  display: inline-flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 16px;
}
.crc .modepill span { font-size: .75rem; font-weight: 700; color: var(--ink-soft); padding: 6px 12px; border-radius: 999px; }
.crc .modepill span.active { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .crc * { animation: none !important; transition: none !important; }
}
@media (max-width: 470px) {
  .crc { padding: 0; }
  .crc .phone { max-width: 100%; height: 100vh; border-radius: 0; border: none; box-shadow: none; }
  .crc .notch { display: none; }
  .crc .bar { padding-top: 16px; }
}

/* ==========================================================================
 * Desktop split landing (Task 2 of the desktop redesign): ≥900px only.
 * Un-frames the phone into a full page; on the LANDING screen only, turns
 * .crc-story (left, story) / .crc-start (right, navy "start the check"
 * panel) into the two-column layout from Direction 1 of
 * docs/superpowers/assets/crc-desktop-directions.html. Quiz/reveal/gate/
 * report screens keep the base single-column `.screen` — that's Task 3.
 * ========================================================================== */
@media (min-width: 900px) {
  .crc { display: block; padding: 0; background: var(--bg); }

  .crc .phone {
    max-width: none; width: 100%; height: auto; min-height: 100vh;
    border: none; border-radius: 0; box-shadow: none;
  }
  .crc .notch { display: none; }
  .crc .bar { padding-top: 16px; }

  /* landing screen only (identified by its .crc-story child) becomes the split grid */
  .crc .screen:has(> .crc-story) {
    display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
    gap: 44px; max-width: 1120px; width: 100%; margin-inline: auto;
    min-height: calc(100vh - 96px); padding: 56px clamp(20px, 4vw, 48px);
  }
  .crc .crc-story, .crc .crc-start { display: block; }

  .crc .crc-story h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.08; letter-spacing: -.03em;
  }
  .crc .crc-story p { max-width: 46ch; font-size: 1.05rem; }

  /* right column: navy "start the check" panel, ported from .d1-right/.doorbtn */
  .crc .crc-start {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
    background: linear-gradient(155deg, #133d50, #1d5d78); border-radius: 24px;
    padding: 42px 40px; box-shadow: 0 30px 70px -35px rgba(6, 20, 28, .55);
  }
  .crc .crc-start::before {
    content: ""; position: absolute; top: -70px; right: -90px; width: 280px; height: 280px;
    border-radius: 50%; background: radial-gradient(circle, rgba(41, 171, 226, .55), transparent 70%);
    pointer-events: none;
  }
  .crc .crc-start > * { position: relative; }
  .crc .crc-start p { color: rgba(255, 255, 255, .85); }

  .crc .crc-start .modepill { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
  .crc .crc-start .modepill span { color: rgba(255, 255, 255, .7); }
  .crc .crc-start .modepill span.active { background: var(--accent); color: #fff; }

  .crc .crc-start .door { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
  .crc .crc-start .door:hover { border-color: rgba(255, 255, 255, .4); }
  .crc .crc-start .door h3 { color: #fff; }
  .crc .crc-start .door small { color: rgba(255, 255, 255, .75); }
  .crc .crc-start .door .arr { color: rgba(255, 255, 255, .5); }

  .crc .crc-start .spacer { min-height: 4px; }

  /* Fineprint stays in the DOM inside .crc-start (mobile order is load-bearing),
   * so on desktop it's reconciled as a light footnote at the base of the navy
   * panel — the `.spacer` above pushes it down, mirroring the "mini" note
   * under the doors in Direction 1 — rather than fighting it into the left
   * column via layout tricks that would require restructuring the markup. */
  .crc .crc-start .fineprint {
    text-align: left; color: rgba(255, 255, 255, .65);
    border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 2px; padding-top: 14px;
  }
  .crc .crc-start .fineprint strong { color: #fff; }

  /* ------------------------------------------------------------------------
   * Desktop inner screens (Task 3): quiz / loading / reveal / gate / report.
   * Identified as the `.screen`s that do NOT contain `.crc-story` (that's the
   * landing, handled above by Task 2). Treatment A from
   * docs/superpowers/assets/crc-desktop-inner-a-vs-b.html (#a): a light top
   * bar (brand left, progress right) over a centered ~640px card on the
   * grey-blue "ground". `.body`'s internal scroll is only needed for the
   * mobile phone-frame (fixed-height `.phone`); at desktop `.phone` is
   * `height:auto`/`min-height:100vh` (set above), so the page itself scrolls
   * and `.body` never needs to clip its own content — switching it to
   * `overflow: visible` here lets the quiz's `.prog` (see below) escape into
   * the top bar's row and lets the card's shadow/radius breathe.
   * ------------------------------------------------------------------------ */
  .crc .body { overflow: visible; }

  .crc .bar { padding-inline: clamp(20px, 4vw, 48px); }

  /* Centre the inner screens (quiz/reveal/gate/report). Keyed off the body's
   * data-screen attribute (set by the component) rather than a `:has()` on the
   * child screen: nesting `:has()` inside `:has()` is INVALID CSS and browsers
   * drop the whole rule, which left the card pinned top-left. The landing is
   * excluded (it centres itself via its own grid + margin-inline:auto). */
  .crc .body[data-screen]:not([data-screen="landing"]) {
    display: flex; flex-direction: row; justify-content: center; align-items: flex-start;
    background: var(--bg); padding: 52px clamp(20px, 4vw, 48px);
    min-height: calc(100vh - 61px);
  }

  .crc .screen:not(:has(> .crc-story)) {
    width: min(640px, 100%); max-width: 640px; min-height: 0; margin: 0;
    background: var(--screen); border: 1px solid var(--line); border-radius: 20px;
    padding: 40px; box-shadow: 0 20px 50px -35px rgba(6, 20, 28, .4);
  }

  /* progress -> reads as the top bar's progress, right of the brand mark.
   * `.phone` (position: relative) is the nearest positioned ancestor, so this
   * escapes `.screen`/`.body` entirely rather than living in the card flow;
   * `top`/`height` are set to the bar's own content band (16px top padding,
   * 34px tall nav button) so it lines up with the wordmark beside it. */
  .crc .screen:not(:has(> .crc-story)) .prog {
    position: absolute; top: 16px; right: clamp(20px, 4vw, 48px); height: 34px;
    width: auto; max-width: 260px; margin: 0; z-index: 32;
  }
  .crc .screen:not(:has(> .crc-story)) .prog .lbl { white-space: nowrap; }
}

/* outcome card secondary action (site addition — see header comment) */
.crc .pathcard .stack { margin-top: 0; }
.crc .pathcard .btn.ghost {
  background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .45);
  box-shadow: none; font-size: .88rem; padding: 11px 14px; border-radius: 12px;
}
.crc .pathcard .btn.ghost:hover { border-color: #fff; filter: none; }
