/* Marlowpath Academy — chalkboard band + school-year planner */

:root {
  color-scheme: light;
  --board: #1f3b2f;
  --board-2: #2a4a3c;
  --board-line: #456556;
  --chalk: #f3f1e7;
  --chalk-dim: #c9d3c8;
  --page: #fbfaf5;
  --paper: #ffffff;
  --ink: #1f2420;
  --muted: #545b55;
  --summer: #8a5a00;
  --summer-wash: #fbf0d9;
  --autumn: #9a3d1f;
  --autumn-wash: #f8e6de;
  --spring: #2f6b3a;
  --spring-wash: #e4f0e3;
  --line: #ddd9cc;
  --line-strong: #a39e8f;
  --control: #757060;
  --alert: #9c2a24;
  --alert-wash: #fbecea;
  --focus: #1f2420;

  --school: "Century Schoolbook", "New Century Schoolbook", "TeX Gyre Schola", "Century", Georgia, serif;
  --sans: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4rem; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 1.04rem; line-height: 1.62; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--school); font-weight: 700; line-height: 1.15; margin: 0 0 0.55em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--board); text-underline-offset: 0.18em; }
a:hover { color: var(--autumn); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 30; background: var(--ink); color: #fff; padding: 0.6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }

/* Chalkboard band */
.board { background: var(--board); color: var(--chalk); }
.board :focus-visible { outline-color: #f5d76e; }
.board a { color: var(--chalk); }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px dashed var(--board-line); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--school); font-weight: 700; font-size: 1.35rem; text-decoration: none; }
.brand svg { width: 2rem; height: 2rem; }
.topbar .contact-link { font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; }
.opening { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); display: grid; gap: 2rem; }
.opening .eyebrow { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--chalk-dim); margin-bottom: 0.9rem; }
.opening h1 { color: #fff; max-width: 18ch; }
.opening .lead { font-size: 1.15rem; color: var(--chalk); max-width: 38rem; }
.opening .note { font-size: 0.93rem; color: var(--chalk-dim); max-width: 38rem; }
.chalk-list { border: 2px solid var(--board-line); padding: 1rem 1.25rem; align-self: start; }
.chalk-list h2 { font-size: 1.1rem; color: #fff; margin-bottom: 0.5rem; }
.chalk-list ul { list-style: none; padding: 0; margin: 0; }
.chalk-list li { padding: 0.45rem 0; border-bottom: 1px dashed var(--board-line); }
.chalk-list li:last-child { border-bottom: 0; }
.chalk-list span { display: block; font-size: 0.85rem; color: var(--chalk-dim); }
.chalk-list a { font-weight: 600; text-decoration: none; }
.chalk-list a:hover { text-decoration: underline; }
@media (min-width: 60rem) { .opening { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 4rem; align-items: start; } }

/* Term tabs */
.tabs { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.tabs li { flex: 0 0 auto; }
.tabs a { display: block; padding: 0.7rem 1rem 0.6rem; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; border-bottom: 4px solid transparent; }
.tabs a:hover { background: var(--page); }
.tabs .t-summer { border-bottom-color: var(--summer); }
.tabs .t-autumn { border-bottom-color: var(--autumn); }
.tabs .t-spring { border-bottom-color: var(--spring); }
.tabs a[aria-current="page"] { background: var(--page); border-bottom-color: var(--ink); }
@media (max-width: 40rem) { .tabs { position: static; } .tabs a { padding: 0.55rem 0.65rem 0.45rem; font-size: 0.9rem; } }

/* Year lifecycle (HTML diagram) */
.year { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.year .sub { color: var(--muted); max-width: 44rem; }
.lifecycle { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.9rem; }
.lifecycle > li { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--board); padding: 0.85rem 1rem; }
.lifecycle .month { display: block; font-family: var(--school); font-size: 1.2rem; }
.lifecycle .what { display: block; font-weight: 600; margin-top: 0.15rem; }
.lifecycle small { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.15rem; }
.lifecycle .lc-sep { border-left-color: var(--autumn); }
.lifecycle .lc-year { border-left-color: var(--spring); }
.lifecycle .lc-jul { border-left-color: var(--summer); }
.lifecycle .lc-aug { border-left-color: var(--board); }
@media (min-width: 60rem) {
  .lifecycle { grid-template-columns: 1fr 2fr 1fr 1fr; gap: 0; border-top: 6px solid var(--board); }
  .lifecycle > li { border: 0; border-right: 1px solid var(--line); border-top: 0; padding: 1rem 1.1rem; background: var(--paper); }
  .lifecycle .lc-sep { box-shadow: inset 0 6px 0 var(--autumn); }
  .lifecycle .lc-year { box-shadow: inset 0 6px 0 var(--spring); }
  .lifecycle .lc-jul { box-shadow: inset 0 6px 0 var(--summer); }
  .lifecycle .lc-aug { box-shadow: inset 0 6px 0 var(--board); border-right: 0; }
}
.year-note { font-size: 0.92rem; color: var(--muted); margin-top: 0.8rem; }

/* Terms */
.term { padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); }
.term-grid { display: grid; gap: 1.5rem 3rem; }
.term-label { align-self: start; }
.term-label .season { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; padding: 0.2rem 0.6rem; margin-bottom: 0.6rem; }
.term-summer .season { background: var(--summer); }
.term-autumn .season { background: var(--autumn); }
.term-spring .season { background: var(--spring); }
.term-label p { color: var(--muted); }
@media (min-width: 60rem) {
  .term-grid { grid-template-columns: 17rem minmax(0, 1fr); }
  .term-label { position: sticky; top: 4.5rem; }
}

.plan { background: var(--paper); border: 1px solid var(--line); margin-bottom: 1.5rem; }
.term-summer .plan { border-top: 5px solid var(--summer); }
.term-autumn .plan { border-top: 5px solid var(--autumn); }
.term-spring .plan { border-top: 5px solid var(--spring); }
.plan h3 { padding: 1rem 1.2rem 0; }
.plan dl { margin: 0; }
.plan dl > div { display: grid; gap: 0.2rem 1.25rem; padding: 0.75rem 1.2rem; border-top: 1px solid var(--line); }
.plan dt { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.plan dd { margin: 0; }
.plan dd ul { margin: 0; padding-left: 1.1rem; }
.plan dd li { margin-bottom: 0.25rem; }
@media (min-width: 44rem) { .plan dl > div { grid-template-columns: 9rem minmax(0, 1fr); } }
.term-summer .plan dl > div:first-child { background: var(--summer-wash); }
.term-autumn .plan dl > div:first-child { background: var(--autumn-wash); }
.term-spring .plan dl > div:first-child { background: var(--spring-wash); }

/* Resource, about */
.band-light { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.res { display: grid; gap: 2rem; align-items: center; }
.res-board { background: var(--board); color: var(--chalk); padding: 1rem 1.2rem; font-size: 0.92rem; max-width: 26rem; border: 8px solid #6b4f32; }
.res-board p { font-family: var(--school); font-size: 1.1rem; margin: 0 0 0.5rem; color: #fff; }
.res-board ul { list-style: none; padding: 0; margin: 0; }
.res-board li { display: flex; gap: 0.6rem; padding: 0.35rem 0; border-top: 1px dashed var(--board-line); }
.res-board li::before { content: ""; flex: 0 0 0.9rem; height: 0.9rem; border: 1.5px solid var(--chalk); margin-top: 0.25rem; }
@media (min-width: 60rem) { .res { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; } }
.btn { display: inline-block; background: var(--board); color: #fff; font: inherit; font-weight: 700; text-decoration: none; padding: 0.7rem 1.2rem; border: 0; cursor: pointer; transition: background-color 0.15s ease; }
.btn:hover { background: var(--board-2); color: #fff; }
.about { padding: clamp(2.5rem, 5vw, 3.5rem) 0; display: grid; gap: 1.5rem 3rem; }
.about p { max-width: 42rem; }
.not-list { list-style: none; padding: 0; margin: 0; border-left: 4px solid var(--board); }
.not-list li { padding: 0.45rem 0 0.45rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
@media (min-width: 60rem) { .about { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }

/* Contact */
.contact { padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); }
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr); gap: 3rem; align-items: start; } }
.timing { background: var(--paper); border: 1px solid var(--line); }
.timing h3 { font-size: 1.1rem; padding: 0.9rem 1rem 0.3rem; margin: 0; }
.timing table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.timing th, .timing td { text-align: left; padding: 0.55rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.timing th { font-weight: 700; width: 38%; }
.notice { background: var(--alert-wash); border-left: 4px solid var(--alert); padding: 0.8rem 1rem; margin-bottom: 1.25rem; font-size: 0.97rem; }
.notice p { margin: 0; }
.notice strong { color: var(--alert); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.enquiry-form { background: var(--paper); border: 2px solid var(--board); padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem; }
.enquiry-form h3 { margin-bottom: 0.2rem; }
.form-required-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.1rem; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 40rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .req { color: var(--alert); }
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.field-hint { font-size: 0.9rem; color: var(--muted); margin: -0.05rem 0 0.4rem; }
.field input, .field select, .field textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--control); border-radius: 0; padding: 0.6rem 0.75rem; min-height: 2.9rem; transition: border-color 0.15s ease; }
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--board); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--board); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 0.45rem; height: 0.45rem; border-right: 2px solid var(--board); border-bottom: 2px solid var(--board); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field [aria-invalid="true"] { border: 2px solid var(--alert); padding: calc(0.6rem - 0.5px) calc(0.75rem - 0.5px); background: #fffafa; }
.field-error { color: var(--alert); font-size: 0.92rem; font-weight: 700; margin: 0.35rem 0 0; }
.field-error::before { content: "Error: "; }
.field-count { font-size: 0.8rem; color: var(--muted); text-align: right; margin: 0.25rem 0 0; }
.field-count.is-near { color: var(--alert); font-weight: 700; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error-summary { border: 2px solid var(--alert); background: var(--alert-wash); padding: 0.85rem 1.05rem; margin-bottom: 1.25rem; }
.error-summary h4 { color: var(--alert); text-transform: none; letter-spacing: 0; font-size: 1rem; margin: 0 0 0.3rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--alert); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.form-actions .btn:disabled { background: var(--line-strong); color: var(--ink); cursor: not-allowed; }
.form-privacy { font-size: 0.9rem; color: var(--muted); margin: 0; }
.form-status:empty { display: none; }
.form-status { margin-top: 1.1rem; padding: 0.75rem 1rem; border-left: 4px solid var(--line-strong); background: var(--page); font-size: 0.97rem; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-status.is-success { border-left-color: var(--spring); background: var(--spring-wash); color: var(--ink); }
.form-status.is-error { border-left-color: var(--alert); background: var(--alert-wash); color: var(--alert); }
.form-noscript { border-left: 4px solid var(--line-strong); padding: 0.75rem 1rem; margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--board); color: var(--chalk-dim); padding: 1.75rem 0 1.5rem; font-size: 0.92rem; }
.site-footer a { color: var(--chalk); }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #f5d76e; }
.footer-top { display: grid; gap: 1rem; }
.footer-top p { margin: 0; max-width: 48rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--board-line); font-size: 0.9rem; }
.footer-legal p { margin: 0; }
.footer-legal a[aria-current="page"] { color: #fff; font-weight: 700; }
@media (min-width: 56rem) { .footer-top { grid-template-columns: 1fr auto; } }
@media (max-width: 30rem) { .footer-legal { flex-direction: column; gap: 0.4rem; } }

/* Docs */
.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 3.5rem; }
.doc-head { max-width: 50rem; margin-bottom: 1.5rem; }
.doc-meta { color: var(--muted); font-size: 0.95rem; }
.doc-body { max-width: 44rem; }
.doc-body h2 { font-size: 1.4rem; margin-top: 2rem; }
.doc-body ul { padding-left: 1.2rem; }
.summary { background: var(--paper); border-left: 4px solid var(--board); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem; }
.summary p:last-child { margin-bottom: 0; }

/* Rollover checklist */
.ro-meta { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.2rem 2rem; max-width: 56rem; }
.ro-meta li { display: flex; gap: 0.6rem; align-items: flex-end; padding-top: 0.6rem; }
.ro-meta span { font-weight: 600; white-space: nowrap; }
.ro-meta li::after { content: ""; flex: 1; border-bottom: 1px solid var(--ink); min-width: 3rem; }
@media (min-width: 40rem) { .ro-meta { grid-template-columns: 1fr 1fr; } }
.ro-warn { border-left: 4px solid var(--alert); background: var(--alert-wash); padding: 0.6rem 0.9rem; font-size: 0.95rem; max-width: 56rem; }
.ro-stage { margin-top: 1.75rem; max-width: 56rem; }
.ro-stage h2 { font-size: 1.35rem; display: flex; gap: 0.75rem; align-items: baseline; border-bottom: 2px solid var(--board); padding-bottom: 0.3rem; }
.ro-stage h2 span { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--board); padding: 0.1rem 0.5rem; }
.ro-list { list-style: none; padding: 0; margin: 0; }
.ro-list li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) 6rem; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.ro-list li::before { content: ""; width: 1rem; height: 1rem; border: 1.5px solid var(--ink); margin-top: 0.25rem; }
.ro-list p { margin: 0; }
.ro-list small { display: block; color: var(--muted); font-size: 0.88rem; }
.ro-list .date { font-size: 0.8rem; color: var(--muted); border-bottom: 1px dotted var(--line-strong); height: 1.4rem; }
.ro-foot { margin-top: 2rem; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.print-hint { color: var(--muted); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10pt; line-height: 1.4; }
  .skip-link, .tabs, .topbar .contact-link, .print-hint, .no-print, .site-footer { display: none !important; }
  .board { background: none; color: #000; border-bottom: 2px solid #000; }
  .board a { color: #000; }
  .topbar { padding: 0 0 2mm; border: 0; }
  .brand svg { display: none; }
  .wrap { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .doc { padding: 5mm 0 0; }
  h1 { font-size: 19pt; }
  .ro-stage { margin-top: 5mm; }
  .ro-stage h2 { font-size: 12.5pt; border-bottom-color: #000; break-after: avoid; }
  .ro-stage h2 span { background: none; color: #000; border: 1px solid #000; }
  .ro-list li { break-inside: avoid; padding: 1.6mm 0; }
  .ro-list li::before { border-color: #000; }
  .ro-warn { background: none; border-left-color: #000; }
}
