/* Public course pages: monochrome photography, quiet surfaces, one action colour.
 * Kept separate from editorial.css so utility/payment pages keep their own layout.
 */
body:is([data-landing-family='home'], [data-landing-family='about'], [data-landing-family='teams'], [data-landing-family='syllabus'], [data-landing-family='faq'], [data-landing-family='form']) {
  --bg: #101011;
  --bg-alt: #171718;
  --surface: #1C1C1E;
  --surface-hi: #222224;
  --border: #323234;
  --border-subtle: #252527;
  --ed-line: #323234;
  --white: #F6F3EE;
  --cream: #F6F3EE;
  --text: #CCC9C4;
  --text-sec: #ADAAA5;
  --text-dim: #ADAAA5;
  --dim: #ADAAA5;
  --ed-ink: #F6F3EE;
  --ed-copy: #CCC9C4;
  --ed-muted: #ADAAA5;
  --ed-section: clamp(64px, 8vw, 112px);
  /* One accent: the old yellow figures take the ink colour of each theme. */
  --yellow: var(--ed-ink);
  background: var(--bg);
  color: var(--ed-copy);
}
:root[data-theme='light'] body:is([data-landing-family='home'], [data-landing-family='about'], [data-landing-family='teams'], [data-landing-family='syllabus'], [data-landing-family='faq'], [data-landing-family='form']) {
  --bg: #F5ECE0;
  --bg-alt: #EEE3D3;
  --surface: #FFFCF7;
  --surface-hi: #FFFFFF;
  --border: #D9D5CF;
  --border-subtle: #E4E0DA;
  --ed-line: #D9D5CF;
  --white: #18181A;
  --cream: #18181A;
  --text: #49474A;
  --text-sec: #666367;
  --text-dim: #666367;
  --dim: #666367;
  --ed-ink: #18181A;
  --ed-copy: #49474A;
  --ed-muted: #666367;
  --ed-accent: #A90C69;
  --ed-on-accent: #FFFAF5;
  --pink: #A90C69;
  /* editorial.css sets a light-theme yellow at this same specificity; this
   * file loads later, so the one-accent rule holds in the light theme too. */
  --yellow: var(--ed-ink);
}

body[data-landing-family] :is(.top-rule, .brand-top-rule) { background: var(--ed-line); height: 1px; }
body[data-landing-family] .top-nav { top: 0; }
body[data-landing-family] :is(.eyebrow, .hero-eyebrow, .author-role) { color: var(--ed-muted); }
body[data-landing-family] :is(.sec-head, .test-head) h2 em,
body[data-landing-family] :is(.curr-l, .about-r) h2 em,
body[data-landing-family] .tier .tname em { color: var(--ed-ink); }
/* Pink italics twice per page: the hero headline and the closing call. */
body[data-landing-family] .closer h2 em { color: var(--pink); }

/* Hero: a small robot held in steel calipers. The AI is the thing being
 * measured, and the hand holding the instrument is the tester's. The frame
 * keeps its 16:9 and hangs from the right edge; the message sits on the
 * empty dark. The gradient is the page colour, so both themes
 * blend, and each theme has its own photograph (dusk / daylight). */
body[data-landing-family='home'] .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(52vw, 780px);
  padding-block: clamp(56px, 7vw, 112px) clamp(48px, 6vw, 88px);
}
body[data-landing-family='home'] .hero > .container { width: 100%; }
body[data-landing-family='home'] .hero-grid { display: block; }
body[data-landing-family='home'] .hero-copy { position: relative; z-index: 1; max-width: min(620px, 52%); margin: 0; text-align: left; }
/* PERF-3: hero widths in em, not ch. ch is the width of "0" in whichever
   face is loaded, so it jumped while Playfair's subsets arrived one by one
   and moved the whole first screen (CLS 0.24). Values = the former ch at
   Playfair's "0": 0.6em upright, 0.6302em italic (measured in Chromium). */
body[data-landing-family='home'] .hero h1 {
  font-size: clamp(42px, 4.7vw, 68px);
  max-width: 8.4em;
  margin: 18px 0 24px;
  line-height: 1.06;
  text-wrap: balance;
}
body[data-landing-family='home'] .hero h1 em { color: var(--pink); }
body[data-landing-family='home'] .hero-lead { margin-inline: 0; max-width: 26.47em; font-size: 18px; line-height: 1.65; }
body[data-landing-family='home'] .hero-cta { justify-content: flex-start; margin-top: 26px; gap: 12px; }
body[data-landing-family='home'] .hero-cta .cta-sec { background: color-mix(in srgb, var(--bg) 70%, transparent); }
body[data-landing-family='home'] :is(.hero-visual, .about-visual) {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  aspect-ratio: 16 / 9;
  width: auto;
  height: 100%;
  max-width: none;
  margin: 0;
  background: var(--bg);
}
body[data-landing-family='home'] :is(.hero-visual, .about-visual) picture { display: block; width: 100%; height: 100%; }
body[data-landing-family='home'] :is(.hero-visual, .about-visual) img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%;
}
body[data-landing-family='home'] :is(.hero-visual, .about-visual)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 20%, color-mix(in srgb, var(--bg) 35%, transparent) 40%, transparent 54%),
    linear-gradient(0deg, var(--bg) 0%, transparent 16%);
}
body[data-landing-family='home'] .curriculum-visual { display: block; width: 100%; max-width: 420px; margin-top: 32px; }
body[data-landing-family='home'] .curriculum-visual img { display: block; width: 100%; height: auto; }
body[data-landing-family='home'] .trust { justify-content: flex-start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; padding-top: 20px; }
body[data-landing-family='home'] .trust .n { font-size: 28px; }
body[data-landing-family='home'] .trust .l { font-size: 12px; line-height: 1.45; }

/* Supporting prints: the pen beside the curriculum, a pair as below. The
 * closing call carries the hero print half developed in a darkroom tray: a
 * full-width background on the right that fades into the section under the
 * words, the way the hero does; on phones a 4:3 crop of the tray under them. */
body[data-landing-family='home'] .curriculum-visual img { border: 1px solid var(--ed-line); }
body[data-landing-family='home'] .closer { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: min(46vw, 660px); text-align: left; }
body[data-landing-family='home'] .closer > .container { display: block; position: static; width: 100%; }
body[data-landing-family='home'] .closer-copy { position: relative; z-index: 1; max-width: min(560px, 46%); }
body[data-landing-family='home'] .closer h2 { max-width: 16ch; }
body[data-landing-family='home'] .closer-cta { justify-content: flex-start; }
body[data-landing-family='home'] .closer-visual { position: absolute; inset: 0 0 0 auto; z-index: 0; height: 100%; width: 64%; margin: 0; }
body[data-landing-family='home'] .closer-visual picture { display: contents; }
body[data-landing-family='home'] .closer-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
body[data-landing-family='home'] .closer-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg-alt) 0%, color-mix(in srgb, var(--bg-alt) 80%, transparent) 14%, transparent 42%),
    linear-gradient(0deg, var(--bg-alt) 0%, transparent 16%),
    linear-gradient(180deg, var(--bg-alt) 0%, transparent 14%);
}

/* Reviews read as words, not as story collages: the exact public excerpt,
 * who wrote it and a link to the post. One scrollable row on every screen. */
body[data-landing-family='home'] .test-card {
  padding: 26px 24px 0;
  background: transparent;
  justify-content: space-between;
  gap: 22px;
}
body[data-landing-family='home'] .test-card:hover,
body[data-landing-family='home'] .test-card:focus-visible { border-color: var(--pink); }
body[data-landing-family='home'] .test-card-quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.45;
  color: var(--ed-ink);
  text-wrap: pretty;
}
body[data-landing-family='home'] .test-card-meta { padding: 16px 0 20px; border-top: 1px solid var(--ed-line); }
body[data-landing-family='home'] .test-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
  margin-inline: 0;
  text-align: left;
}
body[data-landing-family='home'] .test-head h2 { margin: 10px 0 0; }
body[data-landing-family='home'] .test-nav { display: flex; flex: 0 0 auto; gap: 10px; }
body[data-landing-family='home'] .test-nav[hidden] { display: none; }
body[data-landing-family='home'] .test-nav button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--ed-line);
  border-radius: 0;
  background: transparent;
  color: var(--ed-ink);
  font: 18px/1 var(--ed-font);
  cursor: pointer;
}
body[data-landing-family='home'] .test-nav button:hover:not(:disabled) { border-color: var(--pink); }
body[data-landing-family='home'] .test-nav button:disabled { opacity: .35; cursor: default; }
body[data-landing-family='home'] .test-nav button:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
body[data-landing-family='home'] .test-rail { gap: 18px; scrollbar-width: none; padding-bottom: 4px; }
body[data-landing-family='home'] .test-rail::-webkit-scrollbar { display: none; }
@media (min-width: 861px) {
  body[data-landing-family='home'] .test-card { flex-basis: 400px; min-height: 300px; }
}
@media (max-width: 860px) {
  body[data-landing-family='home'] .test-nav { display: none; }
}

/* Canvas: the painted studio backdrop of her portrait, continued under the
 * price and the closing call as a soft pool of light and fine grain. No file. */
body[data-landing-family='home'] :is(.price-sec, .closer) { position: relative; isolation: isolate; }
body[data-landing-family='home'] :is(.price-sec, .closer)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(55% 65% at 70% 35%, color-mix(in srgb, var(--ed-ink) 6%, transparent), transparent 72%);
}

/* In the light theme the pool is light on paper; an ink tint read as a smudge. */
:root[data-theme='light'] body[data-landing-family='home'] :is(.price-sec, .closer)::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(55% 65% at 70% 35%, #FFFFFFB3, transparent 72%);
}

/* The interface is the product proof. Keep its colour and legible source pixels. */
body[data-landing-family='home'] .learning-preview { background: var(--bg-alt); }
body[data-landing-family='home'] .learning-preview__intro { max-width: 850px; }
body[data-landing-family='home'] .learning-preview__intro h2 { font-size: clamp(34px, 4vw, 52px); }
body[data-landing-family='home'] .learning-preview__screen { border-radius: 4px; box-shadow: 0 16px 48px #0000000D; }
body[data-landing-family='home'] .learning-preview__tabs { margin-top: 36px; }
body[data-landing-family='home'] .learning-preview__tab { border-top-width: 1px; }
body[data-landing-family='home'] .learning-preview__tab[aria-selected='true'] { border-top-width: 2px; padding-top: 14px; }
body[data-landing-family='home'] .learning-preview__voice { border-left: 1px solid var(--ed-line); padding-left: 28px; }
/* Author: her real photograph, built like the hero, the one place her face
 * appears. It is a low-key print, so in the light theme the section stays a
 * dark spread instead of becoming a washed-out copy of the photograph. */
body[data-landing-family='home'] #about {
  --bg: #101011;
  --bg-alt: #171718;
  --border: #323234;
  --ed-line: #323234;
  --ed-ink: #F6F3EE;
  --ed-copy: #CCC9C4;
  --ed-muted: #ADAAA5;
  --ed-accent: #FF65BE;
  --white: #F6F3EE;
  --cream: #F6F3EE;
  --text: #CCC9C4;
  --text-sec: #ADAAA5;
  --text-dim: #ADAAA5;
  --dim: #ADAAA5;
  color-scheme: dark;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(48vw, 720px);
  background: var(--bg);
  color: var(--ed-copy);
}
body[data-landing-family='home'] #about > .container { width: 100%; }
body[data-landing-family='home'] .about-grid { display: block; max-width: none; margin: 0; }
body[data-landing-family='home'] .about-r { max-width: min(540px, 46%); }
body[data-landing-family='home'] .about-r > h2 { margin-top: 10px; font-size: clamp(40px, 5vw, 64px); }
body[data-landing-family='home'] .about-r > .about-lede { margin-top: 18px; font-family: var(--font-body); font-style: normal; font-size: 19px; line-height: 1.6; color: var(--ed-ink); }
body[data-landing-family='home'] .tier.paid { background: var(--surface); }
body[data-landing-family='home'] .tier .tprice { color: var(--ed-ink); }
body[data-landing-family='home'] .closer { background: var(--bg-alt); }

/* Author pages use the same photographic language at a different scale. */
body[data-landing-family='about'] .author-intro { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
body[data-landing-family='about'] .author-portrait { max-width: 440px; }
body[data-landing-family='about'] .author-copy h1 { font-size: clamp(46px, 6vw, 80px); }
body[data-landing-family='about'] .author-course { background: var(--bg-alt); }
body[data-landing-family='about'] .author-route { padding-block: 48px 20px; }

/* Companion pages are purposeful catalogues, not copies of the main hero. */
body[data-landing-family='teams'] .hero::after { display: none; }
body[data-landing-family='teams'] .hero h1 { max-width: 18ch; font-size: clamp(44px, 5.6vw, 76px); line-height: 1.12; }
body[data-landing-family='teams'] .hero h1 em { color: var(--pink); }
/* Teams hero: the message, and beside it the STOP sign that a few stickers
 * turn into something a model reads differently. Hidden on narrow screens. */
body[data-landing-family='teams'] .hero > .container {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  grid-template-rows: repeat(6, auto) 1fr;
  column-gap: clamp(32px, 5vw, 80px);
}
body[data-landing-family='teams'] .hero > .container > * { grid-column: 1; }
body[data-landing-family='teams'] .hero > .container > .teams-visual { grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: end; width: 100%; max-width: 420px; margin: 0; border: 1px solid var(--ed-line); background: var(--bg); }
body[data-landing-family='teams'] .teams-visual img { display: block; width: 100%; height: auto; }
body[data-landing-family='teams'] :is(.vcard, .popcard, .qa) h3 em { font-style: normal; color: inherit; }
body[data-landing-family='teams'] .hero-lead { color: var(--ed-copy); font-family: var(--ed-font); font-size: 19px; font-style: normal; line-height: 1.65; max-width: 62ch; }
body[data-landing-family] :is(.syl-lead, .hero-deck, .inquire-head .sub) { color: var(--ed-copy); font-family: var(--ed-font); font-size: 18px; font-style: normal; line-height: 1.65; max-width: 62ch; }
body[data-landing-family='teams'] :is(.vcard, .popcard) { background: transparent; }
body[data-landing-family='teams'] .inquire { background: var(--bg-alt); }
body[data-landing-family='teams'] details.qa > summary.q { list-style: none; cursor: pointer; }
body[data-landing-family='teams'] details.qa > summary.q::-webkit-details-marker { display: none; }
body[data-landing-family='teams'] details.qa[open] > .a { display: block; }
body[data-landing-family='teams'] details.qa[open] > .q .toggle::before { content: '−'; }
body[data-landing-family='syllabus'] .syl-hero { padding-block: clamp(40px, 6vw, 72px) 48px; }
body[data-landing-family='syllabus'] .syl-hero h1 { font-size: clamp(42px, 5.5vw, 72px); line-height: 1.12; max-width: 22ch; }
body[data-landing-family='syllabus'] .syl-hero h1 em { color: var(--pink); }
/* Programme hero: the message on the left, the map of all lectures on the right. */
body[data-landing-family='syllabus'] .syl-hero > .container {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  /* The map spans every row; the trailing flexible row absorbs its height so
   * the text rows keep their natural spacing. */
  grid-template-rows: repeat(6, auto) 1fr;
  column-gap: clamp(32px, 5vw, 80px);
}
body[data-landing-family='syllabus'] .syl-hero > .container > * { grid-column: 1; }
body[data-landing-family='syllabus'] .syl-hero .lecture-map { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; text-align: left; }
body[data-landing-family='syllabus'] .syl-hero .lecture-map :is(.lecture-map-track, .lecture-map-legend) { justify-content: flex-start; }
body[data-landing-family='syllabus'] .mod { background: transparent; }
body[data-landing-family='syllabus'] .mod[open] { background: var(--surface); }
body[data-landing-family='faq'] .hero h1 { font-size: clamp(42px, 5.5vw, 72px); }
body[data-landing-family='faq'] .hero h1 em { color: var(--pink); }
body[data-landing-family='faq'] .category h2 em { color: var(--ed-ink); }
body[data-landing-family='faq'] .cat-num { display: none; }
body[data-landing-family='faq'] .cat-nav { margin-top: 28px; }
body[data-landing-family='faq'] .cat-title { margin-bottom: 24px; }
body[data-landing-family='syllabus'] .syl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 28px; padding-top: 20px; }
body[data-landing-family='syllabus'] .syl-stats .n { font-size: 32px; }

@media (max-width: 860px) {
  body[data-landing-family='teams'] .hero > .container { display: block; }
  body[data-landing-family='teams'] .hero > .container > .teams-visual { display: none; }
  body[data-landing-family='home'] .hero { display: block; min-height: 0; padding-block: 32px 0; }
  body[data-landing-family='home'] .hero-copy { max-width: none; }
  body[data-landing-family='home'] .hero h1 { max-width: 9.6em; font-size: clamp(38px, 7vw, 56px); }
  body[data-landing-family='home'] .hero-lead { font-size: 16px; }
  body[data-landing-family='home'] :is(.hero-visual, .about-visual) { position: relative; inset: auto; z-index: 0; width: auto; height: auto; margin: 28px -40px 0; }
  body[data-landing-family='home'] #about { display: block; min-height: 0; padding-top: 0; }
  body[data-landing-family='home'] .about-visual { margin: 0 -40px 32px; }
  body[data-landing-family='home'] .about-r { max-width: none; }
  body[data-landing-family='home'] .closer { display: block; min-height: 0; padding-bottom: 0; }
  body[data-landing-family='home'] .closer-copy { max-width: none; }
  body[data-landing-family='home'] .closer-visual { position: relative; inset: auto; height: auto; width: auto; aspect-ratio: 4 / 3; margin: 32px -40px 0; }
  body[data-landing-family='home'] .closer-visual img { object-position: 50% 50%; }
  body[data-landing-family='home'] .closer-visual::after { background: linear-gradient(180deg, var(--bg-alt) 0%, transparent 18%), linear-gradient(0deg, var(--bg-alt) 0%, transparent 12%); }
  body[data-landing-family='home'] :is(.hero-visual, .about-visual)::after {
    background: linear-gradient(180deg, var(--bg) 0%, transparent 12%), linear-gradient(0deg, var(--bg) 0%, transparent 14%);
  }
}
@media (max-width: 680px) {
  body[data-landing-family='home'] .hero h1 { max-width: 12em; font-size: clamp(38px, 10.5vw, 56px); }
  body[data-landing-family='home'] .hero h1 br { display: none; }
  body[data-landing-family='home'] .hero-cta > a { flex: 1 1 100%; }
  body[data-landing-family='home'] :is(.hero-visual, .about-visual) { aspect-ratio: 4 / 3; }
  body[data-landing-family='home'] .curriculum-visual { display: none; }
  body[data-landing-family='home'] .hero-cta { margin-top: 22px; }
  body[data-landing-family='home'] .trust { gap: 14px; }
  body[data-landing-family='home'] .learning-preview__voice { border-left: 0; padding-left: 0; }
  body[data-landing-family='about'] .author-intro { grid-template-columns: minmax(0, 1fr); }
  body[data-landing-family='about'] .author-portrait { max-width: 360px; justify-self: start; }
  body[data-landing-family='faq'] > .hero { padding-block: 32px 20px; }
  body[data-landing-family='faq'] .category { padding-block: 28px 16px; }
  body[data-landing-family='faq'] .cat-label { margin-bottom: 8px; }
  body[data-landing-family='faq'] .cat-nav a { padding: 10px 12px; min-height: 44px; font-size: 12px; }
  body[data-landing-family='syllabus'] .syl-hero { padding-block: 32px; }
  body[data-landing-family='syllabus'] .syl-hero > .container { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body[data-landing-family='syllabus'] .syl-hero .lecture-map { grid-column: 1; grid-row: auto; margin-top: 28px; }
  body[data-landing-family='syllabus'] .syl-lead { margin-bottom: 20px; font-size: 17px; }
  body[data-landing-family='syllabus'] .syl-stats { gap: 12px; margin-top: 20px; padding-top: 16px; }
  body[data-landing-family='syllabus'] .syl-stats .n { font-size: 25px; }
  body[data-landing-family='syllabus'] .syl-stats .l { font-size: 11px; line-height: 1.5; }
  body[data-landing-family='syllabus'] .free-note { padding: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  body[data-landing-family='home'] .hero-visual picture { animation: hero-develop .6s ease-out both; }
  @keyframes hero-develop { from { opacity: .25; filter: brightness(.45); } to { opacity: 1; filter: none; } }
}
@media (max-width: 640px) {
  /* The container gutter narrows to 22px here; the photographs still run edge to edge. */
  body[data-landing-family='home'] :is(.hero-visual, .about-visual, .closer-visual) { margin-inline: -22px; }
}

/* Prints come in pairs: the low-key frame for the dark theme and the same
 * scene re-shot high key and toned to the paper for the light one. The hidden
 * image is lazy and display:none, so the browser never fetches it. Kept last
 * so it wins over each print's own `img { display: block }`. */
body[data-landing-family] img.art-light { display: none; }
:root[data-theme='light'] body[data-landing-family] img.art-light { display: block; }
:root[data-theme='light'] body[data-landing-family] img.art-dark { display: none; }
