/*
 * AiSOMA public site. Naintu company tokens (designs/admin-portal-premium/assets/premium.css) with AiSOMA's
 * brand green #006e33. The look is AiSOMA's own: a deep green "board" that opens and closes the page, a
 * notebook margin rail that runs down every section, and school documents (a fee slip, a results sheet,
 * a progress report) as the illustrations. Headlines are set in Inter; Space Grotesk carries the brand,
 * labels and controls; JetBrains Mono is kept for money and codes. Light and dark.
 */
:root {
  --bg: #f5f7f4;
  --bg-alt: #ecf1ec;
  --surface: #ffffff;
  --surface-2: #f3f6f3;
  --ink: #0d1a13;
  --mute: #4c5a52;
  --line: rgba(13, 26, 19, 0.1);
  --line-strong: rgba(13, 26, 19, 0.18);
  --green: #006e33;
  --green-soft: #dcebd8;
  --on-green: #ffffff;
  --success: #17603a;
  --success-soft: #dcebd8;
  --gold: #e0a21f;
  --gold-ink: #7a5200;
  --gold-soft: #fbecc4;
  --red: #b3261e;
  --red-soft: #fbe3e0;
  --focus: #1a54d6;
  --margin-line: rgba(224, 162, 31, 0.5);
  --shadow: 0 1px 2px rgba(13, 26, 19, 0.06), 0 8px 24px -16px rgba(13, 26, 19, 0.3);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.12), 0 34px 60px -30px rgba(0, 0, 0, 0.55);
  --blend: multiply;
  /* The board: AiSOMA's deep green, used at the top and the bottom of the page. */
  --board: #053a1f;
  --board-raise: rgba(255, 255, 255, 0.06);
  --on-board: #f1f6f2;
  --on-board-mute: #bccfc3;
  --board-line: rgba(241, 246, 242, 0.18);
  --board-focus: #f2c45c;
  --card-on-board: #ffffff;
  /* An example school's colours, used only in the school-colours illustration. */
  --school: #7a1f2b;
  --school-on: #ffffff;
  --school-2: #c99a1e;
  --school-ink: #7a1f2b;
  --f-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-head: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --rail: 196px;
  --gap: 64px;
  --max: 1240px;
  --gutter: 24px;
  --sec-bg: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07110c;
    --bg-alt: #0a1610;
    --surface: #0d1a13;
    --surface-2: #11231a;
    --ink: #eaf2ec;
    --mute: #a3b3aa;
    --line: rgba(234, 242, 236, 0.09);
    --line-strong: rgba(234, 242, 236, 0.18);
    --green: #4cc283;
    --green-soft: #1d3327;
    --on-green: #07110c;
    --success: #4cc283;
    --success-soft: #1d3327;
    --gold-ink: #f2c45c;
    --gold-soft: #2a2008;
    --red: #f28b82;
    --red-soft: #3a1714;
    --focus: #8fb0ff;
    --margin-line: rgba(224, 162, 31, 0.28);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 26px -16px rgba(0, 0, 0, 0.8);
    --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.6), 0 34px 60px -28px rgba(0, 0, 0, 0.95);
    --blend: screen;
    --board: #0b2216;
    --board-raise: rgba(255, 255, 255, 0.04);
    --board-line: rgba(241, 246, 242, 0.14);
    --card-on-board: #0d1a13;
    --school-2: #e0b84a;
    --school-ink: #f0a3ad;
  }

  :root:not([data-theme="light"]) .on-light {
    display: none;
  }

  :root:not([data-theme="light"]) .on-dark {
    display: block;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07110c;
  --bg-alt: #0a1610;
  --surface: #0d1a13;
  --surface-2: #11231a;
  --ink: #eaf2ec;
  --mute: #a3b3aa;
  --line: rgba(234, 242, 236, 0.09);
  --line-strong: rgba(234, 242, 236, 0.18);
  --green: #4cc283;
  --green-soft: #1d3327;
  --on-green: #07110c;
  --success: #4cc283;
  --success-soft: #1d3327;
  --gold-ink: #f2c45c;
  --gold-soft: #2a2008;
  --red: #f28b82;
  --red-soft: #3a1714;
  --focus: #8fb0ff;
  --margin-line: rgba(224, 162, 31, 0.28);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 26px -16px rgba(0, 0, 0, 0.8);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.6), 0 34px 60px -28px rgba(0, 0, 0, 0.95);
  --blend: screen;
  --board: #0b2216;
  --board-raise: rgba(255, 255, 255, 0.04);
  --board-line: rgba(241, 246, 242, 0.14);
  --card-on-board: #0d1a13;
  --school-2: #e0b84a;
  --school-ink: #f0a3ad;
}

:root[data-theme="dark"] .on-light {
  display: none;
}

:root[data-theme="dark"] .on-dark {
  display: block;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.board a:focus-visible,
.board button:focus-visible {
  outline-color: var(--board-focus);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: 600 14px var(--f-head);
  box-shadow: var(--shadow);
}

.skip:focus {
  left: 8px;
}

.on-dark {
  display: none;
}

/* The Naintu logo files have white or black backgrounds; blending lets the page show through. */
.logo {
  mix-blend-mode: var(--blend);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.money {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Type ---------- */
h1,
h2 {
  font-family: var(--f-display);
  font-weight: 750;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 6.6vw, 84px);
  line-height: 0.98;
  margin: 26px 0 0;
  max-width: 13em;
}

h2 {
  font-size: clamp(30px, 3.9vw, 50px);
  line-height: 1.04;
  margin: 0;
  max-width: 17em;
}

h3 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}

/* A gold chalk stroke under the words that matter. */
.mark {
  padding-bottom: 0.06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5C60 4 140 3 298 5.5' stroke='%23e0a21f' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 100% 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sub {
  color: var(--mute);
  font-size: 17.5px;
  line-height: 1.6;
  max-width: 38em;
  margin: 20px 0 0;
}

.lead {
  font-size: clamp(16.5px, 1.45vw, 19px);
  line-height: 1.6;
  margin: 0;
  max-width: 32em;
}

/* ---------- Header ---------- */
body > header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

body > header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 19px var(--f-head);
  letter-spacing: 0.04em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font: 600 14px var(--f-head);
  text-decoration: none;
  color: var(--mute);
}

nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

/* Contact and the sun/moon switch share one height and one outline, so they line up. */
nav .nav-contact,
.theme-switch {
  height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
}

nav .nav-contact {
  margin-left: 8px;
  padding: 0 16px;
}

.theme-switch {
  margin-left: 2px;
  cursor: pointer;
}

nav .nav-contact:hover,
.theme-switch:hover {
  border-color: var(--green);
  background: var(--surface);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  padding: 0;
}

.icon-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---------- Buttons, badges, chips ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font: 600 15.5px var(--f-head);
  text-decoration: none;
  transition: transform 0.12s var(--ease), filter 0.12s var(--ease), border-color 0.12s var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  color: var(--on-green);
}

.button.primary:hover,
.button.gold:hover {
  filter: brightness(1.07);
}

.button.gold,
.board a.button.gold {
  background: var(--gold);
  color: #0d1a13;
}

.button.on-board,
.board a.button.on-board {
  border-color: var(--board-line);
  background: var(--board-raise);
  color: var(--on-board);
}

.button.on-board:hover {
  border-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .button:hover {
    transition: none;
    transform: none;
  }
}

/* Status badges: the same looks as the portal designs. Status colours never take a school's colours. */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 9px;
  border: 1.5px solid;
  border-radius: 999px;
  font: 700 11px/1.6 var(--f-mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.b-ok {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success);
}

.b-warn {
  background: var(--gold-soft);
  color: var(--gold-ink);
  border-color: var(--gold-ink);
}

.b-fail {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red);
}

.b-draft {
  background: var(--surface);
  color: var(--mute);
  border: 1.5px dashed var(--line-strong);
}

.chip {
  padding: 1px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font: 600 11px var(--f-head);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}

.where {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 600 12px/1.8 var(--f-head);
  color: var(--mute);
  white-space: nowrap;
}

/* ---------- The board (hero and closing) ---------- */
.board {
  position: relative;
  background: var(--board);
  color: var(--on-board);
  isolation: isolate;
}

/* The star from the AiSOMA mark, as a faint repeating pattern that fades out. */
.board::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(700px 420px at 85% 10%, rgba(224, 162, 31, 0.12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 22Q33.1 29.5 38 30.5 33.1 31.5 32 39 30.9 31.5 26 30.5 30.9 29.5 32 22Z' fill='%23e0a21f' fill-opacity='.11'/%3E%3C/svg%3E") 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
}

.board a {
  color: var(--gold);
}

.board .lead {
  color: var(--on-board-mute);
}

.hero {
  padding: 64px 0;
  z-index: 1;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--board-line);
  border-radius: 999px;
  background: var(--board-raise);
  font: 600 13px var(--f-head);
  color: var(--on-board);
}

.state-pill .dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(224, 162, 31, 0.2);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
  margin-top: 40px;
}

.for-line {
  margin: 18px 0 0;
  font: 600 15px var(--f-head);
  color: var(--on-board-mute);
}

.for-line b {
  color: var(--on-board);
}

.motto {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--board-line);
  font: 600 15px var(--f-head);
  color: var(--gold);
}

.star {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

/* The illustrations hang over the board's lower edge on wide screens. */
.hero-art {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.sheet-card {
  grid-column: 1 / 11;
  grid-row: 1;
  margin: 0;
  background: var(--card-on-board);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font: 500 14px var(--f-head);
  color: var(--mute);
}

.sheet-top b {
  color: var(--ink);
  font-weight: 700;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.mini-table th {
  padding: 10px 18px 8px;
  text-align: left;
  font: 600 11.5px var(--f-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.mini-table td {
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.mini-table td small {
  display: block;
  font-size: 12.5px;
  color: var(--mute);
}

.mini-table tr.is-focus td {
  background: color-mix(in srgb, var(--gold) 9%, transparent);
}

.mini-table tr.is-focus td:first-child {
  box-shadow: inset 3px 0 0 var(--gold);
}

.sheet-foot {
  padding: 4px 18px 18px;
  padding-right: 46%;
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mock-btn {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--mute);
  font: 600 13px var(--f-head);
  opacity: 0.6;
}

.mock-btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
}

.mock-btn.danger {
  border-color: var(--red);
  color: var(--red);
}

.refusal {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.phone-card {
  position: relative;
  z-index: 2;
  grid-column: 8 / 13;
  grid-row: 1;
  align-self: end;
  margin: 0 0 -190px;
  padding: 10px 12px 14px;
  background: var(--card-on-board);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  box-shadow: var(--shadow-lift);
}

.phone-notch {
  width: 64px;
  height: 5px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: var(--line-strong);
}

.phone-head {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--green);
  color: var(--on-green);
}

.phone-head small {
  display: block;
  font: 600 11.5px var(--f-head);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.phone-head strong {
  display: block;
  font: 700 18px var(--f-head);
}

.periods {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13.5px;
}

.periods li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
}

.periods li + li {
  border-top: 1px solid var(--line);
}

.periods .t {
  color: var(--mute);
}

.periods .now {
  background: var(--gold-soft);
  border-top-color: transparent;
}

.periods .now + li {
  border-top-color: transparent;
}

.periods .brk {
  color: var(--mute);
}

.done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 600 12px var(--f-head);
  color: var(--success);
}

.done svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.now-tag {
  font: 700 11px var(--f-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.offline-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--mute);
  font-size: 12.5px;
  line-height: 1.45;
}

.offline-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--gold-ink);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Sections: a notebook margin rail runs down the page ---------- */
.sec {
  --rail-x: calc(max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter)) + var(--rail) + var(--gap) / 2);
  padding: 112px 0;
  background:
    linear-gradient(var(--margin-line), var(--margin-line)) no-repeat var(--rail-x) 0 / 1px 100%,
    var(--sec-bg);
}

.sec.tinted {
  --sec-bg: var(--bg-alt);
}

/* Room for the phone that hangs off the hero. */
.hero + .sec {
  padding-top: 220px;
}

.sec-grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
}

.rail {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font: 600 14px var(--f-head);
  color: var(--green);
  text-align: right;
}

.rail svg,
.contents dt svg,
.principles svg,
.fine-print svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* 1. Roles */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.role {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-tab {
  font: 700 19px var(--f-head);
  letter-spacing: -0.01em;
}

.role > p {
  margin: 0;
  color: var(--mute);
  font-size: 15.5px;
}

.snip {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
}

.snip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 5px 0;
}

.snip-row + .snip-row {
  border-top: 1px solid var(--line);
}

.snip-row > span:first-child {
  color: var(--mute);
}

.ledger .snip-row.total {
  border-top: 1.5px solid var(--ink);
}

.ledger .total > span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.ledger .pending > span,
.ledger .pending > span:first-child {
  color: var(--gold-ink);
}

.snip-note {
  margin: 6px 0 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.5;
}

.snip-tag {
  font: 600 12.5px var(--f-head);
  color: var(--ink);
}

.snip-tag.ok {
  color: var(--success);
}

.ticks {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 2px;
}

.ticks i {
  height: 14px;
  border-radius: 4px;
  background: var(--success);
  opacity: 0.8;
}

.ticks i.off {
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  opacity: 1;
}

.aside-note {
  margin: 24px 0 0;
  color: var(--mute);
  font-size: 14.5px;
}

.aside-note b {
  color: var(--ink);
  font-family: var(--f-head);
}

/* 2. What's inside: a contents page */
.contents {
  margin-top: 48px;
  border-bottom: 1px solid var(--line-strong);
}

.chapter {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  padding: 26px 0;
  border-top: 2px solid var(--ink);
}

.chapter + .chapter {
  border-top: 1px solid var(--line-strong);
}

.chapter-title {
  font-size: 20px;
  font-weight: 700;
}

.contents dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
  margin: 0;
}

.contents dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 650 16px var(--f-body);
  letter-spacing: -0.01em;
}

.contents dt svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--green);
}

.contents dd {
  margin: 6px 0 0 32px;
  color: var(--mute);
  font-size: 15px;
}

/* 3. Fees and results: two documents */
.docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  align-items: start;
}

.doc {
  position: relative;
  margin: 0;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* The fee slip has a perforated top edge. */
.slip {
  padding-top: 34px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.slip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: radial-gradient(circle at 9px 0, var(--sec-bg) 5px, transparent 5.5px) 0 0 / 18px 10px repeat-x;
}

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-head h3 {
  font-size: 21px;
  font-weight: 700;
}

.doc-sum {
  margin-top: 16px;
  padding: 4px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 14px;
}

.doc-sum > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 0;
}

.doc-sum > div + div {
  border-top: 1px dashed var(--line-strong);
}

.doc-sum span {
  color: var(--mute);
}

.doc-sum b {
  font-weight: 600;
  text-align: right;
}

.history {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.history li {
  position: relative;
  padding: 0 0 18px 30px;
}

.history li:last-child {
  padding-bottom: 0;
}

.slip .history li:last-child {
  padding-right: 130px;
}

.history li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: var(--surface);
}

.history li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 21px;
  bottom: 0;
  width: 1.5px;
  background: var(--line-strong);
}

.history li:last-child::after {
  display: none;
}

.history b {
  display: block;
  font: 600 16px var(--f-head);
}

.history span {
  display: block;
  margin-top: 2px;
  color: var(--mute);
  font-size: 14.5px;
}

.history li.key {
  margin: 0 -12px 18px;
  padding: 12px 12px 12px 42px;
  border-radius: var(--r-sm);
  background: var(--gold-soft);
}

.history li.key::before {
  left: 15px;
  top: 18px;
  border-color: var(--gold);
  background: var(--gold);
}

.history li.key::after {
  left: 20px;
  top: 33px;
  bottom: -18px;
}

.history li.key b {
  color: var(--gold-ink);
}

.history li.key span {
  color: var(--ink);
}

.stamp {
  position: absolute;
  right: 24px;
  bottom: 30px;
  padding: 4px 12px;
  border: 3px double var(--success);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--success);
  font: 700 14px var(--f-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-9deg);
  pointer-events: none;
  transition: opacity 0.35s var(--ease) 0.6s, transform 0.35s var(--ease) 0.6s;
}

.doc.is-pending .stamp {
  opacity: 0;
  transform: rotate(-9deg) scale(1.6);
}

.grade-sheet {
  position: relative;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 14px;
}

.gs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 48px;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
}

.gs-row + .gs-row {
  border-top: 1px dashed var(--line-strong);
}

.gs-head {
  font: 600 11.5px var(--f-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.gs-row .bar {
  height: 8px;
  border-radius: 4px;
  background: var(--line-strong);
}

.gs-row .bar.s {
  width: 60%;
}

.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 4px 14px;
  border: 2px dashed var(--mute);
  border-radius: 8px;
  background: var(--surface);
  color: var(--mute);
  font: 700 13px var(--f-head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -40%) rotate(-6deg);
}

.fine-print {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 44px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line-strong);
}

.fine-print li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--mute);
}

.fine-print svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 3px;
  color: var(--green);
  stroke-width: 2.25;
}

.fine-print b {
  color: var(--ink);
  font-family: var(--f-head);
}

/* 4. School colours */
.colours-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 48px;
  align-items: start;
}

.rules {
  margin: 28px 0 0;
}

.rules > div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.rules dt {
  font: 600 15px var(--f-head);
  color: var(--green);
}

.rules dd {
  margin: 0;
  color: var(--mute);
}

.rules.compact {
  margin-top: 36px;
  max-width: 46em;
}

.phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.phone {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone-top {
  padding: 18px 16px;
  background: var(--green);
  color: var(--on-green);
}

.phone.school .phone-top {
  background: var(--school);
  color: var(--school-on);
  border-bottom: 4px solid var(--school-2);
}

.phone-top small {
  display: block;
  font: 600 11.5px var(--f-head);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.phone-top strong {
  display: block;
  margin-top: 2px;
  font: 700 18px var(--f-head);
}

.phone-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.p-card .snip-row {
  flex-wrap: nowrap;
  gap: 8px;
  line-height: 1.35;
}

.p-card {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 11px;
  background: var(--green);
  color: var(--on-green);
  font: 600 13.5px var(--f-head);
}

.phone.school .phone-btn {
  background: var(--school);
  color: var(--school-on);
}

.tabs {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--line);
  padding: 8px 6px 10px;
  font: 600 11.5px var(--f-head);
  color: var(--mute);
}

.tabs span {
  padding-top: 4px;
  border-top: 2px solid transparent;
}

.tabs .tab-on {
  color: var(--green);
  border-color: var(--green);
}

.phone.school .tabs .tab-on {
  color: var(--school-ink);
  border-color: var(--school-ink);
}

.phone figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--mute);
}

/* 5. Privacy */
.parties {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 48px 0 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.parties li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
}

.parties li + li {
  border-left: 1px solid var(--line);
}

.party-role {
  font: 600 12px var(--f-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.parties b {
  font: 750 24px/1.2 var(--f-display);
  letter-spacing: -0.03em;
}

.parties li > span:last-child {
  color: var(--mute);
  font-size: 15px;
}

.principles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  margin: 40px 0 0;
  padding: 0;
}

.principles li {
  display: flex;
  gap: 16px;
}

.principles svg {
  width: 44px;
  height: 44px;
  flex: none;
  padding: 11px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
}

.principles p {
  margin: 4px 0 0;
  color: var(--mute);
  font-size: 15px;
}

.more {
  display: inline-block;
  margin-top: 28px;
  font: 600 15.5px var(--f-head);
}

/* 6. Progress report */
.report {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 3px double var(--line-strong);
}

.report-head img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.report-kicker {
  margin: 0;
  font: 700 13px var(--f-head);
  letter-spacing: 0.06em;
  color: var(--mute);
}

.report-title {
  margin: 0;
  font: 750 22px/1.2 var(--f-display);
  letter-spacing: -0.03em;
}

.status-badge {
  margin-left: auto;
  padding: 4px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font: 600 12px var(--f-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.report-table thead th {
  padding: 12px 24px 10px;
  text-align: left;
  font: 600 12px var(--f-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  background: var(--surface-2);
}

.report-table tbody th,
.report-table td {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.report-table tbody th {
  width: 22%;
  font: 600 16px var(--f-head);
}

.report-table td:nth-child(2) {
  width: 18%;
  white-space: nowrap;
}

.report-table td:last-child {
  color: var(--mute);
}

/* ---------- Closing board ---------- */
.closing {
  padding: 112px 0;
}

.closing::before {
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
}

.closing-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}

.board-label {
  margin: 0 0 14px;
  font: 600 14px var(--f-head);
  color: var(--gold);
}

.closing h2 {
  margin-bottom: 20px;
}

.facts {
  margin: 32px 0 0;
  max-width: 36em;
}

.facts > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--board-line);
  font-size: 15px;
}

.facts dt {
  font: 600 14px var(--f-head);
  color: var(--on-board-mute);
}

.facts dd {
  margin: 0;
}

.write {
  padding: 28px;
  border: 1px solid var(--board-line);
  border-radius: var(--r);
  background: var(--board-raise);
}

.write > p:not(.board-label) {
  margin: 0;
  color: var(--on-board-mute);
}

.board a.email {
  display: inline-block;
  margin-top: 22px;
  font: 700 clamp(22px, 2.6vw, 30px) var(--f-head);
  letter-spacing: -0.01em;
  color: var(--on-board);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- Reveal on scroll (main.js adds .is-pending only to content below the fold) ---------- */
.reveal {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-pending {
  opacity: 0;
  transform: translateY(16px);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stamp {
    transition: none;
  }
}

/* ---------- Privacy policy and 404 ---------- */
.eyebrow,
.micro {
  margin: 0;
  font: 600 14px var(--f-head);
  color: var(--gold);
}

.page-band {
  padding: 56px 0 64px;
}

.page-band h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  margin: 12px 0 0;
}

.narrow {
  max-width: 860px;
}

.doc-body {
  padding-top: 40px;
  padding-bottom: 80px;
}

.draft-note {
  margin: 0;
  padding: 14px 18px;
  border: 1.5px dashed var(--gold-ink);
  border-radius: var(--r-sm);
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 15px;
}

.draft-note b {
  display: block;
  font: 700 13px var(--f-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.updated {
  margin: 14px 0 0;
  color: var(--mute);
  font-size: 14px;
}

.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 32px 36px 16px;
  margin-top: 28px;
}

.sheet h2 {
  max-width: none;
  text-wrap: wrap;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 32px 0 10px;
}

.sheet h2:first-child {
  margin-top: 0;
}

.sheet h3 {
  font-size: 16.5px;
  margin: 18px 0 6px;
}

.sheet p,
.sheet ul {
  font-size: 15.5px;
  margin: 0 0 14px;
}

.sheet ul {
  padding-left: 20px;
}

.sheet li + li {
  margin-top: 4px;
}

.not-found {
  min-height: 72vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 96px 24px;
  text-align: center;
}

.not-found h1 {
  margin: 0;
}

.nf-text {
  margin: 0 0 14px;
  color: var(--on-board-mute);
}

/* ---------- Footer (shared with the Naintu family) ---------- */
footer {
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 13.5px;
  padding: 40px 0 48px;
}

footer p {
  margin: 4px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: center;
}

.maker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
  text-decoration: none;
}

.maker img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  color: var(--mute);
  font: 600 13.5px var(--f-head);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-note {
  grid-column: 1 / -1;
  padding-top: 20px !important;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
}

/* "Naintu" is always written as the Naintu signature. */
.sig-name {
  font-family: 'Satisfy', cursive;
  font-weight: 400;
  font-size: 1.18em;
  letter-spacing: 0;
  line-height: 1;
}

h2 .sig-name,
.parties b .sig-name {
  font-size: 1.28em;
}

/* ---------- Responsive ---------- */
/* Narrow laptop: fewer header links so the bar never overflows; a slimmer rail. */
@media (max-width: 1080px) {
  .hide-medium {
    display: none;
  }

  :root {
    --rail: 150px;
    --gap: 48px;
  }
}

/* Small laptop and tablet: the hero stacks, and the phone tucks under the portal's corner instead of hanging. */
@media (max-width: 1180px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-copy .lead {
    max-width: 40em;
  }

  .hero-art {
    max-width: 820px;
  }

  .sheet-card {
    grid-column: 1 / -1;
  }

  .phone-card {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
    width: min(100%, 320px);
    margin: -28px 12px 0 0;
  }

  .hero + .sec {
    padding-top: 112px;
  }
}

/* Tablet: the rail becomes a label above each section. */
@media (max-width: 960px) {
  .colours-split,
  .closing-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero + .sec {
    padding-top: 96px;
  }

  .sec {
    background: var(--sec-bg);
  }

  .sec-grid {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    justify-content: flex-start;
    margin: 0 0 14px;
    padding-left: 12px;
    border-left: 2px solid var(--gold);
    text-align: left;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .fine-print {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone */
@media (max-width: 680px) {
  :root {
    --gutter: 16px;
  }

  .hide-small {
    display: none;
  }

  body > header .wrap {
    height: 60px;
  }

  .hero {
    padding: 40px 0 56px;
  }

  .hero-split {
    margin-top: 28px;
  }

  .state-pill {
    font-size: 12px;
  }

  .sec,
  .closing {
    padding: 72px 0;
  }

  .hero + .sec {
    padding-top: 72px;
  }

  .roles-grid,
  .docs,
  .contents dl,
  .fine-print,
  .parties,
  .principles {
    grid-template-columns: 1fr;
  }

  .parties li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .phones {
    grid-template-columns: 1fr;
    max-width: 340px;
  }

  .phone-card {
    justify-self: stretch;
    width: auto;
    margin: 16px 0 0;
  }

  .sheet-foot {
    padding-right: 18px;
  }

  .mini-table th,
  .mini-table td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .role,
  .doc,
  .write {
    padding: 20px;
  }

  .stamp {
    right: 16px;
    bottom: 18px;
  }

  .slip .history li:last-child {
    padding-right: 0;
    padding-bottom: 56px;
  }

  .rules > div,
  .facts > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .report-head {
    padding: 18px;
  }

  .status-badge {
    margin-left: 0;
  }

  .report-table thead {
    display: none;
  }

  .report-table,
  .report-table tbody,
  .report-table tr,
  .report-table tbody th,
  .report-table td {
    display: block;
    width: auto;
  }

  .report-table tbody th,
  .report-table td:nth-child(2) {
    width: auto;
  }

  .report-table tr {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
  }

  .report-table tbody th,
  .report-table td {
    padding: 0;
    border: 0;
  }

  .report-table td:nth-child(2) {
    margin: 8px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sheet {
    padding: 22px 18px 8px;
  }
}

/* Very narrow phones (360px): each payment becomes two lines so nothing is cut off. */
@media (max-width: 420px) {
  .mini-table thead {
    display: none;
  }

  .mini-table,
  .mini-table tbody {
    display: block;
  }

  .mini-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-top: 1px solid var(--line);
  }

  .mini-table td {
    border-top: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .mini-table td:first-child {
    grid-row: span 2;
  }

  .mini-table td.money {
    padding-bottom: 0;
    text-align: right;
  }

  .mini-table td:last-child {
    padding-top: 2px;
    text-align: right;
  }

  nav .nav-contact {
    margin-left: 0;
    padding: 0 12px;
  }
}
