/* Schools Within Reach : design system v1 */

:root {
  --ink: #17303f;
  --teal: #1f6f78;
  --teal-dark: #174f56;
  --teal-soft: #e4f0f1;
  --gold: #e9a23b;
  --gold-dark: #b8741a;
  --gold-soft: #fbf0dc;
  --paper: #faf7f1;
  --surface: #ffffff;
  --text: #1e2a30;
  --muted: #566269;
  --line: #e6e1d7;
  --ok: #2f7a4f;
  --ok-soft: #e5f3ea;
  --err: #a63d35;
  --err-soft: #fbe9e7;
  --r: 14px;
  --r-sm: 8px;
  --shadow: 0 8px 28px rgba(23, 48, 63, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.35rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; font-family: var(--sans); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.measure { max-width: 42rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 800px; }
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.band-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: #dbe7ea; }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .muted, .band-ink .lead { color: #b9cbd1; }
.band-ink a { color: #ffd389; }
.band-teal-soft { background: var(--teal-soft); }

.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px;
}
.band-ink .eyebrow { color: var(--gold); }
.section-head { max-width: 46rem; margin-bottom: 40px; }
.section-head p { color: var(--muted); }

/* Skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.2rem; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--teal); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 10px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: var(--sans);
  line-height: 1.2; transition: background 0.15s, color 0.15s, transform 0.08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d8932f; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.band-ink .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.band-ink .btn-outline:hover { background: #fff; color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature .num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--teal-soft); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px; font-family: var(--serif); font-size: 1.1rem;
}
.feature p { color: var(--muted); font-size: 0.98rem; }

/* Status badges */
.status { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; vertical-align: middle; }
.status-now { background: var(--ok-soft); color: var(--ok); }
.status-progress { background: var(--gold-soft); color: var(--gold-dark); }
.status-planned { background: #eceff0; color: var(--muted); }
.tag { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.tag-verified { background: var(--ok-soft); color: var(--ok); }
.tag-reported { background: var(--gold-soft); color: var(--gold-dark); }
.tag-unknown { background: #eceff0; color: var(--muted); }

/* Hero */
.hero { padding: 72px 0 64px; background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .fine { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--teal-soft); color: var(--teal-dark); font-size: 0.85rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* Question card (hero) */
.qcard h3 { font-size: 1.05rem; font-family: var(--sans); margin-bottom: 14px; }
.qcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.qcard li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 0.97rem; }
.qcard li:last-child { border-bottom: none; }
.qcard li::before { content: "?"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.qcard .foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }

/* Check lists */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 0.8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 3px; }
.band-ink .checks li::before { background: var(--gold); color: var(--ink); }
.xlist li::before { content: "×"; background: #eceff0; color: var(--muted); font-size: 1rem; }

/* Steps (how it works) */
.step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step .n { font-family: var(--serif); font-size: 2rem; color: var(--gold-dark); line-height: 1; }
.step h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.step p { color: var(--muted); }

/* Forms */
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c9d1d4; border-radius: var(--r-sm);
  font: inherit; font-size: 1rem; background: #fff; color: var(--text);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 111, 120, 0.3); border-color: var(--teal); }
.field { margin-bottom: 16px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); margin: 14px 0 18px; font-weight: 400; }
.consent input { margin: 4px 0 0; flex: none; width: 18px; height: 18px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.84rem; color: var(--muted); margin-top: 14px; }
.alert { padding: 14px 18px; border-radius: var(--r-sm); margin: 0 0 18px; font-weight: 600; font-size: 0.95rem; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe0cb; }
.alert-err { background: var(--err-soft); color: var(--err); border: 1px solid #efc3bd; }
.alert a { color: inherit; }
.form-done { text-align: center; padding: 32px 12px; }
.form-done .big { font-size: 2.4rem; line-height: 1; margin-bottom: 12px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.calc-inputs .field label { display: flex; justify-content: space-between; gap: 10px; }
.calc-result { background: var(--ink); color: #fff; border-radius: var(--r); padding: 28px; position: sticky; top: 90px; }
.calc-result .sub { color: #b9cbd1; font-size: 0.95rem; }
.calc-result .big { font-family: var(--serif); font-size: 3rem; line-height: 1; margin: 6px 0 6px; font-weight: 600; }
.calc-result .lines { margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; display: grid; gap: 10px; font-size: 0.95rem; }
.calc-result .lines div { display: flex; justify-content: space-between; gap: 12px; }
.calc-result .lines .neg { color: #ffd389; }
.calc-result .lines .total { font-weight: 700; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 10px; }
.calc-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: rgba(255,255,255,0.12); margin-top: 20px; }
.calc-bar span { display: block; height: 100%; transition: width 0.25s ease; }
.calc-bar .b-fund { background: var(--gold); }
.calc-bar .b-aid { background: #f3c77a; }
.calc-bar .b-gap { background: #7fb6bd; }
.calc-bar .b-other { background: #c8d5d9; }
.calc-key { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; font-size: 0.8rem; color: #b9cbd1; }
.calc-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.calc-key .k-fund::before { background: var(--gold); }
.calc-key .k-aid::before { background: #f3c77a; }
.calc-key .k-gap::before { background: #7fb6bd; }
.calc-key .k-other::before { background: #c8d5d9; }
.calc-note { margin-top: 18px; font-size: 0.82rem; color: #b9cbd1; line-height: 1.5; }
.calc-flag { margin-top: 14px; background: rgba(233, 162, 59, 0.15); border: 1px solid rgba(233, 162, 59, 0.4); border-radius: var(--r-sm); padding: 10px 12px; font-size: 0.86rem; color: #ffd389; display: none; }
.calc-flag.show { display: block; }
.calc-cta { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.95rem; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--teal); font-weight: 400; flex: none; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; color: var(--muted); }

/* Prose pages */
.prose h2 { margin-top: 2.2em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1em 0; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--teal-soft); color: var(--ink); }
.callout { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 16px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 1.5em 0; }

/* Footer */
.site-footer { background: var(--ink); color: #b9cbd1; padding: 56px 0 32px; font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; }
.site-footer a { color: #dbe7ea; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; font-size: 0.82rem; line-height: 1.6; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .grid-2, .grid-3, .calc, .foot-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .hero { padding: 52px 0 44px; }
  section { padding: 56px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--paper); flex-direction: column; align-items: stretch;
    padding: 18px 24px 24px; gap: 16px; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { text-align: center; }
}
@media (max-width: 540px) {
  body { font-size: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .calc-result .big { font-size: 2.5rem; }
  .step { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .calc-bar span, .btn { transition: none; }
}/* Release fixes: accessible announcements and calculator exceptions */
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.calc-result .calc-flag {display:block; color:#f9e0a4;}
.calc-result .calc-note a,.calc-result .calc-cta a {color:#ffe0a1;}
@media (max-width:540px) { .brand {font-size:1rem;} .brand svg {width:28px;height:28px;} .wrap {padding-left:18px;padding-right:18px;} .card[data-calc-card]{padding:16px !important;} .calc-result{padding:22px;} }
