/* ==========================================================================
   Producate Invigilator
   Uses the Producate design system (same tokens, type and buttons as producate.co.za)
   1 tokens · 2 base · 3 buttons and forms · 4 header · 5 page pieces · 6 overview
   7 writing an assessment · 8 the assessment itself · 9 examiner · 10 footer · 11 small screens
   ========================================================================== */

/* ---------- 1. tokens ---------- */
:root {
  color-scheme: light;
  --bg: #F4F7F6; --surface: #FFFFFF; --tint: #E0F0EC; --tint-2: #EEF5F3;
  --ink: #10201D; --muted: #4B5E59; --line: #D7E1DE; --line-strong: #B3C4BF; --field: #7F958E;
  --brand: #0B5A55; --brand-ink: #FFFFFF; --brand-edge: #063B37; --brand-hover: #0E6C66;
  --deep: #0B5A55; --deep-2: #084742; --on-deep: #FFFFFF; --on-deep-muted: #D3E5E2;
  --deep-grad: linear-gradient(140deg, #0B5A55 0%, #0A4F52 48%, #093F52 100%);
  --signal: #F7B94B; --signal-ink: #2A1D00; --signal-edge: #BD8713; --signal-hover: #FAC96A;
  --orange: #E8912D; --accent: #E8912D; --accent-text: #A4570B; --danger: #B3261E;
  --ok: #1E7B4F; --ok-bg: #E3F4EA; --warn: #8A5A00; --warn-bg: #FFF1D2; --bad: #B3261E; --bad-bg: #FBE7E5;
  --c1: #0B5A55; --c2: #2F6DB0; --c3: #B5651D; --c4: #8A3F6E; --c5: #2E7D5B;
  --sec: var(--brand);
  --f-display: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --t-display: clamp(2rem, 1.25rem + 3.1vw, 3.375rem);
  --t-h2: clamp(1.5rem, 1.2rem + 1.25vw, 2.125rem);
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(9, 40, 37, .07), 0 1px 1px rgba(9, 40, 37, .04);
  --sh-2: 0 14px 30px -16px rgba(9, 40, 37, .32), 0 3px 8px rgba(9, 40, 37, .06);
  --sh-3: 0 28px 64px -22px rgba(4, 20, 18, .5), 0 6px 16px rgba(4, 20, 18, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gut: clamp(16px, 3.4vw, 32px);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0C1615; --surface: #132120; --tint: #1B2F2C; --tint-2: #172826;
    --ink: #E7F0ED; --muted: #9CB0AA; --line: #273B37; --line-strong: #3A544E; --field: #6C8780;
    --brand: #4CC2B7; --brand-ink: #06201D; --brand-edge: #2A8D84; --brand-hover: #6AD2C8;
    --deep: #0F3A36; --deep-2: #0A2A27; --on-deep: #F2FAF8; --on-deep-muted: #BBD3CE;
    --deep-grad: linear-gradient(140deg, #114440 0%, #0F3A36 48%, #0C2E3A 100%);
    --accent-text: #F0A860; --danger: #F0877B;
    --ok: #6FD3A0; --ok-bg: #143126; --warn: #F2C469; --warn-bg: #3A2C0C; --bad: #F0877B; --bad-bg: #3B1A17;
    --c1: #4CC2B7; --c2: #6AA6E8; --c3: #E8955A; --c4: #D283B4; --c5: #5BC28F;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 10px 24px -12px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .3);
    --sh-3: 0 24px 60px -20px rgba(0, 0, 0, .85), 0 4px 14px rgba(0, 0, 0, .4);
  }
}

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img, svg, video { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.18; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h3, h4 { letter-spacing: 0; }
p { margin: 0 0 12px; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
a { color: var(--link, var(--brand)); text-decoration-thickness: .08em; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--focus, var(--brand)); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--signal) 55%, transparent); color: var(--ink); }
.wrap { max-width: calc(1280px + 2 * var(--gut)); margin-inline: auto; padding-left: max(var(--gut), env(safe-area-inset-left, 0px)); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }
.narrow { max-width: calc(820px + 2 * var(--gut)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: 8px; z-index: 200; padding: 10px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--surface); font: 600 .9375rem var(--f-display); text-decoration: none; }
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.on-deep { background: var(--deep); color: var(--on-deep); --link: currentColor; --focus: var(--signal); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.mono { font-family: var(--f-mono); letter-spacing: .04em; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb0 { margin-bottom: 0; }

/* ---------- 3. buttons and forms ---------- */
.btn { --b-bg: var(--brand); --b-fg: var(--brand-ink); --b-edge: var(--brand-edge); --b-hover: var(--brand-hover);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px;
  border: 0; border-radius: var(--r-md); background: var(--b-bg); color: var(--b-fg);
  font: 600 .9375rem/1.25 var(--f-display); text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 3px 0 var(--b-edge); -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--b-hover); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--b-edge); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 0 3px 0 var(--b-edge); }
.btn svg { flex: none; width: 20px; height: 20px; }
.btn.alt { --b-bg: var(--surface); --b-fg: var(--brand); --b-edge: var(--line-strong); --b-hover: var(--tint-2); box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 3px 0 var(--b-edge); }
.btn.alt:active { box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 1px 0 var(--b-edge); }
.btn.danger { --b-bg: #B3261E; --b-fg: #fff; --b-edge: #74140E; --b-hover: #C5352C; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; border-radius: 10px; box-shadow: 0 2px 0 var(--b-edge); }
.btn.alt.sm { box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 2px 0 var(--b-edge); }
.btn-lg { min-height: 54px; padding: 12px 26px; font-size: 1.0625rem; border-radius: 14px; }
.on-deep .btn, .btn.sig { --b-bg: var(--signal); --b-fg: var(--signal-ink); --b-edge: var(--signal-edge); --b-hover: var(--signal-hover); }
.on-deep .btn.alt { --b-bg: transparent; --b-fg: var(--on-deep); --b-edge: transparent; --b-hover: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btnrow.end { justify-content: flex-end; }
.btnrow.between { justify-content: space-between; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link, var(--brand)); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; text-align: left; }
.x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-md); background: var(--tint-2); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.x:hover { background: var(--tint); }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea) {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--f-body); }
:where(textarea) { min-height: 120px; resize: vertical; }
:where(select) { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 50%, calc(100% - 15px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus-visible { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
:where(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 2px 0 0; }
::placeholder { color: var(--muted); opacity: 1; }
.field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.field > label, .field > .lbl { font: 600 .9375rem/1.3 var(--f-display); }
.field .hint { font-size: .875rem; color: var(--muted); margin: 0; }
.field.inline { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field.inline label { font: 400 1rem/1.45 var(--f-body); }
.fieldrow { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.err { color: var(--bad); font-weight: 600; font-size: .9375rem; margin: 0 0 12px; }
.err:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--tint); color: var(--ink); padding: 3px 10px; border-radius: 999px; font: 600 .78rem/1.5 var(--f-display); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.plain { background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.eyebrow { font: 600 .875rem/1.3 var(--f-display); color: var(--brand); margin: 0 0 8px; }
.on-deep .eyebrow { color: var(--signal); }
.lede { color: var(--muted); margin: 8px 0 0; max-width: 66ch; }
.on-deep .lede { color: var(--on-deep-muted); }
.note { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--signal) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--signal) 60%, var(--line)); border-radius: var(--r-md); padding: 12px 14px; margin: 14px 0; font-size: .9375rem; line-height: 1.5; }
.note svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.note.info { background: var(--tint-2); border-color: var(--line); }
.note.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.note p:last-child { margin-bottom: 0; }
.tablewrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; min-width: 520px; }
table.grid th, table.grid td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
table.grid th { font: 600 .8438rem var(--f-display); color: var(--muted); white-space: nowrap; }
table.grid tr.click { cursor: pointer; }
table.grid tr.click:hover td { background: var(--tint-2); }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- 4. header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 6px; min-height: 60px; }
.logo { font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; font-weight: 700; font-size: clamp(1.3rem, 1.05rem + .9vw, 1.6rem); letter-spacing: -0.02em; line-height: 1; text-decoration: none; display: inline-flex; align-items: baseline; flex: none; margin-right: auto; border-radius: 8px; }
.logo .lg-pro { color: var(--brand); }
.logo .lg-rest { color: #E8912D; }
.logo .lg-cube { height: 1.8em; width: auto; aspect-ratio: 0.887; margin-left: 6px; align-self: center; flex: none; }
.lg-cube g { stroke: var(--surface); stroke-width: 1.6; stroke-linejoin: round; }
.lg-cube .t { fill: #0B5A55; } .lg-cube .o { fill: #E8912D; }
.menubtn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); cursor: pointer; }
.menubtn:hover { background: var(--tint-2); }
.cart-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: 600 .9375rem/1.2 var(--f-display); text-decoration: none; white-space: nowrap; cursor: pointer; }
.cart-btn:hover { border-color: var(--line-strong); background: var(--tint-2); }
.cart-btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tabs { display: none; }
.tabs.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-2); padding: 6px var(--gut) 14px; }
.tabitem { border-bottom: 1px solid var(--line); }
.tabitem:last-of-type { border-bottom: 0; }
.tabitem > a { display: flex; align-items: center; min-height: 54px; padding: 0 8px; font: 600 1.0625rem var(--f-display); color: var(--ink); text-decoration: none; border-radius: 12px; }
.tabitem > a[aria-current="page"] { color: var(--brand); }
.subtabs { border-top: 1px solid var(--line); background: var(--surface); }
.subtabs .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subtabs .wrap::-webkit-scrollbar { display: none; }
.subtabs a { flex: none; display: flex; align-items: center; height: 46px; padding: 0 12px; margin-bottom: -1px; border-bottom: 3px solid transparent; font: 600 .9rem var(--f-display); color: var(--muted); text-decoration: none; white-space: nowrap; }
.subtabs a:first-of-type { margin-left: -12px; }
.subtabs a:hover { color: var(--ink); }
.subtabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--accent); }
@media (min-width: 1000px) {
  .top { background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); }
  .bar { gap: 10px; min-height: 68px; }
  .logo { margin-right: 4px; }
  .menubtn { display: none; }
  .tabs, .tabs.open { display: flex; position: static; gap: 2px; margin-right: auto; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .tabitem { display: flex; border: 0; }
  .tabitem:first-child { display: none; }
  .tabitem > a { height: 44px; min-height: 0; padding: 0 12px; border-radius: 11px; font-size: .9375rem; white-space: nowrap; position: relative; }
  .tabitem > a:hover { background: var(--tint-2); }
  .tabitem > a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
  .subtabs { background: transparent; }
}
@media (max-width: 359px) { .logo .lg-cube { display: none; } .cart-btn { padding: 0 10px; } }   /* the narrowest phones: keep the bar on one line */
html.embedded .top .bar, html.embedded .foot { display: none; }

/* ---------- 5. page pieces ---------- */
.band { padding-block: clamp(36px, 5.5vw, 72px); }
.band-alt { background: var(--surface); border-block: 1px solid var(--line); }
.band h2 { font-size: var(--t-h2); }
.sec-head { max-width: 70ch; margin-bottom: clamp(20px, 3vw, 32px); }
.block { padding-block: clamp(22px, 4vw, 40px) clamp(40px, 6vw, 72px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: clamp(18px, 3vw, 28px); }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 1.375rem; margin-bottom: 6px; }
.card h3 { font-size: 1.0625rem; margin: 18px 0 8px; }
.card > h3:first-child { margin-top: 0; }
.cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols .card + .card { margin-top: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9375rem; }
.kv dd { margin: 0; }
ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.ticks li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
ul.ticks li svg { color: var(--brand); margin-top: 2px; }
ul.plain { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 120; max-width: min(560px, calc(100vw - 32px)); background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 12px; box-shadow: var(--sh-3); font-weight: 600; font-size: .9375rem; }
.toast.bad { background: #8E1D17; color: #fff; }
.veil { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 20, 18, .62); overflow-y: auto; }
.dialog { width: min(560px, 100%); background: var(--surface); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: clamp(18px, 3vw, 26px); }
.dialog.wide { width: min(920px, 100%); }
.dialog h2 { font-size: 1.3125rem; margin-bottom: 8px; }
.dialog .btnrow { margin-top: 18px; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 22px 0; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }

/* ---------- 6. overview ---------- */
.hero { background: var(--deep-grad); color: var(--on-deep); --link: currentColor; --focus: var(--signal); overflow: hidden; }
.hero .wrap { display: grid; gap: 32px; align-items: center; padding-block: clamp(36px, 6vw, 76px); }
.hero h1 { font-size: var(--t-display); letter-spacing: -0.03em; }
.hero .lede { font-size: 1.125rem; max-width: 54ch; margin-top: 14px; }
.hero .btnrow { margin-top: 24px; }
.hero-note { margin: 16px 0 0; font-size: .9rem; color: var(--on-deep-muted); }
.panel { justify-self: center; width: min(400px, 100%); background: var(--surface); color: var(--ink); border-radius: 22px; box-shadow: var(--sh-3); padding: 18px; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.panel-top b { font: 600 .9375rem var(--f-display); }
.panel-time { font: 600 1.25rem var(--f-display); font-variant-numeric: tabular-nums; color: var(--brand); }
.panel-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.panel-row:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-row .ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--tint); color: var(--brand); }
.panel-row b { display: block; font: 600 .9375rem/1.25 var(--f-display); }
.panel-row small { color: var(--muted); font-size: .8125rem; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.feats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (min-width: 1180px) { .feats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-1); display: grid; gap: 8px; align-content: start; }
.feat .ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c, var(--brand)) 14%, var(--surface)); color: var(--c, var(--brand)); }
.feat .ico svg { width: 26px; height: 26px; }
.feat h3 { font-size: 1.0625rem; }
.feat p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 18px 18px 18px 66px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); }
.band-alt .steps li { background: var(--bg); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 1rem var(--f-display); }
.steps b { display: block; font: 600 1rem/1.3 var(--f-display); margin-bottom: 4px; }
.steps span { display: block; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.legal h2 { font-size: 1.25rem; margin: 26px 0 8px; }
.legal h1 { font-size: var(--t-h2); }
.legal table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: .9375rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.legal th { font: 600 .875rem var(--f-display); color: var(--muted); }

/* ---------- 7. writing an assessment: the steps before the clock starts ---------- */
.flow { max-width: 760px; margin-inline: auto; }
.stepper { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.stepper li { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.stepper li.done { background: var(--brand); }
.stepper li.now { background: var(--accent); }
.stepname { font: 600 .875rem var(--f-display); color: var(--muted); margin: 0 0 6px; }
.flow h1 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2rem); margin-bottom: 8px; }
.checklist { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.checklist .ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--tint); color: var(--brand); }
.checklist b { display: block; font: 600 .9688rem/1.3 var(--f-display); }
.checklist small { display: block; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.checklist li.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.checklist li.bad small { color: var(--bad); }
.camwrap { position: relative; width: min(480px, 100%); margin: 14px auto; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: #0d1716; box-shadow: var(--sh-2); }
.camwrap video, .camwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camwrap video.mirror { transform: scaleX(-1); }
.camwrap .guide { position: absolute; inset: 9% 24%; border: 3px dashed rgba(255, 255, 255, .75); border-radius: 50%; pointer-events: none; }
.camwrap .camnote { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(8, 20, 18, .78); color: #fff; font-size: .875rem; font-weight: 600; text-align: center; }
.camwrap .camnote:empty { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.thumbs figure { margin: 0; width: 132px; }
.thumbs img { width: 132px; height: 99px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs figcaption { font-size: .78rem; color: var(--muted); line-height: 1.3; margin-top: 4px; }
.filepick { position: relative; overflow: hidden; }
.filepick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.donecard .btnrow { justify-content: center; }
.codebox { display: inline-block; padding: 10px 18px; border-radius: var(--r-md); border: 2px dashed var(--line-strong); background: var(--bg); font: 700 1.5rem/1.2 var(--f-mono); letter-spacing: .12em; user-select: all; }

/* ---------- 8. the assessment itself ---------- */
body.exam .top, body.exam .foot { display: none; }
body.exam { background: var(--bg); }
.xbar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px -18px rgba(4, 20, 18, .5); }
.xbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.xbar .xtitle { flex: 1 1 180px; min-width: 0; font: 600 1rem/1.25 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbar .xtitle small { display: block; font: 400 .8125rem var(--f-body); color: var(--muted); }
.xtime { font: 700 1.5rem/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--brand); padding: 6px 12px; border-radius: 10px; background: var(--tint-2); }
.xtime.low { color: var(--bad); background: var(--bad-bg); }
.xstat { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font: 600 .75rem/1.4 var(--f-display); color: var(--muted); }
.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dot.ok::before { background: #24A05F; } .dot.warn::before { background: #E8A01A; } .dot.bad::before { background: #D2362C; }
.dot.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); color: var(--bad); }
.xwarn { background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: .9375rem; text-align: center; padding: 8px 16px; }
.xwarn.bad { background: var(--bad-bg); color: var(--bad); }
.xwarn:empty { display: none; }
.xmain { padding-block: 22px 120px; }
.q { max-width: 860px; margin-inline: auto; }
.q .qmeta { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; color: var(--muted); font: 600 .875rem var(--f-display); margin-bottom: 8px; }
.q .qtext { font: 600 1.1875rem/1.45 var(--f-display); white-space: pre-wrap; margin: 0 0 16px; }
.opts { display: grid; gap: 10px; }
.q .qsec { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid var(--brand); background: var(--tint-2); border-radius: 0 10px 10px 0; font-size: .9375rem; color: var(--muted); }
.q .qsec b { color: var(--ink); }
.q .qtext.rich { white-space: normal; }
.q .qtext.rich p { margin: 0 0 10px; }
.q .qtext.rich p:last-child { margin-bottom: 0; }
.q .qtext.rich table { border-collapse: collapse; margin: 10px 0; font-weight: 400; font-size: 1rem; }
.q .qtext.rich th, .q .qtext.rich td { border: 1px solid var(--line-strong); padding: 6px 10px; text-align: left; }
.q .qtext.rich ul, .q .qtext.rich ol { margin: 8px 0; padding-left: 1.3em; font-weight: 400; }
.q .shortans { width: 100%; max-width: 420px; font-size: 1.125rem; }
.opt { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.opt:hover { border-color: var(--line-strong); }
.opt:has(input:checked) { border-color: var(--brand); background: var(--tint-2); box-shadow: inset 0 0 0 1px var(--brand); }
.q textarea { min-height: 260px; font-size: 1.0625rem; line-height: 1.6; }
.wc { text-align: right; font-size: .8438rem; color: var(--muted); margin-top: 6px; }
.qnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.palette button { width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font: 600 .9375rem var(--f-display); cursor: pointer; }
.palette button.done { background: var(--tint); border-color: var(--brand); }
.palette button[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.selfview { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 148px; border-radius: 14px; overflow: hidden; background: #0d1716; box-shadow: var(--sh-3); border: 3px solid var(--surface); }
.selfview video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1); }
.selfview.warn { border-color: #E8A01A; } .selfview.bad { border-color: #D2362C; }
.selfview button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(8, 20, 18, .7); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.selfview.min { width: 44px; height: 44px; border-radius: 50%; }
.selfview.min video { opacity: 0; height: 38px; }
.selfview.min button { inset: 0; width: 100%; height: 100%; border-radius: 50%; background: var(--brand); }
.enginevid { position: fixed; right: 0; bottom: 0; width: 2px; height: 2px; opacity: .01; pointer-events: none; }
.xframe { display: block; width: 100%; height: calc(100vh - 150px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.block-veil { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(8, 20, 18, .9); }
.count { font: 700 2.25rem/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--accent-text); }

/* ---------- 9. examiner ---------- */
.xhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.xhead h1 { font-size: var(--t-h2); }
.xnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.xnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font: 600 .9rem var(--f-display); color: var(--ink); text-decoration: none; }
.xnav a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.stat b { display: block; font: 700 1.625rem/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: .875rem; color: var(--muted); }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 14px; }
.filters :where(input, select) { min-height: 44px; }
.risk { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 700 .78rem/1.5 var(--f-display); white-space: nowrap; }
.risk.low { background: var(--ok-bg); color: var(--ok); } .risk.medium { background: var(--warn-bg); color: var(--warn); } .risk.high { background: var(--bad-bg); color: var(--bad); } .risk.na { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl time { font: 600 .875rem var(--f-mono); color: var(--muted); padding-top: 2px; }
.tl b { font: 600 .9688rem var(--f-display); }
.tl .pts { margin-left: 8px; }
.tl p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.tl li.info b { font-weight: 500; color: var(--muted); }
.evrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.evthumb { position: relative; width: 112px; height: 84px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: #0d1716; cursor: zoom-in; }
.evthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evthumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; background: rgba(8, 20, 18, .72); color: #fff; font: 600 .68rem var(--f-display); text-align: left; }
.evthumb.media { display: grid; place-items: center; color: #fff; cursor: pointer; }
.evthumb.media svg { width: 30px; height: 30px; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.gallery .evthumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.idpair { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); }
.idpair figure { margin: 0; }
.idpair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; background: #0d1716; cursor: zoom-in; }
.idpair figcaption { font-size: .8438rem; color: var(--muted); margin-top: 4px; }
.lightbox img, .lightbox video { display: block; max-width: 100%; max-height: 72vh; margin-inline: auto; border-radius: 10px; background: #0d1716; }
.lightbox audio { width: 100%; }
.answer { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: var(--bg); margin-top: 10px; }
.answer .atext { white-space: pre-wrap; margin: 8px 0 0; }
.answer mark { background: color-mix(in srgb, var(--signal) 60%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.reasons { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; color: var(--muted); display: grid; gap: 3px; }
.sparkbox { margin-top: 10px; }
.sparkbox svg { width: 100%; max-width: 420px; height: 64px; display: block; }
.sparkbox .cap { font-size: .8125rem; color: var(--muted); }
.cmp { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cmp .answer { margin-top: 0; }
.qedit { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; background: var(--bg); }
.qedit .qhead { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.qedit textarea { min-height: 78px; }
.toggles { display: grid; gap: 4px 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; flex-wrap: wrap; }
.seg button { min-height: 42px; padding: 6px 16px; border: 0; background: var(--surface); font: 600 .9rem var(--f-display); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow input { font-family: var(--f-mono); font-size: .9rem; }
.codeblock { background: #0d1716; color: #E7F0ED; border-radius: var(--r-md); padding: 14px 16px; font: 400 .8438rem/1.55 var(--f-mono); overflow-x: auto; white-space: pre; margin: 8px 0 14px; }
.map { width: 100%; max-width: 520px; height: auto; aspect-ratio: 16 / 9; background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--r-md); display: block; }
.diag li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.diag { list-style: none; margin: 0; padding: 0; }
.diag b { font: 600 .9375rem var(--f-display); display: block; }
.diag small { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.diag .y { color: var(--ok); } .diag .n { color: var(--bad); }

/* ---------- 10. footer ---------- */
.foot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; padding-block: clamp(36px, 5vw, 64px) 32px; }
.foot-brand { grid-column: 1 / -1; }
.foot-logo { display: inline-flex; font: 700 1.75rem/1 "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; letter-spacing: -0.02em; color: #fff; text-decoration: none; border-radius: 6px; }
.foot-logo span { color: #F0A040; }
.foot-brand > p { margin: 10px 0 0; max-width: 34ch; color: var(--on-deep-muted); }
.foot-brand address { margin: 18px 0 0; font-style: normal; font-size: .9375rem; line-height: 1.6; color: var(--on-deep-muted); }
.foot-contact { display: grid; gap: 2px; justify-items: start; margin-top: 10px; font-size: .9375rem; }
.foot-contact a { display: inline-block; padding: 5px 0; font-weight: 700; color: #fff; }
.foot h2 { margin: 0 0 10px; font: 600 .9375rem/1.4 var(--f-display); letter-spacing: 0; color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.foot li > a { display: inline-block; padding: 7px 0; color: var(--on-deep-muted); font-size: .9375rem; text-decoration: none; }
.foot li > a:hover { color: #fff; text-decoration: underline; }
.legal-bar { padding-block: 16px; background: color-mix(in srgb, var(--deep) 55%, #000); color: #F2F2F2; font-size: .875rem; line-height: 1.6; }
.legal-bar a { color: inherit; text-decoration: none; white-space: nowrap; }
.legal-bar a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .foot-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px 48px; }
  .foot-brand { grid-column: auto; }
}

/* ---------- 11. small screens ---------- */
@media (max-width: 599.98px) {
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: 10px; }
  /* the bar on a phone: name, clock and Submit on one line, the checks on a slim second line */
  .xbar .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; min-height: 0; padding-block: 8px; align-items: center; }
  .xbar .xtitle { font-size: .9375rem; }
  .xbar .xtitle small { display: none; }
  .xstat { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .xstat::-webkit-scrollbar { display: none; }
  .xtime { font-size: 1.125rem; padding: 6px 10px; }
  .xbar .btn { min-height: 38px; padding: 6px 14px; }
  .dot { flex: none; padding: 3px 8px; font-size: .7rem; }
  .selfview { width: 104px; }
  .tl li { grid-template-columns: 62px 1fr; }
  .checklist li { grid-template-columns: 40px 1fr; }
  .checklist li > .pill { grid-column: 2; justify-self: start; }
  .btnrow.stack .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
@media print { .top, .foot, .xnav, .btn { display: none !important; } body { background: #fff; } }
.estimate { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); min-height: 2.6em; }
.estimate:empty { visibility: hidden; }
.warnline { color: var(--warn); }
/* ---------- the learner's own tests, and the result ---------- */
.ghost { position: fixed; left: -5000px; top: 0; width: 480px; height: 320px; border: 0; opacity: 0; pointer-events: none; }
.mytests .tlist { display: grid; gap: 16px; margin-top: 16px; }
.tcard .xhead { align-items: flex-start; }
.tests { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tests li { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tests li:last-child { border-bottom: 0; padding-bottom: 0; }
.tests li > div:first-child { flex: 1 1 260px; min-width: 0; }
.tests small { display: block; color: var(--muted); margin-top: 2px; }
.tests .tact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg); }
.result .final { display: grid; justify-items: start; gap: 2px; background: var(--brand); color: var(--brand-ink); border-radius: 12px; padding: 16px 18px; }
.result .final small { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; opacity: .85; }
.result .final b { font: 700 2.2rem/1.1 var(--f-display); }
.result h3 { margin: 18px 0 6px; }
.topics { width: 100%; border-collapse: collapse; font-size: .95rem; }
.topics th { text-align: left; font-weight: 600; padding: 8px 12px 8px 0; }
.topics td { padding: 8px 12px 8px 0; white-space: nowrap; }
.topics tr + tr th, .topics tr + tr td { border-top: 1px solid var(--line); }
.tbar { display: block; width: 120px; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.tbar.mid i { background: var(--warn); } .tbar.low i { background: var(--bad); }
@media (max-width: 560px) { .topics td:nth-child(2) { display: none; } .tbar { width: 70px; } }

/* picture checks: the line that says how they came out, on the learner's last page, in the dashboard and in the editor */
.verdict { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; border-left: 4px solid var(--line); background: var(--bg); font-weight: 600; line-height: 1.45; }
.verdict.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.verdict.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.verdict.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.result.checks .topics td { text-align: right; }
.result.checks .small { margin: 10px 0 0; }
#pictureChecks .kv { margin-bottom: 14px; }
@media (max-width: 560px) { .result.checks .topics td:nth-child(2) { display: table-cell; } }
table.checkrows th, table.checkrows td { text-align: right; padding-right: 10px; }
table.checkrows th:first-child, table.checkrows td:first-child { text-align: left; }
table.checkrows th { white-space: normal; }
table.checkrows tr.bad td { background: var(--bad-bg); }
table.checkrows tr.gap td { color: var(--warn); }
table.checkrows tr.gap td + td { text-align: left; }
.plotbox svg.lookplot { width: 100%; max-width: 820px; height: auto; display: block; }
.lookplot .axis { stroke: var(--line); stroke-width: 1; }
.lookplot .limit { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 5 4; }
.lookplot .lbl { font: 600 11px var(--f-display); fill: var(--muted); }
.lookplot .m { fill: var(--ok); opacity: .75; }
.lookplot .x { fill: var(--bad); }
.lookplot .none { stroke: var(--warn); stroke-width: 2; }
.lookplot .multi { stroke: var(--bad); stroke-width: 2; }
.stalebar { background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: .9375rem; text-align: center; padding: 8px 16px; }
