/* SIQ — Sports IQ Trainer
   Brand palette (locked 5): Lightning Yellow #E1FF00 · Bolt Black #11190C ·
   Dark Grey #787664 · Mid Grey #CAC4B7 · Light Grey #F3F1EE.
   Functional red #e24b4a is used ONLY for wrong / alert / destructive states. */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/Atkinson-Hyperlegible-Regular-102a.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/Atkinson-Hyperlegible-Bold-102a.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --red: #e24b4a;     /* functional: wrong / alert / destructive only */
  --navy: #11190C;    /* Bolt Black — dark text sitting on the accent */
  --white: #F3F1EE;   /* Light Grey — the brand's lightest */
  --gold: #E1FF00;    /* Lightning Yellow — the one hero accent */
  --dark: #787664;    /* Dark Grey */

  --bg: #11190C;      /* Bolt Black ground */
  --panel: #1A2313;
  --panel-2: #242F1A;
  --line: rgba(120, 118, 100, 0.40);
  --field: #1A2313;
  --field-line: rgba(202, 196, 183, 0.30);
  --text: #F3F1EE;
  --muted: #CAC4B7;   /* Mid Grey */
  font-size: 16px;
}

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

body {
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(225, 255, 0, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ---------------- Header ---------------- */
header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 22px;
}

.logo {
  font-size: clamp(3.4rem, 14vw, 5.2rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 0.92;
  color: var(--white);
}
.logo .q { color: var(--gold); }
.quote {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.4;
  max-width: 60ch;
}
.quote b { color: var(--white); font-style: normal; font-weight: 700; }

/* ---------------- Screens ---------------- */
.screen { display: none; }
.screen.active { display: block; }

/* ---------------- Home ---------------- */
.rating-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 16px;
}

.rating-label {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rating-value {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.tier-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.tier-rookie  { background: #242f1a; color: var(--muted); }
.tier-backup  { background: #33422a; color: var(--white); }
.tier-starter { background: var(--dark); color: var(--white); }
.tier-allpro  { background: rgba(225, 255, 0, 0.16); color: var(--gold); }
.tier-hof     { background: var(--gold); color: #11190C; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.stat-box .num { font-size: 1.5rem; font-weight: 800; color: var(--white); }
.stat-box .lbl { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }

.section-title {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 22px 0 10px;
}

.cat-row {
  display: grid;
  grid-template-columns: 1fr 140px 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
}
.cat-bar {
  height: 8px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.cat-pct { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.drill-buttons { display: grid; gap: 10px; }

.btn {
  appearance: none;
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: transform 0.06s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { border-color: var(--gold); background: var(--panel-2); }
.btn:active { transform: scale(0.99); }

/* Click 6 / Pick 6 / Kick 6 — lights up on hover, fires on click */
.quiz-spark {
  position: absolute;
  top: 12px;
  right: 16px;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, color 0.15s ease, text-shadow 0.15s ease;
}
.btn:hover .quiz-spark,
.btn:focus-visible .quiz-spark { opacity: 1; color: var(--gold); text-shadow: 0 0 10px rgba(225, 255, 0, 0.5); }
.quiz-spark.fire { animation: sparkFire 0.32s ease; }
@keyframes sparkFire {
  0% { transform: scale(1); }
  45% { transform: scale(1.32); color: var(--gold); text-shadow: 0 0 16px rgba(225, 255, 0, 0.9); opacity: 1; }
  100% { transform: scale(1); }
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #b3cc00);
  border-color: var(--gold);
  color: var(--navy);
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.btn-primary:hover { background: linear-gradient(135deg, #eeff66, var(--gold)); border-color: #eeff66; }

.btn-fit {
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  border-color: var(--gold);
  color: var(--white);
}
.btn-fit:hover { background: var(--panel-2); border-color: #eeff66; }
.btn-fit .btn-sub { color: var(--muted); }

.btn-sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.btn-primary .btn-sub { color: #2a3d00; }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}
.btn-ghost:hover { color: var(--gold); }

.home-footer { text-align: center; margin-top: 28px; }

/* ---------------- Drill ---------------- */
.drill-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.drill-topbar .pts { color: var(--gold); font-weight: 800; }

.situation-strip {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: space-between;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.sit-item { text-align: center; }
.sit-item .v { font-weight: 800; font-size: 1rem; color: var(--white); }
.sit-item .k { color: var(--muted); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* Timer */
.timer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.timer-bar {
  flex: 1;
  height: 10px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}
#timer-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 1s linear, background 0.3s;
}
#timer-bar-fill.urgent { background: var(--red); }
#timer-value {
  font-weight: 900;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
  color: var(--white);
}

/* Diagram */
.diagram-wrap {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.field-svg { display: block; width: 100%; height: auto; }
.field-bg { fill: var(--field); }
.yard-line { stroke: var(--white); stroke-width: 1; opacity: 0.72; }
.hash { stroke: var(--field-line); stroke-width: 1.5; opacity: 0.5; }
.los { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 8 5; opacity: 0.9; }
.los-label { fill: var(--gold); font-size: 11px; text-anchor: end; font-weight: 700; }
.ball { fill: #b06a2c; stroke: #e8c9a0; stroke-width: 0.8; }
.side-label { fill: rgba(202, 196, 183, 0.5); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.side-label.end { text-anchor: end; }
.side-label.mid { text-anchor: middle; }
/* Field detail: sidelines, 1-yard ticks, yard numbers, and the two coaching
   reference lines — coverage DIVIDER (light grey, at the numbers) + WR fade RED LINE */
.sideline { stroke: var(--white); stroke-width: 1.5; opacity: 0.8; }
.yd-tick { stroke: var(--white); stroke-width: 1; opacity: 0.65; }
/* Field numbers: white, larger, italic, spun with the yard line splitting the digits */
.yard-num { fill: var(--white); opacity: 0.8; font-size: 15px; font-weight: 800; font-style: italic; text-anchor: middle; dominant-baseline: central; }
/* Coverage divider — OFF the field for now; kept for teaching content later */
.divider-line { stroke: var(--white); stroke-width: 1; stroke-dasharray: 3 6; opacity: 0.28; }
.red-line { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 6; opacity: 0.5; }
.terr-badge { fill: var(--gold); font-size: 22px; font-weight: 900; text-anchor: middle; letter-spacing: 0.05em; }

/* All position marks (offense + defense) are the SAME size. Defenders are
   colored by unit: front = dark grey, box = mid grey, secondary = red. */
.defender, .offense-mark {
  font-size: 16px;
  font-weight: 900;
  text-anchor: middle;
}
.defender.d-front { fill: var(--dark); }        /* front line — dark grey */
.defender.d-box { fill: var(--muted); }         /* box / linebackers — mid grey */
.defender.d-secondary { fill: var(--red); }     /* secondary — red */
.defender.ital { font-style: italic; }          /* the front T is always italic */
.offense-mark { fill: var(--white); }           /* offense — white, clearly not defense */
.personnel-label { fill: rgba(202, 196, 183, 0.6); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.pers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 10px; }
.pers { font-size: 0.82rem; color: var(--muted); padding: 6px 10px; background: var(--panel-2); border-radius: 6px; }
.pers b { color: var(--gold); font-weight: 900; margin-right: 6px; letter-spacing: 0.04em; }
.blitz-arrow {
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-dasharray: 4 3;
}
.pos-tag {
  fill: rgba(243, 241, 238, 0.75);
  font-size: 10.5px;
  text-anchor: middle;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.offense-tag { fill: var(--muted); }
.shell-name {
  fill: rgba(202, 196, 183, 0.55);
  font-size: 12px;
  text-anchor: middle;
  letter-spacing: 0.25em;
  font-weight: 700;
}
.olineman { fill: none; stroke: var(--white); stroke-width: 2.5; }
.skill { fill: none; stroke: var(--muted); stroke-width: 2.5; }
.qb { fill: var(--gold); stroke: #f3f1ee; stroke-width: 1.5; }
.qb-label { fill: var(--navy); font-size: 9px; font-weight: 900; text-anchor: middle; }

/* Source-page picture on generated questions */
.question-image-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  max-height: 32vh;            /* keep the rep — question + all 4 answers — above the fold */
}
.question-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 32vh;
  object-fit: contain;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  cursor: pointer;
}
.check-label input { width: 16px; height: 16px; accent-color: var(--gold); }

/* Question + choices */
.question-text {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 10px;
  font-weight: 600;
}

.choices { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.choice:hover { border-color: var(--gold); background: var(--panel-2); }
.choices.locked .choice { cursor: default; }
.choices.locked .choice:hover { border-color: var(--line); background: var(--panel); }
.choice-letter {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-2);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--muted);
}
.choice.right { border-color: var(--gold); background: rgba(225, 255, 0, 0.14); }
.choice.right .choice-letter { background: var(--gold); color: var(--navy); }
.choice.wrong { border-color: var(--red); background: rgba(226, 75, 74, 0.16); }
.choice.wrong .choice-letter { background: var(--red); color: var(--white); }

/* Feedback */
.feedback {
  margin-top: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.feedback.hidden { display: none; }
.feedback-verdict { font-weight: 900; letter-spacing: 0.06em; margin-bottom: 8px; }
.feedback-verdict.right { color: var(--gold); }
.feedback-verdict.wrong { color: var(--red); }
.feedback-explanation { color: var(--white); line-height: 1.55; font-size: 0.92rem; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.fb-chip { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.fb-chip.fb-iq { background: rgba(225, 255, 0, 0.14); color: var(--gold); }
.fb-chip.fb-diff-easy { color: #7fc99a; }
.fb-chip.fb-diff-medium { color: var(--muted); }
.fb-chip.fb-diff-hard { color: var(--red); }

#next-btn { margin-top: 14px; width: 100%; text-align: center; }

.drill-footer { text-align: center; margin-top: 18px; }

/* ---------------- FIT learn screen ---------------- */
.fit-hero {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 16px;
  padding: 26px 24px;
  text-align: center;
  margin-bottom: 16px;
}
.fit-hero-title {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.fit-letters {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}
.fit-letter {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.fit-letter span {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
}

.fit-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.fit-col h3 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.fit-tag {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-left: 8px;
}
.fit-col ul { list-style: none; }
.fit-col li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 118, 100, 0.3);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--white);
}
.fit-col li:last-child { border-bottom: none; }
.fit-col strong { color: var(--white); }
.fit-note {
  margin-top: 10px;
  background: rgba(225, 255, 0, 0.10);
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------------- Create quiz ---------------- */
.create-hero-text { color: var(--white); font-size: 0.95rem; }

.text-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  margin-top: 6px;
}
.text-input:focus { outline: none; border-color: var(--gold); }
textarea.text-input { resize: vertical; }

.select-input { width: auto; margin-left: 8px; }

/* ---- Click 6 mantra ---- */
.mantra { margin-top: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.28em; color: var(--gold); text-transform: uppercase; }

/* ---- Coach review screen ---- */
.review-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.review-title { margin: 6px 0 2px; }
#review-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.rev-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rev-head { display: flex; align-items: center; gap: 10px; }
.rev-num { font-weight: 800; color: var(--gold); font-size: 0.9rem; }
.rev-tags { flex: 1; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.rev-del { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 28px; height: 26px; cursor: pointer; font-weight: 700; }
.rev-del:hover { color: var(--white); border-color: var(--red); background: rgba(226, 75, 74, 0.16); }
.rev-q, .rev-ex, .rev-choice-input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 8px 10px; font: inherit; }
.rev-q { font-weight: 700; resize: vertical; }
.rev-ex { resize: vertical; }
.rev-choice { display: flex; align-items: center; gap: 8px; }
.rev-choice input[type=radio] { accent-color: var(--gold); flex: none; }
.rev-choice.correct .rev-letter { background: var(--gold); color: #161a05; }
.rev-choice.correct .rev-choice-input { border-color: var(--gold); }
.rev-letter { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: var(--panel-2); color: var(--muted); font-weight: 800; font-size: 0.8rem; flex: none; }
.rev-choice-input { flex: 1; }
.rev-sub-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 2px; }
.rev-evidence { font-size: 0.82rem; color: var(--muted); background: var(--panel-2); border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0; padding: 6px 10px; font-style: italic; }
.rev-ev-label { font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.62rem; color: var(--gold); margin-right: 6px; }
.rev-attach { display: flex; align-items: center; gap: 8px; }
.rev-diagram { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; }
.rev-regen { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.rev-regen button { flex: 1; min-width: 90px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px; font: inherit; font-weight: 700; font-size: 0.82rem; cursor: pointer; }
.rev-regen button:hover { border-color: var(--gold); color: var(--gold); }

.file-input { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.file-input::file-selector-button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 10px;
}
.file-input::file-selector-button:hover { border-color: var(--gold); }

.create-note { color: var(--muted); font-size: 0.8rem; line-height: 1.5; margin-top: 8px; }
.create-label { display: block; color: var(--text); font-size: 0.9rem; margin-bottom: 10px; }

#generate-btn { width: 100%; margin-top: 6px; }

.create-status {
  margin-top: 12px;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.create-status.hidden { display: none; }
.create-status.busy {
  background: rgba(225, 255, 0, 0.12);
  border: 1px solid var(--gold);
  color: var(--gold);
}
.create-status.error {
  background: rgba(226, 75, 74, 0.14);
  border: 1px solid var(--red);
  color: #f2b3b2;
}

/* Cost tracker chart */
.cost-tracker { margin-top: 16px; }
.cost-total {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.cost-row {
  display: grid;
  grid-template-columns: 1fr 120px 56px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(120, 118, 100, 0.3);
}
.cost-row:last-child { border-bottom: none; }
.cost-meta { min-width: 0; }
.cost-title {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cost-detail {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cost-bar {
  height: 10px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}
.cost-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}
.cost-amount {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-size: 0.9rem;
}
@media (max-width: 520px) {
  .cost-row { grid-template-columns: 1fr 70px 52px; }
}

/* Quiz pack rows on home */
.pack-row { display: flex; gap: 8px; margin-bottom: 10px; }
.pack-btn { flex: 1; }
.pack-title { font-weight: 700; }
.pack-delete {
  flex: 0 0 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}
.pack-delete:hover { border-color: var(--red); color: var(--red); }
#pack-list:empty::after {
  content: "No quiz packs yet — create one from a document below.";
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 4px 0 10px;
}

/* ---------------- Results ---------------- */
.results-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}
.results-card h2 {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
#result-score { font-size: 4rem; font-weight: 900; color: var(--gold); line-height: 1; }
#result-max { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
#result-accuracy { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; }
.result-rating-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
#result-rating { font-weight: 900; font-size: 1.2rem; color: var(--gold); }
#result-message { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }
.results-buttons { display: grid; gap: 10px; }

@media (max-width: 520px) {
  .situation-strip { grid-template-columns: repeat(3, 1fr); }
  .rating-value { font-size: 3.4rem; }
  .cat-row { grid-template-columns: 1fr 90px 40px; font-size: 0.8rem; }
}
