/* ============================================================================
 * site.css — Shared stylesheet for the FIT round-two (strategy-lead) study site.
 *
 * Copied verbatim from the round-one site so the two read as one body of work.
 * Additions for this round are collected at the end under "Round-two additions".
 *
 * Design intent: a quiet "study desk" aesthetic. Warm paper by default, deep
 * ink in dark mode, one signal accent, and a long comfortable reading measure.
 * Nothing decorative competes with the text, because the text is the product.
 *
 * Structure: tokens -> reset -> layout -> typography -> components -> print.
 * Components are prefixed by their role (drill-, story-, rail-) so a page can
 * be read without cross-referencing this file.
 * ==========================================================================*/

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Warm paper palette. Hues sit around 40deg so text feels printed, not lit. */
  --paper:        #f7f4ee;
  --paper-raised: #fffdf9;
  --paper-sunk:   #efeae1;
  --rule:         #ddd6c9;
  --rule-soft:    #e8e2d6;

  --ink:          #23201b;
  --ink-muted:    #6b6355;
  --ink-faint:    #938b7c;

  --accent:       #9a5b2c;    /* ochre — links, active states */
  --accent-soft:  #f0e2d4;
  --accent-ink:   #7d4720;

  /* Traffic-light ratings. Deliberately desaturated so a page of amber cards
     is still readable rather than alarming. */
  --green:        #4f6f4a;
  --green-soft:   #e4ede1;
  --amber:        #96702a;
  --amber-soft:   #f2e9d4;
  --red:          #93453d;
  --red-soft:     #f2e0dd;

  --shadow: 0 1px 2px rgba(35, 32, 27, .05), 0 8px 24px -12px rgba(35, 32, 27, .18);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 10px;
}

[data-theme="dark"] {
  --paper:        #17161a;
  --paper-raised: #1e1d22;
  --paper-sunk:   #121114;
  --rule:         #33313a;
  --rule-soft:    #2a2830;

  --ink:          #e8e4dc;
  --ink-muted:    #a29b8f;
  --ink-faint:    #726c63;

  --accent:       #d99a5f;
  --accent-soft:  #2e2519;
  --accent-ink:   #eab27c;

  --green:        #8fb488;
  --green-soft:   #1e261d;
  --amber:        #d4ac62;
  --amber-soft:   #29220f;
  --red:          #d18b83;
  --red-soft:     #2a1917;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .7);
}

/* --- Reset -------------------------------------------------------------- */

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* --- Site chrome -------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}

.topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .7rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand span { color: var(--ink-faint); font-weight: 400; }

.nav { display: flex; gap: .25rem; flex-wrap: wrap; margin-right: auto; }

.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: .87rem;
  padding: .3rem .6rem;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--paper-sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }

/* The imminent-interview page: marked with a dot so it reads as "today's work"
   without shouting. Sits first in the nav. */
.nav a.nav__urgent { color: var(--accent-ink); font-weight: 550; }
.nav a.nav__urgent::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: .4rem;
  vertical-align: middle;
}

.iconbtn {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .8rem;
  cursor: pointer;
  color: var(--ink-muted);
  transition: border-color .15s ease, color .15s ease;
}
.iconbtn:hover { border-color: var(--ink-faint); color: var(--ink); }

/* --- Layout ------------------------------------------------------------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter) 6rem;
}

.layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }

@media (min-width: 1020px) {
  .layout { grid-template-columns: 210px minmax(0, 1fr); gap: 3.5rem; }
}

.rail { display: none; }

@media (min-width: 1020px) {
  .rail {
    display: block;
    position: sticky;
    top: 4.5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    font-size: .84rem;
    border-left: 2px solid var(--rule-soft);
    padding-left: 1rem;
  }
}

.rail a {
  display: block;
  color: var(--ink-muted);
  text-decoration: none;
  padding: .28rem 0;
  line-height: 1.35;
  border-left: 2px solid transparent;
  margin-left: -1rem;
  padding-left: 1rem;
}
.rail a:hover { color: var(--ink); }
.rail a.is-active { color: var(--accent-ink); border-left-color: var(--accent); font-weight: 500; }
.rail__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin: 1.4rem 0 .5rem;
  font-weight: 600;
}
.rail__label:first-child { margin-top: 0; }

.prose { max-width: var(--measure); }

/* --- Typography --------------------------------------------------------- */

.hero { padding: 4rem 0 2.5rem; border-bottom: 1px solid var(--rule-soft); margin-bottom: 3rem; }

.eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .9rem;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 20ch;
  text-wrap: balance;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 3.4rem 0 1rem;
  scroll-margin-top: 5rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 2.2rem 0 .6rem;
  scroll-margin-top: 5rem;
  text-wrap: balance;
}

h4 { font-size: .95rem; font-weight: 650; margin: 1.6rem 0 .4rem; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1.05rem; }

.lede {
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 58ch;
}

a { color: var(--accent-ink); text-underline-offset: 2px; text-decoration-thickness: 1px; }

strong { font-weight: 650; }

ul, ol { padding-left: 1.2rem; margin: 0 0 1.2rem; }
li { margin-bottom: .45rem; }
li::marker { color: var(--ink-faint); }

blockquote {
  margin: 1.4rem 0;
  padding: .1rem 0 .1rem 1.2rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 1.03rem;
}
blockquote p:last-child { margin-bottom: 0; }

code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--paper-sunk);
  padding: .1em .35em;
  border-radius: 4px;
}

hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 3rem 0; }

/* --- Tables ------------------------------------------------------------- */

.tablewrap { overflow-x: auto; margin: 1.5rem 0 2rem; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .92rem;
  min-width: 480px;
}
th, td {
  text-align: left;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  font-weight: 650;
  border-bottom-color: var(--rule);
}
td:first-child { font-weight: 550; }

/* --- Callouts ----------------------------------------------------------- */

.callout {
  background: var(--paper-raised);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.8rem 0;
  max-width: var(--measure);
}
.callout__title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 650;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--red); }
.callout--warn .callout__title { color: var(--red); }
.callout--ok { border-left-color: var(--green); }
.callout--ok .callout__title { color: var(--green); }

/* --- Cards -------------------------------------------------------------- */

.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.card p { font-size: .88rem; color: var(--ink-muted); margin: 0; }
.card__num {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: .5rem;
}

/* --- Drill cards -------------------------------------------------------- */

.drilltools {
  position: sticky;
  top: 3.4rem;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
  padding: .7rem 0;
  margin-bottom: 2rem;
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}

.drilltools input[type="search"] {
  font: inherit;
  font-size: .88rem;
  padding: .38rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
  min-width: 200px;
  flex: 1 1 200px;
}
.drilltools input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.chip {
  font-size: .8rem;
  padding: .32rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
[data-theme="dark"] .chip[aria-pressed="true"] { color: #17161a; }

.progressbar {
  height: 5px;
  background: var(--paper-sunk);
  border-radius: 999px;
  overflow: hidden;
  margin: .3rem 0 0;
  width: 100%;
}
.progressbar > span {
  display: block;
  height: 100%;
  background: var(--green);
  width: 0%;
  transition: width .3s ease;
}
.progresslabel { font-size: .78rem; color: var(--ink-faint); white-space: nowrap; }

.drill {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--paper-raised);
  margin: 0 0 .85rem;
  overflow: hidden;
  scroll-margin-top: 8rem;
  max-width: var(--measure);
}
.drill[data-rating="green"] { border-left: 3px solid var(--green); }
.drill[data-rating="amber"] { border-left: 3px solid var(--amber); }
.drill[data-rating="red"]   { border-left: 3px solid var(--red); }
.drill.is-hidden { display: none; }

.drill__q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 1.2rem;
  cursor: pointer;
  display: flex;
  gap: .8rem;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.45;
}
.drill__q:hover { background: var(--paper-sunk); }
.drill__q::after {
  content: "reveal";
  margin-left: auto;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
}
.drill.is-open .drill__q::after { content: "hide"; }
.drill__tag {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  font-weight: 700;
  border: 1px solid var(--rule);
  padding: .12rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
  flex: none;
}

/* Answers are visible by default so the page still works with JS disabled;
   only once site.js boots do they collapse into reveal-on-click cards. */
.drill__a { display: block; padding: 0 1.2rem 1.2rem; border-top: 1px solid var(--rule-soft); }
.js-ready .drill__a { display: none; }
.js-ready .drill.is-open .drill__a { display: block; }
html:not(.js-ready) .drill__q::after { content: ""; }
.drill__a > *:first-child { margin-top: 1rem; }
.drill__a blockquote { font-size: 1rem; }
.drill__note {
  font-size: .86rem;
  color: var(--ink-muted);
  border-top: 1px dashed var(--rule);
  padding-top: .7rem;
  margin-top: 1rem;
}
.drill__note b { color: var(--ink); font-weight: 650; }

.rate { display: flex; gap: .4rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.rate__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 600; margin-right: .2rem; }
.rate button {
  font-size: .78rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  color: var(--ink-muted);
}
.rate button:hover { border-color: var(--ink-faint); }
.rate button[data-r="green"][aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 600; }
.rate button[data-r="amber"][aria-pressed="true"] { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); font-weight: 600; }
.rate button[data-r="red"][aria-pressed="true"]   { background: var(--red-soft);   border-color: var(--red);   color: var(--red);   font-weight: 600; }

.emptystate {
  display: none;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: .95rem;
}
.emptystate.is-shown { display: block; }

/* --- Timer -------------------------------------------------------------- */

.timer {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 50;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .5rem .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  box-shadow: var(--shadow);
  font-size: .85rem;
}
.timer__time { font-family: var(--mono); font-variant-numeric: tabular-nums; min-width: 3.4em; font-size: .95rem; }
.timer.is-over .timer__time { color: var(--red); font-weight: 700; }
.timer button {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: .15rem .5rem;
  font-size: .75rem;
  cursor: pointer;
  color: var(--ink-muted);
}
.timer button:hover { border-color: var(--accent); color: var(--accent-ink); }

/* --- Story bank --------------------------------------------------------- */

.story {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.2rem 1.3rem 1.4rem;
  margin: 0 0 1.1rem;
  max-width: var(--measure);
}
.story h3 { margin: 0 0 .2rem; }
.story__hint { font-size: .86rem; color: var(--ink-muted); margin: 0 0 .9rem; }
.story__covers {
  font-size: .74rem;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  padding: .5rem .7rem;
  background: var(--paper-sunk);
  border-radius: 6px;
  line-height: 1.5;
}
.story__covers b { color: var(--ink-muted); text-transform: uppercase; letter-spacing: .07em; font-size: .68rem; }

.field { margin-bottom: .8rem; }
.field label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 650;
  color: var(--ink-faint);
  margin-bottom: .25rem;
}
.field textarea, .field input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: .93rem;
  line-height: 1.5;
  padding: .55rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.field textarea:focus, .field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field textarea { min-height: 4.2rem; }
.field__help { font-size: .78rem; color: var(--ink-faint); margin: .25rem 0 0; }

.savenote { font-size: .78rem; color: var(--green); min-height: 1.2em; }

/* --- Misc utilities ----------------------------------------------------- */

.stack-tight > * + * { margin-top: .3rem; }
.muted { color: var(--ink-muted); }
.small { font-size: .88rem; }
.kbd {
  font-family: var(--mono);
  font-size: .78em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .05em .35em;
  background: var(--paper-raised);
}
.pill {
  display: inline-block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 650;
  padding: .16rem .55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.daygrid { display: grid; gap: .8rem; margin: 1.8rem 0; }
.day {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 1rem;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1rem 1.2rem;
  align-items: start;
}
.day__n {
  font-family: var(--serif);
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-top: .18rem;
}
.day h3 { margin: 0 0 .25rem; font-size: .98rem; }
.day p { margin: 0 0 .4rem; font-size: .92rem; }
.day p:last-child { margin-bottom: 0; }
.day__out {
  font-size: .84rem;
  color: var(--ink-muted);
  border-top: 1px dashed var(--rule);
  padding-top: .5rem;
  margin-top: .6rem;
}
.day__out b { color: var(--green); font-weight: 650; }

@media (max-width: 560px) {
  .day { grid-template-columns: 1fr; gap: .4rem; }
}

.footer {
  border-top: 1px solid var(--rule-soft);
  margin-top: 5rem;
  padding: 2rem 0 3rem;
  font-size: .84rem;
  color: var(--ink-faint);
}
.footer a { color: var(--ink-muted); }

/* --- Print -------------------------------------------------------------- */

@media print {
  .topbar, .rail, .timer, .drilltools, .iconbtn, .rate { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .drill__a { display: block !important; }
  .drill { break-inside: avoid; border: 1px solid #ccc; }
  a { color: #000; text-decoration: none; }
  .layout { display: block; }
}

/* --- Round-two additions -------------------------------------------------
 * Two components the first round did not need: a side-by-side "say this, not
 * that" pair, and a rehearsal script block with margin annotations. Both are
 * for material that is meant to be spoken rather than read.
 * ------------------------------------------------------------------------*/

.pairgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin: 1.6rem 0 2rem;
  max-width: var(--measure);
}

@media (min-width: 720px) {
  .pairgrid { grid-template-columns: 1fr 1fr; }
}

.pair {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: .95rem 1.1rem;
}
.pair--no { border-left: 3px solid var(--red); }
.pair--yes { border-left: 3px solid var(--green); }
.pair__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  margin: 0 0 .45rem;
}
.pair--no .pair__label { color: var(--red); }
.pair--yes .pair__label { color: var(--green); }
.pair p { font-size: .93rem; margin: 0 0 .6rem; }
.pair p:last-child { margin-bottom: 0; }
.pair .pair__why { font-size: .84rem; color: var(--ink-muted); }

/* A line to be said out loud, with the reason each clause is there. */
.script {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.2rem 1.3rem;
  margin: 1.8rem 0;
  max-width: var(--measure);
}
.script__line {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.script__why {
  border-top: 1px dashed var(--rule);
  padding-top: .8rem;
  margin: 0;
  font-size: .87rem;
  color: var(--ink-muted);
}
.script__why li { margin-bottom: .35rem; max-width: none; }
.script__why b { color: var(--ink); font-weight: 650; }

/* Countdown chip used in the hero to keep the four days honest. */
.countdown {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  font-size: .8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .25rem .75rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.countdown b { font-family: var(--mono); color: var(--accent-ink); font-size: .9rem; }

/* --- Trainer (quiz.html) -------------------------------------------------
 * A single-question-at-a-time recall trainer. The visual job here is the
 * opposite of the rest of the site: one thing on screen, nothing to scan
 * ahead to, and no way to accidentally read the answer before speaking.
 * ------------------------------------------------------------------------*/

.quiz { max-width: 46rem; margin: 0 auto; }

.quiz__bar {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  font-size: .82rem;
  color: var(--ink-faint);
}
.quiz__bar .progressbar { flex: 1 1 120px; margin: 0; }

.quiz__clock {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .95rem;
  color: var(--ink-muted);
  min-width: 3.6em;
}
.quiz__clock.is-over { color: var(--red); font-weight: 700; }

.quizcard {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.8rem 1.7rem 1.5rem;
  box-shadow: var(--shadow);
}

.quizcard__tag {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  font-weight: 700;
  border: 1px solid var(--rule);
  padding: .12rem .4rem;
  border-radius: 4px;
}

.quizcard__q {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  margin: .9rem 0 1.2rem;
  text-wrap: balance;
}

.quizcard__say {
  font-size: .88rem;
  color: var(--ink-muted);
  border-left: 3px solid var(--accent);
  padding-left: .9rem;
  margin: 0 0 1.4rem;
}

/* Checkpoints — the scoring surface. Deliberately large hit targets, because
   these get ticked quickly between spoken answers. */
.checks { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.checks li { margin: 0 0 .45rem; max-width: none; }

.check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  padding: .6rem .8rem;
  cursor: pointer;
  font-size: .93rem;
  line-height: 1.45;
  transition: border-color .12s ease, background .12s ease;
}
.check:hover { border-color: var(--ink-faint); }
.check[aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); }
.check[aria-pressed="true"] .check__box { background: var(--green); border-color: var(--green); color: #fff; }
[data-theme="dark"] .check[aria-pressed="true"] .check__box { color: #17161a; }

.check__box {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  margin-top: .13rem;
}

.check__num {
  flex: none;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--ink-faint);
  margin-top: .22rem;
}

/* A checkpoint phrased as a thing to avoid rather than a thing to hit. */
.check--avoid[aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); }
.check--avoid .check__label b { color: var(--red); }

.quiz__actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }

.btn {
  font: inherit;
  font-size: .88rem;
  padding: .5rem 1rem;
  border-radius: 7px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.btn:hover { border-color: var(--ink-faint); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 550; }
[data-theme="dark"] .btn--primary { color: #17161a; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.quiz__score {
  margin-left: auto;
  font-size: .84rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* Start screen and end-of-session summary share this block. */
.quizpanel {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.5rem 1.6rem;
}
.quizpanel h2 { margin-top: 0; }

.deckgrid { display: grid; gap: .6rem; margin: 1.2rem 0; }
.deck {
  display: flex;
  gap: .8rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  padding: .75rem .9rem;
  cursor: pointer;
  font-size: .95rem;
}
.deck:hover { border-color: var(--accent); }
.deck[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.deck b { font-weight: 600; }
.deck span { color: var(--ink-faint); font-size: .82rem; margin-left: auto; white-space: nowrap; }

.summaryrow {
  display: flex;
  gap: .8rem;
  align-items: baseline;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: .9rem;
}
.summaryrow:last-child { border-bottom: 0; }
.summaryrow__pct { font-family: var(--mono); font-variant-numeric: tabular-nums; margin-left: auto; }
.summaryrow--weak { color: var(--red); }
.summaryrow--weak .summaryrow__pct { font-weight: 700; }

.bigscore {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  line-height: 1;
  margin: .4rem 0 .2rem;
}
