/* Thousand Acorns Tutoring — one stylesheet for the whole site.
   Bump the ?v= query in templates/base.html (build.py does it from this file's hash) on every change.
   Design "Daylight" (chosen October 13, 2026): a sunny Conejo Valley day. Sky-blue header and page heads that end in a
   drawing of the hills, a leaf-green band, white and mint sections, deep-green ink for text and 2px outlines, a deep-green
   footer. Young Serif for headings, Atkinson Hyperlegible for text, Playwrite US Trad for the one handwritten note.
   The memorable parts: the hills under every page head, and the price card's solid leaf-green shadow. */

@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/young-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playwrite US Trad"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/playwrite-us-trad-latin-400-basic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #0F3D2E;        /* text, 2px outlines, the footer */
  --ink-hover: #1B5640;
  --ink-2: #2F5446;      /* secondary text: 8.5:1 on white, 7.3:1 on sky, 7.6:1 on mint */
  --graphite: #5B6B64;   /* quiet text: 5.6:1 on white, 5.1:1 on mint, 4.9:1 on sky */
  --forest: #2F6B4F;     /* the handwritten note and small labels: 6.3:1 on white */
  --leaf: #5EDB7A;       /* the accent: buttons, the band, badges (ink on leaf is 6.9:1) */
  --leaf-hover: #46CC66;
  --mint: #E8F8E4;       /* alternate sections */
  --mint-2: #F4FBF2;     /* quiet fills */
  --sky: #E3F0FB;        /* header and page heads */
  --butter: #FFC94D;     /* the sun */
  --paper: #FFFFFF;
  --rule: #CBDDD1;       /* hairlines */
  --dash: #B9D8C1;       /* dashed dividers inside cards */
  --on-ink: #E4F1E8;     /* text on the footer (10.5:1) */
  --on-ink-2: #C3D8CB;   /* quieter text on the footer (8.1:1) */

  --font-head: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Playwrite US Trad", "Segoe Print", cursive;

  --gutter: clamp(24px, 4vw, 48px);
  --col: 1400px;
  --edge: max(var(--gutter), calc((100% - var(--col)) / 2 + var(--gutter)));
  --radius: 18px;
  --radius-lg: 22px;
  --section: clamp(56px, 7vw, 96px);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.125rem; line-height: 1.6;
  font-feature-settings: "kern" 1;
  overflow-wrap: break-word;   /* a long URL or address wraps instead of widening the page (privacy page, 320 px) */
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-ink :focus-visible { outline-color: var(--leaf); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
/* Young Serif has one weight: never let the browser fake a bold */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; font-synthesis: none; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
.nw { white-space: nowrap; }   /* short ranges such as (K–5): an en dash allows a line break after it */
h2 { font-size: clamp(1.875rem, 1.4rem + 1.5vw, 2.75rem); line-height: 1.12; }
h3 { font-size: clamp(1.3125rem, 1.2rem + .4vw, 1.5rem); line-height: 1.2; }
h4 { font-size: 1.1875rem; }
.lede { font-size: 1.25rem; line-height: 1.55; max-width: 62ch; }
.muted { color: var(--graphite); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 50; background: var(--leaf); color: var(--ink); border: 2px solid var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- one shared column ---------- */
.wrap { padding-inline: var(--edge); }
.section { padding-block: var(--section); }
.section--sage { background: var(--mint); }
.section--leaf { background: var(--leaf); }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); margin: 0; }
.section--leaf .section-head p { color: var(--ink); }

/* ---------- placeholders for facts the owner hasn't given yet (pkgcheck fails on any of these) ---------- */
.todo {
  font-family: var(--font-body); font-weight: 700; font-size: .82em; letter-spacing: 0; line-height: 1.3;
  color: #5B4500; background: #FFF4CC; border: 1px dashed #B8860B; border-radius: 4px; padding: .05em .35em;
  white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- header (sky) ---------- */
.site-header { background: var(--sky); color: var(--ink); }
.nav { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand svg { width: 32px; height: 38px; flex: none; }
.brand-name { font-family: var(--font-head); font-size: 1.375rem; line-height: 1.05; }
.brand-name span { display: block; font-family: var(--font-body); font-size: .8125rem; color: var(--ink-2); letter-spacing: .01em; margin-top: 3px; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 700; padding: 10px 2px; display: inline-block; }
.nav-links a:hover, .nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .45em; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-actions .nav-toggle { display: none; width: 48px; padding: 0; background: var(--leaf); }
.nav-actions .nav-toggle:hover, .nav-actions .nav-toggle[aria-expanded="true"] { background: var(--leaf-hover); }

/* ---------- buttons: pills with an ink outline ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--leaf); }
.btn-primary:hover { background: var(--leaf-hover); }
.btn-call:hover { background: var(--mint); }
.btn svg { width: 18px; height: 18px; }
/* the last step of a card or form, and buttons on the leaf band: solid ink */
.hq-actions .btn-primary, .lead-form .btn-primary, .section--leaf .btn-primary { background: var(--ink); color: var(--paper); }
.hq-actions .btn-primary:hover, .lead-form .btn-primary:hover, .section--leaf .btn-primary:hover { background: var(--ink-hover); }

/* ---------- page heads (sky) and the hills ---------- */
.hero { background: var(--sky); color: var(--ink); padding-top: 32px; }
.hero-grid {
  display: grid; gap: 28px 64px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  grid-template-areas: "copy quote" "after quote";
  grid-template-rows: auto 1fr;
}
.hero-copy { grid-area: copy; }
.hero-after { grid-area: after; }
.hero .hero-quote { grid-area: quote; }
.topline { font-size: 1rem; font-weight: 700; color: var(--ink-2); margin: 0 0 16px; }
.hero h1 { font-size: clamp(2.125rem, 1.15rem + 3vw, 3.5rem); line-height: 1.08; letter-spacing: -.01em; margin: 0; max-width: 20ch; }
.hero-def { color: var(--ink-2); max-width: 60ch; margin: 0 0 20px; }
.hero-def strong { color: var(--ink); }
.terms { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; padding: 0; margin: 0; }
.terms li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; }
.terms svg { width: 28px; height: 28px; padding: 5px; flex: none; border-radius: 50%; background: var(--leaf); color: var(--ink); border: 2px solid var(--ink); }
.review-line { margin: 16px 0 0; color: var(--ink-2); font-size: 1rem; }
.hand-note {
  display: inline-block; margin: 24px 0 0; padding-bottom: 12px; transform: rotate(-3deg); transform-origin: left center;
  font-family: var(--font-hand); font-size: 1.3125rem; line-height: 1.6; color: var(--forest);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c40-6 80-7 120-4 30 2 60 4 90 1 15-1 30-3 44-5' fill='none' stroke='%235EDB7A' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left bottom / 100% 12px no-repeat;
}
.hills { display: block; width: 100%; height: clamp(110px, 13vw, 230px); margin-top: clamp(24px, 3vw, 44px); }
.page-head .hills { height: clamp(84px, 9.5vw, 170px); }
.hills .sun { fill: var(--butter); }
.hills .far { fill: #D3ECD8; }
.hills .far-oaks { fill: #A9D6B3; }
.hills .mid { fill: #A3D9AF; }
.hills .mid-oaks { fill: #4F9768; }
.hills .front { fill: var(--leaf); }
.hero--into-paper .hills .front { fill: var(--paper); }

/* ---------- price card: white, ink outline, solid leaf shadow ---------- */
.hero-quote {
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 22px 24px 24px; box-shadow: 10px 10px 0 var(--leaf);
}
.hq-title { font-family: var(--font-head); font-weight: 400; font-synthesis: none; font-size: 1.625rem; line-height: 1.12; letter-spacing: -.005em; margin: 0 0 14px; }
.hq-teacher { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 2px dashed var(--dash); font-size: 1rem; line-height: 1.3; }
.hq-teacher b { display: block; }
.hq-teacher small { display: block; font-size: .875rem; color: var(--graphite); }
.hq-cred { display: block; margin-top: 2px; font-size: .875rem; }
.hq-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink); background: var(--mint); display: grid; place-items: center; overflow: hidden; }
.hq-avatar svg { width: 24px; height: 24px; }
.hq-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.hq-grid label { display: grid; gap: 6px; font-size: .9375rem; font-weight: 700; }
select, input, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background-color: var(--paper);
  border: 2px solid var(--ink); border-radius: 12px; min-height: 48px; width: 100%; padding: 10px 14px;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230F3D2E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.hq-grid select { border-radius: 999px; padding-left: 16px; }
select:hover, input:hover, textarea:hover { background-color: var(--mint-2); }
.hq-grid select:disabled { color: var(--graphite); background-color: var(--mint-2); border-style: dashed; }
.hq-weeks { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .9375rem; font-weight: 700; }
.hq-weeks > span { margin-right: auto; }
.hq-weeks label { position: relative; }
.hq-weeks input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.hq-weeks label span { display: grid; place-items: center; min-width: 44px; height: 36px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 1rem; }
.hq-weeks label:hover span { background: var(--mint-2); }
.hq-weeks input:checked + span { background: var(--leaf); }
.hq-weeks input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.hq-result { border-top: 2px dashed var(--dash); padding-top: 14px; margin-bottom: 18px; }
.hq-price { margin: 0; font-family: var(--font-head); font-size: 2.375rem; line-height: 1.05; }
.hq-price .hq-unit { font-family: var(--font-body); font-size: 1rem; color: var(--graphite); }
.hq-month { margin: 6px 0 0; font-size: 1rem; line-height: 1.4; }
.hq-month .our-price { font-weight: 700; }
.hq-package { margin: 6px 0 0; font-size: 1rem; color: var(--graphite); }
.hq-package .our-price { color: var(--ink); font-weight: 700; }
.hq-detail { margin: 8px 0 0; font-size: 1rem; color: var(--graphite); }
.hq-note { margin: 10px 0 0; font-size: .9375rem; background: var(--mint); border-radius: 12px; padding: 8px 12px; }
.hq-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hq-actions .btn-primary { flex: 1 1 auto; }
.hq-actions .btn-call { flex: 0 0 auto; }
.hero-quote--plain { box-shadow: none; }

/* ---------- the leaf band: how tutoring works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--ink);
  font-family: var(--font-head); font-size: 1.75rem; line-height: 1;
}
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink); }

/* ---------- subjects and prices ---------- */
.price-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 0 0 20px; }
.price-strip p { margin: 0; background: var(--mint); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 22px; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.price-strip b { display: block; font-family: var(--font-head); font-weight: 400; font-size: 2.25rem; line-height: 1.1; margin-bottom: 6px; }
.subject-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.subject-list li { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px 24px 24px; }
.subject-list .badge { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 50%; background: var(--leaf); }
.subject-list .badge svg { width: 26px; height: 26px; }
.subject-list h3 { margin: 0 0 8px; font-size: 1.4375rem; }
.subject-list h3 a { text-decoration: none; }
.subject-list h3 a:hover { text-decoration: underline; }
.subject-list .grades { display: block; font-family: var(--font-body); font-size: .9375rem; font-weight: 700; color: var(--forest); margin-top: 4px; letter-spacing: 0; }
.subject-list p { margin: 0; font-size: 1rem; color: var(--ink-2); }
.not-offered { margin-top: 24px; color: var(--graphite); font-size: 1rem; max-width: 62ch; }

/* ---------- teacher ---------- */
.teacher { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.teacher-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); background: var(--paper); border: 2px dashed var(--ink);
  display: grid; place-items: center; text-align: center; padding: 16px; color: var(--graphite); font-size: .9375rem;
}
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-lg) - 2px); }
.teacher-photo.has-photo { padding: 0; border: 2px solid var(--ink); background: var(--mint); box-shadow: 8px 8px 0 var(--leaf); }
.teacher h3 { font-size: 1.75rem; margin-bottom: 6px; }
.teacher .cred { color: var(--ink-2); font-weight: 700; margin-bottom: 14px; }

/* ---------- safety rules ---------- */
.rules { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.rule-list { list-style: none; padding: 0; margin: 0 0 1.25em; display: grid; gap: 12px; }
.rule-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 12px 16px; font-weight: 700; line-height: 1.4; }
.rule-list svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--leaf); }
.checks dl { margin: 0 0 18px; display: grid; gap: 16px; }
.checks dt { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.25; }
.checks dd { margin: 0; color: var(--ink-2); }

/* ---------- cities and schools ---------- */
.cities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.city { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 22px 22px; }
.city h3 { font-size: 1.375rem; margin-bottom: 4px; }
.city h3 a { text-decoration: none; }
.city h3 a:hover { text-decoration: underline; }
.city .district { font-size: .9375rem; color: var(--graphite); margin: 0 0 10px; }
.city ul { list-style: none; padding: 0; margin: 0; font-size: 1rem; line-height: 1.45; }
.city li { padding: 3px 0; }
.city .later { font-size: .9375rem; color: var(--graphite); margin: 0; }

/* ---------- guide links ---------- */
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.guide-list li { border-top: 2px solid var(--ink); padding: 18px 0 22px; }
.guide-list a { font-family: var(--font-head); font-size: 1.3125rem; line-height: 1.3; }
.guide-list p { margin: 6px 0 0; font-size: 1rem; color: var(--ink-2); }

/* ---------- FAQ: one outlined card per question ---------- */
.faq { max-width: 80ch; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 64px 16px 20px; position: relative; font-family: var(--font-head); font-size: 1.1875rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 32px; height: 32px; margin-top: -16px;
  border-radius: 50%; border: 2px solid var(--ink); transition: transform .15s ease;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%230F3D2E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px 9px no-repeat;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .answer { padding: 0 20px 18px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- inquiry form: the same card as the price card ---------- */
.inquiry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 56px; align-items: start; }
.lead-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: 26px; box-shadow: 10px 10px 0 var(--leaf);
}
.lead-form .full { grid-column: 1 / -1; }
.lead-form label { display: grid; gap: 6px; font-weight: 700; font-size: .9375rem; }
.lead-form .lbl { display: block; }
.lead-form .opt { font-weight: 400; color: var(--graphite); }
.lead-form textarea { min-height: 104px; resize: vertical; }
.lead-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-form .fine { font-size: .9375rem; color: var(--graphite); margin: 0; }
.lead-form button { justify-self: start; }

/* ---------- footer (ink) ---------- */
.site-footer { background: var(--ink); color: var(--on-ink); padding-block: 64px 36px; font-size: 1rem; }
.site-footer a { color: var(--on-ink); }
.foot-def { max-width: 46ch; font-family: var(--font-head); font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.4; color: var(--paper); margin: 0 0 40px; }
.foot-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
/* Each column is a <details>: folded on phones (site.js), open everywhere else, where it neither looks nor acts like a toggle */
.foot-fold > summary { list-style: none; pointer-events: none; }
.foot-fold > summary::-webkit-details-marker { display: none; }
.foot-title { font-size: 1rem; font-weight: 700; line-height: 1.15; margin: 0 0 10px; color: var(--paper); }
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { padding: 4px 0; line-height: 1.35; }
.foot-cols a { text-decoration: none; color: var(--on-ink-2); }
.foot-cols a:hover { color: var(--paper); text-decoration: underline; }
.foot-base { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(228, 241, 232, .22); color: var(--on-ink-2); display: grid; gap: 6px; }
.foot-base p { margin: 0; }
.foot-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }

/* ---------- breadcrumbs, jump strip, tables, sources (inner pages) ---------- */
.crumbs { font-size: .9375rem; padding-block: 14px 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--graphite); }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink); }
.jump { background: var(--leaf); }
.jump ul { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 6px 0 26px; }
.jump a { display: inline-block; padding: 7px 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .9375rem; line-height: 1.3; }
.jump a:hover { background: var(--mint); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.sources { font-size: .9375rem; color: var(--graphite); }
.not-affiliated { font-size: 1rem; font-weight: 700; padding: 12px 16px; background: var(--mint); border-radius: 14px; }

/* ---------- inner pages ---------- */
.page-head { padding-top: 24px; }
.page-head .crumbs { margin-bottom: 18px; padding-top: 0; }
.page-head-inner { max-width: 900px; }
.page-head-inner .hero-after { margin-top: 18px; }
.page-head h1 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.125rem); max-width: 24ch; }
.prose { max-width: 75ch; }
.prose--wide { max-width: 980px; }
/* A .wrap that is also .prose: its padding is the page edge, so the reading width goes on top of it.
   (Without this, the edge padding ate the 75ch on wide screens: 259px of text at 1920, none at 2560.) */
.wrap.prose { max-width: calc(75ch + 2 * var(--edge)); }
.wrap.prose--wide { max-width: calc(980px + 2 * var(--edge)); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose table { margin: 0 0 1.25em; }
.prose th[scope="row"] { width: 30%; border-bottom: 1px solid var(--rule); font-weight: 700; }
.note { font-size: 1rem; background: var(--mint); border-radius: 14px; padding: 12px 16px; }
.terms-table td:first-child { font-weight: 700; width: 34%; }
.section--sage .note, .section--sage .not-affiliated, .section--sage .callout, .section--sage .placement-line { background: var(--paper); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav-links { gap: 16px; }
  .cities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .subject-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
  .nav-links, .nav-actions .btn-primary { display: none; }
  .nav-actions .nav-toggle { display: inline-flex; }
  .nav.is-open .nav-links { display: flex; }
  .nav { flex-wrap: wrap; }
  .nav.is-open .nav-links { order: 3; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .nav.is-open .nav-links a { padding: 12px 0; display: block; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 24px 40px; }
}
@media (max-width: 820px) {
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "quote" "after"; gap: 22px; }
  .hero h1 { max-width: none; }
  .hero-quote, .lead-form { box-shadow: 8px 8px 0 var(--leaf); margin-right: 8px; }   /* the shadow stays inside the page edge */
  .teacher { grid-template-columns: 1fr; }
  .teacher-photo { max-width: 240px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .rules, .inquiry { grid-template-columns: 1fr; gap: 32px; }
  .cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-list { grid-template-columns: 1fr; }
}
@media (min-width: 641px) {
  .price-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* three boxes in a row on tablets, not two and one */
}
@media (max-width: 640px) {
  .subject-list, .price-strip { grid-template-columns: 1fr; }
}
/* Touch screens: list links get a taller tap area (Apple and Google suggest about 44 to 48 px) */
@media (pointer: coarse) {
  .foot-cols li { padding: 0; }
  .foot-cols a { display: inline-block; padding: 9px 0; }
  .city ul a, .link-row a { display: inline-block; padding-block: 6px; }
  .jump a { padding-block: 10px; }
  .foot-contact a { display: inline-block; padding-block: 10px; }
}
@media (max-width: 520px) {
  .nav { min-height: 64px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 1.0625rem; }
  .brand-name span { font-size: .8125rem; }
  .brand svg { width: 26px; height: 31px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { min-height: 44px; padding: 0 14px; }
  .nav-actions .nav-toggle { width: 44px; padding: 0; }
  .hero-quote { padding: 18px 16px; }
  .hq-teacher { display: none; }   /* the same line follows the card on phones, and the card's buttons stay on the first screen */
  .hq-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
  .hq-weeks { margin-bottom: 12px; }
  .hq-weeks label span { height: 34px; }
  .hq-result { padding-top: 12px; margin-bottom: 16px; }
  .hq-month { font-size: .9375rem; }
  .hq-grid label { grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; }
  .hq-actions { flex-wrap: nowrap; gap: 8px; }
  .hq-actions .btn { padding: 0 14px; }
  .tl-brand { display: none; }
  .hq-price { font-size: 2rem; }
  .lead-form { grid-template-columns: 1fr; padding: 18px; }
  .cities { grid-template-columns: 1fr; }
  .topline { margin-bottom: 12px; font-size: .9375rem; }
  .crumbs li:last-child { display: none; }  /* the H1 repeats it; keeps the price card's buttons on the first screen */
  .faq summary { padding: 14px 58px 14px 16px; font-size: 1.125rem; }
  .faq summary::after { right: 12px; }
  .faq .answer { padding: 0 16px 16px; }
  /* the footer on phones: one column, each group folds, every link a full-width 44 px row */
  .site-footer { padding-block: 48px 28px; }
  .foot-def { font-size: 1.1875rem; margin-bottom: 28px; }
  .foot-cols { grid-template-columns: 1fr; gap: 0; border-top: 1px solid rgba(228, 241, 232, .22); }
  .foot-fold { border-bottom: 1px solid rgba(228, 241, 232, .22); }
  .foot-fold > summary { pointer-events: auto; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin: 0; font-size: 1.0625rem; }
  .foot-fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
  .foot-fold[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .foot-fold ul { padding-bottom: 12px; }
  .foot-cols li { padding: 0; }
  .foot-cols a { display: block; padding: 11px 0; }   /* 44 px rows */
  .foot-base { margin-top: 20px; padding-top: 0; border-top: 0; gap: 10px; }
  .foot-contact { flex-direction: column; gap: 0; }
  .foot-contact li { min-height: 44px; display: flex; align-items: center; }   /* the li is flex; the link inside stays plain text */
  .foot-contact a { padding-block: 11px; }
}
@media (max-width: 380px) {
  .hq-actions { flex-wrap: wrap; } .hq-actions .btn { flex: 1 1 100%; }
  .brand-name { font-size: 1rem; }
  .nav-actions .btn-call { padding: 0 14px; }
  .nav-actions .btn-call svg { display: none; }   /* keeps the header on one row at 360px */
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .site-header, .hero-quote, .lead-form, .site-footer, .hills, .hand-note { display: none; } body { font-size: 12pt; } }

/* ---------- content pages ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.teacher--compact { grid-template-columns: 140px minmax(0, 1fr); gap: 22px; }
.teacher--compact .teacher-photo { font-size: .8125rem; padding: 8px; }
.teacher--compact .teacher-photo.has-photo { padding: 0; box-shadow: 6px 6px 0 var(--leaf); }
.teacher--compact h3 { font-size: 1.5rem; }
.safety-summary h3 { margin-bottom: 12px; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.prose h3 { margin-top: 1.3em; }
.prose ul li, .prose ol li { margin-bottom: .35em; }
.prose blockquote { margin: 0 0 1em; padding: 4px 0 4px 18px; border-left: 4px solid var(--leaf); }
.prose table td, .prose table th { font-size: 1rem; }
.table-wrap { overflow-x: auto; }
@media (max-width: 360px) { .prose td, .prose th { overflow-wrap: anywhere; } }   /* a 2-column table fits at 320 px */
/* Reading width: about 80 characters a line in Atkinson Hyperlegible (75ch measured 95 to 111 on laptops) */
.prose p, .prose li, .teacher p, .faq .answer p { max-width: 62ch; }
.prose p, .prose li, .faq .answer p { text-wrap: pretty; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .teacher--compact { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .stack-table thead { position: absolute; left: -9999px; }
  .stack-table tr { display: block; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .stack-table td { display: flow-root; border: 0; padding: 4px 0 4px 42%; }
  /* The label floats in the row's left 38%. Its percentages are of the cell's content box, which is 58% of the row:
     65.5% of it is 38% of the row, and -72.4% moves it 42% left, into the padding. A label that wraps to more lines
     than its value makes the row taller (flow-root holds the float) instead of running into the next row. */
  .stack-table td::before { content: attr(data-label); float: left; width: 65.5%; margin-left: -72.4%; font-weight: 700; }
  .stack-table th[scope="row"] { display: block; width: auto; border: 0; padding: 4px 0; }
}
.scores-table td { white-space: nowrap; }
.glance-table th[scope="row"] { width: 32%; }
.glance-table td, .sources { overflow-wrap: anywhere; }
a[href^="mailto:"] { overflow-wrap: anywhere; }   /* backstop for a long address on a narrow phone */

/* ---------- guides ---------- */
.article-head { max-width: 900px; }
.article-head h1 { max-width: 26ch; }
.article-head .dek { font-size: 1.25rem; line-height: 1.5; color: var(--ink); max-width: 62ch; margin: 22px 0 14px; }
.article-head .dek a, .covered a { color: var(--ink); }
.meta-line { font-size: .9375rem; color: var(--graphite); margin: 0 0 10px; }
.covered { font-size: .9375rem; color: var(--ink-2); max-width: 80ch; margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.article { display: grid; grid-template-columns: 220px minmax(0, 75ch); gap: 56px; align-items: start; padding-block: var(--section); }
.toc { position: sticky; top: 20px; font-size: .9375rem; }
.toc h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; letter-spacing: 0; margin: 0 0 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; line-height: 1.35; color: var(--ink-2); }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); text-decoration: underline; }
.article-body > h2:first-child, .article-body > .table-wrap:first-child { margin-top: 0; }
.article-body--wide { max-width: 980px; }
.callout { margin: 1.6em 0; padding: 16px 20px; background: var(--mint); border-radius: 16px; }
.callout p { margin: 0; }
.placement-line { font-size: 1rem; font-weight: 700; padding: 12px 16px; background: var(--mint); border-radius: 14px; }
.faq-list h3 { font-size: 1.25rem; margin: 1.2em 0 .35em; }
.source-list { font-size: .9375rem; color: var(--graphite); padding-left: 1.1em; overflow-wrap: anywhere; }
.source-list li { margin-bottom: .45em; }
.related-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
.related-grid li { border-top: 2px solid var(--ink); padding-top: 16px; }
.related-grid a { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.3; }
.related-grid p { margin: 6px 0 0; font-size: 1rem; color: var(--ink-2); }
.soft-cta h2 { max-width: 30ch; }
.soft-cta p { max-width: 62ch; color: var(--ink); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.stats-table th[scope="row"] { width: auto; font-weight: 700; }
.stats-table td { white-space: nowrap; }
.method-list summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.method-list ul { font-size: .9375rem; color: var(--graphite); overflow-wrap: anywhere; }
.cite-box { font-size: 1rem; overflow-wrap: anywhere; }
@media (max-width: 1060px) {
  .article { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc { position: static; border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 18px; max-width: 75ch; }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; margin-left: 0; border-left: 0; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; gap: 22px; }
  .article-head .dek { font-size: 1.125rem; }
  .stats-table td { white-space: normal; }
}
@media (max-width: 640px) {
  .stack-table td[data-label=""] { padding-left: 0; font-weight: 700; padding-top: 10px; }
  .stack-table td[data-label=""]::before { content: none; }
}
