/* ==========================================================================
   THVFoodSafe — Food Handler Certification
   Design system: crimson red + white, Jost display (matches the
   wordmark), IBM Plex Sans for reading, IBM Plex Mono for data and indices.
   ========================================================================== */

@font-face { font-family: 'Jost'; font-weight: 300; font-display: swap; src: url('/fonts/jost/jost-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 400; font-display: swap; src: url('/fonts/jost/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 500; font-display: swap; src: url('/fonts/jost/jost-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url('/fonts/plex-sans/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url('/fonts/plex-sans/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url('/fonts/plex-sans/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/fonts/plex-mono/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('/fonts/plex-mono/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  /* Brand: crimson red + white */
  --brand: #a3162c;
  --brand-2: #b71d35;      /* raised surfaces on red */
  --brand-3: #c42640;      /* hover on red */
  --brand-deep: #6e0f1f;   /* footer and deepest bands */
  --tint: #ffffff;         /* light accents on red */
  --tint-2: #fbe5e9;
  --tint-3: #fdf3f5;
  --accent: #a3162c;       /* links and labels on white (7.3:1) */
  --accent-dark: #7f1022;

  /* Neutrals, warmed slightly toward the red */
  --ink: #241517;
  --ink-2: #4a3a3d;
  --muted: #6d5f62;
  --line: #eee3e4;
  --line-2: #dccfd1;
  --paper: #faf7f6;
  --white: #ffffff;
  --on-dark: #ffffff;
  --on-dark-2: #f6d6dc;
  --line-dark: rgba(255, 255, 255, .22);
  --video: #1d1416;        /* behind camera feeds and recordings */

  /* Status. Errors are burnt orange, not red, so they never blend into the brand. */
  --ok: #1d6b45;   --ok-bg: #e8f3ec;
  --warn: #8a5a00; --warn-bg: #fbf2dd;
  --bad: #b3400b;  --bad-bg: #fdf0e8;

  /* Type */
  --display: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Shape & space */
  --r: 3px;
  --r-lg: 6px;
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 9vw, 128px);
  --header: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .5em; color: inherit; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); letter-spacing: -.025em; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: -.005em; }
h4 { font-size: 1.05rem; font-weight: 500; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
code, kbd { font-family: var(--mono); font-size: .9em; }
::selection { background: var(--tint-2); color: var(--brand-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--tint); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--tint); color: var(--brand); padding: 10px 16px; z-index: 100; font-weight: 500; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 760px; }

/* ---------- Type helpers ---------- */
.kicker { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.25rem; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ''; width: 24px; height: 1px; background: currentColor; opacity: .6; }
.kicker.plain::before { display: none; }
.dark .kicker { color: var(--tint); }
.eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.dark .lead { color: var(--on-dark-2); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
/* Reference codes (HV-L-…, HV-E-…): one click selects the whole code for copying. */
.ref { font-family: var(--mono); font-size: .92em; letter-spacing: .04em; white-space: nowrap; user-select: all; }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--brand); color: var(--on-dark); border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header); gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--on-dark); flex: none; }
.brand img { height: 44px; width: auto; }
.brand-name { font-family: var(--display); font-size: 1.4rem; line-height: 1; letter-spacing: .01em; color: var(--on-dark); }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.footer-brand .brand-name { font-size: 1.7rem; }
.footer-grid .footer-brand img { height: 56px; margin-bottom: 0; }
.brand-tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-2); padding-left: 14px; border-left: 1px solid var(--line-dark); line-height: 1.3; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn), .nav button.link { position: relative; color: var(--on-dark); text-decoration: none; padding: 8px 14px; font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px; background: var(--tint); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a:not(.btn):hover, .nav button.link:hover { color: #fff; }
.nav a[aria-current="page"] { color: var(--tint); }
.nav form { margin: 0; }
.nav .divider-v { width: 1px; height: 20px; background: var(--line-dark); margin: 0 10px; }
.nav .btn { margin-left: 6px; }
.nav a, .nav button.link { white-space: nowrap; }
/* Between the full navbar and the Menu button, tighten the spacing so every link stays on one line. */
@media (min-width: 981px) and (max-width: 1180px) { .nav a:not(.btn), .nav button.link { padding: 8px 9px; } .nav a:not(.btn)::after { left: 9px; right: 9px; } .nav .divider-v { margin: 0 6px; } }
.nav-toggle { display: none; align-items: center; gap: 10px; background: none; border: 1px solid var(--line-dark); color: var(--on-dark); border-radius: var(--r); padding: 9px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.nav-toggle span { display: block; width: 16px; height: 1px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
@media (max-width: 980px) {
  .brand-tag { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: var(--header); left: 0; right: 0; background: var(--brand); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line-dark); }
  .nav.open { display: flex; }
  .nav a:not(.btn), .nav button.link { padding: 14px 0; border-bottom: 1px solid var(--line-dark); text-align: left; font-size: 1rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .divider-v { display: none; }
  .nav .btn { margin: 16px 0 0; justify-content: center; border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; font: inherit; font-size: .95rem; font-weight: 500; letter-spacing: .005em; line-height: 1; border-radius: var(--r); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-steel { background: var(--accent); color: #fff; }
.btn-steel:hover { background: var(--accent-dark); color: #fff; }
.btn-light { background: var(--tint); color: var(--brand); }
.btn-light:hover { background: #fbe5e9; color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.dark .btn-ghost { color: var(--on-dark); border-color: rgba(233, 238, 240, .28); }
.dark .btn-ghost:hover { border-color: var(--tint); color: var(--tint); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #8a3008; color: #fff; }
.btn-link { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); }
.btn-link:hover { color: var(--accent-dark); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: var(--r); border: 1px solid; border-left-width: 3px; margin: 0 0 24px; font-size: .925rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #c4e0cf; border-left-color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #ecd9a8; border-left-color: var(--warn); }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: #f5cdb6; border-left-color: var(--bad); }
.alert-info { background: var(--tint-3); color: var(--accent-dark); border-color: var(--tint-2); border-left-color: var(--accent); }
.alert a { color: inherit; }

/* ==========================================================================
   Public course page
   ========================================================================== */
.dark { background: var(--brand); color: var(--on-dark); }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.hero h1 { color: #fff; margin-bottom: 28px; max-width: 11em; }
.hero h1 em { font-style: normal; color: var(--tint); }
.hero .lead { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spec-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(48px, 7vw, 88px) 0 0; border-top: 1px solid var(--line-dark); }
.spec-bar > div { padding: 24px 24px 28px 0; }
.spec-bar > div + div { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.spec-bar dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 8px; }
.spec-bar dd { margin: 0; font-family: var(--display); font-size: 1.35rem; color: #fff; line-height: 1.2; }
@media (max-width: 760px) {
  .spec-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-bar > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .spec-bar > div:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
}

/* Enrol panel (the "buy box") */
.enrol { background: var(--white); color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); position: sticky; top: calc(var(--header) + 24px); overflow: hidden; }
.enrol-head { padding: 28px 32px 24px; border-bottom: 1px solid var(--line); }
.enrol-head .eyebrow { margin-bottom: 10px; }
.price { font-family: var(--display); font-size: 3rem; line-height: 1; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 10px; }
.price small { font-family: var(--sans); font-size: .85rem; letter-spacing: 0; color: var(--muted); }
.enrol-body { padding: 24px 32px 32px; }
.enrol-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; font-size: .93rem; color: var(--ink-2); }
.enrol-list li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; }
.enrol-list svg { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
.enrol-foot { margin: 16px 0 0; font-size: .85rem; color: var(--muted); text-align: center; }
.test-card { margin: 16px 0 0; padding: 10px 12px; border: 1px dashed var(--brand); border-radius: 8px; background: var(--tint-3); font-size: .82rem; color: var(--ink); line-height: 1.5; }
.test-card code { font-weight: 600; white-space: nowrap; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .enrol { position: static; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section-white { background: var(--white); }
.section-rule { border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-head { position: sticky; top: calc(var(--header) + 32px); }
.split-head h2 { margin-bottom: 16px; }
.split-head p { color: var(--muted); max-width: 26em; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-head { position: static; }
}

/* Assurance row */
.assurance { background: var(--white); border-bottom: 1px solid var(--line); }
.assurance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.assurance-grid > div { padding: clamp(32px, 4vw, 48px) 28px clamp(32px, 4vw, 48px) 0; }
.assurance-grid > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.assurance svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 18px; }
.assurance h3 { font-size: 1.05rem; margin-bottom: 6px; }
.assurance p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 900px) {
  .assurance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assurance-grid > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .assurance-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .assurance-grid { grid-template-columns: 1fr; }
  .assurance-grid > div, .assurance-grid > div + div { padding-left: 0; border-left: 0; padding-top: 28px; padding-bottom: 28px; }
  .assurance-grid > div + div { border-top: 1px solid var(--line); }
}

/* Indexed outcome list */
.index-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; counter-reset: idx; }
.index-list li { counter-increment: idx; display: grid; grid-template-columns: 44px 1fr; padding: 20px 0; border-top: 1px solid var(--line); font-size: 1.02rem; color: var(--ink); }
.index-list li::before { content: counter(idx, decimal-leading-zero); font-family: var(--mono); font-size: .8rem; color: var(--accent); padding-top: 3px; }
@media (max-width: 640px) { .index-list { grid-template-columns: 1fr; } }

/* Curriculum */
.curriculum { border-top: 1px solid var(--ink); }
.curriculum details { border-bottom: 1px solid var(--line); }
.curriculum summary { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 24px; gap: 16px; align-items: center; padding: 24px 0; cursor: pointer; list-style: none; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum .mod-n { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.curriculum .mod-title { font-family: var(--display); font-size: 1.3rem; line-height: 1.25; }
.curriculum .mod-meta { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.curriculum summary::after { content: ''; width: 12px; height: 12px; justify-self: end; background: linear-gradient(currentColor, currentColor) center / 12px 1px no-repeat, linear-gradient(currentColor, currentColor) center / 1px 12px no-repeat; color: var(--ink); transition: transform .2s ease; }
.curriculum details[open] summary::after { transform: rotate(45deg); }
.curriculum summary:hover .mod-title { color: var(--accent); }
.curriculum ol { list-style: none; margin: 0; padding: 0 0 24px 72px; display: grid; gap: 2px; }
.curriculum li { display: flex; gap: 14px; padding: 8px 0; color: var(--ink-2); font-size: .95rem; }
.curriculum li span { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding-top: 3px; min-width: 32px; }
@media (max-width: 560px) {
  .curriculum summary { grid-template-columns: 40px minmax(0, 1fr) 20px; }
  .curriculum .mod-meta { display: none; }
  .curriculum ol { padding-left: 56px; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 24px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: .8rem; color: var(--accent); margin-bottom: 40px; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li::before { margin-bottom: 16px; } }

/* Certificate showcase */
.showcase { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.showcase figure { margin: 0; }
.showcase img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 40px 80px -30px rgba(60, 16, 24, .55), 0 0 0 1px var(--line); }
.showcase figcaption { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.dark .showcase figcaption { color: var(--on-dark-2); }
.facts-list { margin: 32px 0 36px; padding: 0; border-top: 1px solid var(--line); }
.facts-list div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; color: var(--ink); }
.dark .facts-list, .dark .facts-list div { border-color: var(--line-dark); }
.dark .facts-list dt { color: var(--on-dark-2); }
.dark .facts-list dd { color: #fff; }
@media (max-width: 900px) { .showcase { grid-template-columns: 1fr; } }

/* About + FAQ */
.prose { max-width: 68ch; font-size: 1.02rem; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 .6em; color: var(--ink); }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 .5em; color: var(--ink); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--accent); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.6em 0; font-size: .93rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; text-align: left; vertical-align: top; }
.prose th { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; color: var(--muted); border-bottom-color: var(--ink); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--ink); font-family: var(--display); font-size: 1.15rem; line-height: 1.5; }
.prose blockquote p:last-child { margin: 0; }
.prose code { background: var(--tint-3); padding: 2px 6px; border-radius: 2px; }
.prose img { border-radius: var(--r); }
.prose a { color: var(--accent); }

.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font-family: var(--display); font-size: 1.2rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 12px; height: 12px; background: linear-gradient(currentColor, currentColor) center / 12px 1px no-repeat, linear-gradient(currentColor, currentColor) center / 1px 12px no-repeat; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--ink-2); max-width: 60ch; padding: 0 40px 12px 0; }
.contact-line { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--muted); }

/* Closing call to action */
.closing { padding: clamp(72px, 9vw, 120px) 0; }
.closing-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.closing h2 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.4rem); margin: 0; max-width: 14em; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 900px) { .closing-grid { grid-template-columns: 1fr; } .closing-actions { justify-content: flex-start; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: var(--on-dark-2); font-size: .9rem; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 40px; padding: 72px 0 56px; }
.footer-grid img { height: 64px; width: auto; margin-bottom: 20px; }
.footer-grid p { max-width: 30em; }
.site-footer h4 { font-family: var(--mono); font-size: .72rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--tint); margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--tint); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0 32px; border-top: 1px solid var(--line-dark); font-size: .8rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: 20px; }
.field label, .label { display: block; font-size: .875rem; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.code-input { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
.field .hint { font-size: .825rem; color: var(--muted); margin-top: 8px; }
.field .err { font-size: .85rem; color: var(--bad); margin-top: 8px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 48px; font: inherit; font-size: 1rem; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
input:hover, select:hover, textarea:hover { border-color: #cdbfc2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44, 106, 128, .16); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
input::placeholder, textarea::placeholder { color: #ad9da0; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.code { font-family: var(--mono); font-size: .85rem; min-height: 320px; }
.checkbox, .field label.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: .925rem; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 72px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; padding: 8px 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 600px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }
.divider { color: var(--muted); font-size: .9rem; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* Auth: split screen */
.auth-shell { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: calc(100vh - var(--header)); }
.auth-aside { padding: clamp(40px, 6vw, 80px) var(--gutter); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; border-right: 1px solid var(--line-dark); }
.auth-aside h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 12em; }
.auth-aside ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.auth-aside li { display: grid; grid-template-columns: 40px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-size: .93rem; color: var(--on-dark); }
.auth-aside li span { font-family: var(--mono); font-size: .75rem; color: var(--tint); padding-top: 3px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(40px, 6vw, 80px) var(--gutter); background: var(--white); }
.auth-form { width: 100%; max-width: 440px; }
.auth-form h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.auth-form > .muted { margin-bottom: 32px; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
/* Simple centred panel (messages, errors) */
.auth { min-height: calc(100vh - var(--header)); display: grid; place-items: center; padding: 64px var(--gutter); }
.auth .panel { width: 100%; max-width: 520px; }
.auth .panel h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); }

/* ==========================================================================
   Learner area
   ========================================================================== */
.page { padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 112px); }
.page-head { margin-bottom: 40px; }
.page-head h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 12px; }
.page-band { background: var(--white); border-bottom: 1px solid var(--line); padding: clamp(32px, 4vw, 48px) 0; }
.page-band h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin: 0; }
.page-band .spread { align-items: flex-end; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); }
.card + .card { margin-top: 24px; }
.card h2 { font-size: 1.5rem; margin-bottom: 12px; }
.card-rule { border-top: 1px solid var(--line); margin: 24px 0; }

progress.bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 0; background: var(--line); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--line); }
progress.bar::-webkit-progress-value { background: var(--accent); }
progress.bar::-moz-progress-bar { background: var(--accent); }
.dark progress.bar { background: var(--line-dark); }
.dark progress.bar::-webkit-progress-bar { background: var(--line-dark); }
.dark progress.bar::-webkit-progress-value { background: var(--tint); }
.dark progress.bar::-moz-progress-bar { background: var(--tint); }

/* Dashboard course row */
.course-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.course-row h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 20px; }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.progress-meta strong { color: var(--ink); font-weight: 500; }
.course-actions { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
@media (max-width: 760px) { .course-row { grid-template-columns: 1fr; } .course-actions { min-width: 0; } }
.cert-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 24px; align-items: center; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9rem; }
.cert-strip dt { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.cert-strip dd { margin: 0; }
@media (max-width: 760px) { .cert-strip { grid-template-columns: 1fr 1fr; } }

.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; background: var(--tint-3); color: var(--accent-dark); white-space: nowrap; line-height: 1.3; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-dark { background: var(--brand); color: var(--tint); }

/* Lesson player */
.lesson-top { background: var(--white); border-bottom: 1px solid var(--line); }
.lesson-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; font-size: .85rem; color: var(--muted); }
.lesson-top a { color: var(--ink-2); text-decoration: none; }
.lesson-top a:hover { color: var(--accent); }
.lesson-top .pos { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; white-space: nowrap; }
.lesson-top progress.bar { width: 180px; }
.lesson-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 1000px) { .lesson-layout { grid-template-columns: 1fr; } .lesson-nav { order: 2; position: static !important; max-height: none !important; } .lesson-top progress.bar { display: none; } }
.lesson-nav { position: sticky; top: calc(var(--header) + 24px); max-height: calc(100vh - var(--header) - 48px); overflow: auto; padding-right: 8px; }
.lesson-nav h4 { display: grid; grid-template-columns: 32px 1fr; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: 0; color: var(--ink); padding: 18px 0 8px; margin: 0; border-top: 1px solid var(--line); }
.lesson-nav h4:first-child { border-top: 0; padding-top: 0; }
.lesson-nav h4 span { font-family: var(--mono); font-weight: 400; color: var(--muted); }
.lesson-nav a:not(.btn), .lesson-nav span.locked { display: grid; grid-template-columns: 32px 1fr; padding: 7px 0; text-decoration: none; color: var(--ink-2); font-size: .875rem; line-height: 1.45; }
.lesson-nav a:not(.btn):hover { color: var(--accent); }
.lesson-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.lesson-nav span.locked { color: #b9aaad; cursor: not-allowed; }
.lesson-nav .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-2); margin-top: 3px; display: grid; place-items: center; background: var(--white); }
.lesson-nav a[aria-current="page"] .dot { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 7px var(--accent); }
.lesson-nav .dot.done { background: var(--accent); border-color: var(--accent); box-shadow: none; }
.lesson-nav .dot.done svg { width: 9px; height: 9px; color: #fff; stroke-width: 3; }
.lesson-nav .exam-link { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.lesson-body { min-width: 0; }
.lesson-body .lesson-title { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 32px; max-width: 18em; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 40px; border-radius: var(--r); overflow: hidden; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { margin: -28px 0 40px; font-size: .85rem; color: var(--muted); }
.video-note.is-warn { color: var(--ink); font-weight: 600; }
.lesson-foot { max-width: 68ch; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--ink); display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.timer-note { font-size: .85rem; color: var(--muted); }

/* Exam */
body.exam-mode { background: var(--paper); user-select: none; -webkit-user-select: none; }
body.exam-mode .site-header .nav, body.exam-mode .nav-toggle { display: none; }
.exam-bar { position: sticky; top: var(--header); z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.exam-bar .wrap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; min-height: 64px; }
.exam-bar .wrap > :last-child { justify-self: end; }
.clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.clock svg { width: 20px; height: 20px; color: var(--muted); }
.clock.low { color: var(--bad); }
.clock.low svg { color: var(--bad); }
.save-state { font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.exam-wrap { position: relative; padding: 48px 0 96px; }
.watermark { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; opacity: .05; }
.watermark span { position: absolute; white-space: nowrap; font-family: var(--mono); font-size: 12px; transform: rotate(-14deg); color: var(--ink); }
.qcard { position: relative; z-index: 6; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 5vw, 56px); max-width: 820px; margin: 0 auto; }
.qnum { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.qprompt { font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.3; margin-bottom: 32px; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 16px; align-items: start; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r); margin-bottom: 10px; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--ink-2); }
.opt input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--tint-3); box-shadow: inset 3px 0 0 var(--accent); }
.qnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.palette { max-width: 820px; margin: 24px auto 0; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 6; }
.palette button { width: 40px; height: 40px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--white); font-family: var(--mono); font-size: .8rem; cursor: pointer; color: var(--ink-2); }
.palette button.answered { background: var(--brand); color: var(--tint); border-color: var(--brand); }
.palette button.current { outline: 2px solid var(--accent); outline-offset: 2px; }
.overlay { position: fixed; inset: 0; background: rgba(60, 16, 24, .9); z-index: 60; display: grid; place-items: center; padding: 20px; }
.overlay[hidden] { display: none; }
.overlay .card { max-width: 520px; text-align: center; }
.rule-list { padding-left: 1.2em; color: var(--ink-2); }
.rule-list li { margin: 10px 0; }
.rule-list li::marker { color: var(--accent); }

/* Results */
.result { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.score { font-family: var(--display); font-size: clamp(5rem, 12vw, 9rem); line-height: .9; letter-spacing: -.04em; }
.score-meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: 16px; }
@media (max-width: 860px) { .result { grid-template-columns: 1fr; } }

/* Verify */
.verify-result { margin-top: 32px; border-top: 1px solid var(--ink); padding-top: 28px; }
.status-line { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.6rem; margin-bottom: 24px; }
.status-line svg { width: 28px; height: 28px; }
.verify-result.valid .status-line { color: var(--ok); }
.verify-result.invalid .status-line { color: var(--bad); }

/* Definition list */
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; font-size: .93rem; border-top: 1px solid var(--line); }
dl.meta dt, dl.meta dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
dl.meta dt { color: var(--muted); padding-right: 32px; }
dl.meta dd { overflow-wrap: anywhere; }

/* Spec table */
.spec { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: .95rem; }
.spec th, .spec td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 40%; font-weight: 400; color: var(--muted); padding-right: 24px; }

/* ==========================================================================
   Tables & admin
   ========================================================================== */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.data td.wrap-text { white-space: normal; min-width: 280px; }
table.data th { font-family: var(--mono); font-weight: 400; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #fcfafa; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfafa; }
table.data a { color: var(--ink); text-decoration: none; font-weight: 500; }
table.data a:hover { color: var(--accent); text-decoration: underline; }
table.data .num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - var(--header)); }
.admin-side { background: var(--brand-deep); padding: 28px 16px; border-right: 1px solid var(--line-dark); }
.admin-side h4 { font-family: var(--mono); font-weight: 400; color: #eab7c0; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; margin: 24px 12px 8px; }
.admin-side h4:first-child { margin-top: 0; }
.admin-side a { display: flex; align-items: center; gap: 12px; color: #f8dfe3; text-decoration: none; padding: 9px 12px; border-radius: var(--r); font-size: .9rem; }
.admin-side a svg { width: 16px; height: 16px; opacity: .7; }
.admin-side a:hover { background: var(--brand-3); color: #fff; }
.admin-side a[aria-current="page"] { background: var(--brand-3); color: var(--tint); }
.admin-side a[aria-current="page"] svg { opacity: 1; }
.admin-find { margin: 0 4px 24px; }
.admin-find input { width: 100%; background: var(--brand); border: 1px solid var(--line-dark); color: var(--on-dark); font: 400 .82rem/1.2 var(--mono); padding: 9px 10px; border-radius: var(--r); }
.admin-find input::placeholder { color: #eab7c0; }
.admin-find input:focus { outline: 2px solid var(--tint); outline-offset: 1px; border-color: transparent; }
.admin-side h4:first-of-type { margin-top: 0; }
.admin-main { padding: 36px clamp(20px, 3.5vw, 48px) 80px; min-width: 0; }
.admin-main .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.admin-main .page-head h1 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin: 0; }
.admin-main h2 { font-size: 1.3rem; font-weight: 500; }
.admin-main .card { padding: 24px; }
.admin-main .card h2 { font-size: 1.15rem; }
.crumb { font-size: .825rem; margin: 0 0 12px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; gap: 4px; padding: 8px var(--gutter); border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .admin-side h4 { display: none; }
  .admin-side a { white-space: nowrap; }
  .admin-find { margin: 0; flex: 0 0 210px; }
}
.setup-list { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.setup-list li { display: grid; grid-template-columns: 72px 150px 1fr; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: .92rem; }
.setup-list li:first-child { border-top: 0; }
.setup-list .badge { justify-self: start; }
@media (max-width: 720px) { .setup-list li { grid-template-columns: 72px 1fr; } .setup-list li .muted { grid-column: 2; } }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 32px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tile { padding: 24px; }
.tile + .tile { border-left: 1px solid var(--line); }
.tile .label { font-family: var(--mono); font-size: .7rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.tile .value { font-family: var(--display); font-size: 2.6rem; line-height: 1.05; margin-top: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tile .sub { font-size: .825rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 12px 16px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: .9rem; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.module-block { border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; background: var(--white); overflow: hidden; }
.module-block header { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fcfafa; flex-wrap: wrap; }
.module-block header form { display: flex; gap: 8px; flex: 1; align-items: center; flex-wrap: wrap; }
.module-block header input[name=title] { flex: 1; min-width: 180px; min-height: 40px; }
.module-block header input[name=position] { width: 76px; min-height: 40px; }
.module-block ul { list-style: none; margin: 0; padding: 4px 0; }
.module-block li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; align-items: center; font-size: .925rem; }
.module-block li + li { border-top: 1px solid var(--line); }
.module-block li a { color: var(--ink); text-decoration: none; }
.module-block li a:hover { color: var(--accent); }
.opt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 10px; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .9rem; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding-top: 2px; }
.answer-opt { padding: 8px 12px; border-radius: var(--r); margin: 4px 0; font-size: .9rem; display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.answer-opt.correct { background: var(--ok-bg); }
.answer-opt.chosen-wrong { background: var(--bad-bg); }
.pager { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.inline-form { display: inline; }
.danger-zone { border-color: #f3ccb5; }
.danger-zone h2 { color: var(--bad); }

/* ---------- Utilities (CSP forbids inline style attributes) ---------- */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.center { text-align: center; }
.justify-center { justify-content: center; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.maxw-360 { max-width: 360px; } .maxw-560 { max-width: 560px; } .maxw-720 { max-width: 720px; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
svg.icon { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -.15em; flex: none; }

@media print {
  .site-header, .site-footer, .btn { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Module quizzes ---------- */
.lesson-nav a.is-quiz:not(.btn), .lesson-nav span.locked.is-quiz { font-family: var(--mono); font-size: .78rem; letter-spacing: .02em; }
.quiz { max-width: 760px; }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.quiz-steps { display: flex; gap: 4px; }
.quiz-steps i { width: 28px; height: 4px; background: var(--line); }
.quiz-steps i.done { background: var(--accent); }
.quiz-steps i.current { background: var(--ink); }
.quiz-timer { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.quiz-timer .mono { min-width: 3ch; font-size: 1rem; font-weight: 600; color: var(--ink); }
.quiz-timer-bar { flex: 1; height: 4px; background: var(--line); overflow: hidden; }
.quiz-timer-bar i { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.quiz-timer.is-low .mono { color: var(--bad); }
.quiz-timer.is-low .quiz-timer-bar i { background: var(--bad); }
.quiz-sheet { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: q; }
.quiz-sheet > li { counter-increment: q; padding: 32px 0; border-top: 1px solid var(--line); }
.quiz-sheet .qprompt { font-size: 1.2rem; margin-bottom: 0; }
.quiz-sheet .qprompt::before { content: counter(q) ". "; color: var(--accent); }
.quiz-sheet .quiz-options { margin-top: 16px; }
.quiz-rules { margin: 24px 0 0; padding: 0 0 0 20px; color: var(--ink-2); }
.quiz-rules li { margin-bottom: 8px; }
.quiz-rules li::marker { color: var(--accent); }
.quiz-options { border: 0; margin: 24px 0 0; padding: 0; min-width: 0; }
.quiz .opt { grid-template-columns: 22px 1fr; }
.quiz .opt.is-wrong { border-color: #e9b79b; background: var(--bad-bg); }
.quiz .opt.is-correct { border-color: var(--ok); background: var(--ok-bg); box-shadow: inset 3px 0 0 var(--ok); cursor: default; }
.quiz .opt .mark svg { width: 18px; height: 18px; color: var(--ok); margin-top: 2px; }
.quiz div.opt { cursor: default; }
.quiz-feedback { margin-top: 20px; padding: 16px 18px; border-left: 3px solid; font-size: .95rem; }
.quiz-feedback.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.quiz-feedback.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); margin: 20px 0 0; }

/* ---------- Exam check-in ---------- */
.checkin { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .checkin { grid-template-columns: 1fr; } }
.cam-panel { position: sticky; top: calc(var(--header) + 24px); }
@media (max-width: 960px) { .cam-panel { position: static; } }
.cam-frame { position: relative; aspect-ratio: 4 / 3; background: var(--video); border-radius: var(--r-lg); overflow: hidden; }
.cam-frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--on-dark-2); font-size: .9rem; }
.cam-empty svg { width: 32px; height: 32px; }
.cam-rec { position: absolute; top: 12px; left: 12px; background: var(--bad); color: #fff; font-family: var(--mono); font-size: .75rem; padding: 4px 8px; border-radius: 2px; }
.check-list { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); font-size: .9rem; }
.check-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.check-list .state { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.check-list li.ok .state { background: var(--ok); }
.check-list li.bad .state { background: var(--bad); }
.check-list li.warn .state { background: #c58b00; }
.check-list li.bad { color: var(--bad); }
.meter { margin-left: auto; width: 80px; height: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.steps-v { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.step-v { border-bottom: 1px solid var(--line); padding: 24px 0; }
.step-v h2 { display: flex; align-items: baseline; gap: 16px; font-size: 1.4rem; margin: 0; color: var(--muted); }
.step-v h2 span { font-family: var(--mono); font-size: .8rem; }
.step-v.active h2, .step-v.complete h2 { color: var(--ink); }
.step-v.complete h2::after { content: 'Done'; margin-left: auto; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.step-v .step-body { display: none; padding: 16px 0 8px 40px; color: var(--ink-2); }
.step-v.active .step-body { display: block; }
@media (max-width: 560px) { .step-v .step-body { padding-left: 0; } }
.capture { margin-top: 16px; max-width: 420px; }
.capture img, .capture video { width: 100%; border-radius: var(--r); border: 1px solid var(--line); display: block; }
.id-name { padding: 12px 16px; background: var(--tint-3); border-left: 3px solid var(--accent); }
.cancel-checkin { margin-top: 32px; }

/* ---------- Live exam camera ---------- */
.exam-cam { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 168px; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--video); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.exam-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.exam-cam .cam-state { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(60, 16, 24, .7); padding: 3px 6px; border-radius: 2px; }
.exam-cam .cam-state::before { content: '● '; color: #e8590c; }
@media (max-width: 700px) { .exam-cam { width: 112px; right: 12px; bottom: 12px; } }
.pledges { border: 0; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 14px; min-width: 0; }
.pledges legend { padding: 0; margin-bottom: 14px; }
.card h4 { font-family: var(--sans); font-size: .9rem; font-weight: 600; margin-bottom: 4px; }

/* ---------- Admin: proctoring evidence ---------- */
.evidence { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 16px; }
@media (max-width: 1100px) { .evidence { grid-template-columns: 1fr 1fr; } .evidence .wide { grid-column: 1 / -1; } }
@media (max-width: 600px) { .evidence { grid-template-columns: 1fr; } }
.evidence figure { margin: 0; min-width: 0; }
.evidence img, .evidence video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--video); border-radius: var(--r); display: block; }
.evidence figcaption, .snapshots figcaption { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 6px; }
.evidence-missing { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bad-bg); color: var(--bad); border-radius: var(--r); font-size: .85rem; }
.snapshots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.snapshots figure { margin: 0; }
.snapshots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); display: block; background: var(--video); }
.snapshots figure.flagged img { outline: 2px solid var(--warn); outline-offset: 2px; }
.review-panel { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

/* Honeypot field for bots: off-screen, never shown to people or screen readers. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.curriculum-final { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 24px; gap: 16px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--ink); }
.curriculum-final .mod-n { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.curriculum-final .mod-title { font-family: var(--display); font-size: 1.3rem; }
.curriculum-final .mod-meta { font-size: .85rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .curriculum-final { grid-template-columns: 40px minmax(0, 1fr); } .curriculum-final .mod-meta { display: none; } }
.curriculum .mod-topic { color: var(--muted); }

/* ==========================================================================
   Motion (homepage; driven by /js/motion.js). Without JavaScript, or with
   reduced motion, none of this applies and the page is fully visible.
   ========================================================================== */
.motion [data-intro], .motion [data-reveal], .motion [data-reveal-stagger], .motion [data-split], .motion [data-steps], .motion [data-tilt] { visibility: hidden; }
.hero { position: relative; overflow: clip; }
.hero > .wrap { position: relative; }
.hero-glow { position: absolute; top: -30%; right: -20%; width: min(1100px, 120vw); aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(176, 215, 228, .14), rgba(176, 215, 228, .05) 45%, transparent 70%); }
/* Headline words rise out of a mask. */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
[data-split] .wi { display: inline-block; will-change: transform; }
/* "How it works": a bar draws across each step as it becomes active. */
.motion .steps li { position: relative; }
.motion .steps li::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); transform: scaleX(var(--fill, 0)); transform-origin: left; }
/* Curriculum: a rail fills alongside the modules as you scroll. */
.curriculum-wrap { position: relative; }
.curriculum-rail { display: none; }
@media (min-width: 1100px) {
  .motion .curriculum-rail { display: block; position: absolute; left: -32px; top: 0; bottom: 0; width: 2px; background: var(--accent); transform-origin: top; }
}
.showcase { perspective: 1400px; }
[data-tilt] { transform-origin: 50% 100%; will-change: transform; }
.site-header { transition: box-shadow .3s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7); }

/* ---------- Sign-up as a deck of cards (driven by /js/signup.js) ---------- */
.su-card { border: 0; margin: 0; padding: 0; min-width: 0; }
/* A legend normally sits on the fieldset border; floating it puts it inside the card. */
.su-q { float: left; width: 100%; display: flex; gap: 12px; align-items: baseline; padding: 0; margin: 0 0 6px; font-family: var(--display); font-size: 1.4rem; line-height: 1.25; color: var(--ink); }
.su-n { font-family: var(--mono); font-size: .75rem; color: var(--accent); }
.su-help { clear: both; color: var(--muted); font-size: .9rem; margin: 0 0 22px; }
.su-q + :not(.su-help) { clear: both; }
.su-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.su-summary { margin: 10px 0 20px; }
.su-meter { display: flex; align-items: center; gap: 12px; margin: -10px 0 20px; }
.su-meter span { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.su-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .3s ease, background-color .3s ease; }
.su-meter[data-score="2"] i { background: var(--warn); }
.su-meter[data-score="3"] i { background: var(--ok); }
.su-meter small { min-width: 120px; text-align: right; font-size: .8rem; color: var(--muted); }
.su-dots { display: flex; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; }
.su-dots li { width: 32px; height: 3px; border-radius: 2px; background: var(--line-2); transition: background-color .3s ease; }
.su-dots li.done { background: var(--accent); }
.su-dots li.current { background: var(--ink); }
/* Without JavaScript: one ordinary form. Scoped to the sign-up form: other pages (the exam check-in)
   use data-next buttons too and don't set the .js flag. */
html:not(.js) .su-dots, html:not(.js) .su-nav [data-next], html:not(.js) .su-nav [data-back] { display: none; }
html:not(.js) .su-card + .su-card { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
/* With JavaScript: the cards stack; the next two peek out behind the one in front. */
.js .su-deck { display: grid; padding-bottom: 26px; }
.js .su-card { grid-area: 1 / 1; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 28px 24px; box-shadow: 0 22px 44px -28px rgba(60, 16, 24, .45); transform-origin: 50% 100%;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s ease, visibility 0s linear .6s; }
.js .su-card .su-nav { margin-top: auto; padding-top: 12px; }
.js .su-card > * { transition: opacity .2s ease; }
.js .su-card:not(.is-active) > * { opacity: 0; }
.js .su-card.is-active { z-index: 4; transition-delay: 0s; }
.js .su-card.is-active > * { opacity: 1; transition: opacity .35s ease .18s; }
.js .su-card.is-next { z-index: 3; transform: translateY(13px) scale(.955); background: var(--tint-3); }
.js .su-card.is-next2 { z-index: 2; transform: translateY(26px) scale(.91); background: var(--tint-2); }
.js .su-card.is-later { z-index: 1; transform: translateY(26px) scale(.91); opacity: 0; }
.js .su-card.is-done { z-index: 5; transform: translate(-115%, -10px) rotate(-7deg); opacity: 0; visibility: hidden; pointer-events: none; }
.su-card.shake { animation: su-shake .38s ease; }
@keyframes su-shake { 20% { transform: translateX(-8px); } 45% { transform: translateX(7px); } 70% { transform: translateX(-4px); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .js .su-card, .js .su-card > *, .su-dots li { transition: none; }
  .su-card.shake { animation: none; }
}
@media (max-width: 520px) { .js .su-card { padding: 22px 18px 18px; } }

/* ---------- Policy pages ---------- */
.policy-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.policy-nav { position: sticky; top: calc(var(--header) + 24px); }
.policy-nav ul { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.policy-nav li { border-bottom: 1px solid var(--line); }
.policy-nav a { display: block; padding: 11px 0 11px 14px; color: var(--ink-2); text-decoration: none; font-size: .92rem; border-left: 2px solid transparent; }
.policy-nav a:hover { color: var(--accent); }
.policy-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; border-left-color: var(--brand); }
.policy-body .callout { background: var(--tint-3); border-left: 3px solid var(--brand); padding: 16px 20px; border-radius: 0 var(--r) var(--r) 0; color: var(--ink-2); }
.policy-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1em 0 1.6em; }
.policy-body th, .policy-body td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.policy-body th { color: var(--muted); font-weight: 500; width: 40%; }
@media (max-width: 900px) {
  .policy-layout { grid-template-columns: 1fr; }
  .policy-nav { position: static; }
  .policy-nav ul { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin-bottom: 8px; }
  .policy-nav li { border: 0; }
  .policy-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
  .policy-nav a[aria-current="page"] { border-color: var(--brand); }
}

/* ==========================================================================
   Homepage: light hero, device mockups, module cards, screens, pricing
   ========================================================================== */
.hero-light { background: var(--white); color: var(--ink); border-bottom: 1px solid var(--line); }
.hero-light h1, .hero-light h2 { color: var(--ink); }
.hero-light h1 em { color: var(--accent); }
.hero-light .kicker { color: var(--brand); }
.hero-light .lead { color: var(--ink-2); }
.hero-light .btn-ghost { color: var(--brand); border-color: var(--line-2); }
.hero-light .btn-ghost:hover { border-color: var(--brand); background: var(--tint-3); }
.hero-light .hero-glow { background: radial-gradient(closest-side, rgba(163, 22, 44, .09), rgba(163, 22, 44, .03) 45%, transparent 70%); }
.hero-light .spec-bar { border-top-color: var(--line); }
.hero-light .spec-bar > div + div { border-left-color: var(--line); }
.hero-light .spec-bar dt { color: var(--ink-2); }
.hero-light .spec-bar dd { color: var(--ink); }
@media (max-width: 760px) { .hero-light .spec-bar > div:nth-child(n+3) { border-top-color: var(--line); } }
.hero-light .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.hero-trust { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: .92rem; color: var(--ink-2); }
.hero-trust li { display: flex; align-items: center; gap: 10px; }
.hero-trust svg { width: 20px; height: 20px; color: var(--brand); }

/* Device mockups showing real screens */
.hero-visual { position: relative; padding: 0 0 48px 56px; }
.device-laptop .screen { background: #1d1416; border-radius: 14px 14px 4px 4px; padding: 10px 10px 12px; box-shadow: 0 40px 70px -30px rgba(60, 16, 24, .6); }
.device-laptop img, .device-phone img { display: block; width: 100%; height: auto; }
.device-laptop img { border-radius: 4px; }
.device-laptop .base { height: 16px; margin: 0 -7%; border-radius: 2px 2px 16px 16px; background: linear-gradient(#f1ebec, #cfc3c5); box-shadow: 0 18px 30px -18px rgba(60, 16, 24, .6); }
.device-phone { position: absolute; left: 0; bottom: 0; width: 25%; padding: 7px; border-radius: 24px; background: #1d1416; box-shadow: 0 30px 50px -20px rgba(60, 16, 24, .65); }
.device-phone img { border-radius: 18px; }
.float-badge { position: absolute; right: -8px; top: 14%; display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--white); border-radius: var(--r-lg); box-shadow: 0 18px 40px -16px rgba(60, 16, 24, .45); font-size: .85rem; color: var(--ink); }
.float-badge svg { width: 26px; height: 26px; color: var(--ok); flex: none; }
.float-badge strong { display: block; font-weight: 600; }
.float-badge span { font-size: .75rem; color: var(--muted); }
@media (max-width: 980px) {
  .hero-light .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; padding-left: 36px; }
}
@media (max-width: 520px) { .float-badge { display: none; } .hero-visual { padding: 0 0 32px 24px; } }

/* Module cards */
.module-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.module-card { display: flex; flex-direction: column; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.module-card:hover { transform: translateY(-3px); border-color: var(--tint-2); box-shadow: 0 18px 36px -24px rgba(60, 16, 24, .45); }
.module-card img { width: 64px; height: 64px; margin-bottom: 18px; }
.module-n { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.module-card h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 8px; }
.module-card p { font-size: .9rem; color: var(--muted); margin: 0 0 14px; }
.module-card .module-meta { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.module-card-final { background: var(--brand); border-color: var(--brand); color: var(--on-dark); }
.module-card-final svg { width: 48px; height: 48px; color: var(--tint); margin-bottom: 20px; }
.module-card-final .module-n { color: var(--tint); }
.module-card-final h3 { color: #fff; }
.module-card-final p { color: var(--on-dark-2); }

/* Real screens in browser frames */
.screens { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 32px; }
.screens figure { margin: 0; }
.screen-wide { grid-row: span 2; }
.browser-frame { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); box-shadow: 0 30px 60px -36px rgba(60, 16, 24, .55); }
.browser-frame > span { display: block; height: 26px; border-bottom: 1px solid var(--line); background: var(--paper)
  radial-gradient(circle, #e3d6d8 4px, transparent 4.5px) 12px 50% / 14px 14px no-repeat; }
.browser-frame > span::after { content: ''; display: block; width: 28px; height: 100%; margin-left: 26px; background: radial-gradient(circle, #e3d6d8 4px, transparent 4.5px) 0 50% / 14px 14px repeat-x; }
.browser-frame img { display: block; width: 100%; height: auto; }
.screen-card figcaption { margin-top: 14px; font-size: .92rem; color: var(--muted); }
.screen-card figcaption strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 900px) { .screens { grid-template-columns: 1fr; } .screen-wide { grid-row: auto; } }

/* What you need */
.needs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.needs li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.needs svg { width: 48px; height: 48px; padding: 12px; border-radius: 50%; background: var(--tint-3); color: var(--brand); box-sizing: border-box; }
.needs h3 { font-size: 1.02rem; margin: 4px 0 4px; }
.needs p { font-size: .9rem; color: var(--muted); margin: 0; }
@media (max-width: 640px) { .needs { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.pricing h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); }
.pricing .enrol { position: static; }
.pricing-note { color: var(--on-dark-2); font-size: .95rem; margin-top: 28px; }
.pricing-note a { color: var(--tint); }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* Closing call to action on ice */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--on-dark-2); text-decoration: none; }
.footer-links a:hover { color: var(--tint); }

/* About */
.about-hero { padding-bottom: clamp(56px, 8vw, 104px); }
.about-hero-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-hero h1 { max-width: 12em; }
.about-mark { width: 100%; max-width: 260px; height: auto; justify-self: end; opacity: .95; }
.commitments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.commitments li { padding: 28px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.commitments svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--tint-2); color: var(--brand); margin-bottom: 20px; box-sizing: border-box; }
.commitments h3 { font-size: 1.1rem; margin-bottom: 8px; }
.commitments p { font-size: .92rem; color: var(--muted); margin: 0; }
@media (max-width: 980px) { .commitments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .about-hero-grid { grid-template-columns: 1fr; } .about-mark { display: none; } }
@media (max-width: 560px) { .commitments { grid-template-columns: 1fr; } }

/* Policies hub */
.policy-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.policy-cards a { display: flex; flex-direction: column; height: 100%; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.policy-cards a:hover { border-color: var(--brand); transform: translateY(-2px); }
.policy-cards h2 { font-size: 1.2rem; margin: 0 0 8px; }
.policy-cards p { color: var(--muted); font-size: .93rem; margin: 0 0 20px; }
.link-arrow { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; font-size: .9rem; }
.link-arrow svg { width: 16px; height: 16px; }

/* ---------- Image slots (photos uploaded in Admin → Site images) ---------- */
.photo { display: block; width: 100%; height: auto; border-radius: var(--r-lg); object-fit: cover; background: var(--tint-3); }
.photo[data-ratio="4:5"], .ratio-4x5 { aspect-ratio: 4 / 5; }
.photo[data-ratio="3:2"], .ratio-3x2 { aspect-ratio: 3 / 2; }
.photo-empty { position: relative; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--tint-3), var(--tint-2));
  border: 1px solid var(--line); }
.photo-empty::before { content: ''; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(circle at 80% 15%, rgba(255, 255, 255, .9), transparent 45%); }
.photo-empty svg { position: relative; width: 56px; height: 56px; color: var(--brand); opacity: .35; }
.photo-label { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .92);
  font-size: .78rem; line-height: 1.45; color: var(--ink-2); box-shadow: 0 6px 18px -10px rgba(60, 16, 24, .5); }
.photo-label strong { display: block; color: var(--brand); font-weight: 600; }
.dark .photo-empty { background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .13)); border-color: var(--line-dark); }
.dark .photo-empty svg { color: var(--tint); opacity: .4; }
.audience { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.audience h3 { font-size: 1.15rem; margin: 18px 0 6px; }
.audience p { font-size: .93rem; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .audience { grid-template-columns: 1fr; max-width: 480px; } }
.auth-photo { max-height: 42vh; }
@media (max-height: 760px) { .auth-photo { display: none; } }
.slot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.slot-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: start; }
.slot-preview img, .slot-preview .photo { width: 100%; height: auto; object-fit: cover; border-radius: var(--r); display: block; }
.slot-preview img.ratio-4x5 { aspect-ratio: 4 / 5; } .slot-preview img.ratio-3x2 { aspect-ratio: 3 / 2; }
.slot-body h2 { font-size: 1.1rem; margin: 0 0 12px; }
.slot-body .meta { margin-bottom: 16px; font-size: .85rem; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) { .slot-card { grid-template-columns: 1fr; } .slot-preview { max-width: 200px; } }
.slot-grid .card { margin: 0; }
.slot-preview .photo-empty { display: grid; }

/* ---------- Cookie consent ---------- */
.cookie-banner { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; padding: 18px 20px; background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 40px rgba(36, 21, 23, .18); font-size: .9rem; }
.cookie-banner p { margin: 0 0 12px; }
.cookie-banner p strong { display: block; margin-bottom: 4px; }
.cookie-banner .checkbox { margin-bottom: 10px; }
.cookie-banner .checkbox span strong { display: inline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Never over the exam or its check-in: the choice can wait until afterwards. */
.exam-mode .cookie-banner, .checkin-mode .cookie-banner { display: none; }
@media print { .cookie-banner { display: none; } }

/* A notice an admin posts on every page, such as a temporary disruption. */
.site-notice { background: #fff4d6; color: #3d2e00; border-bottom: 1px solid #e8c766; padding: 10px 0; font-size: .95rem; }
.site-notice .wrap { line-height: 1.4; }
/* APA reference lists: unnumbered, with a hanging indent. */
.references { list-style: none; padding-left: 0; }
.references li { padding-left: 2em; text-indent: -2em; margin-bottom: .75em; overflow-wrap: anywhere; }
