/* Honors Track brand system v2 — tokens from Peter's Recraft brand file (brand/brand.json).
   Palette: slate #4A5568 · ink #1A202C · paper #F8F9FA · single accent orange #F97316.
   Type: Nunito (closest free match to the wordmark's rounded heavy letterforms).
   Generic aliases (--ink, --accent, --band-*, ...) are kept working for app.js inline styles. */
:root {
  /* Brand core (source of truth: brand/brand.json) */
  --ht-slate: #4A5568;
  --ht-ink: #1A202C;
  --ht-paper: #F8F9FA;
  --ht-orange: #F97316;
  --ht-orange-dark: #EA580C; /* hover/focus depth for the accent (better contrast than the base orange) */
  /* Brand neutrals */
  --ht-surface-white: #FFFFFF;
  --ht-text-body: #1A202C;
  --ht-border-light: #D9E0E8;

  /* Aliases used across app.js / page styles */
  --ink: var(--ht-ink);
  --muted: var(--ht-slate); /* secondary text — slate on white is 7.5:1 */
  --line: var(--ht-border-light);
  --bg: var(--ht-paper);
  --card: var(--ht-surface-white);
  --accent: var(--ht-orange);       /* progress fills, active accents (graphical, non-text) */
  --accent-dark: var(--ht-slate);   /* headings-adjacent emphasis, pill text */
  --good: #1e7d46;
  --bad: #b3372f;
  --warn-bg: #fff4e8;
  --band-avg: #e3e8ee;
  --band-upper: #d8ead2;
  --band-elite: #fdebd3;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Nunito", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ht-text-body); background: var(--bg); font-size: 16px; line-height: 1.6; }
h1, h2, h3, h4 { font-family: "Nunito", sans-serif; color: var(--ht-slate); line-height: 1.25; }
h1 { font-weight: 900; letter-spacing: -0.02em; }
h2 { font-weight: 800; letter-spacing: -0.01em; }
h3 { font-weight: 800; letter-spacing: 0; }
h4 { font-weight: 700; }
a { color: var(--ht-slate); text-underline-offset: 2px; }
a:hover { color: var(--ht-orange-dark); }
button { font: inherit; cursor: pointer; }
/* Primary action: orange bg. White text on #F97316 is only 2.8:1, so text is ink (5.8:1). 6px radius. */
.btn { display: inline-block; background: var(--ht-orange); color: var(--ht-ink); border: 0; border-radius: 6px; padding: 10px 18px; font-family: "Nunito", sans-serif; font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-decoration: none; }
.btn:hover { background: var(--ht-orange-dark); color: var(--ht-ink); }
/* Secondary action: transparent fill, 1.5px slate border, slate text */
.btn.secondary { background: transparent; color: var(--ht-slate); border: 1.5px solid var(--ht-slate); }
.btn.secondary:hover { background: var(--ht-paper); color: var(--ht-slate); }
/* Secondary on dark (slate) surfaces */
.btn.secondary.light { color: var(--ht-paper); border-color: var(--ht-paper); }
.btn.secondary.light:hover { background: rgba(248, 249, 250, 0.12); color: var(--ht-paper); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-family: "Nunito", sans-serif; font-weight: 600; letter-spacing: 0; }
.btn.ghost:hover { background: var(--ht-paper); }
.btn.small { padding: 6px 12px; font-size: 0.9em; }
.btn:disabled { opacity: 0.5; cursor: default; }
/* Form inputs: white fill, 1px border, 44px min height, orange focus ring */
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%; min-height: 44px; color: var(--ht-text-body); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ht-orange-dark); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.30); }
input[type="checkbox"], input[type="radio"] { min-height: 0; }
label { display: block; font-weight: 700; font-size: 0.92em; margin: 12px 0 4px; color: var(--ht-ink); }
.hint-text { color: var(--muted); font-size: 0.88em; }
.error { background: #fdecea; color: var(--bad); border: 1px solid #f3c1bd; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.notice { background: var(--warn-bg); border: 1px solid #f3d3ac; border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 0.94em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.03em; }
.bar-wrap { position: relative; height: 18px; background: #e7ecf1; border-radius: 6px; overflow: hidden; min-width: 130px; }
.bar-band { position: absolute; top: 0; bottom: 0; }
.bar-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); opacity: 0.9; }
.bar-marker { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--ink); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.8em; font-weight: 700; background: var(--band-avg); color: var(--accent-dark); }
.pill.done { background: var(--band-upper); color: var(--good); }
.pill.now { background: var(--band-elite); color: #9a3412; }
.modal-back { position: fixed; inset: 0; background: rgba(26, 32, 44, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 30px 14px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: var(--radius); max-width: 620px; width: 100%; padding: 24px; }
.modal h3 { margin-top: 0; }
.info-btn { background: none; border: 1.5px solid var(--ht-slate); color: var(--ht-slate); width: 20px; height: 20px; border-radius: 50%; font-size: 0.78em; line-height: 1; padding: 0; margin-left: 6px; vertical-align: middle; }
.choices { display: grid; gap: 8px; margin: 12px 0; }
.choice { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 14px; width: 100%; }
.choice:hover { border-color: var(--ht-slate); }
.choice.picked { border-color: var(--accent); background: #fff3e9; }
.choice.correct { border-color: var(--good); background: #e7f4ec; }
.choice.wrong { border-color: var(--bad); background: #fdecea; }
.feedback { border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 0.95em; }
.feedback.good { background: #e7f4ec; }
.feedback.bad { background: #fdecea; }
.passage { background: #fcfdfe; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 10px 0; white-space: pre-wrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15em; font-family: "Nunito", sans-serif; color: var(--ht-slate); }
.journey { display: flex; flex-wrap: wrap; gap: 8px; }
.journey .sess { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 0.85em; min-width: 118px; }
.journey .sess.done { border-color: var(--good); background: #eef7f1; }
.journey .sess.next { border-color: var(--accent); background: #fff3e9; }
.journey .sess .k { font-weight: 800; text-transform: capitalize; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.tabs button { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-family: "Nunito", sans-serif; font-size: 0.92em; color: var(--ht-slate); }
.tabs button.on { background: var(--ht-slate); color: #fff; border-color: var(--ht-slate); }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.stepper .step { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 0.9em; font-weight: 700; }
.stepper .step.done { border-color: var(--good); color: var(--good); }
.stepper .step.now { background: var(--ht-slate); color: #fff; border-color: var(--ht-slate); }
header.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
header.topbar .brand { text-decoration: none; display: inline-flex; align-items: center; }
/* Logo lockup sizing: full horizontal lockup on desktop;
   below the mobile threshold the icon-only HT monogram is used instead. */
.brand-logo-full { width: 176px; height: auto; display: block; }
.brand-logo-icon { height: 42px; width: auto; display: none; }
@media (max-width: 639px) {
  .brand-logo-full { display: none; }
  .brand-logo-icon { display: block; }
}
header.topbar .spacer { flex: 1; }
header.topbar nav a, header.topbar .navlink { font-family: "Nunito", sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.02em; color: var(--ht-slate); text-decoration: none; margin-right: 14px; }
header.topbar nav a:hover, header.topbar .navlink:hover { color: var(--ht-orange-dark); }
main.wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
.progressline { height: 8px; background: #e7ecf1; border-radius: 6px; overflow: hidden; }
.progressline > div { height: 100%; background: var(--accent); }
.small { font-size: 0.88em; }
.mono { font-variant-numeric: tabular-nums; }
u { text-decoration: underline; text-underline-offset: 2px; }
/* HT monogram in parent-portal report headers (replaces the retired academic seal) */
.report-mark { float: right; width: 64px; height: auto; margin: 0 0 8px 14px; }
.report-mark-sm { width: 34px; height: auto; vertical-align: middle; margin-right: 9px; }
