/* =====================================================================
   KhAI - site styles
   Colours, fonts and logo rules: KhAI Brand Guidelines v2 (Sep 2026).
   Layout: Linz's final design, 6 Oct 2026 (website/README.md, prompt 1).
   Mobile first. No frameworks, no external requests.
   ===================================================================== */

/* ---------- Fonts: self-hosted (Sora for headings, Switzer for text) ---------- */
@font-face { font-family: "Sora"; src: url("/assets/fonts/Sora-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/fonts/Sora-SemiBold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-LightItalic.otf") format("opentype"); font-weight: 300; font-style: italic; font-display: swap; }
/* The brand's real Switzer Bold for the **bold** mark-up in running text (Lindsay's rewrite, 17 Nov 2026:
   "AI literacy", "By the end:", the founder's note, the parents' accounts answer). A browser only downloads
   it on a page that uses bold text. The Clubhouse declared it first, in its own stylesheet. */
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --midnight: #1d004a;
  --amethyst: #64039c;
  --ivory: #fbf9f5;
  --honey: #ffa400;
  --lime: #90c235;
  --line: rgba(29, 0, 74, .22);         /* Midnight hairline on Ivory */
  --line-light: rgba(251, 249, 245, .28); /* Ivory hairline on Midnight */
  --k-opacity: .12;                       /* the faint K logomark */

  /* The diagonal on the home banner and the hub banners is the slash of the K in the logo:
     34.27 degrees off vertical (read from the supplied logomark). */
  --slash-angle: -34.27deg;
  --slash-k: .6815;                       /* tan of that angle */

  /* Khmer comes later: Noto Sans Khmer is the fallback for Khmer script */
  --font-head: "Sora", "Noto Sans Khmer", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Switzer", "Noto Sans Khmer", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-body: clamp(17px, .42vw + 15.5px, 20px);
  --fs-lead: clamp(19px, .55vw + 17px, 23px);
  --fs-small: clamp(15px, .2vw + 14.3px, 17px);
  --fs-h1: clamp(32px, 2.4vw + 23px, 54px);
  --fs-h2: clamp(24px, 1.1vw + 20px, 34px);
  --fs-h3: clamp(19px, .4vw + 17.5px, 23px);
  --fs-card-title: clamp(30px, 1.5vw + .8vh + 11px, 50px);
  --fs-card-teaser: clamp(18px, .35vw + .55vh + 12px, 25px);

  --lh-body: 1.6;
  --lh-head: 1.12;

  --header-h: 64px;
  --footer-h: 64px;                       /* the script sets the real height */
  --gutter: clamp(16px, 3.2vw, 48px);
  /* Home (computers): the Amethyst slash starts at the middle of the top edge and the header's
     "FAQs" link sits over it (Linz, 7 Oct 2026). The page has no fixed width: it grows with the window. */
  --home-slash-x: 50vw;
  --home-stripe: clamp(54px, 6.4vw, 108px);
  --measure: 68ch;                        /* line length of body text inside the Ivory card */
  --sheet-pad: clamp(22px, 5.6vw, 80px);
  --space-section: clamp(44px, 5vw, 72px);
  --radius-button: 8px;                   /* buttons are the only rounded shapes */
  color-scheme: light;
}
@media (min-width: 48em) { :root { --header-h: 72px; } }

/* Very small phones (under 360px): a little less padding so lines are not cut short */
@media (max-width: 22.49em) {
  :root { --gutter: 12px; --sheet-pad: 18px; --fs-lead: 18px; }
}

/* Khmer script needs taller lines and no tight letter-spacing */
:root:lang(km) { --lh-body: 1.9; --lh-head: 1.45; }
:lang(km) h1, :lang(km) h2, :lang(km) h3, :lang(km) .card__title { letter-spacing: 0; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--amethyst);
  color: var(--midnight);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  line-height: var(--lh-head);
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
p, li, figcaption { text-wrap: pretty; }
summary { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--midnight); outline-offset: 3px; }
::selection { background: var(--honey); color: var(--midnight); }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ivory);
  color: var(--midnight);
  font: 600 16px/1.2 var(--font-head);
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; outline: 3px solid var(--honey); outline-offset: 2px; }

.icon { display: block; width: 100%; height: 100%; }

/* ---------- Buttons: rounded, Sora Bold, Midnight on Honey (as in the guidelines' sample) ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px 11px;
  border-radius: var(--radius-button);
  background: var(--honey);
  color: var(--midnight);
  font: 700 clamp(15px, .2vw + 14.4px, 17px)/1.2 var(--font-head);
  letter-spacing: .03em;
  text-transform: uppercase;         /* capitals come from here: the words in the content files stay as written */
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { box-shadow: inset 0 0 0 3px var(--midnight); }   /* hover: a Midnight outline, never a lighter Honey */
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid var(--ivory); outline-offset: 4px; }
.button--on-light:focus-visible { outline-color: var(--midnight); }
:lang(km) .button { text-transform: none; letter-spacing: 0; }

/* ---------- Header: Midnight band, Ivory text ---------- */
.site-header { position: relative; z-index: 20; background: var(--midnight); color: var(--ivory); }
.site-header :focus-visible { outline-color: var(--honey); }
.site-header__inner {
  position: relative;
  min-height: var(--header-h);
  margin-inline: auto;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Logomark clearspace: at least half its height on every side */
.site-logo { flex: none; display: inline-flex; padding: 4px; margin-right: 12px; }
.site-logo__mark { width: auto; height: 28px; }

.site-nav { flex: 1; display: flex; justify-content: flex-end; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid var(--ivory);
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  font: 600 16px/1 var(--font-head);
  cursor: pointer;
}
.menu-toggle[aria-expanded="true"] { background: var(--ivory); color: var(--midnight); }
.site-nav__list { display: none; margin: 0; padding: 0; list-style: none; }
.site-nav.is-open .site-nav__list {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 6px var(--gutter) 18px;
  background: var(--midnight);
  border-top: 1px solid var(--line-light);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .7);
}
.site-nav__list a {
  display: block;
  padding: 12px 0;
  font: 600 18px/1.3 var(--font-head);
  text-decoration: none;
}
.site-nav__list a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--honey);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
}

.lang-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 44px;
}
.lang-switch img { width: auto; height: 24px; box-shadow: 0 0 0 1px rgba(251, 249, 245, .55); }

@media (min-width: 48em) {
  .site-header__inner { gap: clamp(16px, 2vw, 28px); }
  .site-logo { margin-right: clamp(6px, 1.4vw, 20px); }
  .site-logo__mark { height: 32px; }
  .site-nav { justify-content: flex-start; }
  .menu-toggle { display: none; }
  .site-nav__list,
  .site-nav.is-open .site-nav__list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    position: static;
    gap: 0 clamp(16px, 2.4vw, 38px);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-nav__list a {
    padding: 10px 0 7px;
    font-size: clamp(15px, .3vw + 13px, 17px);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
  }
  .site-nav__list a:hover { border-bottom-color: var(--lime); }
  .site-nav__list a[aria-current],
  .site-nav__list a[aria-current]:hover { text-decoration: none; border-bottom-color: var(--honey); }
}

/* Home page, computers: K, Home, About, How it works, Club members and FAQs are spread evenly from the
   left margin to the top of the Amethyst slash, so "FAQs" sits over the slash at every width; the flag
   stays at the far right. The links become direct children of the header row for the spacing only. */
@media (min-width: 60em) {
  /* the row ends half a "FAQs" past the middle of the stripe's top, so the word is centred over it */
  .is-home .site-header__inner { justify-content: space-between; padding-right: calc(var(--home-slash-x) - var(--home-stripe) / 2 - 1.3 * clamp(15px, .3vw + 13px, 17px)); }
  .is-home .site-logo { margin-right: 0; }
  .is-home .site-nav, .is-home .site-nav__list { display: contents; }
  .is-home .lang-switch { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); }
}

/* Home page: the Clubhouse link is Lime, the footer's colour, so it stands out (Linz, 1 Nov 2026).
   Lime on Midnight reads at 8.65:1. Other pages keep it Ivory like the rest of the menu. */
.is-home .site-nav__clubhouse { color: var(--lime); }

/* ---------- Footer: Lime bar, Midnight words, the email in Amethyst (Linz, 7 Oct 2026). With the
   script it pops up when the visitor moves and slips away when they are still; without it, it is an
   ordinary footer. ---------- */
.site-footer { background: var(--lime); color: var(--midnight); border-top: 4px solid var(--amethyst); }
.site-footer :focus-visible { outline-color: var(--midnight); }
.site-footer__inner {
  min-height: 56px;
  margin-inline: auto;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.site-footer__cta {
  text-align: right;
  font: 600 clamp(16px, .3vw + 14.8px, 18px)/1.45 var(--font-head);
  text-wrap: balance;
}
.site-footer__cta a {
  display: inline-block;
  padding: 5px 0;                 /* a comfortable target for a thumb */
  color: var(--amethyst);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.site-footer__cta a:hover { text-decoration-thickness: 3px; }

.has-popup-footer { scroll-padding-bottom: calc(var(--footer-h) + 16px); }
/* room at the end of every page, so the last lines are never under the bar */
.has-popup-footer body { padding-bottom: var(--footer-h); }
.has-popup-footer body.is-home { padding-bottom: 0; }   /* the home banner keeps its own space clear instead */
.has-popup-footer .site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  transform: translateY(105%);
}
.has-popup-footer .site-footer.is-visible,
.has-popup-footer .site-footer:focus-within { transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .has-popup-footer .site-footer { transition: transform .34s cubic-bezier(.2, .75, .25, 1); }
}
/* Reduced motion: fade instead of sliding */
@media (prefers-reduced-motion: reduce) {
  .has-popup-footer .site-footer { transform: none; opacity: 0; pointer-events: none; transition: opacity .2s linear; }
  .has-popup-footer .site-footer.is-visible,
  .has-popup-footer .site-footer:focus-within { opacity: 1; pointer-events: auto; }
}

/* =====================================================================
   BANNERS: a photo, the Amethyst slash, a Midnight panel.
   Home mirrors the Facebook banner (photo left, panel right, fills the screen).
   Hub pages use the guidelines' sample layout (panel left with the heading, photo right).
   Phones: the photo sits on top and the slash crosses between photo and panel.
   ===================================================================== */
.banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--midnight);
  color: var(--ivory);
  --photo-h: clamp(200px, 38vh, 400px);
  --rise: 17vw;
  --band: clamp(16px, 5vw, 34px);
}
.banner :focus-visible { outline-color: var(--honey); }
.banner__photo { order: -1; flex: none; height: var(--photo-h); background: var(--midnight); }
.banner__img { width: 100%; height: 100%; object-fit: cover; }
.banner__slash {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: calc(var(--photo-h) - var(--rise) - var(--band));
  height: calc(var(--rise) + var(--band) + 1px);
  background: var(--midnight);
  clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%);
}
.banner__slash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amethyst);
  clip-path: polygon(0 var(--rise), 100% 0, 100% var(--band), 0 calc(var(--rise) + var(--band)));
}
.banner__panel { position: relative; z-index: 2; }

/* ---- Home ---- */
.banner--home {
  flex: 1;
  /* The lockup's clearspace is half its height on every side (brand guidelines) */
  --lockup-w: min(64vw, 340px);
  --lockup-h: calc(var(--lockup-w) * .3612);
  --lockup-c: calc(var(--lockup-h) / 2);
}
.banner--home .banner__img { object-position: 100% 0; }   /* pinned to its top right corner: the main student's half face and the half-cut shirt writing always show (Linz, 7 Oct 2026, second round) */
.banner--home .banner__panel {
  flex: 1;
  display: flex;
  align-items: center;
  padding: max(var(--lockup-c), 34px) var(--gutter) calc(var(--footer-h) + 30px) max(var(--gutter), var(--lockup-c));
}
.banner__content { width: 100%; }
.banner__logo { margin: 0; }
.lockup { width: var(--lockup-w); height: auto; }
.banner__line {
  margin-top: max(var(--lockup-c), 26px);
  color: var(--honey);
  font: 700 clamp(22px, 1.25vw + 17px, 36px)/1.2 var(--font-head);
  letter-spacing: -.015em;
  text-wrap: balance;
}
.banner__actions { margin-top: clamp(18px, 2.2vh, 26px); }
/* The photo credit: small plain text, no box, no link (Linz, 7 Oct 2026). On Meet the team it sits under
   Serey's photo. On the home page it sits at the top left of the photo itself (Linz, 11 Oct 2026). */
.photo-credit { margin: clamp(22px, 3vh, 34px) 0 0; font-size: 14px; line-height: 1.4; font-style: italic; font-weight: 300; }
.photo-credit--on-light { margin: 8px 0 0; color: var(--midnight); }
/* The home credit on the photo: Midnight, because that corner of the picture is a pale wall on computers
   and phones (the contrast against the real photo pixels is measured by tools/a11y_checks.js, section 8).
   On tablets the photo shows more of its left-hand side, and the dark edge of a laptop passes under the
   letters, so there a faint Ivory glow sits behind them: still plain text, no box. */
.banner__photo .photo-credit--on-photo {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 1;
  max-width: calc(100% - 2 * var(--gutter));
  margin: 0;
  color: var(--midnight);
}
@media (min-width: 48em) and (max-width: 59.99em) {
  .banner__photo .photo-credit--on-photo { text-shadow: 0 0 2px var(--ivory), 0 0 5px var(--ivory), 0 0 9px var(--ivory); }
}
/* A small Midnight tab on the corner of a photo: says when a picture was made with AI, and
   carries the credit link when a photo's licence asks for one (caption style: Switzer Light
   Italic). Text never sits on a photo without this solid panel behind it. */
.banner__photo { position: relative; }
.credit {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  max-width: min(82%, 31rem);
  margin: 0;
  padding: 7px 14px 8px var(--gutter);
  background: var(--midnight);
  color: var(--ivory);
  font-size: 14px;
  line-height: 1.4;
  font-style: italic;
  font-weight: 300;
  text-wrap: balance;
}
.credit a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.credit a:hover { text-decoration-color: var(--honey); }
.banner--hub .credit { top: auto; left: auto; right: 0; bottom: 0; padding-left: 14px; }

@media (min-width: 60em) {
  .banner--home {
    display: block;
    min-height: calc(100dvh - var(--header-h));
    --hero-h: calc(100dvh - var(--header-h));
    --slash-x: var(--home-slash-x);                /* the photo's diagonal edge starts at the middle of the top edge */
    --stripe: var(--home-stripe);
    --lockup-w: clamp(280px, min(29vw, 50vh), 500px);   /* a little smaller on short screens */
    --pad-top: max(44px, calc(var(--lockup-c) + 6px));
    --pad-bottom: calc(var(--footer-h) + 30px);
    /* rough height of the logo, line and button together, with room to spare (the credit line left the
       panel for the photo on 11 Oct 2026; the estimate is kept, so the text column starts where it did) */
    --block-h: calc(var(--lockup-h) * 1.5 + 190px);
    --y-top: calc(var(--pad-top) + (var(--hero-h) - var(--pad-top) - var(--pad-bottom) - var(--block-h)) / 2);
    /* The text column starts where the lockup's clearspace just clears the slash. Lower down the
       slash has moved left, so the column can start further left too (never less than zero). */
    --col-x: calc(var(--slash-x) + var(--stripe) + var(--lockup-c) - var(--slash-k) * max(0px, var(--y-top) - var(--lockup-c) - 48px));
  }
  .banner--home .banner__photo { position: absolute; inset: 0 auto 0 0; width: var(--slash-x); height: auto; overflow: hidden; }
  /* Linz, 11 Oct 2026: on computers the photo ends at her red line, 11.2% of the cut (361 of its 3224
     columns) short of the cut's right edge, so the strip between that line and the slash no longer shows.
     The cut file is unchanged (phones and tablets still show it whole): here the picture is drawn at the
     box's full height, pinned to its top right corner, then slid to the right by 11.2% of its own width,
     and that strip sits under the slash. Cropped, never stretched. The min-width keeps a very wide, short
     window from showing a gap at the left. */
  .banner--home .banner__img {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    height: 100%;
    min-width: calc(100% / .888);
    object-fit: cover;
    object-position: 100% 0;
    transform: translateX(11.2%);
  }
  .banner--home .banner__slash {
    top: 0;
    bottom: 0;
    left: var(--slash-x);
    right: auto;
    width: 220vmax;
    height: auto;
    clip-path: none;
    background: var(--midnight);
    border-left: var(--stripe) solid var(--amethyst);
    transform: skewX(var(--slash-angle));
    transform-origin: top left;
  }
  .banner--home .banner__slash::before { content: none; }
  /* left edge: clear of the slash; right edge: the lockup keeps its clearspace from the screen edge */
  .banner--home .banner__panel {
    min-height: calc(100dvh - var(--header-h));
    margin-left: clamp(calc(var(--slash-x) + var(--stripe) * .6), var(--col-x), calc(100vw - var(--lockup-w) - var(--lockup-c) - 2px));
    padding: var(--pad-top) var(--lockup-c) var(--pad-bottom) 0;
  }
}

/* ---- Hub pages ---- */
.hub { flex: 1; display: flex; padding: clamp(16px, 3vw, 40px) var(--gutter); }
.hub__inner {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vw, 24px);
}
.banner--hub { flex: none; --photo-h: clamp(104px, 28vw, 200px); --rise: 9vw; --band: clamp(10px, 3vw, 22px); }
.banner--hub .banner__panel { padding: clamp(14px, 3.4vw, 22px) clamp(20px, 5vw, 32px) clamp(20px, 5vw, 28px); }
.banner__title { font-size: clamp(28px, 2.1vw + 21px, 48px); }

@media (min-width: 60em) {
  /* The banner has a set height, but it may grow if a visitor enlarges the text or its spacing:
     the slash keeps its angle at any height, and nothing is ever cut off. */
  .banner--hub {
    display: block;
    min-height: var(--hub-h);
    --hub-h: clamp(132px, 14vw, 208px);
    --split: 57%;                                  /* where the photo's diagonal edge starts, at the top */
    --stripe: clamp(26px, 3vw, 42px);
    --dx: calc(var(--hub-h) * var(--slash-k));
  }
  /* the hub with a label above its heading (How it works, 17 Nov 2026): its three-line heading needs a little
     more Midnight, so the photo's diagonal edge starts a little further right */
  .banner--labelled { --split: 62%; }
  /* the photo reaches a little further left than the slash needs, so a taller banner still has no gap */
  .banner--hub .banner__photo { position: absolute; z-index: 0; inset: 0 0 0 auto; width: calc(100% - var(--split) + var(--dx) * 1.5); height: auto; }
  .banner--hub .banner__img { object-position: 100% 50%; }
  .banner--hub .banner__slash {
    top: 0;
    bottom: 0;
    left: -40%;
    right: auto;
    width: calc(40% + var(--split));
    height: auto;
    clip-path: none;
    background: var(--midnight);
    border-right: var(--stripe) solid var(--amethyst);   /* same colour as the page: reads as a cut */
    transform: skewX(var(--slash-angle));
    transform-origin: top right;
  }
  .banner--hub .banner__slash::before { content: none; }
  /* the heading's box ends where the Midnight panel is narrowest, so no line can reach the slash.
     Stacked (column), so a small label can sit above the heading (How it works, 17 Nov 2026). */
  .banner--hub .banner__panel {
    min-height: var(--hub-h);
    width: calc(var(--split) - var(--stripe) - var(--dx));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 12px 10px clamp(24px, 3.2vw, 44px);
  }
}

/* ---------- Small capitals label above a heading (Lindsay's rewrite, 17 Nov 2026) ----------
   "HOW KHAI WORKS" above the How it works hub heading and "WHAT WE BELIEVE" on the Mission page. One
   style; the colour follows the background: Amethyst on Ivory (9.9:1), Honey on Midnight (9.2:1). The words
   stay as written in the content file: the capitals come from here, like the buttons. A label, not a heading. */
.eyebrow {
  margin: 0 0 .6em;
  font: 600 var(--fs-small)/1.3 var(--font-head);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amethyst);
}
.banner .eyebrow { margin-bottom: .5em; color: var(--honey); }
:lang(km) .eyebrow { text-transform: none; letter-spacing: 0; }

/* =====================================================================
   CARDS: the three growing cards (kept exactly from the 4 Oct home page).
   Ivory, Midnight, Ivory. The whole card is one link. No buttons, no icons.
   ===================================================================== */
.cards {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
}
.card { position: relative; isolation: isolate; overflow: hidden; }
.card--link {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: clamp(24px, 2.8vw, 44px);
  background: var(--ivory);
  color: var(--midnight);
}
.card--midnight { background: var(--midnight); color: var(--ivory); }
.card__title {
  font-size: var(--fs-card-title);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.card__link { color: inherit; text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; }  /* stretches the link over the card */
/* Keyboard focus: a Honey ring around the whole card (drawn on the card, so it is never clipped) */
.card__link:focus-visible { outline: none; }
.card--link:focus-within { outline: 4px solid var(--honey); outline-offset: 4px; }
@supports selector(:has(*)) {
  .card--link:focus-within { outline: none; }
  .card--link:has(.card__link:focus-visible) { outline: 4px solid var(--honey); outline-offset: 4px; }
}
.card__title-text { position: relative; display: inline-block; padding-bottom: .3em; }
/* The Honey underline: the "this is clickable" cue. It grows on hover and focus. */
.card__title-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: var(--honey);
  transform: scaleX(.3);
  transform-origin: left center;
}
.card__teaser {
  margin-top: clamp(14px, 1.5vw, 22px);
  font-size: var(--fs-card-teaser);
  line-height: 1.5;
  text-wrap: balance;   /* short teasers in narrow cards: even lines, no stranded last words */
}
/* The large K: bottom right, partly cropped, behind the text (as in the mock-up) */
.card__k {
  position: absolute;
  right: -9%;
  bottom: -8%;
  z-index: -1;
  width: 62%;
  height: auto;
  opacity: var(--k-opacity);
  pointer-events: none;
}

@media (min-width: 48em) and (max-width: 59.99em) {
  .card--link { min-height: 300px; }
  .card__k { width: min(62%, 280px); }
}

@media (min-width: 60em) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 440px; }
  .card--link { min-height: 0; }
}

/* Hover and keyboard focus: the card grows and lifts above its neighbours (no layout shift) */
@media (prefers-reduced-motion: no-preference) {
  .card--link { transition: transform .28s cubic-bezier(.2, .75, .25, 1), box-shadow .28s ease; }
  .card__title-text::after { transition: transform .32s cubic-bezier(.2, .75, .25, 1); }
  .card--link:focus-within {
    z-index: 3;
    transform: scale(1.05);
    box-shadow: 0 24px 48px -20px rgba(29, 0, 74, .7);
  }
  .card--link:focus-within .card__title-text::after { transform: scaleX(1); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .card--link:hover {
    z-index: 3;
    transform: scale(1.05);
    box-shadow: 0 24px 48px -20px rgba(29, 0, 74, .7);
  }
  .card--link:hover .card__title-text::after { transform: scaleX(1); }
}
/* Reduced motion: no growing. The full underline and an outline show instead. */
@media (prefers-reduced-motion: reduce) {
  .card--link:hover .card__title-text::after,
  .card--link:focus-within .card__title-text::after { transform: none; }
  .card--link:hover { outline: 4px solid var(--honey); outline-offset: 4px; }
}
@media (hover: hover) and (pointer: fine) {
  .card--link { cursor: pointer; }
}

/* Small note under the cards (on Amethyst) */
.hub__note { color: var(--ivory); font-size: var(--fs-small); font-style: italic; font-weight: 300; margin: 0; }
.hub :focus-visible { outline-color: var(--honey); }

/* =====================================================================
   CARD PAGES: one large Ivory card on Amethyst, Midnight text,
   Honey and Lime accents, the faint K bottom right.
   ===================================================================== */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3.4vw, 52px) var(--gutter);
}
.sheet {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--sheet-pad));
  margin: auto;
  padding: var(--sheet-pad) var(--sheet-pad) calc(var(--sheet-pad) * 1.3);
  background: var(--ivory);
  color: var(--midnight);
}
.sheet__head { margin-bottom: clamp(26px, 3.2vw, 44px); }
/* The small link back to the hub, above the heading */
.sheet__back { margin-bottom: clamp(14px, 1.6vw, 20px); font: 600 var(--fs-small)/1.3 var(--font-head); }
.sheet__back a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  color: var(--amethyst);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.sheet__back a::before {
  content: "";
  flex: none;
  width: .5em;
  height: .5em;
  margin-left: 2px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
}
.sheet__back a:hover { text-decoration-color: var(--honey); text-decoration-thickness: 3px; }
.sheet__head h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 6px;
  margin-top: clamp(16px, 1.6vw, 22px);
  background: var(--honey);
}
.sheet__head .intro { margin: clamp(20px, 2vw, 28px) 0 0; text-wrap: balance; }   /* even lines under the heading, no lone "11-18+." (17 Nov 2026) */
.sheet__head .intro + .intro { margin-top: .85em; }   /* a two-paragraph intro (Levels, future leaders; 17 Nov 2026) */
/* A plain bulleted list inside running text (the parents' accounts answer, 17 Nov 2026) */
.list { margin: .85em 0; padding-left: 1.3em; }
.list li + li { margin-top: .3em; }
.sheet__k {
  position: absolute;
  right: -9%;
  bottom: 0;
  z-index: -1;
  width: min(62%, 520px);
  height: auto;
  transform: translateY(13%);
  opacity: var(--k-opacity);
  pointer-events: none;
}
.sheet--short .sheet__k { width: min(46%, 340px); }

.sheet p + p { margin-top: .85em; }
.sheet h2 { margin: 0 0 .55em; }
.block { margin-top: var(--space-section); }
.intro, .lead { font-size: var(--fs-lead); line-height: 1.5; }
.intro { margin-bottom: 1.1em; }
.sheet a:not([class]) {
  color: var(--amethyst);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.sheet a:not([class]):hover { text-decoration-color: var(--honey); text-decoration-thickness: 3px; }
.actions { margin-top: clamp(22px, 2.6vw, 30px); }

/* Content icons: Lime Material Symbols with no tile or box behind them (Linz, 7 Oct 2026). Decorative. */
.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(36px, 3.2vw, 44px);
  aspect-ratio: 1;
  color: var(--lime);
}
.tile .icon { width: 100%; height: 100%; }
.tile--large { width: clamp(64px, 7vw, 92px); }

/* What is KhAI?: Lindsay's story */
.story {
  padding: 2px 0 2px clamp(18px, 2.4vw, 30px);
  border-left: 6px solid var(--amethyst);
}
.story__heading { margin-bottom: .6em; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.01em; }
.sheet .story__heading { margin: 0 0 .6em; }
.story__body p { font-size: var(--fs-lead); line-height: 1.55; }
.story__signoff { margin-top: 1.1em; font-size: var(--fs-small); font-style: italic; font-weight: 300; }

/* What is KhAI?: the three selling points */
.points { margin: 1.4em 0 0; padding: 0; list-style: none; display: grid; gap: clamp(24px, 2.6vw, 32px); }
.point { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(14px, 1.8vw, 22px); align-items: start; }
.point h3 { margin: .1em 0 .3em; }
.point .tile { margin-top: .1em; }

/* What is KhAI?: sources */
.stats { display: grid; gap: 22px; margin-top: 1.6em; }
@media (min-width: 48em) { .stats { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; } }
.stat { margin: 0; padding-top: 16px; border-top: 4px solid var(--honey); }
.stat__text { font: 600 var(--fs-h3)/1.4 var(--font-head); letter-spacing: -.01em; }
.stat__source { margin-top: .6em; font-size: var(--fs-small); font-style: italic; font-weight: 300; }

/* Mission statement: the mission and the vision, set large */
.statement { margin-top: clamp(8px, 1vw, 14px); }
.sheet .statement__label { margin: 0 0 .7em; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.01em; color: var(--amethyst); }
.statement__text {
  font: 600 clamp(23px, 1.7vw + 16.5px, 40px)/1.28 var(--font-head);
  letter-spacing: -.02em;
  text-wrap: pretty;      /* long lines: no lone last word (balance stops working after a few lines) */
}
.statement--vision {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: var(--space-section);
  padding: clamp(24px, 4vw, 52px) clamp(22px, 3.8vw, 48px) clamp(30px, 4.6vw, 60px);
  background: var(--midnight);
  color: var(--ivory);
}
.sheet .statement--vision .statement__label { color: var(--honey); }
.statement__k {
  position: absolute;
  right: -6%;
  bottom: -14%;
  z-index: -1;
  width: min(42%, 300px);
  height: auto;
  opacity: var(--k-opacity);
  pointer-events: none;
}
.sheet--statement { padding-bottom: var(--sheet-pad); }

/* Mission page (Lindsay's rewrite, 17 Nov 2026): what we believe, four lines each on its own, with the Honey
   bar of the Levels outcomes; then the founder's note in the story style that opened What is KhAI? before. */
.beliefs { margin-top: var(--space-section); }
.beliefs__list { margin: 0; padding: 0; list-style: none; display: grid; gap: clamp(14px, 1.6vw, 20px); }
.beliefs__list li {
  padding-left: clamp(16px, 2vw, 22px);
  border-left: 4px solid var(--honey);
  font: 600 clamp(20px, .9vw + 17px, 28px)/1.3 var(--font-head);
  letter-spacing: -.015em;
  text-wrap: balance;
}
.founder { margin-top: var(--space-section); }
.story__signature { margin-top: 1.1em; }

/* Levels */
.levels { margin: 0; padding: 0; list-style: none; display: grid; gap: 28px; }
@media (min-width: 56em) { .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); } }
.level { display: flex; flex-direction: column; gap: .55em; padding-top: 16px; border-top: 4px solid var(--midnight); }
.sheet .level__name { margin: 0; font-size: var(--fs-h2); }
.level__days {
  align-self: flex-start;
  padding: 6px 10px 5px;
  background: var(--honey);
  color: var(--midnight);
  font: 600 var(--fs-small)/1.2 var(--font-head);
}
.sheet .level p + p { margin-top: 0; }
.sheet .level__desc p + p { margin-top: .85em; }   /* "By the end:" starts its own paragraph (17 Nov 2026) */

/* How it works: the four steps (a real sequence, so they are numbered). The Lime icon sits on the
   heading line ("[icon] 1 Plan"); the heading and its number are Amethyst (Linz, 7 Oct 2026). */
.steps { margin: 1.4em 0 0; padding: 0; list-style: none; display: grid; gap: clamp(32px, 3.6vw, 48px); }
@media (min-width: 44em) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) clamp(24px, 3vw, 40px); } }
.step h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 .45em; color: var(--amethyst); }
.step__icon { flex: none; width: clamp(30px, 2.4vw, 36px); aspect-ratio: 1; color: var(--lime); }
.step__num { color: var(--amethyst); }

/* Phones: the icon sits beside the heading and the text runs the full width underneath,
   so lines are not squeezed into a narrow column */
@media (max-width: 29.99em) {
  .point { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .point__text { display: contents; }
  .point h3 { margin: 0; }
  .point p { grid-column: 1 / -1; margin-top: .55em; }
  .point .tile { width: 36px; margin-top: 0; }
  .tile--large { width: 64px; }
}

/* What a club member gets: two lists, three items on the left and two on the right, each item with a
   Lime icon. On computers the two lists are the same height and the second spreads its items so the tops
   and the bottoms line up; on phones they stack into one column (Linz, 7 Oct 2026). */
.gets { display: grid; gap: 14px 36px; }
@media (min-width: 44em) { .gets { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.ticks li { display: flex; align-items: flex-start; gap: 12px; }
.list-icon { flex: none; width: 28px; aspect-ratio: 1; margin-top: .12em; color: var(--lime); }

/* Levels: what learners will be able to do */
.outcomes { display: grid; gap: 22px; margin-top: 1.4em; }
.outcome { padding-left: clamp(16px, 2vw, 22px); border-left: 4px solid var(--honey); }
.outcome h3 { margin-bottom: .3em; }

/* Levels: KhAI Cafe, in a Midnight panel */
.panel {
  margin-top: var(--space-section);
  padding: clamp(22px, 3.6vw, 44px);
  background: var(--midnight);
  color: var(--ivory);
}
.panel h2::before {
  content: "";
  display: block;
  width: 56px;
  height: 5px;
  margin-bottom: 16px;
  background: var(--honey);
}
.sheet .panel a:not([class]) { color: var(--ivory); }
.panel :focus-visible, .statement--vision :focus-visible { outline-color: var(--honey); }

/* Club members: under construction */
.construction { display: flex; flex-wrap: wrap; align-items: center; gap: 20px clamp(20px, 3vw, 32px); }
.construction__text { flex: 1 1 260px; }
.sheet .construction__status { margin-bottom: .35em; font-size: var(--fs-h2); }

/* Meet the team. Each profile has a photo box in the same style: on wider screens the photo sits top
   right and the bio flows around and under it, so there is no empty column beside or under the text. */
.profile { display: grid; gap: 22px; }
.profile + .profile { margin-top: var(--space-section); padding-top: var(--space-section); border-top: 1px solid var(--line); }
.profile__photo { margin: 0; max-width: 320px; }
@media (min-width: 44em) {
  .profile { display: flow-root; }
  .profile__photo { float: right; width: min(36%, 270px); max-width: none; margin: 6px 0 18px clamp(24px, 3vw, 36px); }
}
.profile__photo img { width: 100%; height: auto; }
.sheet .profile h2 { margin-bottom: .2em; }
.profile__role { margin-bottom: 1em; color: var(--amethyst); font: 600 var(--fs-small)/1.4 var(--font-head); }
.independence { margin-top: var(--space-section); padding-top: 16px; border-top: 4px solid var(--honey); }

/* FAQs: native details/summary */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  position: relative;
  padding: 20px 52px 20px 0;
  list-style: none;
  cursor: pointer;
  font: 600 var(--fs-h3)/1.35 var(--font-head);
  letter-spacing: -.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before,
.faq__item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 18px;
  height: 3px;
  margin-top: -1.5px;
  background: var(--amethyst);
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }
@media (prefers-reduced-motion: no-preference) {
  .faq__item summary::after { transition: transform .2s ease; }
}
.faq__item summary:hover { color: var(--amethyst); }
.faq__answer { padding: 0 52px 22px 0; }
.faq__outro { margin-top: clamp(24px, 3vw, 34px); }
/* The honest notes at the end of a page: AI helped with the words; the photos are stock */
.notes { margin-top: var(--space-section); padding-top: 16px; border-top: 1px solid var(--line); }
.note { font-size: var(--fs-small); font-style: italic; font-weight: 300; }
.sheet .note + .note { margin-top: .5em; }

/* 404 and the Khmer holding page */
.page-link { margin-top: 1.4em; font: 600 var(--fs-lead)/1.4 var(--font-head); }
.page-link a { color: var(--amethyst); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.page-link a:hover { text-decoration-color: var(--honey); }
