/* TroopDesk Exam Portal: styles.
   Brand: navy #1B2A4A, gold #C9A84C (The True Troop Consulting). One light theme on
   purpose: exam pages are read under pressure, so contrast and calm matter more than
   theming. Mobile first; many learners sit on a phone. */

:root {
  --navy: #1b2a4a;
  --navy-900: #121c33;
  --navy-700: #26395f;
  --navy-100: #e8ecf4;
  --gold: #c9a84c;
  --gold-600: #a98a35;
  --gold-100: #f7f0dc;
  --cream: #faf6ec;
  --ink: #1b2a4a;
  --text: #2a3550;
  --muted: #5d6781;
  --line: #e2e6ef;
  --bg: #f4f5f9;
  --card: #ffffff;
  --ok: #1e7a4c;
  --ok-100: #e6f4ec;
  --bad: #b3261e;
  --bad-100: #fbeaea;
  --warn: #9a6a10;
  --warn-100: #fdf3dc;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 28, 51, 0.06), 0 8px 24px rgba(18, 28, 51, 0.06);
  --shadow-lg: 0 20px 50px rgba(18, 28, 51, 0.18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif; /* display headlines only; body text stays Inter */
  --navy-950: #0f1a31;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
[hidden] { display: none !important; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--gold-600); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.0625rem; color: var(--text); }
.stack > * + * { margin-top: 12px; }
kbd {
  font: 600 0.75rem/1 var(--font);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--navy);
  color: #fff;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 3px solid var(--gold);
}
.topbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.55);
  border-radius: 999px;
  padding: 3px 9px;
}
.topbar__programme { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); white-space: nowrap; }
.brand__tag { white-space: nowrap; }
/* The phone rule that hides .topbar__programme lives after the landing block's
   display:inline-flex further down, otherwise that later rule would win and the label
   would push the page wider than a phone screen. */

/* ---------------------------------------------------------------- layout */
main { flex: 1; width: 100%; }
.screen { max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; }
.screen--narrow { max-width: 640px; }
.screen--centre {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.screen--exam { padding-top: 0; max-width: none; padding-left: 0; padding-right: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card + .card, .grid-2 + .card, .card + .actions { margin-top: 20px; }
.card--accent { border-top: 4px solid var(--gold); }
.card--hero { padding: 32px 28px; }
.card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.card__headline { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}
.eyebrow--light { color: var(--gold); }

/* ---------------------------------------------------------------- landing */
.hero {
  background:
    radial-gradient(1200px 300px at 90% -20%, rgba(201, 168, 76, 0.28), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  border-radius: 18px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow { color: var(--gold); }
.hero__title { color: #fff; font-size: clamp(1.75rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 600;
}
.facts svg { width: 18px; height: 18px; color: var(--gold); flex: none; }

.grid-signin { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) { .grid-signin { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 42px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

/* ---------------------------------------------------------------- forms */
fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
fieldset:disabled { opacity: 0.55; }
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid #cdd3e1;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(27, 42, 74, 0.12); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; margin: 4px 0 16px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy); flex: none; cursor: pointer; }
.check label { cursor: pointer; }
.form-error {
  background: var(--bad-100);
  color: var(--bad);
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.help-line { margin-top: 14px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font: 700 1rem/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--navy-900); color: #fff; }
.btn--gold { background: var(--gold); color: var(--navy-900); }
.btn--gold:hover:not(:disabled) { background: #d6b760; color: var(--navy-900); }
.btn--ghost { background: #fff; color: var(--navy); border-color: #cdd3e1; }
.btn--ghost:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn--block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn--gold.is-busy::after, .btn--ghost.is-busy::after { border-color: rgba(27, 42, 74, 0.3); border-top-color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.actions--split { justify-content: space-between; }
.icon-btn { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 6px 10px; border-radius: 8px; }

/* ---------------------------------------------------------------- notices */
.notice {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.95rem;
  border: 1px solid;
  margin: 0 0 20px;
}
.notice--ok { background: var(--ok-100); border-color: rgba(30, 122, 76, 0.25); color: #145236; }
.notice--warn { background: var(--warn-100); border-color: rgba(154, 106, 16, 0.3); color: #6b4a0b; }
.notice--info { background: var(--navy-100); border-color: rgba(27, 42, 74, 0.15); color: var(--navy); }
.notice strong { color: inherit; }
.notice .btn { margin-top: 10px; min-height: 42px; padding: 9px 16px; font-size: 0.95rem; }

/* ---------------------------------------------------------------- exam bar */
.exam-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.exam-bar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.exam-bar__title { font-weight: 700; color: var(--ink); font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-bar__left { min-width: 0; }
.exam-bar__meta { font-size: 0.82rem; color: var(--muted); }
.dot { margin: 0 4px; }
.save-state[data-state="saved"] { color: var(--ok); }
.save-state[data-state="saving"], .save-state[data-state="pending"] { color: var(--muted); }
.save-state[data-state="offline"] { color: var(--bad); font-weight: 600; }
.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(27, 42, 74, 0.25);
}
.timer svg { width: 20px; height: 20px; color: var(--gold); }
.timer.is-warn { background: var(--gold); color: var(--navy-900); }
.timer.is-warn svg { color: var(--navy-900); }
.timer.is-critical { background: var(--bad); color: #fff; animation: pulse 1s ease-in-out infinite; }
.timer.is-critical svg { color: #fff; }
.progress { height: 4px; background: var(--navy-100); }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #e0c77c); transition: width 0.3s ease; }

/* ---------------------------------------------------------------- question */
.exam-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 96px;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
  .exam-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; padding-bottom: 48px; }
}
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.q-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.q-num { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-600); }
.q-num .muted { font-weight: 600; }
.q-text { font-size: clamp(1.15rem, 2.6vw, 1.4rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 20px; }
.q-text:focus { outline: none; } /* focused by script after keyboard navigation, for screen readers */
.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 0.82rem/1 var(--font);
  cursor: pointer;
}
.flag-btn svg { width: 16px; height: 16px; }
.flag-btn[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-100); color: var(--navy); }

.options { display: grid; gap: 12px; }
.opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
  min-height: 56px;
}
.opt:hover { border-color: #b9c1d4; background: #fbfcfe; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt__letter {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: var(--navy-100);
  color: var(--navy);
  transition: background 0.12s, color 0.12s;
}
.opt__text { padding-top: 4px; color: var(--ink); font-weight: 500; }
.opt.is-selected { border-color: var(--navy); background: #f5f7fc; box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.1); }
.opt.is-selected .opt__letter { background: var(--navy); color: var(--gold); }
.opt:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.q-nav .btn { flex: 1; max-width: 220px; }
.kbd-hint { margin-top: 16px; font-size: 0.8rem; color: var(--muted); }
@media (hover: none) { .kbd-hint { display: none; } }

/* ---------------------------------------------------------------- navigator */
.navigator {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
@media (min-width: 960px) { .navigator { position: sticky; top: 92px; } }
.navigator__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.navigator__head h3 { font-size: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.75rem; color: var(--muted); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid #cdd3e1; background: #fff; display: inline-block; }
.lg--done { background: var(--navy); border-color: var(--navy); }
.lg--flag { background: var(--gold); border-color: var(--gold); }
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin-bottom: 18px; }
.nav-cell {
  position: relative;
  height: 44px;
  border-radius: 9px;
  border: 1.5px solid #cdd3e1;
  background: #fff;
  color: var(--ink);
  font: 700 0.9rem/1 var(--font);
  cursor: pointer;
}
.nav-cell:hover { border-color: var(--navy); }
.nav-cell.is-done { background: var(--navy); border-color: var(--navy); color: #fff; }
.nav-cell.is-current { box-shadow: 0 0 0 3px var(--gold); }
.nav-cell.is-flag::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
}
.nav-close, .nav-fab, .sheet-backdrop { display: none; }

@media (max-width: 959px) {
  /* On phones and tablets the question list becomes a bottom sheet. */
  .navigator {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    border-radius: 18px 18px 0 0;
    max-height: 78vh;
    overflow-y: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(105%);
    transition: transform 0.25s ease;
  }
  .navigator.is-open { transform: translateY(0); }
  .nav-close { display: inline-block; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(18, 28, 51, 0.45); z-index: 35; }
  .nav-fab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font: 700 0.95rem/1 var(--font);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
  }
  .nav-fab__count { background: var(--gold); color: var(--navy-900); border-radius: 999px; padding: 3px 8px; font-size: 0.8rem; }
}

/* ---------------------------------------------------------------- review panel */
.review-panel { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; }
.review-panel .actions + p { margin-top: 14px; }
.nav-grid--review { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); margin-top: 18px; }

/* ---------------------------------------------------------------- modal + toast */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(18, 28, 51, 0.55); display: grid; place-items: center; padding: 20px; }
.modal__card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 26px; max-width: 460px; width: 100%; }
.modal__card h2 { font-size: 1.3rem; margin-bottom: 10px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 70;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.95rem;
  max-width: min(92vw, 520px);
  text-align: center;
}
.toast[data-kind="warn"] { background: var(--gold); color: var(--navy-900); }

/* ---------------------------------------------------------------- spinner */
.spinner { width: 42px; height: 42px; border: 4px solid var(--navy-100); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0.18); } }

/* ---------------------------------------------------------------- result */
.result-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  background:
    radial-gradient(900px 260px at 100% 0%, rgba(201, 168, 76, 0.25), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  border-radius: 18px;
  padding: 30px 32px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}
.ring { position: relative; width: 150px; height: 150px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 10; }
.ring__value { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring__label strong { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.ring__label span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.75); margin-top: 4px; }
.result-hero__body { flex: 1; min-width: 240px; }
.result-hero__title { color: #fff; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.88); }
.band { border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; background: var(--gold); color: var(--navy-900); }
.band[data-band="Merit"] { background: #fff; color: var(--navy); }
.band[data-band="Pass"] { background: #cfe9da; color: #145236; }
.band[data-band="Revisit"] { background: #f4d9c8; color: #7a3413; }
.result-hero__note { margin-top: 12px; color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; }

.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.topics { display: grid; gap: 14px; }
.topic__row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.topic__row span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--navy-100); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--navy); }
.bar > i.is-full { background: var(--gold); }
.bar > i.is-low { background: #c0643a; }

.review-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid #cdd3e1;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font: 600 0.85rem/1 var(--font);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.review-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 12px; }
.rv { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: #fff; }
.rv--ok { border-left-color: var(--ok); }
.rv--bad { border-left-color: var(--bad); }
.rv--blank { border-left-color: var(--gold); }
.rv__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.rv__num { font-weight: 800; color: var(--ink); font-size: 0.92rem; }
.rv__topic { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pill { margin-left: auto; border-radius: 999px; padding: 4px 10px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.pill--ok { background: var(--ok-100); color: var(--ok); }
.pill--bad { background: var(--bad-100); color: var(--bad); }
.pill--blank { background: var(--warn-100); color: var(--warn); }
.rv__q { font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.rv__opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv__opt { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); font-size: 0.95rem; }
.rv__opt b { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--navy-100); color: var(--navy); font-size: 0.8rem; }
.rv__opt span { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.rv__opt em { font-style: normal; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; padding-top: 3px; }
@media (max-width: 560px) {
  /* On phones the "Your answer / Correct answer" tag drops under the option text. */
  .rv__opt em { flex-basis: 100%; padding: 0 0 0 34px; }
  .card { padding: 18px; }
  .rv { padding: 14px; }
  .hero, .result-hero { padding: 24px 20px; }
  .q-card { padding: 20px 16px; }
}
.rv__opt.is-correct { background: var(--ok-100); border-color: rgba(30, 122, 76, 0.35); }
.rv__opt.is-correct b { background: var(--ok); color: #fff; }
.rv__opt.is-correct em { color: var(--ok); }
.rv__opt.is-wrong { background: var(--bad-100); border-color: rgba(179, 38, 30, 0.35); }
.rv__opt.is-wrong b { background: var(--bad); color: #fff; }
.rv__opt.is-wrong em { color: var(--bad); }
.rv__why { margin-top: 12px; padding: 12px 14px; background: var(--cream); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; font-size: 0.93rem; }
.rv__why strong { color: var(--navy); }
.empty-note { color: var(--muted); padding: 12px 0; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
}
body[data-screen="exam"] .site-footer { display: none; }
.noscript { max-width: 640px; margin: 40px auto; padding: 16px; background: var(--warn-100); border-radius: 10px; }

/* ---------------------------------------------------------------- print (result page) */
@media print {
  body { background: #fff; }
  .topbar, .no-print, .chips, .toast, .nav-fab { display: none !important; }
  .screen { padding: 0; }
  .card, .result-hero { box-shadow: none; break-inside: avoid; }
  .result-hero { background: var(--navy) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rv { break-inside: avoid; }
  .rv[hidden] { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================================
   Landing page, premium edition (23 Sep 2026): full-bleed navy hero with the learner
   photograph, serif display type, glass stat panel, floating product previews, "how it
   works" steps and an elevated sign-in card. Everything below builds on the tokens above.
   ===================================================================================== */

.topbar__programme { display: inline-flex; align-items: center; gap: 8px; }
.topbar__programme svg { width: 15px; height: 15px; color: var(--gold); }
@media (max-width: 640px) {
  .topbar__programme { display: none; } /* the brand bar keeps one tidy line on phones */
}
body[data-screen="signin"] .topbar { background: var(--navy-950); border-bottom-color: rgba(201, 168, 76, 0.35); }

.screen--landing { max-width: none; padding: 0; }

/* ---- hero ---- */
.lx-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 520px at 82% 18%, rgba(201, 168, 76, 0.2), transparent 62%),
    radial-gradient(700px 420px at 8% 108%, rgba(64, 98, 170, 0.38), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy) 56%, #22365e 100%);
}
/* A faint drafting grid, fading out from the headline: a nod to the Gantt chart. */
.lx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 42%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse at 30% 42%, #000 20%, transparent 72%);
  pointer-events: none;
}
.lx-hero__inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 960px) {
  .lx-hero__inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); padding: 76px 24px 100px; gap: 56px; }
}

.lx-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.lx-badge {
  font: 700 0.72rem/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.08);
  border-radius: 999px;
  padding: 9px 14px;
}
.lx-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 0.78rem/1 var(--font);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.lx-status i { width: 8px; height: 8px; border-radius: 50%; background: #f5b942; animation: lx-ping 2.2s ease-out infinite; }
.lx-status[data-state="open"] i { background: #3ddc97; }
.lx-status[data-state="preview"] i { background: #7fb2ff; }
.lx-status[data-state="closed"] i { background: #9aa4b8; animation: none; }
@keyframes lx-ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.lx-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: #fff;
  font-variation-settings: "opsz" 120;
}
.lx-title__sub {
  display: block;
  margin-top: 12px;
  font-style: italic;
  font-weight: 400;
  font-size: 0.56em;
  letter-spacing: 0;
  background: linear-gradient(90deg, #e9cf86, var(--gold) 55%, #b8923a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lx-title__sub:empty { display: none; }
.lx-lead { margin-top: 22px; max-width: 34em; font-size: 1.14rem; line-height: 1.65; color: rgba(255, 255, 255, 0.78); }

.lx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.lx-stat { padding: 18px 20px; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.lx-stat:first-child { border-left: 0; }
.lx-stat__num { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1; color: #fff; }
.lx-stat__label { display: block; margin-top: 8px; font: 600 0.7rem/1.2 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 560px) {
  .lx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-stat:nth-child(3) { border-left: 0; }
  .lx-stat:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.1); }
}

.lx-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn--lg { min-height: 56px; padding: 16px 28px; font-size: 1.04rem; border-radius: 14px; }
.btn svg { width: 20px; height: 20px; }
.btn--gold { box-shadow: 0 12px 32px rgba(201, 168, 76, 0.32); }
.btn--gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(201, 168, 76, 0.42); }
.btn--glass { background: rgba(255, 255, 255, 0.07); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn--glass:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); color: #fff; }

.lx-trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.lx-trust li { display: inline-flex; align-items: center; gap: 8px; }
.lx-trust svg { width: 16px; height: 16px; color: var(--gold); }

/* ---- the photograph, with product previews floating around it ---- */
.lx-visual { position: relative; margin: 0; justify-self: center; width: min(100%, 460px); isolation: isolate; }
.lx-visual::before {
  content: "";
  position: absolute;
  inset: 10% -8% -6% 10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(201, 168, 76, 0.5), transparent);
  filter: blur(34px);
}
.lx-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 44px 90px rgba(4, 9, 22, 0.55), 0 0 0 1px rgba(201, 168, 76, 0.4);
}
.lx-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font: 700 0.95rem/1.2 var(--font);
  box-shadow: 0 20px 44px rgba(4, 9, 22, 0.38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: lx-float 7s ease-in-out infinite;
}
.lx-chip small { display: block; margin-top: 3px; font: 600 0.72rem/1 var(--font); color: var(--muted); }
.lx-chip svg { width: 22px; height: 22px; flex: none; }
.lx-chip--timer { top: 7%; left: -9%; background: rgba(15, 26, 49, 0.92); color: #fff; border: 1px solid rgba(201, 168, 76, 0.45); }
.lx-chip--timer svg { color: var(--gold); }
.lx-chip--timer b { font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--gold); }
.lx-chip--timer small { color: rgba(255, 255, 255, 0.65); }
.lx-chip--saved { top: 45%; right: -8%; animation-delay: -2.3s; }
.lx-chip__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(30, 122, 76, 0.18); flex: none; }
.lx-chip--result { bottom: 7%; left: -7%; animation-delay: -4.6s; }
.lx-chip--result svg { color: var(--gold); }
@keyframes lx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (max-width: 700px) {
  .lx-chip { font-size: 0.85rem; padding: 10px 12px; }
  .lx-chip--timer { left: 4%; top: 4%; }
  .lx-chip--saved { right: 4%; }
  .lx-chip--result { left: 4%; bottom: 4%; }
}

/* ---- how it works ---- */
.lx-how { max-width: 1180px; margin: 0 auto; padding: 76px 24px 16px; }
.lx-h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 6px 0 30px;
  font-variation-settings: "opsz" 72;
}
.lx-h2--sm { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-bottom: 14px; }
.lx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: lx; }
.lx-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lx-step:hover { transform: translateY(-4px); box-shadow: 0 26px 52px rgba(18, 28, 51, 0.12); }
.lx-step::after {
  counter-increment: lx;
  content: "0" counter(lx);
  position: absolute;
  top: 20px;
  right: 22px;
  font: 600 1.7rem/1 var(--serif);
  color: rgba(27, 42, 74, 0.12);
}
.lx-step__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-700) 100%);
  color: var(--gold);
  box-shadow: 0 10px 22px rgba(27, 42, 74, 0.22);
}
.lx-step__icon svg { width: 22px; height: 22px; }
.lx-step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.lx-step p { color: var(--muted); font-size: 0.95rem; }

/* ---- sign-in ---- */
.lx-signin { max-width: 1180px; margin: 0 auto; padding: 44px 24px 88px; }
.lx-signin__grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .lx-signin__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); } }
.lx-rules { padding: 32px; border-radius: 22px; }
.lx-form {
  position: relative;
  padding: 34px 32px 30px;
  border-radius: 22px;
  border: 1px solid rgba(201, 168, 76, 0.45);
  box-shadow: 0 34px 70px rgba(18, 28, 51, 0.14);
  scroll-margin-top: 24px;
}
.lx-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #e9cf86, var(--gold), #b8923a);
}
@media (min-width: 960px) { .lx-form { position: sticky; top: 24px; } }
.lx-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ok-100);
  color: var(--ok);
  font: 700 0.72rem/1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lx-secure svg { width: 13px; height: 13px; }
.lx-form .notice { margin: 16px 0 0; }
.lx-form .field input { padding: 14px 16px; border-radius: 12px; }
.lx-form.is-highlight { animation: lx-glow 1.4s ease-out 1; }
@keyframes lx-glow { 0% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.65), 0 34px 70px rgba(18, 28, 51, 0.14); } 100% { box-shadow: 0 0 0 18px rgba(201, 168, 76, 0), 0 34px 70px rgba(18, 28, 51, 0.14); } }

/* Serif display type carried through the rest of the journey. */
.card__headline, .result-hero__title { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }

/* Staggered entrance for the landing page. */
.lx-reveal { opacity: 0; transform: translateY(14px); animation: lx-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes lx-rise { to { opacity: 1; transform: none; } }

/* ---- celebration for a Distinction ---- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall { to { transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--rot, 540deg)); opacity: 0.9; } }

/* Footer: the brand line on a navy band. */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, 0.7); border-top: 1px solid rgba(201, 168, 76, 0.3); }
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: #e9cf86; }
.lx-stat__num--word { font-size: 1.45rem; padding-top: 0.28em; }
/* Brand bar lines up with the landing grid. */
.topbar__inner { max-width: 1180px; padding-left: 24px; padding-right: 24px; }
