@charset "UTF-8";

/* ==========================================================================
   Kidfinity and Beyond Foundation, Inc.
   Design system

   Type    Source Serif 4 for headings and pull quotes; Source Sans 3 for
           running text, navigation and data. One serif, one sans, no more.
   Colour  A single institutional navy carries the site. The spectrum in the
           Foundation's mark appears once, as a 3px rule beneath the masthead.
   Form    Square corners, hairline rules, generous measure. Nothing glows.
   ========================================================================== */

/* --------------------------------------------------------------- tokens -- */

:root {
  /* Institutional navy, sampled from the Foundation's mark */
  --navy-900: #05233c;
  --navy-800: #0a3355;
  --navy-700: #0e4a78;
  --navy-600: #1a5f93;
  --navy-300: #8fb4cd;
  --navy-100: #dfeaf2;
  --navy-050: #eff5f9;

  /* Spectrum accents, used sparingly and never as a background wash */
  --spectrum-1: #16a4c8;
  --spectrum-2: #62c24a;
  --spectrum-3: #f0a012;
  --spectrum-4: #e0501a;
  --spectrum-5: #b8127a;
  --spectrum-6: #6f2fa0;

  --ink: #17232e;
  --ink-soft: #4a5a68;
  --ink-faint: #74838f;

  --paper: #ffffff;
  --paper-warm: #f7f4ef;
  --paper-cool: #f3f6f8;

  --rule: #dcd7ce;
  --rule-strong: #b9b2a6;
  --rule-cool: #ccd8e1;

  --ok: #1d6b3f;
  --ok-bg: #e8f3ec;
  --warn: #8a5a05;
  --warn-bg: #fbf2df;
  --stop: #9c2620;
  --stop-bg: #f8eae9;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 34rem;
  --gutter: 1.5rem;
  --shell: 74rem;
  --shell-wide: 84rem;

  --shadow-card: 0 1px 2px rgba(5, 35, 60, 0.06);
  --shadow-raised: 0 2px 10px rgba(5, 35, 60, 0.09);
}

/* ---------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

img, video, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--navy-700); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-900); }

:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 2px;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ----------------------------------------------------------------- type -- */

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--navy-900);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.35rem + 3.1vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.22rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.22rem, 1.08rem + 0.6vw, 1.45rem); }
h4 { font-size: 1.08rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 650; color: var(--navy-900); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin: 0 0 1rem;
  display: block;
}
.eyebrow--light { color: var(--navy-300); }

.lede {
  font-size: clamp(1.14rem, 1.03rem + 0.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 2em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--navy-600); }

blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--navy-700);
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.45;
  color: var(--navy-800);
}
blockquote cite {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

sup.cite { font-size: 0.66em; line-height: 0; }
sup.cite a { text-decoration: none; padding: 0 0.1em; font-weight: 600; }
sup.cite a::before { content: "["; }
sup.cite a::after { content: "]"; }

/* --------------------------------------------------------------- layout -- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--wide { max-width: var(--shell-wide); }
.shell--narrow { max-width: 46rem; }

.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--tight { padding-block: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem); }
.section--warm { background: var(--paper-warm); }
.section--cool { background: var(--paper-cool); }
.section--navy { background: var(--navy-900); color: #dbe6ef; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy a:not(.btn) { color: #a9cde6; }
.section--rule-top { border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.section-head p { max-width: var(--measure); color: var(--ink-soft); }
.section-head h2 { margin-bottom: 0; }
@media (min-width: 52rem) {
  .section-head { grid-template-columns: minmax(0, 1fr) auto; }
  .section-head .section-head__aside { justify-self: end; text-align: right; }
}

/* Single-column grids get an explicit shrinkable track. Without it the implicit
   `auto` track grows to fit its widest descendant (a data table, a long select),
   pushing the page past the screen edge on phones. */
.grid, .split, .review-grid, .hero__grid, .stat-grid, .footer__grid { grid-template-columns: minmax(0, 1fr); }
.grid > *, .split > *, .review-grid > *, .hero__grid > *, .stat-grid > *, .footer__grid > * { min-width: 0; }
.slot-card select { min-width: 0; flex: 1; }

.grid { display: grid; gap: 2rem; }
@media (min-width: 46rem) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 46rem) and (max-width: 63.99rem) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: start;
}
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--sidebar { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .split--aside-first { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); }
  .split--sticky > :last-child { position: sticky; top: 6rem; }
}

/* -------------------------------------------------------------- masthead -- */

.utility {
  background: var(--navy-900);
  color: #b9cde0;
  font-size: 0.8125rem;
}
.utility__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  align-items: center;
  justify-content: flex-end;
  min-height: 2.35rem;
  padding-block: 0.35rem;
}
.utility a { color: #cfe0ee; text-decoration: none; }
.utility a:hover { color: #fff; text-decoration: underline; }
.utility__note { margin-right: auto; color: #8fabc4; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.75rem;
  padding-block: 0.6rem;
}
.masthead__spectrum {
  height: 3px;
  background: linear-gradient(90deg,
    var(--spectrum-1) 0%, var(--spectrum-2) 22%, var(--spectrum-3) 42%,
    var(--spectrum-4) 60%, var(--spectrum-5) 80%, var(--spectrum-6) 100%);
}

@media (max-width: 47.99rem) {
  .utility__note { display: none; }
  .utility__inner { justify-content: flex-end; }
  .masthead__cta { display: none !important; }
  .masthead__inner { min-height: 4rem; }
  .brand img { width: 2.5rem !important; height: 2.5rem !important; }
  .brand__name { font-size: 0.9rem; }
  .brand__sub { font-size: 0.64rem; }
}

.brand__name, .brand__sub { white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; margin-right: auto; }
.brand img { width: 3.1rem; height: 3.1rem; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.99rem;
  letter-spacing: 0.005em;
  color: var(--navy-900);
  text-transform: uppercase;
}
.brand__sub {
  font-size: 0.7rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.18rem;
}

.nav { display: none; align-items: center; gap: 0.1rem; }
@media (min-width: 72rem) { .nav { display: flex; } }
.nav a {
  display: block;
  white-space: nowrap;
  padding: 0.55rem 0.62rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy-700); border-bottom-color: var(--rule-cool); }
.nav a[aria-current="page"] { color: var(--navy-800); border-bottom-color: var(--navy-700); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--navy-900);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
@media (min-width: 72rem) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 1rem; height: 1rem; }

.drawer { display: none; border-bottom: 1px solid var(--rule); background: var(--paper-warm); }
.drawer[data-open="true"] { display: block; }
@media (min-width: 72rem) { .drawer { display: none !important; } }
.drawer a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
}
.drawer a:last-child { border-bottom: 0; }

/* -------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.35rem;
  font-family: var(--sans);
  font-size: 0.925rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn--primary { background: var(--navy-700); color: #fff; }
.btn--primary:hover { background: var(--navy-900); color: #fff; }

.btn--secondary { background: transparent; color: var(--navy-800); border-color: var(--navy-700); }
.btn--secondary:hover { background: var(--navy-050); color: var(--navy-900); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: var(--paper-warm); }

.btn--onnavy { background: #fff; color: var(--navy-900); }
.btn--onnavy:hover { background: var(--navy-100); color: var(--navy-900); }

.btn--danger { background: transparent; color: var(--stop); border-color: var(--stop); }
.btn--danger:hover { background: var(--stop-bg); }

.btn--sm { padding: 0.42rem 0.8rem; font-size: 0.82rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.link-arrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.925rem;
  text-decoration: none;
  color: var(--navy-700);
}
.link-arrow::after { content: "→"; transition: transform 0.15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ----------------------------------------------------------------- hero -- */

.hero { background: var(--navy-900); color: #d9e5ee; position: relative; overflow: hidden; }
.hero__grid { display: grid; gap: 0; align-items: stretch; }
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}
.hero__copy { padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) 0; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 64rem) { .hero__copy { padding-right: 3.5rem; } }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero__lede { font-size: clamp(1.08rem, 1rem + 0.45vw, 1.28rem); color: #b9cde0; max-width: 32rem; }
.hero .btn-row { margin-top: 2rem; }
.hero__figure { position: relative; min-height: 20rem; }
.hero__figure img, .hero__figure video { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 64rem) {
  .hero__figure { margin-right: calc(50% - 50vw); }
}
.hero__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 2.5rem 1.25rem 0.9rem;
  background: linear-gradient(to top, rgba(5, 35, 60, 0.88), rgba(5, 35, 60, 0));
  color: #cfdde8;
  font-size: 0.78rem;
  line-height: 1.4;
}

.page-header { background: var(--navy-900); color: #cddced; padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.25rem); }
.page-header h1 { color: #fff; margin-bottom: 0.75rem; }
.page-header p { max-width: var(--measure); color: #b0c7da; }
.page-header--plain { background: var(--paper-warm); color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.page-header--plain h1 { color: var(--navy-900); }
.page-header--plain p { color: var(--ink-soft); }
.page-header--plain .eyebrow { color: var(--navy-600); }

/* ---------------------------------------------------------------- cards -- */

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1.6rem;
}
.card--flush { padding: 0; overflow: hidden; }
.card--tint { background: var(--paper-warm); border-color: var(--rule); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.97rem; }

.programme-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy-700);
  border-radius: 2px;
  padding: 1.6rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.programme-card:hover { box-shadow: var(--shadow-raised); }
.programme-card[data-accent="1"] { border-top-color: var(--spectrum-1); }
.programme-card[data-accent="2"] { border-top-color: var(--spectrum-2); }
.programme-card[data-accent="3"] { border-top-color: var(--spectrum-3); }
.programme-card[data-accent="4"] { border-top-color: var(--spectrum-6); }
.programme-card__acronym {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.15rem;
}
.programme-card__name {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
  line-height: 1.35;
}
.programme-card p { flex: 1; margin-bottom: 1.1rem; }

.report-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.report-card__figure { aspect-ratio: 3 / 2; overflow: hidden; background: var(--navy-100); border: 1px solid var(--rule); }
.report-card__figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.report-card:hover .report-card__figure img { transform: scale(1.03); }
.report-card__meta {
  display: flex; gap: 0.6rem; align-items: baseline;
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 1rem 0 0.4rem;
}
.report-card__meta span + span::before { content: "· "; }
.report-card h3 { font-size: 1.18rem; margin-bottom: 0.4rem; }
.report-card p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0.9rem; }
.report-card .link-arrow { margin-top: auto; }

/* ------------------------------------------------------------ statistics -- */

.stat-band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-grid { display: grid; gap: 0; }
@media (min-width: 46rem) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .stat-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.stat { padding: 2rem 1.75rem 2rem 0; border-bottom: 1px solid var(--rule); }
.stat:last-child { border-bottom: 0; }
@media (min-width: 46rem) {
  .stat { border-bottom: 0; border-right: 1px solid var(--rule); padding-left: 1.75rem; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0; }
}
.stat__figure {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 1.7rem + 2.4vw, 3.15rem);
  font-weight: 600;
  line-height: 1;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.stat__label { font-size: 0.95rem; color: var(--ink); font-weight: 600; margin-bottom: 0.35rem; line-height: 1.35; }
.stat__note { font-size: 0.83rem; color: var(--ink-faint); line-height: 1.45; }
.section--navy .stat { border-color: rgba(255,255,255,0.16); }
.section--navy .stat__figure { color: #fff; }
.section--navy .stat__label { color: #dbe6ef; }
.section--navy .stat__note { color: #90adc6; }

/* ------------------------------------------------------------- findings -- */

.finding {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  margin-top: 2.4rem;
}
.finding__index {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--navy-600);
  margin-bottom: 0.6rem;
}
.finding h3 { margin-bottom: 0.6rem; }

.callout {
  border: 1px solid var(--rule-cool);
  border-left: 3px solid var(--navy-700);
  background: var(--navy-050);
  padding: 1.4rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.97rem;
}
.callout h4 { margin-bottom: 0.5rem; color: var(--navy-900); }
.callout p { color: var(--ink-soft); }
.callout--caution { border-left-color: var(--spectrum-3); background: var(--warn-bg); border-color: #ead9b4; }
.callout--caution h4 { color: var(--warn); }

.reference-list { counter-reset: ref; list-style: none; padding: 0; margin: 0; font-size: 0.88rem; }
.reference-list li {
  counter-increment: ref;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  line-height: 1.5;
}
.reference-list li::before {
  content: "[" counter(ref) "]";
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--navy-600);
}
.reference-list a { word-break: break-word; }
.reference-list li:target { background: var(--warn-bg); }

/* --------------------------------------------------------------- figures -- */

figure { margin: 0; }
figure.framed img, figure.framed video { border: 1px solid var(--rule); width: 100%; }
figcaption {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-faint);
  padding-top: 0.65rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.75rem;
}
figcaption b { color: var(--ink-soft); font-weight: 650; }

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 52rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.gallery figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border: 1px solid var(--rule); }
.gallery--feature figure:first-child { grid-column: span 2; }
.gallery--feature figure:first-child img { aspect-ratio: 16 / 9; }

.media-empty {
  border: 1px dashed var(--rule-strong);
  background: var(--paper-warm);
  color: var(--ink-faint);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}
.media-empty code { font-family: var(--mono); font-size: 0.82em; color: var(--navy-700); }

/* ---------------------------------------------------------------- forms -- */

.field { margin-bottom: 1.25rem; }
.field > label, .field-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-800);
  margin-bottom: 0.4rem;
}
.field__hint { font-size: 0.85rem; color: var(--ink-faint); margin: 0.35rem 0 0; }
.field__error { font-size: 0.85rem; color: var(--stop); margin: 0.35rem 0 0; font-weight: 600; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], input[type="url"], input[type="search"],
select, textarea {
  width: 100%;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.6rem 0.7rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy-700);
  outline: 2px solid var(--navy-100);
  outline-offset: 0;
}
input[type="file"] { font-size: 0.9rem; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
select { appearance: none; 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 fill='%2374838f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.7rem center; padding-right: 2rem; }

.field-row { display: grid; gap: 1rem; }
@media (min-width: 40rem) {
  .field-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.93rem; line-height: 1.5; }
.check input { margin-top: 0.25rem; flex: none; }

fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
legend {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--navy-900);
  padding: 0;
  margin-bottom: 0.35rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------- alerts -- */

.alert {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--navy-700);
  background: var(--navy-050);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.93rem;
  line-height: 1.5;
}
.alert--ok { border-color: #bcdcc8; border-left-color: var(--ok); background: var(--ok-bg); color: #15502f; }
.alert--warn { border-color: #ead9b4; border-left-color: var(--spectrum-3); background: var(--warn-bg); color: var(--warn); }
.alert--error { border-color: #e7c5c2; border-left-color: var(--stop); background: var(--stop-bg); color: var(--stop); }
.alert strong { color: inherit; }
.alert ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }

/* ----------------------------------------------------------------- pill -- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--ok { color: var(--ok); background: var(--ok-bg); border-color: #bcdcc8; }
.pill--warn { color: var(--warn); background: var(--warn-bg); border-color: #ead9b4; }
.pill--stop { color: var(--stop); background: var(--stop-bg); border-color: #e7c5c2; }
.pill--info { color: var(--navy-700); background: var(--navy-050); border-color: var(--rule-cool); }
.pill--muted { color: var(--ink-faint); background: var(--paper-warm); border-color: var(--rule); }

/* ---------------------------------------------------------------- table -- */

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { padding: 0.7rem 0.85rem; text-align: left; vertical-align: top; }
table.data thead th {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--rule-strong);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-800);
  white-space: nowrap;
}
table.data tbody tr + tr { border-top: 1px solid var(--rule); }
table.data tbody tr:hover { background: var(--paper-cool); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--ink-faint); }

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ink-faint);
  border: 1px dashed var(--rule-strong);
  background: var(--paper-warm);
}
.empty-state h3 { color: var(--ink-soft); font-size: 1.1rem; }

/* --------------------------------------------------------------- footer -- */

.footer { background: var(--navy-900); color: #a9c1d5; font-size: 0.92rem; padding-block: 3.5rem 2rem; }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 46rem) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer h4 {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.55rem; }
.footer a { color: #b9cde0; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__brand { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 1.1rem; }
.footer__brand img { width: 3.4rem; height: 3.4rem; flex: none; }
.footer__brand strong { color: #fff; display: block; font-size: 0.98rem; line-height: 1.3; }
.footer__mission { max-width: 24rem; color: #93aec5; line-height: 1.6; }
.footer__base {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: #7f9cb6;
}
.footer__base a { color: #7f9cb6; }

/* ---------------------------------------------------------- application -- */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper-cool); }
.app-shell > main { flex: 1; padding-block: 2.5rem 4rem; }

.app-bar { background: var(--navy-900); color: #cfdde8; }
.app-bar__inner { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; flex-wrap: wrap; }
.app-bar .brand__name, .app-bar .brand__sub { color: #fff; }
.app-bar .brand__sub { color: #91aec6; }
.app-bar__nav { display: flex; gap: 0.15rem; margin-left: auto; flex-wrap: wrap; }
.app-bar__nav a {
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c3d6e5;
  text-decoration: none;
  border-radius: 2px;
}
.app-bar__nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.app-bar__nav a[aria-current="page"] { background: rgba(255,255,255,0.16); color: #fff; }
.app-bar__user { font-size: 0.82rem; color: #91aec6; display: flex; align-items: center; gap: 0.75rem; }

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; margin-bottom: 1.75rem; }
.panel__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-warm);
}
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1.12rem; }
.panel__head p { margin: 0; font-size: 0.85rem; color: var(--ink-faint); }
.panel__body { padding: 1.4rem; }
.panel__body--flush { padding: 0; }
.panel__foot { padding: 1rem 1.4rem; border-top: 1px solid var(--rule); background: var(--paper-warm); }

.review-grid { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 68rem) { .review-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

.metrics { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.75rem; }
@media (min-width: 60rem) { .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.metric { background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--navy-700); padding: 1.15rem 1.25rem; }
.metric__value { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.metric__label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.5rem; }
.metric--attention { border-top-color: var(--spectrum-3); }
.metric--stop { border-top-color: var(--stop); }

.verdict {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ink-faint);
  padding: 1.25rem 1.4rem;
  background: var(--paper-warm);
}
.verdict[data-verdict="meets"] { border-left-color: var(--ok); background: var(--ok-bg); border-color: #bcdcc8; }
.verdict[data-verdict="review"] { border-left-color: var(--spectrum-3); background: var(--warn-bg); border-color: #ead9b4; }
.verdict[data-verdict="below"] { border-left-color: var(--stop); background: var(--stop-bg); border-color: #e7c5c2; }
.verdict__head { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: baseline; justify-content: space-between; }
.verdict__title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--navy-900); margin: 0; }
.verdict__numbers { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.1rem; }
.verdict__number b { display: block; font-family: var(--serif); font-size: 1.65rem; font-weight: 600; line-height: 1; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.verdict__number span { display: block; font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.4rem; }
.verdict ul { margin: 1.1rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--ink-soft); }
.verdict li { margin-bottom: 0.35rem; }

.subject-rows { width: 100%; border-collapse: collapse; }
.subject-rows th {
  text-align: left; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-800); padding: 0 0.5rem 0.5rem 0; font-weight: 700;
}
.subject-rows td { padding: 0.25rem 0.5rem 0.25rem 0; vertical-align: top; }
.subject-rows td:last-child, .subject-rows th:last-child { padding-right: 0; }
.subject-rows input { padding: 0.45rem 0.55rem; font-size: 0.93rem; }
.subject-rows .col-grade { width: 7.5rem; }
.subject-rows .col-units { width: 6rem; }
.subject-rows .col-remove { width: 2.75rem; }
.row-remove {
  border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink-faint);
  width: 2rem; height: 2.1rem; cursor: pointer; border-radius: 2px; font-size: 1rem; line-height: 1;
}
.row-remove:hover { color: var(--stop); border-color: var(--stop); background: var(--stop-bg); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.4rem 1.6rem; border-left: 1px solid var(--rule); }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -0.3rem; top: 0.42rem;
  width: 0.55rem; height: 0.55rem; background: var(--navy-700); border-radius: 50%;
}
.timeline time { display: block; font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.2rem; }
.timeline p { font-size: 0.92rem; margin: 0; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .auth-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.auth-page__aside { background: var(--navy-900); color: #b9cde0; padding: clamp(2.5rem, 2rem + 3vw, 4rem) clamp(1.5rem, 1rem + 3vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; }
.auth-page__aside h1 { color: #fff; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); }
.auth-page__aside .brand { margin: 0 0 2.5rem; }
.auth-page__aside .brand__name, .auth-page__aside .brand__sub { color: #fff; }
.auth-page__aside .brand__sub { color: #8fabc4; }
.auth-page__main { padding: clamp(2.5rem, 2rem + 3vw, 4rem) clamp(1.5rem, 1rem + 3vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.auth-form { width: 100%; max-width: 25rem; }

.media-tile { border: 1px solid var(--rule); background: var(--paper); }
.media-tile__thumb { aspect-ratio: 4 / 3; background: var(--navy-050); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.media-tile__thumb img, .media-tile__thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-tile__body { padding: 0.75rem 0.85rem; font-size: 0.85rem; }
.media-tile__body strong { display: block; font-size: 0.9rem; margin-bottom: 0.2rem; }
.media-tile__body span { color: var(--ink-faint); font-size: 0.78rem; }

.slot-card { border: 1px solid var(--rule); background: var(--paper); padding: 1.1rem 1.25rem; }
.slot-card code { font-family: var(--mono); font-size: 0.78rem; color: var(--navy-700); background: var(--navy-050); padding: 0.1rem 0.3rem; }
.slot-card__items { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.85rem; }
.slot-card__items img { width: 4.5rem; height: 3.4rem; object-fit: cover; border: 1px solid var(--rule); }

/* --------------------------------------------------------------- helpers -- */

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.muted { color: var(--ink-faint); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.78rem; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums lining-nums; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.hide { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 200;
  background: var(--navy-900); color: #fff; padding: 0.7rem 1.1rem;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0.5rem; color: #fff; }

@media print {
  .masthead, .utility, .footer, .app-bar, .btn, .nav-toggle { display: none !important; }
  body { font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}
