/* Newton School — a quiet, welcoming place to begin.
 * Owned by worker-codex. HTML class contract: worker-claude.
 * hero.png and thanks.png: generated with built-in GPT image_gen.
 * Brief palette: paper, forest, sage, ochre, a small apple-red accent.
 * Native book/humanist type keeps this local preview free of font requests.
 */
:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --surface: #fcfbf7;
  --input: #fffefa;
  --ink: #213e32;
  --muted: #626c60;
  --line: #dcded3;
  --line-strong: #a8b3a3;
  --forest: #285640;
  --on-forest: #faf9ef;
  --sage: #e7eddf;
  --accent: #b14f3a;
  --focus: #53733c;
  --error: #a7372c;
  --error-bg: #fbede6;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Trebuchet MS", "Segoe UI", sans-serif;
  --space-xs: .5rem;
  --space-sm: .75rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #18231e; --surface: #202e26; --input: #1b2821;
    --ink: #f0f0df; --muted: #bcc6b5; --line: #3d4d40;
    --line-strong: #6f826d; --forest: #d2dfb7; --on-forest: #1c3326;
    --sage: #334635; --accent: #efad8f; --focus: #c3d69d;
    --error: #ffb5a6; --error-bg: #412d28;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #18231e; --surface: #202e26; --input: #1b2821;
  --ink: #f0f0df; --muted: #bcc6b5; --line: #3d4d40;
  --line-strong: #6f826d; --forest: #d2dfb7; --on-forest: #1c3326;
  --sage: #334635; --accent: #efad8f; --focus: #c3d69d;
  --error: #ffb5a6; --error-bg: #412d28;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
body, button, input, select { -webkit-font-smoothing: antialiased; }
a { color: var(--forest); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--sage); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 10; top: 12px; left: 16px; padding: 12px 18px; background: var(--forest); color: var(--on-forest); transform: translateY(-160%); border-radius: 4px; }
.skip:focus { transform: translateY(0); }
.top { border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1240px; margin-inline: auto; padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; line-height: 1.2; }
.brand b { font: 600 27px/1.2 var(--serif); letter-spacing: -.035em; }
.brand span { color: var(--muted); font-size: 11px; letter-spacing: .1em; margin-top: 4px; }
.home { font-size: 13px; font-weight: 600; text-decoration: none; padding-block: 10px; }
.home::before { content: "\2190"; margin-right: 9px; }
.wrap { max-width: 1240px; margin-inline: auto; padding: 30px 32px 72px; display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: 28px 64px; align-items: start; }
.preview-badge { grid-column: 1 / -1; margin: 0; justify-self: start; color: var(--muted); font-size: 11px; letter-spacing: .035em; display: flex; align-items: center; gap: 8px; }
.preview-badge::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero { position: sticky; top: 40px; padding-top: 28px; min-width: 0; }
.kicker { color: var(--accent); font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 22px; }
h1 { font: 400 clamp(46px, 5.3vw, 70px)/1.04 var(--serif); letter-spacing: -.055em; margin: 0 0 24px; max-width: 9ch; text-wrap: balance; }
.lead { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; max-width: 37ch; }
.hero .lead { color: var(--forest); font: 400 clamp(23px, 2.2vw, 28px)/1.3 var(--serif); letter-spacing: -.025em; max-width: 26ch; text-wrap: balance; }
.hero .lead-sub { margin: 14px 0 0; color: var(--muted); font: 400 14px/1.75 var(--sans); max-width: 40ch; }
.hero-art { margin: 30px 0 0 -12px; border-radius: 50% 50% 8px 8px; overflow: hidden; background: #f5f1e7; }
.hero-art img { width: 100%; height: auto; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 32px 36px 36px; }
.form-card { counter-reset: section; border-top: 3px solid var(--forest); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0; }
.form-card > .hint { margin-bottom: 28px; }
.req { color: var(--accent); font-size: .9em; }
.opt { display: inline-block; margin-inline-start: 4px; padding: 1px 5px; border-radius: 3px; background: var(--sage); color: var(--muted); font-weight: 400; font-size: 11px; line-height: 1.55; white-space: nowrap; vertical-align: baseline; }
.form-section { min-width: 0; border: 0; margin: 0; padding: 0; counter-increment: section; }
.form-section + .form-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-title { padding: 0; width: 100%; margin-bottom: 20px; font: 400 27px/1.25 var(--serif); letter-spacing: -.025em; display: flex; align-items: center; gap: 12px; }
.section-title::before { content: "0" counter(section); color: var(--accent); font: 600 11px/1 var(--sans); letter-spacing: .05em; }
.section-title .req { font: 400 18px/1 var(--sans); margin-left: -6px; }
.section-note { margin-top: -10px; margin-bottom: 16px; font-size: 13px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > label { font-size: 13px; line-height: 1.5; font-weight: 600; }
.field:has(> #schoolEmail) > label, .field:has(> #microsoftEmail) > label { min-block-size: 3em; }
.fields > .hint { margin-top: -8px; max-width: 65ch; }
input, select, textarea { width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--input); color: var(--ink); padding: 10px 12px; font-size: 16px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover { border-color: var(--forest); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
input::placeholder { color: var(--muted); opacity: .8; }
[aria-invalid="true"] { border-color: var(--error) !important; background: var(--error-bg) !important; }
.field-error { margin: 0; color: var(--error); font-size: 12px; line-height: 1.55; }
.teach-line { margin: 0 0 22px; }
.teach-line .section-note { margin: 0 0 9px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.teach-list { display: flex; flex-wrap: wrap; gap: 5px 15px; padding: 0; margin: 0; list-style: none; }
.teach-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.teach-item::before { content: ""; flex: 0 0 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.teach-item:first-child { color: var(--forest); font-weight: 600; }
.teach-item:first-child::before { background: var(--accent); }
.parent-group .fields { align-items: start; }
.parent-note { display: flex; align-items: baseline; gap: 9px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--sage); color: var(--ink); font-size: 13px; line-height: 1.65; }
.parent-note::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--forest); transform: translateY(-2px); }
.is-adult .parent-group .section-title { color: var(--muted); }
.parent-note, #parent-fields { transition: opacity .18s ease-out, transform .18s ease-out, display .18s allow-discrete; }
.parent-note[hidden], #parent-fields[hidden] { opacity: 0; transform: translateY(-4px); }
@starting-style {
  .parent-note:not([hidden]), #parent-fields:not([hidden]) { opacity: 0; transform: translateY(-4px); }
}
.address-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.address-grid .field--street { grid-column: span 4; }
.address-grid .field--apt { grid-column: span 2; }
.address-grid .field--city { grid-column: span 3; }
.address-grid .field--state { grid-column: span 1; }
.address-grid .field--zip { grid-column: span 2; }
.alert { margin-top: 24px; border: 1px solid var(--error); padding: 14px 16px; border-radius: 5px; color: var(--error); background: var(--error-bg); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.alert p { margin: 0; }
.actions { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.privacy-note { color: var(--muted); font-size: 12px; line-height: 1.6; max-width: 46ch; margin: 0; }
.btn { cursor: pointer; border: 1px solid transparent; border-radius: 5px; min-height: 52px; padding: 13px 20px; font-weight: 600; font-size: 14px; line-height: 1.5; transition: background-color .15s, transform .15s; }
.btn-primary { background: var(--forest); color: var(--on-forest); display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.btn-primary::after { content: "\2192"; font-size: 20px; line-height: 1; font-weight: 400; }
.btn-primary:hover { background: color-mix(in oklch, var(--forest), var(--ink) 15%); }
.btn-primary:active { transform: translateY(1px); }
.btn:disabled { cursor: wait; opacity: .7; }
.thanks { text-align: center; padding-block: 32px 40px; align-self: start; }
.thanks-art { max-width: 280px; margin: 0 auto 20px; overflow: hidden; border-radius: 50%; }
.thanks-art img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.thanks h2 { font: 400 44px/1.15 var(--serif); letter-spacing: -.04em; margin: 0 0 14px; }
.thanks .lead { margin-inline: auto; font-size: 15px; }
.thanks-summary { color: var(--ink); font-size: 14px; line-height: 1.7; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.foot { max-width: 1176px; margin: 0 auto; border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--muted); font-size: 11px; line-height: 2; text-align: center; }
.foot a { color: inherit; }
@media (min-width: 1440px) { .wrap { padding-top: 40px; gap: 32px 80px; } }
@media (max-width: 1000px) {
  .wrap { gap: 24px 36px; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  .card { padding: 28px; }
  h1 { font-size: 52px; }
  .address-grid .field--street, .address-grid .field--apt { grid-column: 1 / -1; }
  .parent-group .fields { grid-template-columns: minmax(0, 1fr); }
  .field:has(> #schoolEmail), .field:has(> #microsoftEmail) { grid-column: 1 / -1; }
  .field:has(> #schoolEmail) > label, .field:has(> #microsoftEmail) > label { min-block-size: 0; }
}
@media (max-width: 760px) {
  .top-inner { padding: 20px 24px; }
  .wrap { display: flex; flex-direction: column; gap: 24px; padding: 20px 24px 48px; max-width: 640px; }
  .hero { position: static; padding: 4px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 160px; align-items: center; gap: 16px; width: 100%; }
  .kicker { font-size: 10px; margin-bottom: 14px; }
  h1 { font-size: 44px; margin-bottom: 16px; max-width: 10ch; }
  .lead { font-size: 14px; line-height: 1.7; }
  .hero-art { margin: 0; border-radius: 50%; }
  .hero-art img { aspect-ratio: 1; }
  .card { width: 100%; padding: 28px; }
  .foot { margin-inline: 24px; padding-inline: 8px; }
}
@media (max-width: 480px) {
  .top-inner { padding: 17px 20px; gap: 12px; }
  .brand b { font-size: 23px; }
  .brand span { font-size: 9px; letter-spacing: .06em; }
  .home { font-size: 11px; }
  .home::before { margin-right: 5px; }
  .wrap { padding: 16px 16px 36px; gap: 20px; }
  .preview-badge { font-size: 10px; }
  .hero { display: block; position: relative; top: auto; padding: 6px 4px 0; }
  .hero-text { position: relative; z-index: 1; }
  h1 { font-size: 46px; max-width: 8.7ch; margin-bottom: 15px; }
  .hero .lead { max-width: 24ch; }
  .hero .lead-sub { font-size: 13px; margin-top: 12px; max-width: 37ch; }
  .hero .kicker { max-width: calc(100% - 90px); }
  .hero-art { width: 100%; max-width: 240px; margin: 14px auto 0; border-radius: 50% 50% 8px 8px; }
  .hero-art img { aspect-ratio: 2 / 1; object-position: center 56%; }
  .card { padding: 24px 20px 26px; border-radius: 6px; }
  .form-card > .hint { margin-bottom: 24px; }
  .section-title { font-size: 26px; gap: 10px; margin-bottom: 18px; }
  .fields, .address-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .fields .field, .address-grid .field { grid-column: 1 / -1; }
  .form-section + .form-section { margin-top: 28px; padding-top: 24px; }
  .teach-list { gap: 5px 12px; }
  .actions { gap: 16px; margin-top: 26px; padding-top: 22px; }
  .thanks { padding: 24px 20px 32px; }
  .thanks-art { max-width: 220px; }
  .foot { margin-inline: 20px; font-size: 10px; text-wrap: balance; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn-primary { border-color: ButtonText; } }
@media print {
  :root { color-scheme: light; --paper: #fdfcf8; --surface: #fdfcf8; --ink: #213e32; --muted: #535d52; --line: #bbc2b4; }
  .wrap { display: block; max-width: none; padding: 20px; }
  .hero { position: static; margin-bottom: 24px; }
  .hero-art, .preview-badge, .home, .skip { display: none; }
  h1 { max-width: none; font-size: 36px; }
  .card { break-inside: avoid; }
}
