/* ============================================================
   Weft / apple.css. The shared Apple-language design system,
   extracted from /teachers/ (the proven reference page).
   Pages link ONLY this file. System type, OKLCH only, no red,
   no Google Fonts. Page-specific layout stays in each page's
   own <style> block.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* apple.com palette in OKLCH: near-white canvas, gray band,
     near-black ink, secondary gray, action blue. */
  --paper:       oklch(98.9% 0.0015 260);
  --paper-deep:  oklch(97% 0.002 260);
  --sheet:       oklch(100% 0 0);
  --ink:         oklch(23.5% 0.004 260);
  --ink-muted:   oklch(54% 0.006 260);
  --accent:      oklch(54% 0.17 255);
  --accent-deep: oklch(47% 0.16 255);
  --ok:          oklch(58% 0.14 150);
  --ok-ink:      oklch(44% 0.11 150);
  --line:        oklch(23.5% 0.004 260 / 0.12);
  --line-mid:    oklch(23.5% 0.004 260 / 0.30);
  --shadow-card: 0 4px 24px oklch(23.5% 0.004 260 / 0.06);
  --glass:       oklch(98.9% 0.0015 260 / 0.72);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ui:      -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap-max: 72rem;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.6rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  overflow-wrap: break-word;
  text-wrap: balance;
}
p { overflow-wrap: break-word; }

::selection { background: var(--accent); color: var(--sheet); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

a { color: var(--accent); text-decoration: none; text-underline-offset: 0.22em; }
a:hover { color: var(--accent-deep); text-decoration: underline; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); }

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.4em;
}

/* ---------- 3. Layout shells ---------- */
/* .wrap is the wide chrome shell (header, footer); .shell is the
   980px content column every section uses. */
.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.shell {
  max-width: 980px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* ---------- 4. Global header chrome ---------- */
.skip-link {
  position: absolute;
  left: -200vw;
  top: 0.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
}
.skip-link:focus-visible { left: 0.5rem; }

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  min-height: 3rem;
  padding-block: 0.55rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-logo { width: 28px; height: 28px; border-radius: 22%; flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-sub { display: none; }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-size: 0.85rem;
}
.nav-links a { color: var(--ink); font-weight: 400; text-decoration: none; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-links a.nav-cta {
  background: var(--accent);
  color: var(--paper);
  border-radius: 980px;
  padding: 0.38em 1em;
  font-weight: 500;
}
.nav-links a.nav-cta:hover { background: var(--accent-deep); color: var(--paper); text-decoration: none; }

/* ---------- 5. Sticky local subnav (the one sanctioned translucency) ---------- */
.subnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.subnav-inner {
  max-width: 980px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.subnav-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  flex: 0 0 auto;
}
.subnav-title:hover { color: var(--ink); text-decoration: none; }
.subnav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.8rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  padding-block: 0.25rem;
}
.subnav-links::-webkit-scrollbar { display: none; }
.subnav-links a { color: var(--ink-muted); }
.subnav-links a:hover { color: var(--ink); text-decoration: none; }
.subnav-cta {
  background: var(--accent);
  color: var(--paper);
  border-radius: 980px;
  padding: 0.3em 0.95em;
  font-weight: 500;
}
.subnav-links a.subnav-cta { color: var(--paper); }
.subnav-links a.subnav-cta:hover { background: var(--accent-deep); color: var(--paper); }

/* ---------- 6. Pills and chevron links ---------- */
.pill {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  border-radius: 980px;
  padding: 0.7em 1.5em;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
}
.pill:hover { background: var(--accent-deep); color: var(--paper); text-decoration: none; }
.chev-link { font-weight: 400; }
.chev-link::after { content: " \203A"; }

/* ---------- 7. Hero ---------- */
.vb-hero {
  text-align: center;
  padding-block: clamp(5rem, 10vw, 8rem) clamp(4rem, 8vw, 6rem);
}
.hero-logo {
  width: clamp(88px, 9vw, 120px);
  height: auto;
  border-radius: 22%;
  box-shadow: 0 12px 36px oklch(23.5% 0.004 260 / 0.12);
  margin: 0 auto 1.6rem;
}
.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.vb-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.04;
  margin: 0 auto;
  max-width: 18ch;
  text-wrap: balance;
}
.vb-hero .subline {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 52ch;
  margin: 1.4rem auto 0;
  text-wrap: pretty;
}
.hero-cta {
  margin-top: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ---------- 8. Chapters: alternating bands, centered statements ---------- */
.chapter { padding-block: clamp(5rem, 10vw, 8rem); }
.chapter-alt { background: var(--paper-deep); }
.chapter-head { text-align: center; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.chapter-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.06;
  margin: 0 auto;
  max-width: 22ch;
  text-wrap: balance;
}
.chapter-head .subline {
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 1.1rem auto 0;
  text-wrap: pretty;
}

/* Closing CTA chapter */
.closer { text-align: center; }
.closer h2 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.06;
  margin: 0 auto;
  max-width: 20ch;
  text-wrap: balance;
}
.closer .subline {
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 50ch;
  margin: 1.1rem auto 0;
}
.closer .hero-cta { margin-top: 2rem; }

/* Quiet inline limit notes */
.vb-note { font-size: 0.9rem; color: var(--ink-muted); }
.vb-note strong { color: var(--ink); font-weight: 600; }

/* ---------- 9. Mock panels (product-shot stand-ins, real text) ---------- */
.panel { margin: clamp(3rem, 6vw, 4.5rem) auto 0; max-width: 620px; }
.mock {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  text-align: left;
  font-size: 0.92rem;
}
.mock-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.mock-title { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.mock-mono { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-muted); letter-spacing: 0.05em; }
.mock-rows { list-style: none; margin: 0; padding: 0; }
.mock-rows > li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; align-self: center; }
.dot-ok { background: var(--ok); }
.dot-flag { background: var(--accent); }
.dot-note { background: var(--ink-muted); }
.mock-name { font-weight: 500; }
.mock-val { margin-left: auto; font-weight: 600; }
.mock-val.ok { color: var(--ok-ink); }
.mock-val.flag { color: var(--accent); }
.mock-val.quiet { color: var(--ink-muted); font-weight: 400; }
.mock-note { flex-basis: 100%; margin: 0; padding-left: 1.35rem; font-size: 0.83rem; color: var(--ink-muted); }
.mock-foot { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; padding-top: 1rem; }
.mock-btn {
  background: var(--accent);
  color: var(--paper);
  border-radius: 980px;
  padding: 0.35em 1.1em;
  font-weight: 500;
  font-size: 0.85rem;
}
.mock-foot .mock-note { flex-basis: auto; padding-left: 0; }
.mock-sub { font-size: 0.8rem; color: var(--ink-muted); margin-left: 0.25rem; }
.mock-link { color: var(--accent); font-weight: 500; }
.mock-end { margin-left: auto; }
.mock-cap { padding-left: 0; margin-top: 1rem; }
.mock-open { color: var(--ok-ink); font-weight: 600; }
.panel figcaption {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 48ch;
  margin-inline: auto;
}
.mock-file {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-top: 0.9rem;
  background: var(--paper);
}
.mock-file .mock-val { font-weight: 500; }
.mock-check {
  display: inline-flex;
  width: 1rem; height: 1rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--paper);
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex: 0 0 auto;
  align-self: center;
}

/* ---------- 9b. Shared section motifs: steps flow & checks board ---------- */
/* Promoted from the home and teachers pages, which both use them.
   Shared components live here so the two copies can never drift. */
.steps-flow { list-style: none; margin: 0; padding: 0; max-width: 820px; margin-inline: auto; }
.steps-flow > li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.5rem clamp(0.9rem, 2.5vw, 1.6rem);
  padding-block: clamp(1.8rem, 4vw, 2.6rem);
  border-top: 1px solid var(--line);
}
.steps-flow > li:first-child { border-top: 0; }
/* One numbering treatment everywhere: the same quiet circled
   counter the grading timeline uses. */
.step-num {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}
.step-body h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 0.55rem;
}
.step-body p { margin: 0; max-width: 62ch; }
.step-body p + p { margin-top: 0.7em; }

.checks-board {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding-inline: clamp(1.2rem, 3.5vw, 2.6rem);
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
}
.checks-colhead {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr 1.4fr;
  gap: clamp(1rem, 3vw, 2.4rem);
  padding-block: 1.2rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.checks-list { list-style: none; margin: 0; padding: 0; }
.check-row {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr 1.4fr;
  gap: 0.6rem clamp(1rem, 3vw, 2.4rem);
  padding-block: clamp(1.6rem, 3.5vw, 2.2rem);
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; }
.check-row h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 0;
}
.check-cell p { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.check-cell .cell-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}
@media (min-width: 880px) {
  .check-cell .cell-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 879px) {
  .checks-colhead { display: none; }
  .check-row { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}
.limits-note {
  max-width: 760px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
  text-align: center;
}
.limits-note h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 0.6rem;
}
.limits-note p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* ---------- 10. FAQ: quiet expandable rows ---------- */
.faq { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.3rem, 3vw, 1.8rem);
  font-family: var(--font-ui);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.faq .chev {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg) translateY(-2px);
}
.faq details[open] .chev { transform: rotate(225deg) translateY(-2px); }
.faq-body { padding-bottom: clamp(1.4rem, 3vw, 2rem); }
.faq-body p { margin: 0; max-width: 62ch; color: var(--ink); }
.faq-body p + p { margin-top: 0.8em; }

/* ---------- 11. Footer: the Apple treatment ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  padding-block: 2.2rem 2.6rem;
}
.footer-grid {
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; }
.footer-brand .brand-logo { width: 24px; height: 24px; }
.footer .brand-name {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.footer-tag { font-size: 0.75rem; color: var(--ink-muted); max-width: 22ch; margin-block-start: 0.4rem; }
.footer-head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  margin-block-end: 0.7rem;
}
.footer-col a {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-decoration: none;
  padding-block: 0.22rem;
}
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-fineprint {
  font-size: 0.75rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-top: 1.6rem;
}

/* ---------- 12. Motion: fade-up on entry, gated and once ---------- */
/* Requires the head gate script adding html.anim, plus the
   IntersectionObserver snippet adding .in. See APPLE-NOTES.md. */
@media (prefers-reduced-motion: no-preference) {
  html.anim .fade {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 480ms ease-out, transform 480ms ease-out;
    transition-delay: var(--d, 0ms);
  }
  html.anim .fade.in { opacity: 1; transform: none; }
  .faq .chev { transition: transform 220ms ease-out; }
  .pill, .subnav-cta, .mock-btn, .nav-cta { transition: background-color 160ms ease-out; }
}

/* ---------- 13. Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--ink-muted); }

/* ---------- 14. Print quieting ---------- */
@media print {
  .site-head, .subnav, .skip-link, .footer { display: none; }
  a { color: inherit; text-decoration: none; }
  .mock, .checks-board { box-shadow: none; }
}
