/* =========================================================
   Growing Minds Science: classes.css
   The classes hub and the four class pages on the annotated-observation
   system. The primitives (container, type, buttons, entrances, menu rows,
   range bar) come from fg-base.css; this file holds what only the class
   pages need: the title block, the curriculum timeline (Fig. 1), the class
   rows, the free-lesson panel, and the class page sections.
   Tokens from tokens-field-guide.css. Calm corners on panels and controls,
   quiet rules between rows, no shadows at rest.
   ========================================================= */

/* ---------- Title block: the lead line, then its supporting thought ---------- */
.cl-title { padding-block: clamp(40px, 7vw, 104px) clamp(40px, 6vw, 88px); }
.cl-title__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.cl-title h1 { font-size: clamp(2.75rem, 1.6rem + 3.2vw, 4.25rem); line-height: 0.98; letter-spacing: -0.025em; }
.cl-title .hb-lead { margin-top: 24px; color: var(--ink-soft); }
.cl-terms { margin-top: 20px; color: var(--ink-muted); font-size: 15px; max-width: 46ch; }
@media (max-width: 960px) { .cl-title__grid { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* ---------- Fig. 1: the four classes across birth to five ---------- */
.tl { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(18px, 2.4vw, 32px); }
.tl__axis, .tl__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tl__axis { color: var(--ink-muted); font-size: 13px; margin-bottom: 12px; }
.tl__axis > span:last-child { display: flex; justify-content: space-between; }
/* Phones: the last column is too narrow for "4" and "5 years" side by side, so the unit drops. */
@media (max-width: 480px) { .tl__yrs { display: none; } }
.tl__rows { display: grid; gap: 8px; }
/* Each row is one link: the bar spans the class's window and carries its name. */
.tl__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); text-decoration: none; color: var(--on-forest); --bar: var(--forest); --bar-hover: var(--forest-deep); }
.tl__row--ink { color: var(--paper); --bar: var(--ink); --bar-hover: var(--ink-700); }
.tl__row--soon { color: var(--ink); --bar: var(--sage-mist); --bar-hover: var(--sage-mist-2); }
.tl__name, .tl__bar { grid-column: var(--from) / var(--to); grid-row: 1; }
/* On wide screens the name is the bar: it carries the color, so its text and ground are one element. */
.tl__bar { display: none; }
.tl__name { min-height: 40px; display: flex; align-items: center; border-radius: var(--radius); background: var(--bar); padding: 9px 12px; font-size: 14px; font-weight: 500; line-height: 1.3; transition: background-color 160ms ease; }
.tl__row:hover .tl__name { background: var(--bar-hover); }
.tl__row:hover .tl__name { text-decoration: underline; text-underline-offset: 0.16em; }
/* A window too short for its name (the first year): the bar stays in its window and the name sits beside it. */
@media (min-width: 641px) {
  .tl__row--out .tl__bar { display: block; min-height: 40px; border-radius: var(--radius); background: var(--bar); transition: background-color 160ms ease; }
  .tl__row--out .tl__name { grid-column: var(--to) / -1; background: none; color: var(--ink); }
  .tl__row--out:hover .tl__name { background: none; }
  .tl__row--out:hover .tl__bar { background: var(--bar-hover); }
}
/* On a phone the name takes its own line above a thin bar, aligned to the bar's end when the bar ends the axis. */
@media (max-width: 640px) {
  .tl__row { color: var(--ink); row-gap: 6px; min-height: 44px; }
  .tl__name { grid-column: 1 / -1; padding: 0; min-height: 0; display: block; background: none; }
  .tl__row:hover .tl__name { background: none; }
  .tl__bar { display: block; background: var(--bar); }
  .tl__row--end .tl__name { text-align: right; }
  .tl__bar { grid-row: 2; min-height: 10px; border-radius: 5px; }
  .tl__row--soon .tl__bar { background: var(--sage-mist-2); }
}
.tl figcaption { margin-top: 14px; font-size: 13px; color: var(--ink-muted); }
.tl figcaption b { color: var(--ink); font-weight: 600; margin-right: 0.4em; }

/* ---------- The classes, as rows ---------- */
.cl-list { padding-block: 0 clamp(64px, 9vw, 128px); }
.cl-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 12px clamp(24px, 4vw, 56px); padding-block: 32px; border-top: 1px solid var(--border-soft); align-items: start; }
.cl-row:first-child { border-top: 0; padding-top: 0; }
.cl-row h2 { font-family: var(--font-display); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); line-height: 1.02; letter-spacing: -0.015em; font-weight: 400; }
.cl-row h2 a { text-decoration: none; display: inline-block; padding-block: 8px; margin-block: -8px; }
.cl-row h2 a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 0.16em; }
.cl-row__body p { color: var(--ink-soft); }
.cl-row__meta { margin-top: 10px; font-size: 15px; color: var(--ink-muted); }
.cl-row__act { display: grid; gap: 12px; justify-items: start; }
.cl-row__price { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.cl-row__price.soon { color: var(--clay-text); font-size: 15px; font-weight: 500; }
.cl-row__act .hb-btn { min-width: 11rem; }
.cl-row__links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.cl-row__links a { display: inline-flex; align-items: center; min-height: 44px; }
.cl-row__note { font-size: 14px; color: var(--ink-muted); max-width: 30ch; }
@media (max-width: 960px) {
  .cl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 44px 40px; }
  .cl-row__head { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cl-row { grid-template-columns: minmax(0, 1fr); padding-block: 28px; }
  .cl-row__act { justify-items: stretch; }
  .cl-row__act .hb-btn { width: 100%; }
}

/* ---------- Not sure yet: one panel, one action ---------- */
.cl-free { background: var(--sage-mist); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 5vw, 80px); align-items: end; }
.cl-free p { color: var(--ink-soft); margin-top: 14px; max-width: 46ch; }
.cl-free__act { display: grid; gap: 14px; justify-items: start; }
.cl-free__links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.cl-free__links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 760px) { .cl-free { grid-template-columns: minmax(0, 1fr); } .cl-free__act { justify-items: stretch; } }

/* =========================================================
   The four class pages (body.cp). Their content markup is kept as it was,
   so every anchor and hook (#enroll, #syllabus, #sample, #waitlist, the
   .class-hero .hero__ctas the enroll bar watches, [data-enroll-bar], the
   waitlist form) still works; these rules put it on the system.
   ========================================================= */
.cp main .container { width: min(100% - 2 * var(--hb-gutter), 1320px); margin-inline: auto; }
.cp main > section { padding-block: clamp(56px, 8vw, 120px); }
.cp main h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.cp main h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.cp .section--alt { background: var(--surface); }

/* A narrow section becomes the homepage's split: heading left, content right. */
.cp main .container--narrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 80px); align-items: start; }
.cp main .container--narrow > :not(h2):not(.section-head) { grid-column: 2; }
.cp main .container--narrow > h2, .cp main .container--narrow > .section-head { grid-column: 1; }
@media (max-width: 860px) { .cp main .container--narrow { grid-template-columns: minmax(0, 1fr); } .cp main .container--narrow > * { grid-column: 1 !important; } }

/* Buttons on the system: one flat shape, calm corners; the ghost is the quiet outline. */
.cp .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 48px; padding: 0 1.25rem; border: 0; border-radius: var(--radius); background: var(--forest); color: var(--on-forest); font-weight: 500; font-size: 1rem; text-decoration: none; transition: background-color 160ms ease; }
.cp .btn:hover { background: var(--forest-deep); color: var(--on-forest); }
.cp .btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cp .btn--ghost:hover { background: var(--sage-mist); color: var(--ink); }
.cp .btn--block { width: 100%; }
.cp .btn--lg { min-height: 52px; }

/* ---------- Title block ---------- */
.cp .class-hero { padding-block: clamp(40px, 6vw, 96px) clamp(48px, 7vw, 104px); }
.cp .class-hero > .container { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px clamp(32px, 5vw, 80px); align-items: center; }
.cp .class-hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.75rem, 1.6rem + 4vw, 5rem); line-height: 0.98; letter-spacing: -0.025em; text-wrap: balance; }
.cp .class-hero__lede { margin-top: 22px; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.45; color: var(--ink-soft); max-width: 44ch; }
.cp .class-intro__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 12px 24px; max-width: 40rem; margin-top: 24px; font-size: 15px; }
.cp .class-intro__facts dt { color: var(--ink-muted); font-size: 13px; }
.cp .class-intro__facts dd { color: var(--ink); font-weight: 500; }
.cp .hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cp .class-intro__fine { margin-top: 16px; font-size: 14px; color: var(--ink-muted); max-width: 52ch; }
.cp .class-intro__fine a { display: inline-block; padding-block: 0.7rem; margin-block: -0.7rem; }
@media (max-width: 900px) { .cp .class-hero > .container { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .cp .hero__ctas .btn { width: 100%; } }

/* The figure: the class's own chart, or the curriculum timeline, on a soft-white plate */
.cp .fig--plate { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(18px, 2.4vw, 32px); margin: 0; }
.cp .fig svg { display: block; width: 100%; height: auto; }
.cp .fig-text { font-family: var(--font-body); font-size: 15px; fill: var(--ink-soft); }
.cp .fig-text--sm { font-size: 13px; fill: var(--ink-muted); }
.cp .fig-grid { stroke: var(--border-soft); }
.cp .fig-axis { stroke: var(--ink-muted); }
.cp .fig-ref { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; }
.cp .fig-band { fill: var(--sage-mist); }
.cp .fig-band-edge { stroke: var(--forest); stroke-width: 1; stroke-dasharray: 4 5; fill: none; }
.cp .fig-curve { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cp .fig-curve--a { stroke: var(--ink); }
.cp .fig-curve--b { stroke: var(--forest); stroke-dasharray: 9 7; }
.cp .fig-dot { fill: var(--note-amber); stroke: var(--surface); stroke-width: 2; }
.cp .fig-label--band { fill: var(--forest); font-weight: 600; }
.cp .fig__key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); list-style: none; padding: 0; }
.cp .fig__key li { display: inline-flex; align-items: center; gap: 8px; }
.cp .fig__key-line { width: 1.75rem; border-top: 3px solid var(--ink); }
.cp .fig__key-line--b { border-top: 3px dashed var(--forest); }
.cp .fig__caption { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-muted); max-width: 70ch; }
.cp .fig__caption b { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .cp .fig-text { font-size: 20px; } .cp .fig-text--sm { font-size: 18px; } }
/* Fig. 1 on a class page: the class's own row leads, the others step back */
.tl--class .tl__row--dim { color: var(--ink); --bar: var(--sage-mist); --bar-hover: var(--sage-mist-2); }
.tl--class .tl__row--dim.tl__row--soon { --bar: var(--paper-2); }

/* ---------- Read part of a lesson (toddler) ---------- */
.cp .lesson-sample > .container { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 80px); }
.cp .lesson-sample__note { margin-top: 14px; color: var(--ink-soft); font-size: 15px; max-width: 40ch; }
.cp .lesson-sample__text { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 40px); font-family: var(--font-display); font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; }
.cp .lesson-sample__text p + p { margin-top: 0.9em; }
@media (max-width: 860px) { .cp .lesson-sample > .container { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Lists: outcomes with a small mark, quiet rules elsewhere ---------- */
.cp .check-list { display: grid; gap: 14px; list-style: none; padding: 0; }
.cp .check-list li { display: grid; grid-template-columns: auto 1fr; gap: 14px; color: var(--ink); }
.cp .check-list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--note-amber); margin-top: 0.55em; }

/* ---------- Syllabus: modules as rows ---------- */
.cp .section-head { display: grid; gap: 14px; margin-bottom: clamp(24px, 3vw, 40px); }
.cp .section-head__lede { color: var(--ink-soft); max-width: 52ch; }
.cp .syllabus { list-style: none; padding: 0; display: grid; }
.cp .syllabus__item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px clamp(32px, 5vw, 80px); padding-block: 26px; border-top: 1px solid var(--border-soft); }
.cp .syllabus__item:first-child { border-top: 0; padding-top: 0; }
.cp .syllabus__num { font-size: 13px; color: var(--clay-text); font-weight: 500; }
.cp .syllabus__title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.1; margin-top: 4px; }
.cp .syllabus__meta { margin-top: 6px; font-size: 14px; color: var(--ink-muted); }
.cp .syllabus__body > p { color: var(--ink-soft); }
.cp .syllabus__lessons { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 2px; font-size: 15px; }
.cp .syllabus__lessons li { display: grid; grid-template-columns: 1.75rem 1fr; min-height: 32px; align-items: baseline; }
.cp .syllabus__lessons li > span:first-child { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.cp .syllabus__lessons a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -6px; }
.cp .syllabus__free { font-style: normal; font-size: 13px; color: var(--clay-text); margin-left: 8px; }
@media (max-width: 760px) { .cp .syllabus__item { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Sources: the research-blue module ---------- */
.cp .sources { grid-template-rows: auto 1fr; align-content: start; margin-top: clamp(48px, 6vw, 88px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--border-soft); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px clamp(32px, 5vw, 80px); }
.cp .sources__title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.1; color: var(--research); }
.cp .sources__title, .cp .sources__lede { grid-column: 1; }
.cp .sources__lede { font-size: 15px; color: var(--ink-soft); align-self: start; }
.cp .sources-list { grid-column: 2; grid-row: 1 / span 2; }
.cp .sources-list { list-style: none; padding: 0; display: grid; }
.cp .sources-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding-block: 12px; border-top: 1px solid var(--border-soft); font-size: 15px; line-height: 1.45; }
.cp .sources-list li:first-child { border-top: 0; padding-top: 0; }
.cp .sources-list__where { font-size: 13px; color: var(--research); white-space: nowrap; }
.cp .sources-list a { color: var(--research); }
@media (max-width: 760px) { .cp .sources { grid-template-columns: minmax(0, 1fr); } .cp .sources-list { grid-column: 1; grid-row: auto; } .cp .sources-list li { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Who teaches it ---------- */
.cp .educator { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: start; }
.cp .educator__photo { width: 72px; height: 72px; border-radius: var(--radius-lg); object-fit: cover; }
.cp .educator__body { display: grid; gap: 12px; color: var(--ink-soft); }
.cp .educator__body strong { color: var(--ink); font-weight: 600; }

/* ---------- Free reading: one sage-mist panel of links ---------- */
.cp ul.reading { list-style: none; padding: 8px clamp(16px, 2.4vw, 28px); background: var(--sage-mist); border-radius: var(--radius-lg); display: grid; }
.cp .reading li + li { border-top: 1px solid var(--sage-mist-2); }
.cp .reading a { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding-block: 14px; min-height: 48px; text-decoration: none; }
.cp .reading__kind { font-size: 13px; color: var(--ink-muted); }
.cp .reading__title { font-weight: 500; }
.cp .reading a:hover .reading__title { color: var(--forest); text-decoration: underline; text-underline-offset: 0.16em; }
@media (max-width: 560px) { .cp .reading a { grid-template-columns: minmax(0, 1fr) auto; } .cp .reading__kind { grid-column: 1 / -1; } }

/* ---------- Questions ---------- */
.cp .faq-class-list { display: grid; }
.cp .faq-class-item { border-top: 1px solid var(--border-soft); }
.cp .faq-class-item:last-child { border-bottom: 1px solid var(--border-soft); }
.cp .faq-class-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; min-height: 56px; padding-block: 12px; font-weight: 500; }
.cp .faq-class-item summary::-webkit-details-marker { display: none; }
.cp .faq-class-item summary::after { content: "+"; font-size: 1.25rem; color: var(--ink-muted); }
.cp .faq-class-item[open] summary::after { content: "\2212"; }
.cp .faq-class-item p { padding-bottom: 18px; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Enroll and waitlist: the close ---------- */
.cp .signup { background: var(--sage-mist); }
.cp .signup__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.cp .signup__head { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem) !important; line-height: 0.98 !important; letter-spacing: -0.025em !important; grid-column: 1; }
.cp .signup__head mark { background: none; color: var(--forest); }
.cp .signup__form { grid-column: 2; grid-row: 1 / span 2; background: var(--surface); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 36px); display: grid; gap: 12px; }
.cp .signup__form-title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); }
.cp .signup__price { font-size: 1.125rem; }
.cp .signup__price strong { font-weight: 600; }
.cp .signup__note, .cp .signup__refund, .cp .signup__fine { font-size: 14px; color: var(--ink-soft); }
/* Fine print with several links: generous line spacing keeps each link a separate target. */
.cp .signup__fine { line-height: 2.1; }
.cp .signup__back a { display: inline-flex; align-items: center; min-height: 44px; }
.cp .signup__body { grid-column: 1; }
.cp .signup__back { margin-top: 8px; font-size: 15px; }
.cp .form-row { display: grid; gap: 6px; }
.cp .form-label { font-weight: 500; }
.cp .form-input { min-height: 48px; padding: 0 14px; border: 1.5px solid var(--ink-muted); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; }
.cp .form-input:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.cp .form-help, .cp .form-status { font-size: 14px; color: var(--ink-soft); }
@media (max-width: 860px) { .cp .signup__inner { grid-template-columns: minmax(0, 1fr); } .cp .signup__form, .cp .signup__body, .cp .signup__head { grid-column: 1; grid-row: auto; } }

/* ---------- The phone enroll bar (main.js shows it once the hero buttons scroll away) ---------- */
.cp .enroll-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--hb-gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--border-soft); transform: translateY(100%); transition: transform 220ms ease; }
.cp .enroll-bar.is-visible { transform: none; }
.cp .enroll-bar[hidden] { display: none; }
.cp .enroll-bar__label { font-size: 14px; color: var(--ink-soft); }
.cp .enroll-bar__label strong { display: block; color: var(--ink); font-weight: 600; }
.cp .enroll-bar .btn { min-height: 44px; }
@media (min-width: 761px) { .cp .enroll-bar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .cp .enroll-bar { transition: none; } }
.cl-terms--trust { color: var(--ink-soft); font-weight: 600; }
