/* Hallmark · shape: Split Studio (/), Long Document (/privacy, /terms, /guides/*), Workbench (/study-plan/*, /tools/*) · genre: playful · theme: brand · redesign: full
 * paper: oklch(98.6% 0.006 190) · accent: oklch(55% 0.095 185) · display: Bricolage Grotesque · body: IBM Plex Sans · hero: Split on a soft teal and mint wash · nav: sticky frosted bar, wordmark left, links right · footer: soft panel, wordmark over link columns · signature: a sprint-day card you can tick off, floating on a mint wash
 * axes: light/grotesk-sans/chromatic-teal · posture: split · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: P, the brand has few photos; the real planner pages and YouTube thumbnails carry the pictures */
/* Hallmark · waive 44c · /study-plan/* heroes end near 600px at 1440 · the plan builds right under the form, so a short hero keeps it in view */
/* Hallmark · waive 77 · reading sections on /study-plan/* are prose · they answer the questions people search for, so they stay text */
/* Hallmark · waive 78 · reading heads on /study-plan/* render at 39px · they sit in a narrow side column under the tool */
/* Hallmark · reworded hero lead "Simple, tested-on-yourself study systems: fewer distractions, notes that stick, and a plan that gets you through the syllabus without all-nighters." to "Tested-on-yourself study systems: fewer distractions, notes that stick, no all-nighters." · 58 names it: the old lead ran 20 words over the hero budget */
/* Hallmark · reworded "9 printable A4 pages · PDF · instant download" into a three-row spec list · 63 names it: dot-joined meta reads as template */
/* Fonts: self-hosted latin subsets (SIL Open Font License) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/bricolage-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/plex-sans.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plex-mono-500.woff2") format("woff2"); }

/* ---------- Tokens: the source of truth (see /design.md) ---------- */
/* FocusFlow Lab tokens. The source of truth for every page; see design.md. */
:root {
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1.0625rem; --text-lg: 1.25rem; --text-xl: 1.5625rem; --text-2xl: 1.953rem; --text-3xl: 2.441rem;
  --text-display-s: clamp(2.25rem, 4vw + 0.5rem, 3.5rem); --text-display: clamp(2.5rem, 4.5vw + 1rem, 4.5rem);
  --text-section: clamp(1.75rem, 2vw + 1rem, 2.75rem); --text-title: clamp(1.2rem, 0.6vw + 0.95rem, 1.5rem); --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --container: 1120px; --gutter: 40px; --gap-columns: 48px; --section-gap-s: 72px; --section-gap: 104px; --section-gap-l: 136px;
  --z-base: 1; --z-raised: 10; --z-sticky-nav: 300;

  /* Colour: FocusFlow teal (#2a9d8f / #3cc2b2) is the anchor; navy ink; cool ruled paper. */
  --color-paper: oklch(98.6% 0.006 190);
  --color-paper-2: oklch(99.6% 0.003 190);
  --color-paper-3: oklch(95.5% 0.02 185);
  --color-wash-mint: oklch(94% 0.045 170);
  --color-wash-teal: oklch(91% 0.06 195);
  --color-wash-sun: oklch(95% 0.05 90);
  --color-ink: oklch(25% 0.05 250);
  --color-ink-2: oklch(33% 0.045 248);
  --color-muted: oklch(45% 0.03 240);
  --color-rule: oklch(88% 0.015 210);
  --color-rule-strong: oklch(78% 0.02 210);
  --color-accent: oklch(55% 0.095 185);
  --color-accent-ink: oklch(42% 0.08 190);
  --color-accent-wash: oklch(93% 0.04 185);
  --color-on-accent: oklch(99% 0.01 185);
  --color-focus: oklch(50% 0.11 190);
  --color-phase-review: oklch(58% 0.1 185);
  --color-phase-practice: oklch(70% 0.12 75);
  --color-phase-final: oklch(55% 0.05 250);
  --color-error: oklch(52% 0.16 30);
  --color-success: oklch(50% 0.12 150);

  --font-display: "Bricolage Grotesque", "IBM Plex Sans", ui-sans-serif, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-outlier: var(--font-mono);

  --measure: 64ch;
  --radius-card: 20px; --radius-control: 14px; --radius-pill: 999px; --rule-hair: 1px;
  --shadow-card: 0 1px 2px oklch(30% 0.05 220 / 0.06), 0 12px 32px -12px oklch(30% 0.06 220 / 0.18);
  --shadow-lift: 0 2px 4px oklch(30% 0.05 220 / 0.08), 0 24px 48px -16px oklch(30% 0.06 220 / 0.26);
  --tracking-display: -0.02em;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-paper: oklch(19% 0.02 220);
    --color-paper-2: oklch(23% 0.022 220);
    --color-paper-3: oklch(26% 0.024 220);
    --color-ink: oklch(94% 0.01 200);
    --color-ink-2: oklch(86% 0.015 200);
    --color-muted: oklch(76% 0.02 210);
    --color-rule: oklch(32% 0.02 215);
    --color-rule-strong: oklch(44% 0.025 215);
    --color-accent: oklch(74% 0.11 185);
    --color-accent-ink: oklch(82% 0.1 185);
    --color-accent-wash: oklch(30% 0.05 190);
    --color-on-accent: oklch(20% 0.03 200);
    --color-focus: oklch(80% 0.11 185);
    --color-phase-final: oklch(70% 0.05 250);
    --color-error: oklch(75% 0.13 30);
    --color-wash-mint: oklch(27% 0.045 175); --color-wash-teal: oklch(26% 0.05 205); --color-wash-sun: oklch(28% 0.04 90);
    --shadow-card: 0 1px 2px oklch(5% 0.02 220 / 0.4), 0 12px 32px -12px oklch(5% 0.02 220 / 0.6); --shadow-lift: 0 2px 4px oklch(5% 0.02 220 / 0.5), 0 24px 48px -16px oklch(5% 0.02 220 / 0.7);
  }
}
:root[data-theme="dark"] {
  --color-paper: oklch(19% 0.02 220); --color-paper-2: oklch(23% 0.022 220); --color-paper-3: oklch(26% 0.024 220);
  --color-ink: oklch(94% 0.01 200); --color-ink-2: oklch(86% 0.015 200); --color-muted: oklch(76% 0.02 210);
  --color-rule: oklch(32% 0.02 215); --color-rule-strong: oklch(44% 0.025 215);
  --color-accent: oklch(74% 0.11 185); --color-accent-ink: oklch(82% 0.1 185); --color-accent-wash: oklch(30% 0.05 190);
  --color-on-accent: oklch(20% 0.03 200); --color-focus: oklch(80% 0.11 185); --color-phase-final: oklch(70% 0.05 250); --color-error: oklch(75% 0.13 30);
  --color-wash-mint: oklch(27% 0.045 175); --color-wash-teal: oklch(26% 0.05 205); --color-wash-sun: oklch(28% 0.04 90);
    --shadow-card: 0 1px 2px oklch(5% 0.02 220 / 0.4), 0 12px 32px -12px oklch(5% 0.02 220 / 0.6); --shadow-lift: 0 2px 4px oklch(5% 0.02 220 / 0.5), 0 24px 48px -16px oklch(5% 0.02 220 / 0.7);
}

/* ---------- Base: the floor rules ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); }
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 700); font-synthesis: none; letter-spacing: var(--tracking-display); line-height: 1.05; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { max-width: 20ch; font-size: var(--text-display); } h2 { max-width: 30ch; font-size: var(--text-section); } h3 { max-width: 40ch; font-size: var(--text-title); line-height: 1.2; }
.lead { font-size: var(--text-lead); line-height: 1.45; max-width: 52ch; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.num, .figure, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--color-paper-2, var(--color-paper)), var(--color-paper-3, var(--color-paper))); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 56px; --section-gap: 80px; --section-gap-l: 104px; --gap-columns: 32px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* ---------- Site ---------- */

body { font-size: var(--text-md); line-height: 1.6; }
a { color: var(--color-accent-ink); }
a:hover { color: var(--color-ink); }
a:active { color: var(--color-ink-2); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

.container { max-width: var(--container); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--color-muted); }

/* Masthead: the header of a printed sheet */
.masthead { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; font: 700 1.05rem/1 var(--font-display); color: var(--color-ink); text-decoration: none; }
.wordmark img { width: 32px; height: 32px; border-radius: 8px; }
.masthead nav { display: flex; gap: var(--space-xs) var(--space-lg); flex-wrap: wrap; font-size: var(--text-sm); }
.masthead nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-muted); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--color-ink); text-decoration: underline; }

/* Controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 var(--space-lg); border: 1px solid var(--color-accent); border-radius: var(--radius-card);
  background: var(--color-accent); color: var(--color-on-accent);
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-micro) ease, border-color var(--dur-micro) ease, color var(--dur-micro) ease, transform var(--dur-micro) ease;
}
.btn:hover { background: var(--color-accent-ink); border-color: var(--color-accent-ink); color: var(--color-on-accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--color-accent-ink); }
.btn-quiet:hover { background: var(--color-accent-wash); border-color: var(--color-accent); color: var(--color-ink); }
.text-link { font-weight: 600; color: var(--color-accent-ink); }

/* Headings share one weight and one colour */
h1, h2, h3 { color: var(--color-ink); font-weight: 700; }
h1 { font-size: var(--text-display); line-height: 1.02; }
h2 { font-size: var(--text-section); line-height: 1.1; }
h3 { font-size: var(--text-title); }

/* The sheet: ruled paper with a hairline all round and a teal head rule */
.sheet { background: var(--color-paper-2); border: 1px solid var(--color-rule-strong); border-top: 4px solid var(--color-accent); border-radius: var(--radius-card); padding: var(--space-lg); }
.sheet-title { display: flex; justify-content: space-between; gap: var(--space-sm); font: 700 1.05rem/1.3 var(--font-display); margin: 0 0 var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
.sheet-title span { font: 500 var(--text-sm) var(--font-mono); color: var(--color-muted); }

/* ---------- Home ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: center; padding: var(--space-2xl) 0 var(--section-gap-s); }
.home-hero .lead { margin-top: var(--space-lg); color: var(--color-muted); max-width: 40ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg); margin-top: var(--space-xl); }

.day-sheet ol { list-style: none; margin: 0; padding: 0; }
.day-sheet li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.day-sheet li:last-child { border-bottom: 0; }
.day-sheet .n { font: 500 1.4rem/1 var(--font-mono); color: var(--color-accent-ink); }
.day-sheet label { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; font-size: var(--text-sm); color: var(--color-muted); cursor: pointer; }
.day-sheet input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-accent); }
.day-sheet li:has(input:checked) strong { text-decoration: line-through; text-decoration-color: var(--color-accent); color: var(--color-muted); }
.day-sheet .foot { margin: var(--space-md) 0 0; font-size: var(--text-sm); color: var(--color-muted); }

.band { padding: var(--section-gap-s) 0; border-top: 2px solid var(--color-ink); scroll-margin-top: var(--space-md); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gap-columns); align-items: start; }
.split > * { min-width: 0; }
.split .intro p { margin-top: var(--space-md); color: var(--color-muted); max-width: 46ch; }

.ruled { list-style: none; margin: var(--space-xl) 0 0; padding: 0; border-top: 1px solid var(--color-rule); counter-reset: ruled; }
.ruled li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); counter-increment: ruled; }
.ruled li::before { content: counter(ruled, decimal-leading-zero); font: 500 var(--text-sm)/1.9 var(--font-mono); color: var(--color-accent-ink); }

.form-sheet p { color: var(--color-muted); margin-bottom: var(--space-md); }
.ml-embedded { min-height: 120px; }

.planner { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.planner figure { margin: 0; }
.planner figure img { width: 100%; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-card); background: var(--color-paper-2); }
.planner figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.planner .ruled { margin-top: var(--space-lg); }
.planner .ruled li { grid-template-columns: minmax(0, 1fr); }
.planner .ruled li::before { content: none; }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2xs) var(--space-lg); margin: var(--space-lg) 0 0; font-size: var(--text-sm); }
.spec dt { color: var(--color-muted); }
.spec dd { margin: 0; }
.buy { display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; margin-top: var(--space-xl); }
.price { font: 500 clamp(2.75rem, 4vw + 1rem, 4rem)/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--color-ink); margin: 0; }

/* Lists of links set as timetable rows */
.rows { list-style: none; margin: var(--space-xl) 0 0; padding: 0; border-top: 1px solid var(--color-rule); }
.rows li { border-bottom: 1px solid var(--color-rule); }
.rows a { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto; gap: var(--space-lg); align-items: baseline; padding: var(--space-md) 0; color: var(--color-ink); text-decoration: none; }
.rows a:hover .rows-name, .rows a:focus-visible .rows-name { color: var(--color-accent-ink); text-decoration: underline; }
.rows-name { font: 700 var(--text-title)/1.2 var(--font-display); }
.rows-note { color: var(--color-muted); }
.rows-go { color: var(--color-accent-ink); font-weight: 600; white-space: nowrap; }

/* Footer: colophon */
.colophon { margin-top: var(--section-gap-s); padding: var(--space-xl) 0; border-top: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.colophon p { margin: 0 0 var(--space-xs); max-width: 72ch; }
.colophon a { color: var(--color-muted); }
.colophon a:hover { color: var(--color-ink); }
.colophon-links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin-top: var(--space-md); }

/* ---------- Legal pages: Long Document ---------- */
.doc-head { padding: var(--space-2xl) 0 var(--space-xl); border-bottom: 2px solid var(--color-ink); }
.doc { padding: var(--space-xl) 0 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: var(--gap-columns); }
.doc > .prose { grid-column: 2; }
.toc { position: sticky; top: var(--space-lg); align-self: start; font-size: var(--text-sm); }
.toc p { color: var(--color-muted); margin-bottom: var(--space-xs); }
.toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.toc li { border-bottom: 1px solid var(--color-rule); }
.toc a { display: block; padding: var(--space-xs) 0; color: var(--color-ink); text-decoration: none; }
.toc a:hover { color: var(--color-accent-ink); text-decoration: underline; }
.prose h2 { scroll-margin-top: var(--space-lg); }
.doc-head h1 { font-size: var(--text-display-s); }
.doc-head p { margin-top: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--text-title); margin: var(--space-xl) 0 var(--space-sm); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--space-md); }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin-bottom: var(--space-xs); }

@media (max-width: 860px) {
  .home-hero, .split, .planner, .doc { grid-template-columns: minmax(0, 1fr); }
  .doc > .prose { grid-column: 1; }
  .toc { position: static; }
  .home-hero { padding-top: var(--space-xl); }
  .planner figure { order: 2; }
  .rows a { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
}
.sub { margin-top: var(--space-md); max-width: 52ch; }

/* MailerLite embed, restyled with the site tokens (the form and its wiring are MailerLite's) */
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper { background: transparent !important; border: 0 !important; border-radius: 0 !important; max-width: none !important; width: 100% !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody { padding: 0 !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedContent { display: none !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-align-center { text-align: left !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody { padding: 0 !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-successContent h4,
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-successContent p { color: var(--color-ink) !important; font-family: var(--font-body) !important; text-align: left !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-fieldRow input.form-control {
  min-height: 48px !important; padding: 0 var(--space-sm) !important; font: 1rem var(--font-body) !important;
  background: var(--color-paper-2) !important; color: var(--color-ink) !important;
  border: 1px solid var(--color-muted) !important; border-radius: var(--radius-card) !important;
}
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-fieldRow input.form-control::placeholder { color: var(--color-muted) !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedSubmit button.primary {
  min-height: 48px !important; padding: 0 var(--space-lg) !important; font: 600 1rem var(--font-body) !important;
  background: var(--color-accent) !important; color: var(--color-on-accent) !important;
  border: 1px solid var(--color-accent) !important; border-radius: var(--radius-card) !important;
}
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedSubmit button.primary:hover { background: var(--color-accent-ink) !important; border-color: var(--color-accent-ink) !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer input.form-control:focus-visible,
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer button:focus-visible { outline: 2px solid var(--color-focus) !important; outline-offset: 3px !important; }

/* Videos: thumbnails that load the YouTube player on click */
.videos { list-style: none; margin: var(--space-xl) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-lg); }
.videos li { min-width: 0; }
.video { display: block; color: var(--color-ink); text-decoration: none; }
.video-frame { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-card); background: var(--color-paper-3); }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video .video-frame::after { content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; translate: -50% -50%; border-radius: var(--radius-card); background: var(--color-accent); transition: transform var(--dur-micro) ease, background-color var(--dur-micro) ease; }
.video .video-frame::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; translate: -35% -50%; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent var(--color-on-accent); }
.video:hover .video-frame::after { background: var(--color-accent-ink); transform: scale(1.06); }
.video:active .video-frame::after { transform: scale(0.98); }
.video-title { display: block; margin-top: var(--space-sm); font-weight: 600; line-height: 1.35; }
.video:hover .video-title { color: var(--color-accent-ink); text-decoration: underline; }
.videos + .rows { margin-top: var(--space-2xl); }
@media (max-width: 860px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .videos { grid-template-columns: minmax(0, 1fr); } }


/* ================= Soft and bright layer ================= */

/* Sticky frosted masthead */
.site-head { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklab, var(--color-paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 70%, transparent); }
.site-head .masthead { border-bottom: 0; padding-block: var(--space-sm); }
.masthead nav { gap: var(--space-2xs); }
.masthead nav a { padding: 0 var(--space-sm); border-radius: var(--radius-pill); color: var(--color-ink-2); }
.masthead nav a:hover, .masthead nav a[aria-current] { background: var(--color-accent-wash); color: var(--color-ink); text-decoration: none; }
.masthead nav a.nav-cta { background: var(--color-accent); color: var(--color-on-accent); font-weight: 600; }
.masthead nav a.nav-cta:hover { background: var(--color-accent-ink); color: var(--color-on-accent); }

/* Controls go soft */
.btn { border-radius: var(--radius-pill); box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--color-accent) 70%, transparent); }
.btn-quiet, .btn-soft { box-shadow: none; }
.btn-soft { background: var(--color-paper-2); color: var(--color-ink); border-color: var(--color-rule-strong); }
.btn-soft:hover { background: var(--color-accent-wash); border-color: var(--color-accent); color: var(--color-ink); }
input[type="date"], input[type="number"], input[type="text"], select { border-radius: var(--radius-control) !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedSubmit button.primary { border-radius: var(--radius-pill) !important; }
.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-fieldRow input.form-control { border-radius: var(--radius-control) !important; }

/* Cards: elevation, no hairline */
.sheet, .card { background: var(--color-paper-2); border: 0; border-radius: var(--radius-card); padding: var(--space-lg); box-shadow: var(--shadow-card); }

/* Soft washes behind the hero */
.wash { position: relative; isolation: isolate; }
.wash::before { content: ""; position: absolute; z-index: -1; inset: -96px -50vw 0; pointer-events: none; background: var(--color-wash-mint); border-radius: 0 0 48px 48px; }
.home-hero { padding: var(--space-3xl) 0 var(--section-gap-s); }
.home-hero h1 { font-size: clamp(2.75rem, 5vw + 1rem, 5rem); }
.day-sheet { box-shadow: var(--shadow-lift); rotate: 1.5deg; }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); background: var(--color-paper-2); box-shadow: var(--shadow-card); font-size: var(--text-sm); color: var(--color-ink-2); }

/* Sections become soft panels instead of ruled bands */
.band { border-top: 0; padding: var(--section-gap-s) 0 0; }
.panel { border-radius: calc(var(--radius-card) + 8px); padding: var(--space-2xl); background: var(--color-paper-3); }
@media (max-width: 860px) { .panel { padding: var(--space-lg); } }
.panel-mint { background: var(--color-wash-mint); }
.panel-teal { background: var(--color-wash-teal); }
.section-head p { color: var(--color-muted); max-width: 52ch; margin-top: var(--space-sm); }

/* Numbered list with soft round chips */
.ruled { border-top: 0; }
.ruled li { border-bottom: 1px solid color-mix(in oklab, var(--color-rule-strong) 60%, transparent); align-items: center; }
.ruled li::before { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--color-paper-2); box-shadow: var(--shadow-card); line-height: 1; }

.planner figure img { border: 0; border-radius: calc(var(--radius-card) - 6px); box-shadow: var(--shadow-lift); }

/* Card grids for exams, tools and guides */
.cards { list-style: none; margin: var(--space-xl) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--space-md); }
.cards li { min-width: 0; display: flex; }
.cards a { flex: 1; display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--shadow-card); color: var(--color-ink); text-decoration: none; transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cards a:active { transform: translateY(0); }
.card-tag { align-self: flex-start; padding: var(--space-3xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-accent-wash); color: var(--color-accent-ink); font-size: var(--text-xs); font-weight: 600; }
.card-name { font: 700 var(--text-title)/1.2 var(--font-display); }
.card-note { color: var(--color-muted); font-size: var(--text-sm); flex: 1; }
.card-go { color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-sm); margin-top: var(--space-xs); }
.cards a:hover .card-go { text-decoration: underline; }

.rows { border-top: 0; }
.video-frame { border: 0; border-radius: calc(var(--radius-card) - 6px); box-shadow: var(--shadow-card); }
.video .video-frame::after { border-radius: var(--radius-pill); }

/* Footer: soft panel */
.site-foot { margin-top: var(--section-gap); padding: var(--space-2xl) 0 var(--space-xl); background: var(--color-paper-3); font-size: var(--text-sm); color: var(--color-muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.foot-grid p { margin-top: var(--space-sm); max-width: 36ch; }
.foot-grid h2 { font: 600 var(--text-sm)/1.4 var(--font-body); color: var(--color-ink); margin-bottom: var(--space-sm); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3xs); }
.foot-grid a, .foot-note a { color: var(--color-muted); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.foot-grid a:hover, .foot-note a:hover { color: var(--color-ink); text-decoration: underline; }
.foot-note { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.foot-note p { margin: 0 0 var(--space-xs); max-width: 80ch; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Legal and guide pages */
.doc-head { border-bottom: 0; }
.toc { padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-3); top: 88px; }
.toc ol { border-top: 0; }
.toc li { border-bottom: 0; }
.toc a { border-radius: var(--radius-control); padding: var(--space-xs) var(--space-sm); font-size: var(--text-xs); }
@media (min-width: 861px) { .doc { grid-template-columns: minmax(15rem, 3fr) minmax(0, 8fr); } }
.toc a:hover { background: var(--color-paper-2); text-decoration: none; }
.prose h2 { scroll-margin-top: 88px; }

/* One gentle reveal; content stays visible without scripting */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal [data-reveal] { opacity: 1; transform: none; } .day-sheet { rotate: 0deg; } .cards a:hover { transform: none; } }
@media (max-width: 860px) { .day-sheet { rotate: 0deg; } .home-hero { padding-top: var(--space-xl); } }
.skip { position: absolute; left: var(--space-md); top: -100px; z-index: 1000; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-xs); }
.page-note { margin-top: var(--space-2xl); font-size: var(--text-sm); color: var(--color-muted); }
.page-note p { margin: 0 0 var(--space-xs); max-width: 80ch; }

/* ---------- Tools ---------- */
.tool-hero { align-items: center; }
.timer { text-align: center; }
.timer .sheet-title { justify-content: center; }
.timer-time { margin: var(--space-md) 0; font: 500 clamp(4rem, 10vw, 6.5rem)/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--color-ink); letter-spacing: -0.02em; }
.timer-actions { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; }
.timer-actions .btn { min-width: 128px; }
.timer-set { display: flex; justify-content: center; gap: var(--space-lg); flex-wrap: wrap; margin-top: var(--space-lg); }
.timer-set fieldset { margin: 0; }
.seg { display: inline-flex; gap: var(--space-3xs); padding: var(--space-3xs); border-radius: var(--radius-pill); background: var(--color-paper-3); }
.seg label { margin: 0; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-md); border-radius: var(--radius-pill); color: var(--color-ink-2); font-size: var(--text-sm); cursor: pointer; }
.seg label:hover { color: var(--color-ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--color-paper-2); color: var(--color-ink); font-weight: 600; box-shadow: var(--shadow-card); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.selftest { margin-top: var(--space-md); padding: var(--space-md); border-radius: var(--radius-control); background: var(--color-accent-wash); text-align: left; }
.timer-count { margin-top: var(--space-md); font-size: var(--text-sm); }
.count-result { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.count-result .totals dd { color: var(--color-accent-ink); }
.count-result p { margin-top: var(--space-sm); }
input[type="text"] { width: 100%; min-height: 44px; padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-muted); background: var(--color-paper); color: var(--color-ink); font: 1rem var(--font-body); }
.fields-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important; }
@media (max-width: 700px) { .fields-2 { grid-template-columns: minmax(0, 1fr) !important; } }
.review-tool { display: grid; gap: var(--space-md); }
.review-list { display: grid; gap: var(--space-md); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); }
.review-head h3 { font-size: var(--text-lg); }
.review-head .btn { min-height: 36px; padding: 0 var(--space-sm); font-size: var(--text-sm); }
.review-dates { list-style: none; margin: var(--space-sm) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-xs); }
.review-dates li { padding: var(--space-xs); border-radius: var(--radius-control); background: var(--color-paper-3); font-size: var(--text-sm); }
.review-dates span { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.review-dates li.due { background: var(--color-accent-wash); }
.review-dates li.past { opacity: 0.55; }
@media (max-width: 560px) { .review-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Guides ---------- */
.guide-head { max-width: 60rem; }
.guide-head h1 { margin-top: var(--space-sm); }
.guide-head .lead { margin-top: var(--space-md); color: var(--color-muted); font-size: var(--text-lead); }
.prose .video { margin: var(--space-md) 0 var(--space-xl); max-width: 560px; }
.guide-kit { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin: var(--space-xl) 0; }
.guide-kit p { margin: 0 !important; max-width: 40ch; }
.refs { font-size: var(--text-sm); color: var(--color-muted); }

.ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedSubmit button.primary { white-space: nowrap !important; }
@media (max-width: 380px) { .ml-embedded :is([id^="mlb2-"], #ml-form-any).ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedSubmit button.primary { padding: 0 var(--space-sm) !important; font-size: var(--text-sm) !important; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .site-head { position: static; }
  .site-head .masthead { flex-wrap: wrap; row-gap: 0; }
  .masthead nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav a { white-space: nowrap; flex: none; }
}

/* Sticky companions: the kit form and the planner picture stay in view beside their lists */
@media (min-width: 861px) {
  #free-kit .form-sheet, .planner figure { position: sticky; top: 88px; }
}

/* Exam planner products */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); margin-top: var(--space-xl); }
.product { display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--shadow-card); overflow: hidden; }
.product picture img { width: 100%; height: auto; }
.product-body { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); flex: 1; }
.product-body p { color: var(--color-muted); }
.product-body .product-meta { font-size: var(--text-sm); }
.product-body .buy { margin-top: auto; padding-top: var(--space-sm); }
.product-body .price { font-size: clamp(2.25rem, 3vw + 1rem, 3rem); }
.kit.product-offer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: var(--space-xl); }
.product-offer img { width: 100%; border-radius: calc(var(--radius-card) - 6px); box-shadow: var(--shadow-card); }
.product-offer p { margin: var(--space-sm) 0 var(--space-md); }
.product-offer .text-link { margin-left: var(--space-md); }
@media (max-width: 860px) { .products, .kit.product-offer { grid-template-columns: minmax(0, 1fr); } }
.prose h3 { font-size: var(--text-lg); margin: var(--space-lg) 0 var(--space-xs); scroll-margin-top: 88px; }
.toc .toc-sub a { padding-left: var(--space-lg); color: var(--color-muted); }
.toc[hidden] + .prose { grid-column: 1 / -1; }

/* Tool rows (GPA, weighted grade, study schedule) */
.row-head, .tool-rows li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--space-xs); align-items: center; }
.row-head { font-size: var(--text-xs); color: var(--color-muted); margin-bottom: var(--space-2xs); }
.tool-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.tool-rows input, .tool-rows select { min-height: 44px; }
.tool-rows input[type="date"] { font-size: var(--text-sm); }
.row-remove { min-height: 40px !important; padding: 0 var(--space-sm) !important; font-size: var(--text-sm) !important; }
.fields-2b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-sm); }
@media (max-width: 560px) {
  .row-head { display: none; }
  .tool-rows li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--color-rule); }
  .tool-rows li > :first-child { grid-column: 1 / -1; }
  .fields-2b { grid-template-columns: minmax(0, 1fr); }
}
.mini-table { width: 100%; border-collapse: collapse; margin-top: var(--space-md); font-size: var(--text-sm); }
.mini-table th { text-align: left; font-weight: 600; color: var(--color-muted); border-bottom: 2px solid var(--color-rule-strong); padding: var(--space-xs); }
.mini-table td { border-bottom: 1px solid var(--color-rule); padding: var(--space-xs); }
.mini-table td span { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.table-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.ss-plan { margin-bottom: var(--space-xl); }
.ss-exams { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); list-style: none; padding: 0; margin: var(--space-sm) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.ss-plan .table-scroll { max-height: none; }
textarea { width: 100%; padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-muted); border-radius: var(--radius-control); background: var(--color-paper); color: var(--color-ink); font: 1rem/1.4 var(--font-body); resize: vertical; }
.fc-tool { display: grid; gap: var(--space-md); }
.fc-study { text-align: center; }
.fc-front { font: 700 var(--text-xl)/1.3 var(--font-display); margin: var(--space-md) 0; }
.fc-back { padding: var(--space-md); border-radius: var(--radius-control); background: var(--color-accent-wash); }
.fc-study .sheet-actions { justify-content: center; }
.fc-list { list-style: none; margin: 0 0 var(--space-md); padding: 0; }
.fc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-sm); align-items: center; padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); font-size: var(--text-sm); }
.fc-list em { display: block; font-style: normal; color: var(--color-muted); }
.fc-next { color: var(--color-muted); font-size: var(--text-xs); white-space: nowrap; }
.fc-list .btn { min-height: 36px; padding: 0 var(--space-sm); font-size: var(--text-sm); }
.fc-import { cursor: pointer; }
.fc-import:focus-within { outline: 2px solid var(--color-focus); outline-offset: 3px; }
@media print { .site-head, .crumbs, .hero, .reading, .kit, .site-foot, .page-note, .no-print { display: none !important; } .ss-plan { display: block !important; } }
#ss-form .row-head, #ss-rows li { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1fr) auto; }
@media (max-width: 560px) { #ss-rows li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Button rows: everything in a row shares one baseline and nothing carries stray margins */
.sheet-actions > *, .offer-actions > *, .buy > * { margin: 0; }
label.btn { margin: 0; display: inline-flex; }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }
.kit.product-offer .text-link { margin-left: 0; }
.related { padding-top: var(--space-2xl); }
.related h2 { font-size: var(--text-2xl); }
.feedback { margin-top: var(--space-2xl); padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-3); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.feedback p { margin: 0; max-width: 60ch; }

/* ---------- Mega menu ---------- */
.site-head { position: sticky; }
.masthead nav { align-items: center; }
.nav-item { display: flex; }
.masthead nav .nav-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); color: var(--color-ink-2); text-decoration: none; }
.nav-trigger::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-micro) ease; }
.nav-trigger[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.masthead nav .nav-trigger:hover, .masthead nav .nav-trigger[aria-expanded="true"], .masthead nav .nav-trigger[aria-current] { background: var(--color-accent-wash); color: var(--color-ink); }
.mega { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-sticky-nav); background: var(--color-paper-2); border-bottom: 1px solid var(--color-rule); box-shadow: var(--shadow-lift); }
.js-nav .nav-item.open .mega { display: block; }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 0.9fr); gap: var(--space-lg) var(--gap-columns); padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.mega-title { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); margin: 0 0 var(--space-xs); }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3xs); }
.masthead nav .mega a:not(.btn) { display: block; padding: var(--space-xs) var(--space-sm); margin-left: calc(var(--space-sm) * -1); border-radius: var(--radius-control); min-height: 0; color: var(--color-ink); text-decoration: none; }
.masthead nav .mega a:not(.btn):hover, .masthead nav .mega a:not(.btn):focus-visible { background: var(--color-accent-wash); }
.mega a strong { display: block; font-weight: 600; font-size: var(--text-sm); }
.mega a span { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.mega-cta { padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-3); align-self: start; }
.mega-cta p { font-size: var(--text-sm); color: var(--color-muted); margin: 0 0 var(--space-sm); }
.masthead nav .mega-cta .btn { min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); color: var(--color-ink); background: var(--color-paper-2); }
@media (max-width: 860px) {
  .mega-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-top: var(--space-md); padding-bottom: var(--space-md); }
}
@media (max-width: 640px) {
  .site-head { position: relative; }
  .mega { max-height: 70vh; overflow-y: auto; }
  .mega-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .nav-trigger::after { width: 6px; height: 6px; }
}
@media (prefers-reduced-motion: reduce) { .nav-trigger::after { transition: none; } }

/* Breadcrumbs: shared by every page type, with clear space below the header */
.crumbs { font-size: var(--text-sm); color: var(--color-muted); margin: var(--space-lg) 0 0; }
.crumbs a { color: var(--color-muted); }
.crumbs a:hover { color: var(--color-ink); }
@media (max-width: 640px) { .crumbs { margin-top: var(--space-md); } }
@media (max-width: 640px) {
  .site-head .masthead { padding-block: var(--space-xs) var(--space-2xs); row-gap: var(--space-2xs); }
  .masthead nav { justify-content: space-between; gap: 0; }
  .masthead nav .nav-trigger, .masthead nav .nav-link { padding: 0 var(--space-xs); }
  .masthead nav .nav-item:first-child .nav-trigger { margin-left: calc(var(--space-xs) * -1); }
  .masthead nav .nav-cta { display: none; }
}
/* The header bar keeps the page gutter (an older .masthead rule reset it) */
.site-head .container.masthead { padding-inline: var(--gutter); }
.gpa-head, .gpa-rows li { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1fr) auto; }
.gpa-need { margin-top: var(--space-sm); font-weight: 600; color: var(--color-accent-ink); min-height: 1.5em; }
@media (max-width: 560px) { .gpa-rows li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); } .gpa-rows li > :first-child { grid-column: 1 / -1; } }
