/* ============================================================
   AOE Centre — aoe-ds.css                              (1011d)
   ------------------------------------------------------------
   The simplified design, in ONE stylesheet. A page that loads
   this file needs no other stylesheet: no style.css, no
   aoe-theme.css, no aoe-theme-vars.css, no aoe-app.css.

   Every colour, size and font is a token from the AOE Centre
   design system (tokens.json). Light is the default; dark is
   html[data-theme="dark"], set before first paint by the boot
   line in <head>, exactly as before.

   It also skins the parts the existing scripts build — the
   phone bottom bar, the theme and language switches, the
   first-visit language chooser, tooltips, the busy line and the
   install card — so those scripts keep working unchanged.

   1011d: the home page in design B — dark header with the owl,
   light-brown hero, three doors (Learners Portal, Teacher
   Portal, Guides), the placement test, subjects folded by exam
   board, prices, contact. Colours are the logo's own.

   Rule of the design: one function, one place. Used often →
   header (phone: bottom bar). Now and then → the menu. Rarely →
   footer.
   ============================================================ */

/* ============================================================
   1. TOKENS
   ============================================================ */

:root, html[data-theme="light"] {
  --page: #ebe6da;
  --card: #fffdf7;
  --raised: #ffffff;
  --row: #f3efe4;
  --band: #5f5950;
  --line: #dfd7c6;
  --line-strong: #c6bba7;
  --ink: #2b2721;
  --muted: #6c6558;
  --gold: #dfcd83;
  --on-gold: #2b2721;
  --gold-text: #71611e;
  --on-band: #f5f2ea;
  --band-accent: #f5ebc4;
  --focus: var(--gold-text);
  --correct: #3f7a56;
  --correct-soft: #f2f7f3;
  --wrong: #b0442f;
  --wrong-soft: #fdf3f1;
  --warn: #c9922f;
  --warn-soft: #fbf4e6;
  --shadow-card: 0 1px 2px #2b27210d, 0 4px 14px #2b272112;
}

html[data-theme="dark"] {
  --page: #171410;
  --card: #2b2721;
  --raised: #332f28;
  --row: #38332b;
  --band: #211e19;
  --line: #453f35;
  --line-strong: #5c554c;
  --ink: #f5f2ea;
  --muted: #a9a296;
  --gold: #dfcd83;
  --on-gold: #2b2721;
  --gold-text: #dfcd83;
  --on-band: #f5f2ea;
  --band-accent: #f5ebc4;
  --focus: var(--gold-text);
  --correct: #7fc79a;
  --correct-soft: rgba(95,169,124,.24);
  --wrong: #e08a72;
  --wrong-soft: rgba(196,85,61,.24);
  --warn: #dca94a;
  --warn-soft: rgba(220,169,74,.18);
  --shadow-card: none;
}

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 14px;
  --space-4: 22px;
  --space-5: 34px;
  --space-6: 52px;
  --radius-none: 0;
  --radius-btn: 1px;
  --radius-pill: 999px;
  --width-page: 1120px;
  --width-prose: 800px;
  --height-topbar: 72px;
  --height-topbar-phone: 54px;
  --height-tabbar: 62px;
  --width-more: 360px;
  --font-display: "Marcellus", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "DejaVu Sans Mono", monospace;
  --font-script: "Petit Formal Script", "Segoe Script", cursive;
}

/* the old names, for the few scripts that paint with them
   (the install card builds its own styles from these) */
:root, html[data-theme="dark"] {
  --cream: var(--page); --panel: var(--card); --rule: var(--line);
  --gold-deep: var(--gold-text); --taupe-dark: var(--muted); --taupe: var(--band);
  --bg: var(--page); --surface: var(--card); --text: var(--ink); --dim: var(--muted);
  --accent: var(--gold-text); --rule-c: var(--line); --rule-strong: var(--line-strong);
}
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* ============================================================
   2. COLOUR ROLES FOR THE HOME PAGE (design B, "AOE logo")
      Every value is one of the logo's own colours: the dark
      brown, the light brown, the sand, the gold and the cream.
   ============================================================ */
:root, html[data-theme="light"] {
  --head-bg: #2b2721;  --head-text: #f5f2ea;  --head-line: #c6bba7;
  --brand: #dfcd83;    --brand-sub: #c6bba7;
  --sign-bg: #c6bba7;  --sign-text: #2b2721;
  --hero-bg: #5f5950;  --hero-text: #f5f2ea;  --hero-label: #f5ebc4;  --hero-word: #dfcd83;
  --hero-btn: #f5f2ea; --hero-btn-text: #2b2721;
  --btn-bg: #2b2721;   --btn-text: #f5f2ea;
  --tint-bg: #c6bba7;  --tint-text: #2b2721;  --tint-line: #9b9283;  --tint-label: #2b2721;
  --fig-bg: #2b2721;   --fig-num: #dfcd83;    --fig-text: #f5f2ea;
  --hair: #c6bba7;     --muted2: #4a443b;
}
html[data-theme="dark"] {
  --head-bg: #100e0b;  --head-text: #f5f2ea;  --head-line: #453f35;
  --brand: #dfcd83;    --brand-sub: #a9a296;
  --sign-bg: #c6bba7;  --sign-text: #2b2721;
  --hero-bg: #38332b;  --hero-text: #f5f2ea;  --hero-label: #f5ebc4;  --hero-word: #dfcd83;
  --hero-btn: #f5f2ea; --hero-btn-text: #2b2721;
  --btn-bg: #f5f2ea;   --btn-text: #2b2721;
  --tint-bg: #38332b;  --tint-text: #f5f2ea;  --tint-line: #5c554c;  --tint-label: #dfcd83;
  --fig-bg: #100e0b;   --fig-num: #dfcd83;    --fig-text: #f5f2ea;
  --hair: #5c554c;     --muted2: #c9c2b6;
}

/* ============================================================
   3. BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.18; letter-spacing: .01em; margin: 0; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@supports selector(:focus-visible) { :focus:not(:focus-visible) { outline: none; } }
[data-skip-target]:focus { outline: none; }
.aoe-wrap { max-width: var(--width-page); margin: 0 auto; padding: 0 var(--space-4); }
.aoe-label { font-family: var(--font-mono); font-size: 11px; line-height: 1.6; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); margin: 0; }
.aoe-h2 { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.15; margin: 8px 0 0; color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.only-phone { display: none !important; }
@media (max-width: 760px) {
  .aoe-wrap { padding: 0 14px; }
  .aoe-h2 { font-size: 26px; line-height: 1.18; margin-top: 6px; }
  .only-phone { display: revert !important; }
  .not-phone { display: none !important; }
}

/* ============================================================
   4. BUTTONS — square corners, bold, 48px tall
   ============================================================ */
.aoe-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 26px; font-family: var(--font-sans); font-size: 15px; line-height: 1.2; font-weight: 700; letter-spacing: .02em; text-decoration: none; border: 1px solid transparent; border-radius: var(--radius-btn); cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; white-space: nowrap; }
.aoe-btn--dark { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.aoe-btn--dark:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.aoe-btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.aoe-btn--outline:hover { background: var(--ink); color: var(--page); }
.aoe-btn--light { background: var(--hero-btn); border-color: var(--hero-btn); color: var(--hero-btn-text); min-height: 50px; padding: 0 28px; }
.aoe-btn--light:hover { background: transparent; color: var(--hero-btn); }
.aoe-btn--ghost-light { background: transparent; border: 2px solid var(--hero-text); color: var(--hero-text); min-height: 50px; padding: 0 28px; }
.aoe-btn--ghost-light:hover { background: var(--hero-text); color: var(--hero-bg); }
.aoe-btn[disabled], .aoe-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.aoe-btn[aria-busy="true"] { cursor: progress; opacity: .82; }
.aoe-link { font-weight: 700; font-size: 15px; color: var(--gold-text); text-underline-offset: 4px; }
@media (max-width: 760px) {
  .aoe-btn { min-height: 50px; font-size: 16px; }
}

/* ============================================================
   5. HEADER — dark bar with the owl, sticky
      Computer: owl · AOE CENTRE · Portals Guides Subjects Prices ·
                WhatsApp us · Sign in · EN·中文 (opens the menu)
      Phone:    owl · AOE CENTRE · Sign in · ≡
   ============================================================ */
.aoe-head { position: sticky; top: 0; z-index: 70; background: var(--head-bg); color: var(--head-text); border-bottom: 3px solid var(--head-line); }
.aoe-head__in { display: flex; align-items: center; gap: 34px; min-height: var(--height-topbar); max-width: var(--width-page); margin: 0 auto; padding: 0 var(--space-4); }
.aoe-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; text-decoration: none; white-space: nowrap; }
.aoe-brand img { width: 48px; height: 48px; }
.aoe-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.aoe-brand__name { font-family: var(--font-display); font-size: 20px; letter-spacing: .3em; color: var(--brand); }
.aoe-brand__tag { margin-top: 4px; font-family: var(--font-script); font-size: 13px; color: var(--brand-sub); }
.aoe-nav { display: flex; align-items: center; gap: 28px; flex: 1 1 auto; min-width: 0; }
.aoe-nav a { color: var(--head-text); text-decoration: none; font-size: 15px; font-weight: 700; padding: 6px 0 4px; border-bottom: 2px solid transparent; white-space: nowrap; }
.aoe-nav a:hover { color: var(--head-text); border-bottom-color: var(--brand); }
.aoe-head__end { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; margin-left: auto; }
.aoe-head__wa { color: var(--brand); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.aoe-head__wa:hover { color: var(--head-text); text-decoration: underline; text-underline-offset: 4px; }
.aoe-signin { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; background: var(--sign-bg); border: 1px solid var(--sign-bg); border-radius: var(--radius-btn); color: var(--sign-text); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.aoe-signin:hover { background: var(--head-text); border-color: var(--head-text); color: var(--sign-text); }
.aoe-menubtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; background: transparent; border: 1px solid var(--head-text); border-radius: var(--radius-btn); color: var(--head-text); font-family: var(--font-sans); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.aoe-menubtn svg { width: 20px; height: 20px; }
.aoe-menubtn .when-shut, .aoe-menubtn .when-open { display: none; }
.aoe-menubtn[aria-expanded="true"] { background: var(--head-text); color: var(--head-bg); }
.aoe-head :focus-visible { outline-color: var(--brand); }
@media (min-width: 761px) and (max-width: 1060px) {
  .aoe-head__in { gap: 22px; }
  .aoe-nav { gap: 20px; }
  .aoe-brand__tag { display: none; }
  .aoe-brand__name { font-size: 17px; letter-spacing: .24em; }
  .aoe-head__wa { display: none; }
}
@media (min-width: 761px) and (max-width: 880px) {
  .aoe-brand__name { display: none; }
}
@media (max-width: 760px) {
  .aoe-head__in { min-height: 60px; gap: 10px; padding: 0 12px 0 14px; }
  .aoe-brand { gap: 10px; }
  .aoe-brand img { width: 36px; height: 36px; }
  .aoe-brand__name { font-size: 16px; letter-spacing: .26em; }
  .aoe-brand__tag, .aoe-nav, .aoe-head__wa { display: none; }
  .aoe-head__end { gap: 10px; }
  .aoe-signin { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .aoe-menubtn { width: 44px; height: 44px; min-height: 44px; padding: 0; }
  .aoe-menubtn__word { display: none; }
  .aoe-menubtn[aria-expanded="false"] .when-shut, .aoe-menubtn:not([aria-expanded]) .when-shut { display: block; }
  .aoe-menubtn[aria-expanded="true"] .when-open { display: block; }
}
@media (max-width: 340px) { .aoe-brand__name { letter-spacing: .14em; font-size: 15px; } }

/* ============================================================
   6. THE MENU — everything used now and then, plus the two
      switches. Computer: a panel under the button.
      Phone: the whole screen under the header.
   ============================================================ */
.aoe-menu { position: absolute; top: calc(100% + 3px); right: max(var(--space-4), calc((100% - var(--width-page)) / 2 + var(--space-4))); width: 380px; max-height: calc(100vh - 100px); overflow: auto; background: var(--card); color: var(--ink); border: 1px solid var(--hair); border-top: 0; box-shadow: var(--shadow-card); padding: 6px 22px 22px; z-index: 75; }
.aoe-menu[hidden] { display: none; }
.aoe-menu__link { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 19px; line-height: 1.25; }
.aoe-menu__link::after { content: "\2192"; font-family: var(--font-sans); font-size: 17px; color: var(--gold-text); }
.aoe-menu__link:hover { color: var(--ink); background: var(--row); }
.aoe-menu__set { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.aoe-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 16px; }
.aoe-menu__head { margin-top: 8px; }
@media (max-width: 760px) {
  .aoe-menu { position: fixed; top: 63px; left: 0; right: 0; bottom: 0; width: auto; max-height: none; border: 0; box-shadow: none; padding: 6px 18px 28px; overscroll-behavior: contain; }
  body.has-tabs .aoe-menu { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .aoe-menu__link { min-height: 58px; font-size: 22px; }
  .aoe-menu__link::after { font-size: 18px; }
  .aoe-menu__set { margin-top: 22px; gap: 14px; }
}

/* ============================================================
   7. NOTICE — the newest noticeboard item, one line
   ============================================================ */
.aoe-notice { background: var(--card); border-bottom: 1px solid var(--hair); }
.aoe-notice[hidden] { display: none; }
.aoe-notice__in { display: flex; align-items: center; gap: var(--space-2) var(--space-3); flex-wrap: wrap; max-width: var(--width-page); margin: 0 auto; padding: 10px var(--space-4); font-size: 14px; line-height: 1.55; }
.aoe-notice__in p { flex: 1 1 260px; min-width: 0; }
.aoe-notice__in p b { font-weight: 700; }
.aoe-notice__in a { color: var(--gold-text); font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) { .aoe-notice__in { padding: 10px 14px; } }

/* ============================================================
   8. HERO — light brown, the owl, one heading, two buttons
   ============================================================ */
.aoe-hero { background: var(--hero-bg); color: var(--hero-text); border-bottom: 1px solid var(--hair); }
.aoe-hero__in { max-width: var(--width-page); margin: 0 auto; padding: 80px var(--space-4) 150px; text-align: center; }
.aoe-hero__owl { width: 120px; height: 120px; margin: 0 auto 26px; border-radius: 50%; border: 6px solid var(--hero-text); box-sizing: content-box; }
.aoe-hero .aoe-label { font-size: 12px; font-weight: 500; color: var(--hero-label); }
.aoe-hero h1 { margin: 18px auto 0; max-width: 18ch; font-size: clamp(40px, 5.2vw, 64px); line-height: 1.08; color: var(--hero-text); text-wrap: balance; }
.aoe-hero h1 span { color: var(--hero-word); border-bottom: 4px solid var(--hero-word); }
.aoe-hero__lede { margin: 24px auto 0; max-width: 54ch; font-size: 18px; color: var(--hero-text); }
.aoe-hero__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.aoe-hero :focus-visible { outline-color: var(--hero-label); }
@media (max-width: 760px) {
  .aoe-hero__in { padding: 24px 18px 72px; }
  .aoe-hero__owl { width: 64px; height: 64px; margin-bottom: 14px; border-width: 4px; }
  .aoe-hero .aoe-label { font-size: 11px; letter-spacing: .16em; }
  .aoe-hero h1 { margin-top: 12px; font-size: 34px; line-height: 1.12; }
  .aoe-hero h1 span { border-bottom-width: 3px; }
  .aoe-hero__lede { margin-top: 16px; font-size: 16px; }
  .aoe-hero__acts { flex-direction: column; gap: 10px; margin-top: 22px; }
  .aoe-hero__acts .aoe-btn { width: 100%; }
}

/* ============================================================
   9. WAYS IN — phone only: the three portals in one card,
      overlapping the bottom of the hero
   ============================================================ */
.aoe-ways { display: none; }
@media (max-width: 760px) {
  .aoe-ways { display: block; position: relative; margin: -48px 14px 0; background: var(--card); border: 1px solid var(--hair); border-top: 4px solid var(--ink); box-shadow: var(--shadow-card); padding: 14px 8px 16px; }
  .aoe-ways > .aoe-label { margin: 0 0 12px; text-align: center; letter-spacing: .16em; }
  .aoe-ways__row { display: flex; }
  .aoe-ways__row a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 6px; text-align: center; color: var(--ink); text-decoration: none; }
  .aoe-ways__row a + a { border-left: 1px solid var(--hair); }
  .aoe-ways__row svg { width: 28px; height: 28px; color: var(--gold-text); }
  .aoe-ways__who { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); }
  .aoe-ways__name { font-family: var(--font-display); font-size: 17px; line-height: 1.2; }
}

/* ============================================================
   10. THE THREE DOORS — Learners Portal, Teacher Portal, Guides
   ============================================================ */
.aoe-doors { position: relative; margin-top: -96px; scroll-margin-top: 100px; }
.aoe-doors__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.aoe-door { display: flex; flex-direction: column; gap: 10px; min-width: 0; background: var(--card); border: 1px solid var(--hair); border-top: 4px solid var(--ink); box-shadow: var(--shadow-card); padding: 34px 30px 30px; scroll-margin-top: 100px; }
.aoe-door__top { display: flex; flex-direction: column; gap: 16px; }
.aoe-door__top svg { width: 30px; height: 30px; color: var(--gold-text); flex: 0 0 auto; }
.aoe-door__who { font-family: var(--font-mono); font-size: 11px; line-height: 1.6; letter-spacing: .2em; text-transform: uppercase; color: var(--muted2); }
.aoe-door h2 { font-size: 28px; line-height: 1.2; margin-top: 4px; }
.aoe-door__say { font-size: 15px; line-height: 1.6; }
.aoe-door ul { margin: 6px 0 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--muted2); }
.aoe-door li { padding: 3px 0; }
.aoe-door__go { margin-top: auto; padding-top: 16px; display: inline-flex; gap: 6px; align-self: flex-start; font-weight: 700; font-size: 15px; color: var(--gold-text); text-underline-offset: 4px; }
.aoe-door__go:hover { color: var(--ink); }
@media (min-width: 761px) and (max-width: 957px) {
  .aoe-doors__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aoe-door:last-child { grid-column: 1 / -1; }
}
.aoe-new { margin-top: 22px; padding: 22px 30px; background: var(--card); border: 1px solid var(--hair); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; }
.aoe-new > div { flex: 1 1 360px; min-width: 0; }
.aoe-new h2 { font-size: 24px; line-height: 1.25; }
.aoe-new p { margin-top: 4px; font-size: 17px; line-height: 1.6; }
@media (max-width: 760px) {
  .aoe-doors { margin-top: 28px; scroll-margin-top: 72px; }
  .aoe-doors__grid { grid-template-columns: 1fr; gap: 12px; }
  .aoe-door { padding: 18px 18px 16px; gap: 0; scroll-margin-top: 72px; }
  .aoe-door__top { flex-direction: row; align-items: center; gap: 12px; }
  .aoe-door__top svg { width: 28px; height: 28px; }
  .aoe-door__who { letter-spacing: .16em; }
  .aoe-door h2 { font-size: 23px; margin-top: 2px; }
  .aoe-door__say { margin-top: 10px; line-height: 1.55; }
  .aoe-door ul { display: none; }
  .aoe-door__go { margin-top: 12px; padding: 0 14px; min-height: 44px; align-self: stretch; align-items: center; justify-content: space-between; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; }
  .aoe-new { margin-top: 12px; padding: 18px; }
  .aoe-new > div { flex-basis: 100%; }
  .aoe-new h2 { font-size: 22px; }
  .aoe-new p { font-size: 16px; }
  .aoe-new .aoe-btn { width: 100%; }
}

/* ============================================================
   11. SECTIONS
   ============================================================ */
.aoe-section { margin-top: 88px; scroll-margin-top: 100px; }
.aoe-section--last { margin-bottom: 88px; }
.aoe-section__say { margin-top: 10px; max-width: 60ch; font-size: 15px; color: var(--muted2); }
@media (max-width: 760px) {
  .aoe-section { margin-top: 34px; scroll-margin-top: 72px; }
  .aoe-section--last { margin-bottom: 34px; }
}

/* ============================================================
   12. PLACEMENT TEST — sand band, figures on dark brown
   ============================================================ */
.aoe-test { display: flex; flex-wrap: wrap; background: var(--tint-bg); color: var(--tint-text); border: 1px solid var(--tint-line); border-top: 3px solid var(--gold-text); }
.aoe-test__say { flex: 3 1 420px; padding: 52px 48px; min-width: 0; }
.aoe-test .aoe-label { color: var(--tint-label); }
.aoe-test h2 { margin-top: 12px; font-size: 38px; line-height: 1.15; color: var(--tint-text); }
.aoe-test__say > p:not(.aoe-label) { margin-top: 16px; max-width: 48ch; }
.aoe-test__say .aoe-btn { margin-top: 30px; }
.aoe-test__nums { flex: 2 1 300px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-content: center; padding: 52px 48px; background: var(--fig-bg); }
.aoe-test__nums b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 60px; line-height: 1; color: var(--fig-num); }
.aoe-test__nums span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--fig-text); }
@media (max-width: 760px) {
  .aoe-test { display: block; }
  .aoe-test__say { padding: 22px 18px 20px; }
  .aoe-test .aoe-label { letter-spacing: .16em; }
  .aoe-test h2 { margin-top: 8px; font-size: 26px; line-height: 1.18; }
  .aoe-test__say > p:not(.aoe-label) { margin-top: 10px; font-size: 15px; line-height: 1.55; }
  .aoe-test__say .aoe-btn { margin-top: 16px; width: 100%; }
  .aoe-test__nums { gap: 10px; padding: 16px 18px; }
  .aoe-test__nums b { font-size: 36px; }
  .aoe-test__nums span { margin-top: 6px; font-size: 13px; line-height: 1.35; }
}

/* ============================================================
   13. SUBJECTS — one fold per exam board, a row per subject
   ============================================================ */
.aoe-groups { margin-top: 30px; border-bottom: 1px solid var(--ink); }
.aoe-group { border-top: 1px solid var(--ink); }
.aoe-group > summary { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding: 18px 0; cursor: pointer; list-style: none; }
.aoe-group > summary::-webkit-details-marker { display: none; }
.aoe-group > summary::after { content: "+"; margin-left: auto; font-size: 24px; line-height: 1; color: var(--gold-text); }
.aoe-group[open] > summary::after { content: "\2212"; }
.aoe-group > summary:hover .aoe-group__name { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.aoe-group__name { font-family: var(--font-display); font-size: 23px; line-height: 1.2; color: var(--ink); }
.aoe-group__count { font-family: var(--font-mono); font-size: 11px; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: var(--muted2); }
.aoe-group__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 44px; padding: 0 0 22px; }
.aoe-subj { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.5; min-width: 0; }
.aoe-subj:hover { color: var(--ink); background: var(--row); }
.aoe-subj:hover .aoe-subj__name { text-decoration: underline; text-underline-offset: 3px; }
.aoe-subj__code { min-width: 72px; font-family: var(--font-mono); font-size: 12px; color: var(--gold-text); }
.aoe-subj__name { flex: 1 1 auto; min-width: 0; }
.aoe-subj__kind { font-size: 13px; color: var(--muted2); white-space: nowrap; }
@media (max-width: 760px) {
  .aoe-groups { margin-top: 14px; }
  .aoe-group > summary { align-items: center; gap: 4px 10px; min-height: 52px; padding: 8px 0; }
  .aoe-group__name { font-size: 20px; }
  .aoe-group__count { letter-spacing: .1em; }
  .aoe-group__list { grid-template-columns: 1fr; padding-bottom: 8px; }
  .aoe-subj { gap: 12px; min-height: 44px; padding: 10px 0; }
  .aoe-subj__code { min-width: 70px; }
  .aoe-subj__kind { font-size: 12px; }
}

/* ============================================================
   14. PRICES — what it costs, before an account
   ============================================================ */
.aoe-prices { display: flex; flex-wrap: wrap; background: var(--card); border: 1px solid var(--hair); }
.aoe-prices__say { flex: 2 1 380px; min-width: 0; padding: 44px 40px; background: var(--fig-bg); color: var(--fig-text); }
.aoe-prices__say .aoe-label { color: var(--fig-num); }
.aoe-prices__say h2 { margin-top: 10px; font-size: 30px; line-height: 1.2; color: var(--fig-text); }
.aoe-prices__say > p:not(.aoe-label) { margin-top: 14px; font-size: 15px; color: var(--fig-text); }
.aoe-prices__acts { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.aoe-prices__acts .aoe-btn { background: var(--fig-text); border-color: var(--fig-text); color: var(--fig-bg); }
.aoe-prices__acts .aoe-btn:hover { background: transparent; color: var(--fig-text); }
.aoe-prices__acts .aoe-link { color: var(--fig-num); }
.aoe-prices__acts .aoe-link:hover { color: var(--fig-text); }
.aoe-prices :focus-visible { outline-color: var(--fig-num); }
.aoe-prices__opts { flex: 3 1 420px; min-width: 0; padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px; align-content: center; }
.aoe-prices__opts > div { border-top: 3px solid var(--ink); padding-top: 14px; }
.aoe-prices__opts h3 { font-size: 22px; color: var(--ink); }
.aoe-prices__opts p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--ink); }
@media (max-width: 760px) {
  .aoe-prices { display: block; }
  .aoe-prices__say { padding: 22px 18px 20px; }
  .aoe-prices__say .aoe-label { letter-spacing: .16em; }
  .aoe-prices__say h2 { margin-top: 8px; font-size: 24px; }
  .aoe-prices__acts { margin-top: 16px; flex-direction: column; align-items: stretch; gap: 10px; }
  .aoe-prices__acts .aoe-link { text-align: center; padding: 4px 0; }
  .aoe-prices__opts { display: block; padding: 6px 18px 4px; }
  .aoe-prices__opts > div { border-top: 0; padding: 12px 0; }
  .aoe-prices__opts > div + div { border-top: 1px solid var(--hair); }
  .aoe-prices__opts h3 { font-size: 19px; }
  .aoe-prices__opts p { margin-top: 2px; font-size: 14px; line-height: 1.5; }
}

/* ============================================================
   15. ALSO AT AOE — three quiet links
   ============================================================ */
.aoe-also { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.aoe-also a { display: block; padding: 6px 30px; color: var(--ink); text-decoration: none; }
.aoe-also a:first-child { padding-left: 0; }
.aoe-also a:last-child { padding-right: 0; }
.aoe-also a + a { border-left: 1px solid var(--hair); }
.aoe-also b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.25; }
.aoe-also span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--muted2); }
.aoe-also a:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 760px) {
  .aoe-also { display: block; border-top: 1px solid var(--ink); }
  .aoe-also a, .aoe-also a:first-child, .aoe-also a:last-child { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0; border-left: 0; border-bottom: 1px solid var(--hair); }
  .aoe-also a::after { content: "\2192"; color: var(--gold-text); }
  .aoe-also b { font-family: var(--font-sans); font-size: 16px; }
  .aoe-also span { display: none; }
}

/* ============================================================
   16. CONTACT — WhatsApp first, the form folded under it
   ============================================================ */
.aoe-contact { text-align: center; padding: 52px 22px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hair); }
.aoe-contact h2 { margin-top: 10px; font-size: 36px; line-height: 1.15; }
.aoe-contact > p:not(.aoe-label) { margin: 14px auto 0; max-width: 52ch; color: var(--muted2); }
.aoe-contact__acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px; margin-top: 26px; }
.aoe-contact__form > summary { list-style: none; }
.aoe-contact__form > summary::-webkit-details-marker { display: none; }
.aoe-contact__form[open] { flex: 1 1 100%; }
.aoe-contact__form[open] > summary { display: inline-flex; }
.aoe-contact__form > .aoe-form { margin: 26px auto 0; max-width: 760px; text-align: left; }
.aoe-contact__mail { margin-top: 18px !important; font-size: 14px; color: var(--muted2) !important; }
.aoe-contact__mail a { color: var(--muted2); }
@media (max-width: 760px) {
  .aoe-contact { padding: 30px 0; }
  .aoe-contact h2 { margin-top: 6px; font-size: 26px; line-height: 1.2; }
  .aoe-contact > p:not(.aoe-label) { margin-top: 6px; font-size: 15px; }
  .aoe-contact__acts { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 14px; }
  .aoe-contact__acts > .aoe-btn, .aoe-contact__form > summary { width: 100%; }
}

.aoe-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.aoe-form > .aoe-field--full, .aoe-form > .aoe-full { grid-column: 1 / -1; }
@media (max-width: 560px) { .aoe-form { grid-template-columns: 1fr; gap: 18px; } }
.aoe-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aoe-field > label { font-family: var(--font-mono); font-size: 11px; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.aoe-field input, .aoe-field select, .aoe-field textarea { width: 100%; font-family: var(--font-sans); font-size: 16px; line-height: 1.4; color: var(--ink); background: var(--raised); border: 1px solid var(--tint-line); border-radius: var(--radius-btn); padding: 13px 14px; }
.aoe-field textarea { min-height: 130px; resize: vertical; }
.aoe-field input::placeholder, .aoe-field textarea::placeholder { color: var(--muted); }
.aoe-field input:focus-visible, .aoe-field select:focus-visible, .aoe-field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.aoe-field input[aria-invalid="true"], .aoe-field textarea[aria-invalid="true"] { border-color: var(--wrong); background: var(--wrong-soft); }
.aoe-telrow { display: flex; }
.aoe-telrow select { flex: 0 0 auto; width: auto; min-width: 104px; border-right: 0; border-radius: var(--radius-btn) 0 0 var(--radius-btn); font-family: var(--font-mono); font-size: 15px; }
.aoe-telrow input { flex: 1 1 auto; border-radius: 0 var(--radius-btn) var(--radius-btn) 0; min-width: 0; }
.aoe-form__send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-status { min-height: 24px; font-size: 15px; line-height: 1.5; color: var(--muted2); }
.form-status.ok { color: var(--correct); }
.form-status.err { color: var(--wrong); }
.aoe-footnote { font-size: 13px; line-height: 1.5; color: var(--muted2); }
.fielderr { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--wrong); }
@media (max-width: 560px) { .aoe-form__send .aoe-btn { width: 100%; } }

/* ============================================================
   17. TAG (the noticeboard label)
   ============================================================ */
.aoe-tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; padding: 2px 9px; border: 1px solid var(--tint-line); color: var(--ink); background: transparent; white-space: nowrap; }
.aoe-tag--gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* ============================================================
   18. FOOTER — one line of the rarely used
   ============================================================ */
.aoe-footer { border-top: 1px solid var(--hair); }
.aoe-footer__in { max-width: var(--width-page); margin: 0 auto; padding: 34px var(--space-4); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; font-size: 14px; color: var(--muted2); }
.aoe-footer__in a { color: var(--muted2); text-decoration: none; }
.aoe-footer__in a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.aoe-footer__gap { flex: 1 1 auto; }
.aoe-tagline { font-family: var(--font-script); font-size: 18px; line-height: 1.4; color: var(--gold-text); }
@media (max-width: 760px) {
  .aoe-footer__in { padding: 26px 14px; gap: 8px 20px; }
  .aoe-footer__gap { flex-basis: 100%; height: 0; }
}

/* ============================================================
   19. THE PHONE BOTTOM BAR (built by aoe-tabs.js)
   ============================================================ */
.aoe-tabs { display: none; }
@media (max-width: 760px) {
  .aoe-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--card); border-top: 1px solid var(--hair); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.has-tabs { padding-bottom: 64px; }
}
@media (display-mode: standalone) {
  .aoe-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--card); border-top: 1px solid var(--hair); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.has-tabs { padding-bottom: 64px; }
}
.aoe-tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 2px 6px; min-height: 63px; color: var(--muted2); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.aoe-tabs a:active { background: var(--row); }
.aoe-tabs svg { width: 22px; height: 22px; }
.aoe-tabs span { font-family: var(--font-mono); font-size: 11px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.aoe-tabs a.on, .aoe-tabs a[aria-current="page"] { color: var(--ink); }
.aoe-tabs a.on svg { stroke-width: 2; }
.aoe-tabs a.on::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--ink); }
.aoe-tabs :focus-visible { outline-color: var(--focus); outline-offset: -3px; }

/* ============================================================
   20. THE TWO SWITCHES (built by aoe-theme.js and i18n.js)
   ============================================================ */
.aoe-pill, #aoe-lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; margin: 0; background: var(--raised); border: 1px solid var(--tint-line); border-radius: var(--radius-pill); flex: 0 0 auto; }
.aoe-pill button, #aoe-lang button { border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; padding: 5px 15px; min-height: 34px; }
#aoe-lang button[data-l="zh"] { font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; }
.aoe-pill button:hover:not(.on), #aoe-lang button:hover:not(.on) { background: var(--row); }
.aoe-pill button.on, #aoe-lang button.on { background: var(--btn-bg); color: var(--btn-text); font-weight: 500; }
.aoe-pill-float { position: fixed; right: 18px; bottom: 18px; z-index: 85; }
@media print { .aoe-pill, #aoe-lang, .aoe-tabs, .aoe-menubtn, .aoe-menu { display: none !important; } }

/* ============================================================
   21. FIRST-VISIT LANGUAGE CHOOSER AND THE "ENGLISH ONLY" BAR
       (both built by i18n.js)
   ============================================================ */
.lang-veil { position: fixed; inset: 0; z-index: 900; background: rgba(23, 20, 16, .82); display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.lang-veil.gone { opacity: 0; transition: opacity .25s ease; }
.lang-box { background: var(--card); color: var(--ink); border-top: 3px solid var(--ink); max-width: 460px; width: 100%; padding: 38px 34px 30px; text-align: center; }
.lang-brand { font-family: var(--font-display); font-size: 15px; letter-spacing: .34em; color: var(--gold-text); margin: 0 0 18px; }
.lang-box h2 { font-size: 24px; line-height: 1.35; margin: 0 0 24px; }
.lang-box h2 span { color: var(--muted2); font-size: 21px; }
.lang-pick { display: grid; gap: 12px; }
.lang-pick button { background: var(--page); border: 1px solid var(--hair); padding: 16px 18px; cursor: pointer; font-family: var(--font-sans); text-align: left; color: var(--ink); }
.lang-pick button:hover { border-color: var(--ink); }
.lang-pick b { display: block; font-size: 18px; color: var(--ink); }
.lang-pick small { display: block; font-size: 13px; color: var(--muted2); margin-top: 3px; }
.lang-note { margin-top: 22px; font-size: 12px; line-height: 1.6; color: var(--muted2); }
@media (max-width: 420px) { .lang-box { padding: 30px 22px 24px; } }
#aoe-partial { background: var(--tint-bg); color: var(--tint-text); text-align: center; padding: 9px 16px; font-size: 13px; line-height: 1.5; }
#aoe-partial a { color: var(--tint-text); font-weight: 700; margin-left: 8px; }

/* ============================================================
   22. SMALL HELPERS BUILT BY aoe-app.js AND aoe-install.js
   ============================================================ */
.aoe-skip { position: fixed; left: -9999px; top: 0; z-index: 999; background: var(--ink); color: var(--page); font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 12px 18px; text-decoration: none; }
.aoe-skip:focus, .aoe-skip:focus-visible { left: 0; top: 0; }
[data-tip] { position: relative; }
.aoe-tip { position: fixed; z-index: 200; background: var(--ink); color: var(--page); font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; pointer-events: none; white-space: nowrap; opacity: 0; transition: opacity .12s ease; }
.aoe-tip.on { opacity: 1; }
.aoe-toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 10px 16px; font-size: 14px; opacity: 0; pointer-events: none; z-index: 200; transition: opacity .18s ease; }
.aoe-toast.on { opacity: 1; }
@media (min-width: 901px) { .aoe-toast { bottom: 28px; } }
.aoe-line { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 300; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.aoe-line.on { opacity: 1; }
.aoe-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: -38%; width: 38%; background: var(--gold); animation: aoe-sweep 1.05s linear infinite; }
@keyframes aoe-sweep { from { left: -38%; } to { left: 100%; } }
.is-pressed { opacity: .85; }
.is-busy { pointer-events: none; opacity: .72; }
.is-busy::after { content: "\2026"; margin-left: 6px; }
.is-busy[data-busy-on]::after { content: none; }
.aoe-fresh { position: fixed; left: 12px; right: 12px; bottom: 74px; z-index: 90; background: var(--card); border: 1px solid var(--hair); padding: 12px 14px; font-size: 14px; line-height: 1.5; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-card); }
.aoe-fresh button { margin-left: auto; flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: var(--btn-bg); color: var(--btn-text); border: 0; padding: 10px 14px; cursor: pointer; }
@media (min-width: 761px) { .aoe-fresh { left: auto; right: 18px; bottom: 18px; max-width: 380px; } }
/* the install offer sits in the menu as a quiet block, not a big card */
.aoe-menu #aoe-install-slot:empty { display: none; }
.aoe-menu .aoe-inst { margin: var(--space-2) 0 0; padding: var(--space-3) 0 0; border: 0; border-top: 1px solid var(--hair); background: transparent; }
.aoe-menu .aoe-inst h3 { font-size: 17px; }
.aoe-menu .aoe-inst p, .aoe-menu .aoe-inst ol { font-size: 14px; }

/* ============================================================
   23. 中文 — no wide letter-spacing, a little more line height
   ============================================================ */
html.zh body { line-height: 1.8; }
html.zh .aoe-label, html.zh .aoe-tag, html.zh .aoe-group__count, html.zh .aoe-field > label,
html.zh .aoe-tabs span, html.zh .aoe-pill button, html.zh .aoe-door__who, html.zh .aoe-ways__who { letter-spacing: .04em; }
html.zh .aoe-hero h1 { max-width: 15em; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.25; }

/* ============================================================
   24. LESS MOTION WHEN ASKED
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aoe-btn, .aoe-tip, .aoe-toast, .aoe-line { transition: none; }
  .aoe-line::before { animation: none; left: 0; width: 100%; opacity: .55; }
}

