/* ACE Academy — learner and reviewer pages. WisdomAI brand: Inter, Primary Indigo used sparingly.
   Every color is a token; components never carry a literal. */

/* Inter 4 (variable, weights 100–900), from @fontsource-variable/inter 5.2.8,
   SIL Open Font License (fonts/OFL.txt). Served from the academy so no
   learner's browser contacts Google. ?v= marks the files immutable: bump it
   if they are ever replaced. The extended-Latin file loads only for a page
   that uses one of its characters. */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2?v=5.2.8") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2?v=5.2.8") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Nov 17: the signed-in pages take the front door's values (navy ink, the
     spec's muted grey and divider, violet buttons, the brand tint behind
     the cards) so the whole academy reads as one product. */
  --bg: #F5F7FF; --surface: #FFFFFF; --ink: #18192F; --muted: #636382; --line: #E6E8F2; --title: #000000; --field: #8687A2; --field-hover: #35376A;
  --accent: #3F39B1; --accent-solid: #4B40DD; --accent-solid-hover: #3F39B1; --accent-soft: #EEEDFB; --on-accent: #FFFFFF; --ring: rgba(75, 64, 221, .28);
  --ok: #1E7A4C; --ok-soft: #E3F3EA; --warn: #A9400B; --warn-soft: #FCEBDD; --danger: #B3261E; --danger-soft: #FBE9E7;
  --focus: #5263FF;
  --font: "Avenir Next LT Pro", "Avenir Next", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-h1: 40px; --fs-h2: 20px; --fs-body: 15px; --fs-small: 13px; --fs-label: 11px;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111122; --surface: #1A1A31; --ink: #ECECF6; --muted: #A7A8BB; --line: #2C2C48; --title: #ECECF6; --field: #6A6B8C; --field-hover: #A7A8BB;
    --accent: #8C93FF; --accent-solid: #5A50E6; --accent-solid-hover: #4B40DD; --accent-soft: #25254A; --on-accent: #FFFFFF; --ring: rgba(138, 167, 253, .35);
    --ok: #7FD3A6; --ok-soft: #163326; --warn: #F5A26F; --warn-soft: #3A2516; --danger: #F2938C; --danger-soft: #3B1A18;
    --focus: #8AA7FD;
    color-scheme: dark;
  }
}
/* The ACE banner's brand art (Aaron, Nov 11): the same in light and dark,
   since it is artwork. Sampled from the ACE 201 banner. */
:root {
  --ab-ink: #0D0E24; --ab-badge: #505CE3; --ab-badge-line: #DCE3F8;
  --ab-sky-0: #F6F9FF; --ab-sky-1: #ECF1FF; --ab-sky-2: #E2EAFE; --ab-sky-3: #C9DBFF; --ab-sky-4: #B0CBFF; --ab-sky-5: #A0C1FD;
  --ab-mid: #6EA0FB; --ab-edge: #3D85FF; --ab-deep-1: #2F6DF0; --ab-deep-2: #1A56DF;
  --ab-cyan: #30B5F8; --ab-purple: #7039C7; --ab-blue: #0563FE; --ab-lime: #CDFD6B; --ab-mist: #E6EDFF; --ab-stroke: #FFFFFF;
  --ab-tile: rgba(255, 255, 255, .2); --ab-tile-line: rgba(255, 255, 255, .6); --ab-wire: rgba(255, 255, 255, .5); --ab-glow: rgba(160, 220, 255, 1);
}
/* The front door (sign-in redesign spec, Nov 15): WisdomAI's brand values
   under the spec's own names. The lime is eyeballed from the 101 banner;
   the rest come from the brand list and wisdom.ai's computed styles. */
:root {
  --wai-navy: #18192F; --wai-indigo: #35376A; --wai-violet: #4B40DD; --wai-violet-dark: #3F39B1;
  --wai-blue: #0663FF; --wai-blue-2: #3B74FB; --wai-sky: #31B5F7; --wai-purple: #6A3ED4; --wai-lime: #C6F36B;
  --wai-tint-1: #F5F7FF; --wai-tint-2: #DCE5FE; --wai-tint-3: #8AA7FD; --wai-white: #FFFFFF; --wai-black: #000000;
  --wai-text: #18192F; --wai-text-muted: #636382; --wai-border: #8687A2; --wai-divider: #E6E8F2; --wai-error: #B42318;
  --wai-ring: rgba(75, 64, 221, .28); --wai-wire: rgba(255, 255, 255, .9); --wai-glass: rgba(255, 255, 255, .3);
  --wai-glass-line: rgba(255, 255, 255, .7); --wai-frost: rgba(255, 255, 255, .9); --wai-glow: rgba(6, 99, 255, .14);
  /* Avenir Next LT Pro is licensed and not served: a Mac shows its own Avenir Next, everyone else Inter. */
  --wai-font: "Avenir Next LT Pro", "Avenir Next", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* What the front door's controls use. Light is the spec; dark keeps the page
   readable for a learner whose system is dark. The art panel is artwork and
   stays the same in both. */
:root {
  --land-bg: var(--wai-white); --land-title: var(--wai-black); --land-text: var(--wai-text); --land-muted: var(--wai-text-muted);
  --land-field: var(--wai-border); --land-field-hover: var(--wai-indigo); --land-field-bg: var(--wai-white); --land-line: var(--wai-divider);
  --land-name: var(--wai-indigo); --land-link: var(--wai-violet-dark); --land-error: var(--wai-error);
  --land-cta: var(--wai-violet); --land-cta-hover: var(--wai-violet-dark); --land-on: var(--wai-white);
  --land-ink: var(--wai-navy); --land-ink-hover: var(--wai-indigo); --land-on-ink: var(--wai-white); --land-alt-hover: var(--wai-tint-1);
  --land-box: var(--wai-white); --land-card: var(--wai-tint-1); --land-card-line: var(--wai-tint-2); --land-card-text: var(--wai-indigo);
  --land-pill: var(--wai-tint-2); --land-pill-ink: var(--wai-violet-dark);
}
@media (prefers-color-scheme: dark) {
  :root {
    --land-bg: var(--surface); --land-title: var(--ink); --land-text: var(--ink); --land-muted: var(--muted);
    --land-field: #6A6B8C; --land-field-hover: var(--muted); --land-field-bg: var(--surface); --land-line: var(--line);
    --land-name: var(--muted); --land-link: var(--accent); --land-error: var(--danger);
    --land-cta: #5A50E6; --land-cta-hover: var(--wai-violet); --land-on: var(--wai-white);
    --land-ink: var(--ink); --land-ink-hover: #C9CAE0; --land-on-ink: var(--wai-navy); --land-alt-hover: var(--accent-soft);
    --land-box: var(--surface); --land-card: var(--accent-soft); --land-card-line: var(--line); --land-card-text: var(--muted);
    --land-pill: #34346A; --land-pill-ink: var(--ink);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--fs-body)/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* The page area takes focus on each new screen for screen readers; it is not a control, so no ring. */
#app:focus { outline: none; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
/* Light, large headlines, as on wisdom.ai and the front door; weight comes from size, not bold. */
h1 { font-size: var(--fs-h1); line-height: 1.15; font-weight: 400; letter-spacing: -0.04em; color: var(--title); }
h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 500; }
h3 { font-size: 16px; line-height: 1.4; font-weight: 500; }
p { margin: 0; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main.wrap { flex: 1; padding-block: 28px 56px; display: grid; gap: 24px; align-content: start; }
main.wrap.wide { max-width: 1240px; }
/* Grid items default to min-width:auto, which lets a wide table push the page sideways. */
main.wrap > *, #admin-body, #ls-out { min-width: 0; }
.loading { color: var(--muted); }
.lbl { font-size: var(--fs-label); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: baseline; }

/* top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
/* The front door's lockup: the mark, WisdomAI, a divider, ACE Academy. */
.brand { display: flex; align-items: center; gap: 8px; height: 32px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.brand .mark { width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; }   /* the Hub's .logo-mark */
.brand .b-name { margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--wai-indigo); font-size: 15px; line-height: 24px; }
.who { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.who a { font-weight: 500; }
.who a, .who button { font-size: 14px; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; min-width: 0; }
.card.narrow { max-width: 520px; width: 100%; margin: 0 auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hero { display: grid; gap: 10px; }
.hero p { color: var(--muted); max-width: 64ch; font-size: 16px; line-height: 1.5; }
/* A page's eyebrow, as on the front door: violet, small caps. */
.hero > .lbl, .card.narrow > .lbl { color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .06em; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; font-size: 14px; }
.note.ok { background: var(--ok-soft); }
.note.warn { background: var(--warn-soft); }
.note.bad { background: var(--danger-soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }

/* buttons and fields */
/* Pill buttons, as on the front door: one filled violet action per view,
   the rest outlined in violet. */
.btn { font: 500 15px/1.2 var(--font); min-height: 44px; border-radius: 999px; padding: 0 20px; border: 1.5px solid var(--accent-solid); background: var(--surface); color: var(--accent-solid); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--accent-soft); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-solid); }
.btn.primary { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-solid-hover); border-color: var(--accent-solid-hover); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn.link { min-height: 0; border: 0; border-radius: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.btn.link:hover { background: none; }
.btn.link:focus-visible { box-shadow: none; outline: 2px solid var(--focus); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
/* A form's one main action, as wide as the fields above it. */
.btn.block { width: 100%; justify-content: center; }
/* The other way in (Sign in on the landing page): ink, inverted on dark. */
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.ink:hover { opacity: .88; border-color: var(--ink); }
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
label.f .optional { font-weight: 400; color: var(--muted); }
label.f .hint, .fld .hint { font-weight: 400; color: var(--muted); font-size: var(--fs-small); }
.fld { display: grid; gap: 6px; }
/* A select draws its own chevron, so it looks the same in every browser. */
.sel { position: relative; display: block; }
.sel select { appearance: none; -webkit-appearance: none; padding-right: 40px; }
.sel::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: translate(0, -70%) rotate(45deg); pointer-events: none; }
/* Fields as on the front door: 48px, a border dark enough to see, a violet focus ring. */
input[type=text], input[type=email], input[type=url], input[type=number], select, textarea {
  font: 16px/1.4 var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: 10px; padding: 11px 14px; min-height: 48px; width: 100%; }
input[type=text]:hover, input[type=email]:hover, input[type=url]:hover, input[type=number]:hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input[type=text]:focus, input[type=email]:focus, input[type=url]:focus, input[type=number]:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-solid); box-shadow: 0 0 0 3px var(--ring); }
input[readonly] { background: var(--bg); color: var(--muted); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent-solid); }
input.code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 21px; }
.check input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; }
.check .sub { display: block; color: var(--muted); }
.checks { display: grid; gap: 10px; }
.err { color: var(--danger); font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-small); }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.google { justify-content: center; width: 100%; }

/* pills and progress */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; white-space: nowrap; background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.idle { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent-solid); border-radius: 999px; }

/* course */
.modules { list-style: none; margin: 0; padding: 0; display: grid; }
.module { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.module:first-child { border-top: 0; }
.module .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-small); font-weight: 600; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.module .n svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.module.done .n { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.module.next .n { background: var(--accent-solid); color: var(--on-accent); border-color: transparent; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.steps .s { border-top: 3px solid var(--line); padding-top: 8px; font-size: var(--fs-small); color: var(--muted); }
.steps .s.on { border-color: var(--accent-solid); color: var(--ink); font-weight: 600; }
.steps .s.done { border-color: var(--ok); color: var(--ink); }

/* player: the module takes the whole window, under one slim bar */
body.playing .top, body.playing .foot { display: none; }
main.wrap.play { max-width: none; padding: 0; gap: 0; }
.player { display: block; }
.pbar { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 6px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.pbar a { white-space: nowrap; }
.pbar .ptitle { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .pnote { color: var(--muted); white-space: nowrap; }
.pbar #save-line { white-space: nowrap; }
.player iframe { display: block; width: 100%; height: calc(100vh - 44px); height: calc(100dvh - 44px); border: 0; background: var(--surface); }
.player .slot:not(:empty) { max-width: 980px; margin: 24px auto 40px; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }

/* exam */
.q { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q legend { font-weight: 600; padding: 0; }
.q fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.opt:hover { border-color: var(--field); }
.opt:has(input:checked) { border-color: var(--accent-solid); background: var(--accent-soft); }
.opt input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; }
/* matching: the answers as a lettered list, one choice per prompt */
.m-answers { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.m-answers li { display: flex; gap: 10px; }
.m-answers b { min-width: 1.2em; }
.m-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.m-row select { width: 100%; }
@media (max-width: 720px) { .m-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.examhead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 10px; border-bottom: 1px solid var(--line); }
.score { font-size: 48px; font-weight: 400; letter-spacing: -0.04em; color: var(--title); font-variant-numeric: tabular-nums; }

/* certificate */
.cert { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; background: var(--surface); text-align: center; }
.cert .name { font-size: 30px; font-weight: 400; letter-spacing: -0.03em; color: var(--title); }
.cert .title { color: var(--accent); font-weight: 500; }
.copy { display: flex; gap: 8px; }
.copy input { font-size: var(--fs-small); }

/* feedback: a 1-5 rating as five buttons (real radios, visually replaced) */
.rate { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rate legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.rate label { position: relative; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate .n { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; background: var(--surface); }
.rate label:hover .n { border-color: var(--muted); }
.rate input:checked + .n { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.rate input:focus-visible + .n { outline: 2px solid var(--focus); outline-offset: 2px; }
.rate .ends { font-size: var(--fs-small); color: var(--muted); }
.slot:empty { display: none; }
.slot.narrow { max-width: 520px; width: 100%; margin: 0 auto; }
/* reviewer */
.quote { border-left: 3px solid var(--line); padding-left: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--accent-solid); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; }
.stat b { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.req { display: grid; gap: 10px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* The Logs tab */
.lg-filters { gap: 8px; }
.lg-filters .btn[aria-pressed="true"] { background: var(--accent-soft); }
.lg-filters input[type=search] { flex: 1 1 220px; width: auto; min-height: 34px; padding: 6px 12px; border: 1px solid var(--field); border-radius: 999px; font: 14px/1.4 var(--font); color: var(--ink); background: var(--surface); }
.lg-filters input[type=search]:focus { outline: none; border-color: var(--accent-solid); box-shadow: 0 0 0 3px var(--ring); }
table.logs td { vertical-align: top; }
.lg-when { white-space: nowrap; }
.lg-msg { margin-top: 6px; overflow-wrap: anywhere; }
.lg-where { overflow-wrap: anywhere; max-width: 260px; }
.lg-more { margin-top: 6px; }
.lg-more summary { cursor: pointer; color: var(--accent); font-size: var(--fs-small); font-weight: 500; }
.lg-more ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); }
.foot { padding-block: 18px 28px; color: var(--muted); font-size: var(--fs-small); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; }

@media (max-width: 720px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { margin-top: 6px; }
  .brand .b-wai { display: none; }
  .brand .b-name { margin-left: 0; padding-left: 0; border-left: 0; color: var(--ink); font-size: 16px; }
  :root { --fs-h1: 32px; }
  .card { padding: 20px; }
  .pbar .pnote, .pbar #save-line { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ACE level banner: Aaron's brand art in HTML, one for each level. Sizes are
   in container units, so the banner keeps its proportions from a phone-width
   card to a full page. The art is decoration (aria-hidden); the badge and the
   level's name are text. */
.ace-banner { position: relative; container-type: inline-size; aspect-ratio: 16 / 7; overflow: hidden; border-radius: var(--radius); isolation: isolate;
  background:
    radial-gradient(48% 62% at 100% 100%, var(--ab-deep-2) 0%, var(--ab-deep-1) 35%, transparent 100%),
    radial-gradient(22% 70% at 100% 48%, var(--ab-edge) 0%, transparent 100%),
    radial-gradient(48% 40% at 55% 100%, var(--ab-mid) 0%, transparent 100%),
    radial-gradient(55% 55% at 30% 15%, var(--ab-sky-0) 0%, transparent 100%),
    linear-gradient(180deg, var(--ab-sky-1) 0%, var(--ab-sky-2) 30%, var(--ab-sky-3) 58%, var(--ab-sky-4) 80%, var(--ab-sky-5) 100%); }
.ace-banner .ab-art, .ace-banner .ab-art > * { position: absolute; }
.ace-banner .ab-art { inset: 0; z-index: -1; }
.ab-sq { aspect-ratio: 1; }
.ab-tile { aspect-ratio: 1; display: grid; place-items: center; background: var(--ab-tile); border: 1px solid var(--ab-tile-line); color: var(--ab-stroke); backdrop-filter: blur(2px); }
.ab-tile svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.ab-wire { border: 0 solid var(--ab-wire); }
/* Placed as in the 1920×1080 original, the height eased to 16:7. */
.ab-sq.cyan   { left: 5.73%;  top: 14.4%; width: 3.13cqw; background: var(--ab-cyan); }
.ab-sq.purple { left: 3.44%;  top: 35.4%; width: 2.29cqw; background: var(--ab-purple); }
.ab-sq.blue   { left: 11.5%;  top: 79.8%; width: 3.18cqw; background: var(--ab-blue); }
.ab-sq.lime-s { left: 14.7%;  top: 86.2%; width: 1.15cqw; background: var(--ab-lime); }
.ab-sq.lime   { left: 94.6%;  top: 52%;   width: 1.88cqw; background: var(--ab-lime); }
.ab-sq.mist   { left: 87.9%;  top: 88.5%; width: 3.54cqw; background: var(--ab-mist); }
.ab-tile.chat  { left: 88.96%; top: 4.76%; width: 7.92cqw; }
.ab-tile.table { left: 85.7%;  top: 63.8%; width: 5.73cqw; }
.ab-tile.hex   { left: 69.4%;  top: 78.8%; width: 8.23cqw; }
.ab-tile.code  { left: 5.94%;  top: 87.1%; width: 5.1cqw; }
.ab-wire.glow  { left: 91.4%;  top: 69.6%; width: 8.6%; height: max(1px, .16cqw); box-shadow: 0 0 .4cqw var(--ab-glow); background: linear-gradient(90deg, var(--ab-glow), transparent); }
.ab-wire.elbow { left: 77.7%;  top: 75.4%; width: 9.1%; height: 11.6%; border-right-width: 1px; border-bottom-width: 1px; border-bottom-right-radius: 2.6cqw; }
.ab-wire.rise  { left: 88.9%;  top: 86.9%; width: 11.1%; height: 13.1%; border-left-width: 1px; border-top-width: 1px; border-top-left-radius: 3cqw; }
.ace-banner .ab-text { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2cqw; padding: 0 15cqw 8cqw; text-align: center; }
.ab-pill { display: inline-flex; align-items: center; gap: 1.1cqw; padding: 1cqw 2.2cqw; border-radius: 999px; border: 1px solid var(--ab-badge-line); background: rgba(255, 255, 255, .35);
  color: var(--ab-badge); font-size: max(11px, 2.4cqw); font-weight: 350; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.ab-pill svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ace-banner .ab-title { margin: 0; color: var(--ab-ink); font-size: max(20px, 7.2cqw); font-weight: 300; line-height: 1.28; letter-spacing: 0; text-wrap: balance; }
/* On a level card the banner runs to the card's edges, like a course tile,
   with the name a size smaller so it keeps to two lines. */
.card > .ace-banner.bleed { margin: -24px -24px 2px; border-radius: var(--radius) var(--radius) 0 0; }
@media (max-width: 720px) { .card > .ace-banner.bleed { margin: -20px -20px 2px; } }
.ace-banner.bleed .ab-text { padding-inline: 12cqw; gap: 2.8cqw; }
.ace-banner.bleed .ab-title { font-size: max(18px, 5.6cqw); line-height: 1.22; }
.card.lvl { align-content: start; }
/* On a level's own page the banner is a header, not a poster. */
.hero > .ace-banner { aspect-ratio: 16 / 5.4; }
.hero > .ace-banner .ab-text { gap: 2.4cqw; padding-bottom: 5cqw; }
.hero > .ace-banner .ab-title { font-size: max(24px, 5cqw); line-height: 1.2; }
.hero > .ace-banner .ab-pill { font-size: max(11px, 1.8cqw); }
@container (max-width: 520px) { .hero > .ace-banner .ab-title { font-size: max(22px, 6.4cqw); } }
.hero:has(> .ace-banner) { gap: 14px; }

/* Screen-reader-only text (a link's full name, where the visible words are short). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* A button at work keeps its label and turns a small spinner after it. */
.btn.busy { cursor: progress; }
.btn.busy::after { content: ""; width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ace-spin .8s linear infinite; }
@keyframes ace-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::after { animation: none; } }

/* ── Front door: the signed-out pages (sign-in redesign spec, Nov 15) ────
   Desktop (900px and up): the form column on the left; on the right the
   brand panel, art in its top 58% and the certifications box pinned 48px
   from its bottom and sides. The art gives way before it touches the box.
   Under 900px it is one column: a short band of the art, the logo, the
   form, the certifications box, the footer. That is also the DOM order
   (the band is decoration and hidden from assistive tech), so tab order
   follows what the eye reads. */
body.landing .top, body.landing .foot { display: none; }
main.wrap.bare { max-width: none; padding: 0; display: block; }
.land {
  --land-pad: clamp(20px, 4.5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 51.25%);
  grid-template-areas: "top art" "body art" "foot art"; grid-template-rows: auto 1fr auto;
  min-height: 100vh; min-height: 100dvh;
  background: var(--land-bg); color: var(--land-text); font-family: var(--wai-font);
}
.land :is(input, select, button, .btn) { font-family: inherit; }
.land-top { grid-area: top; padding: 32px var(--land-pad) 0; }
.land-brand { display: inline-flex; align-items: center; gap: 8px; height: 32px; color: var(--land-text); text-decoration: none; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.land-brand img { width: 24px; height: 24px; object-fit: contain; }
.land-brand .land-name { margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--land-line); color: var(--land-name); font-size: 15px; font-weight: 500; line-height: 24px; }
.land-body { grid-area: body; display: grid; place-items: center; padding: 44px var(--land-pad) 48px; }
.land-foot { grid-area: foot; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 var(--land-pad) 30px; color: var(--land-muted); font-size: 13px; }
.land-foot a { color: var(--land-link); font-weight: 500; }

/* The form: spacing is set per step, so the grid itself adds none. */
.land-form { width: 100%; max-width: 400px; display: grid; }
.land-hero { display: grid; margin-bottom: 32px; }
.land-hero .eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--land-link); font-size: 13px; font-weight: 500; line-height: 20px; letter-spacing: .06em; text-transform: uppercase; }
.land-hero .eyebrow svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.land-hero h1 { margin-bottom: 10px; color: var(--land-title); font-size: 44px; font-weight: 400; line-height: 1.15; letter-spacing: -0.04em; }
.land-hero h1:focus { outline: none; }   /* focused on arrival for screen readers; not a control */
.land-hero .lead { color: var(--land-muted); font-size: 16px; line-height: 1.5; }
.land :is(.land-form, .land-foot) a:not(.btn) { color: var(--land-link); font-weight: 500; text-decoration: underline; }
.land .stack { gap: 24px; }
.land label.f { gap: 6px; color: var(--land-text); font-size: 14px; font-weight: 500; line-height: 1.4; }
.land .fld { gap: 6px; }
.land .fld .hint { color: var(--land-muted); font-size: 13px; line-height: 1.4; }
.land input[type=email], .land input[type=text], .land input[type=url], .land select {
  min-height: 48px; padding: 11px 16px; border: 1px solid var(--land-field); border-radius: 10px;
  background: var(--land-field-bg); color: var(--land-text); font-size: 16px; line-height: 1.4; }
.land input::placeholder { color: var(--land-muted); opacity: 1; }
.land input:hover, .land select:hover { border-color: var(--land-field-hover); }
.land input[type=email]:focus, .land input[type=text]:focus, .land input[type=url]:focus, .land select:focus { outline: none; border-color: var(--land-cta); box-shadow: 0 0 0 3px var(--wai-ring); }
.land :is(input, select)[aria-invalid=true] { border-color: var(--land-error); }   /* red on hover too; while focused, the focus ring shows instead */
.land .sel select { padding-right: 44px; }
.land .sel::after { border-color: var(--land-text); }
.land input.code { font-size: 20px; letter-spacing: .4em; text-align: center; }
.land .checks { gap: 11px; }
.land .check { gap: 12px; color: var(--land-text); font-size: 14px; line-height: 21px; }
.land .check input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--land-cta); }
.land .check .sub { color: var(--land-muted); }
.land .ferr { color: var(--land-error); font-size: 13px; line-height: 1.4; }
/* A message sits under its own field (6px), not at the form's 24px spacing; a checkbox's under its words. */
.land .stack > .ferr { margin-top: -18px; }
.land .checks > .ferr { margin-top: -6px; padding-left: 32px; }
.land .err { color: var(--land-error); font-size: 14px; }
.land :focus-visible { outline-color: var(--land-cta); }

/* Buttons: purple for new learners, navy for returning ones, one outline. */
.land .btn { min-height: 48px; border-radius: 999px; font-size: 16px; font-weight: 500; line-height: 1.2; }
.land .btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--land-bg), 0 0 0 4px var(--land-cta); }
.land .btn.primary { background: var(--land-cta); border-color: var(--land-cta); color: var(--land-on); }
.land .btn.primary:hover { background: var(--land-cta-hover); border-color: var(--land-cta-hover); }
.land .btn.ink { min-height: 52px; background: var(--land-ink); border-color: var(--land-ink); color: var(--land-on-ink); font-weight: 600; }
.land .btn.ink:hover { opacity: 1; background: var(--land-ink-hover); border-color: var(--land-ink-hover); }
.land .btn.ink:focus-visible { box-shadow: 0 0 0 2px var(--land-bg), 0 0 0 4px var(--land-ink); }
.land .btn.alt { background: var(--land-bg); border: 1.5px solid var(--land-cta); color: var(--land-cta); }
.land .btn.alt:hover { background: var(--land-alt-hover); }
.land .btn.google { margin-top: 12px; }
.land .btn.busy[disabled] { opacity: 1; }
.land .btn.link { min-height: 0; border-radius: 0; color: var(--land-link); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.land form .btn.block { margin-top: 8px; }   /* with the stack's 24: 32 above the main button */
.land .divider { margin: 32px 0; color: var(--land-muted); font-size: 13px; line-height: 16px; }
.land .divider::before, .land .divider::after { border-top-color: var(--land-line); }
.land-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.land-legal { margin-top: 24px; color: var(--land-muted); font-size: 13px; }
.land .note { margin-bottom: 24px; }

/* The brand panel. */
.land-art {
  grid-area: art; position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: linear-gradient(118deg, var(--wai-white) 0%, var(--wai-tint-1) 12%, var(--wai-tint-2) 34%, var(--wai-tint-3) 62%, var(--wai-blue-2) 86%, var(--wai-blue) 100%);
}
/* The art: 58% of the panel, less when the panel is too short for it and the box. */
.land-deco { position: relative; flex: 0 1 58%; min-height: 0; margin-bottom: 24px; }
.land-deco > * { position: absolute; }
.lw { border: 0 solid var(--wai-wire); }
.lw-a { left: 29.95%; top: 21.9%; width: 50%; bottom: 0; border-width: 1px 1px 0 1px; }
.lw-b { left: 29.95%; top: 62.04%; width: 28.05%; border-top-width: 1px; }
.lw-c { left: 58%; top: 44%; right: 0; bottom: 0; border-width: 1px 0 0 1px; }
.lw-d { left: 79.95%; top: 74.03%; right: 0; border-top-width: 1px; }
.ls { width: 30px; height: 30px; }
.ls-blue   { left: 44.04%; top: calc(21.9% - 17px); background: var(--wai-blue); }
.ls-cyan   { left: calc(29.95% - 30px); top: 31.02%; background: var(--wai-sky); }
.ls-mist   { left: calc(79.95% - 30px); top: 33%; background: var(--wai-tint-2); }
.ls-lime   { left: 52.03%; top: 56.1%; width: 18px; height: 18px; background: var(--wai-lime); }
.ls-purple { left: 22.09%; top: 72.05%; background: var(--wai-purple); }
.land-deco .lt { width: 64px; height: 64px; border-radius: 4px; background: var(--wai-glass); border: 1px solid var(--wai-glass-line); backdrop-filter: blur(8px); box-shadow: 0 10px 28px var(--wai-glow); }
.land-deco .lt svg { width: 26px; height: 26px; stroke-width: 1.4; }
.lt-code { left: 63.96%; top: 13.97%; }
.lt-chat { left: 23.98%; top: 45.99%; }
.lt-hex  { left: 62.06%; top: 64.02%; }

/* Learn more about the certifications: frosted glass on the panel. */
.land-certs {
  flex: 0 0 auto; margin: auto 48px 48px; padding: 24px; display: grid; gap: 16px; container-type: inline-size;
  background: var(--wai-frost); border: 1px solid var(--wai-white); border-radius: 16px;
  backdrop-filter: blur(10px); box-shadow: 0 12px 32px var(--wai-glow); color: var(--wai-text);
  --lc-card: var(--wai-tint-1); --lc-card-line: var(--wai-tint-2); --lc-text: var(--wai-indigo); --lc-title: var(--wai-text);
  --lc-pill: var(--wai-tint-2); --lc-pill-ink: var(--wai-violet-dark); --lc-link: var(--wai-violet-dark);
}
.land-certs h2 { color: var(--lc-title); font-size: 20px; font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; }
.lc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container (max-width: 520px) { .lc-cards { grid-template-columns: minmax(0, 1fr); } }
.lc-card { display: flex; flex-direction: column; align-items: flex-start; padding: 16px; background: var(--lc-card); border: 1px solid var(--lc-card-line); border-radius: 12px; }
.lc-step { padding: 1px 8px; border-radius: 999px; background: var(--lc-pill); color: var(--lc-pill-ink); font-size: 12px; font-weight: 500; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; }
.lc-card h3 { margin-top: 8px; color: var(--lc-title); font-size: 16px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.lc-card p { margin-top: 4px; color: var(--lc-text); font-size: 14px; line-height: 20px; }
.land a.lc-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; color: var(--lc-link); font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: underline; text-underline-offset: 2px; }
.lc-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Signed-in pages on this layout (the ACE 201 request) lead with a way back. */
.land a.land-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-bottom: 32px; color: var(--land-link); font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: underline; text-underline-offset: 2px; }
.land-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* How ACE 201 access works: the request's steps, in the certifications box's place. */
.card .lr-steps { --lc-card: var(--accent-soft); --lc-card-line: var(--line); --lc-text: var(--muted); --lc-title: var(--ink); --lc-pill: var(--bg); --lc-pill-ink: var(--accent); margin-inline: -12px; }
.lr-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lr-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border: 1px solid transparent; border-radius: 12px; }
.lr-steps li.on { background: var(--lc-card); border-color: var(--lc-card-line); }
.lr-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--lc-pill); color: var(--lc-pill-ink); font-size: 13px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.lr-n svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lr-steps li.on .lr-n { background: var(--wai-violet); color: var(--wai-white); }
.lr-steps h3 { color: var(--lc-title); font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.lr-steps li.next h3 { color: var(--lc-text); font-weight: 400; }
.lr-steps p { margin-top: 2px; color: var(--lc-text); font-size: 13px; line-height: 1.45; }
.lr-why { color: var(--lc-text); font-size: 13px; line-height: 1.45; }

@media (max-width: 899px) {
  .land { --land-pad: 24px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "deco" "top" "body" "certs" "foot"; grid-template-rows: auto; }
  /* The panel's two parts join the column: the art as a band on top, the box below the form. */
  .land-art { display: contents; }
  .land-deco {
    grid-area: deco; height: 128px; flex: none; margin: 0; overflow: hidden;
    background: linear-gradient(118deg, var(--wai-white) 0%, var(--wai-tint-1) 12%, var(--wai-tint-2) 34%, var(--wai-tint-3) 62%, var(--wai-blue-2) 86%, var(--wai-blue) 100%);
  }
  .ls-mist, .lt-chat, .lt-hex { display: none; }
  .land-deco .lt { width: 48px; height: 48px; }
  .land-deco .lt svg { width: 20px; height: 20px; }
  .land-top { padding-top: 24px; }
  .land-body { place-items: start center; padding: 32px var(--land-pad) 40px; }
  .land-certs {
    grid-area: certs; width: calc(100% - 2 * var(--land-pad)); max-width: 400px; justify-self: center; margin: 0 0 40px;
    background: var(--land-box); border-color: var(--land-line); box-shadow: none; backdrop-filter: none; color: var(--land-text);
    --lc-card: var(--land-card); --lc-card-line: var(--land-card-line); --lc-text: var(--land-card-text); --lc-title: var(--land-text);
    --lc-pill: var(--land-pill); --lc-pill-ink: var(--land-pill-ink); --lc-link: var(--land-link);
  }
  .lc-cards { grid-template-columns: minmax(0, 1fr); }
  /* Logo and footer line up with the form, which is centred on a tablet. */
  .land-top, .land-foot { justify-self: center; width: 100%; max-width: calc(400px + 2 * var(--land-pad)); }
  .land-foot { padding-bottom: 24px; }
}
@media (max-width: 520px) {
  .land-hero h1 { font-size: 34px; }
  .land-certs { width: auto; max-width: none; justify-self: stretch; margin-inline: var(--land-pad); }
}
