@font-face {
  font-family: "Archivo Variable";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --limewash: oklch(97.4% 0.006 175);
  --surface: oklch(99.6% 0.002 175);
  --ink: oklch(23% 0.035 265);
  --ink-deep: oklch(16% 0.03 265);
  --ink-soft: oklch(43% 0.03 265);
  --hairline: oklch(89.5% 0.012 240);
  --hairline-strong: oklch(79% 0.016 240);
  --cobalt: oklch(46% 0.18 263);
  --cobalt-deep: oklch(37% 0.15 263);
  --turquoise: oklch(48% 0.09 198);
  --turquoise-deep: oklch(38% 0.075 198);
  --saffron: oklch(83% 0.155 83);
  --saffron-deep: oklch(69% 0.15 72);
  --violet: oklch(45% 0.16 302);
  --violet-deep: oklch(36% 0.13 302);
  --present: oklch(48% 0.12 150);
  --present-wash: oklch(94.5% 0.045 150);
  --absent: oklch(51% 0.19 27);
  --absent-wash: oklch(95.5% 0.03 27);
  --partial: oklch(48% 0.1 62);
  --partial-wash: oklch(95.5% 0.055 85);
  --muted-wash: oklch(94% 0.008 265);
  --font: "Archivo Variable", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 16px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--limewash);
  font-variant-numeric: tabular-nums;
  caret-color: var(--cobalt);
}

::selection {
  background: var(--saffron);
  color: var(--ink);
}

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

.on-dark :focus-visible,
.band-cobalt :focus-visible,
.band-turquoise :focus-visible,
.band-violet :focus-visible,
.topbar :focus-visible {
  outline-color: var(--surface);
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.sign-type {
  font-stretch: 118%;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-wrap: balance;
}

.label-type {
  font-stretch: 108%;
  font-weight: 650;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-stretch: 108%;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn { white-space: nowrap; }

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-light {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px oklch(23% 0.035 265 / 0.08), 0 2px 6px oklch(23% 0.035 265 / 0.06);
}

.btn-light:hover {
  background: var(--limewash);
}

.btn-ink {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 1px 2px oklch(23% 0.035 265 / 0.08), 0 2px 6px oklch(23% 0.035 265 / 0.06);
}

.btn-ink:hover {
  background: var(--ink-deep);
}

.btn-quiet {
  background: oklch(99.6% 0.002 175 / 0.14);
  color: var(--surface);
  border-color: oklch(99.6% 0.002 175 / 0.45);
}

.btn-quiet:hover {
  background: oklch(99.6% 0.002 175 / 0.24);
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: var(--surface);
  border-bottom: 4px solid var(--ink-deep);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.wordmark {
  font-size: 1.15rem;
  text-decoration: none;
  margin-right: auto;
}

.topbar .btn {
  min-height: 40px;
  padding: 0 12px;
}

.topbar .btn-label-long {
  display: none;
}

.topbar .wrap {
  gap: 8px;
}

/* Hero */
.hero {
  background: var(--ink);
  color: var(--surface);
  padding-block: 40px 56px;
}

.hero h1 {
  font-size: clamp(2.1rem, 8.5vw, 4.5rem);
  max-width: 14ch;
}

.hero p {
  margin-top: 20px;
  max-width: 34rem;
  font-size: 1.125rem;
  color: oklch(90% 0.012 265);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Colour stripes: the favicon, reused as the day's four stops */
.stripes {
  display: flex;
  height: 12px;
}

.stripes i {
  flex: 1;
}

.stripes i:nth-child(1) { background: var(--cobalt); }
.stripes i:nth-child(2) { background: var(--turquoise); }
.stripes i:nth-child(3) { background: var(--saffron); }
.stripes i:nth-child(4) { background: var(--violet); }

/* Bands: one per stop of the day */
.band {
  padding-block: 48px 56px;
  border-bottom: 4px solid transparent;
}

.band-cobalt { background: var(--cobalt); color: var(--surface); border-color: var(--cobalt-deep); }
.band-turquoise { background: var(--turquoise); color: var(--surface); border-color: var(--turquoise-deep); }
.band-saffron { background: var(--saffron); color: var(--ink); border-color: var(--saffron-deep); }
.band-violet { background: var(--violet); color: var(--surface); border-color: var(--violet-deep); }

.band-grid {
  display: grid;
  gap: 32px;
}

.band h2 {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
}

.band h2 .t {
  opacity: 0.8;
  margin-right: 0.35em;
}

.band .lede {
  margin-top: 16px;
  max-width: 34rem;
  font-size: 1.0625rem;
}

.band-cobalt .lede,
.band-turquoise .lede,
.band-violet .lede {
  color: oklch(94% 0.025 265);
}

.band-turquoise .lede { color: oklch(95% 0.03 198); }
.band-violet .lede { color: oklch(95% 0.03 302); }
.band-saffron .lede { color: oklch(28% 0.04 75); }

.points {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  max-width: 34rem;
}

.points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.points svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
}

/* Product panels sit on white, on the colour */
.panel {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}

.panel-head .label-type {
  font-size: 0.95rem;
}

.sample {
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

/* Register */
.register {
  margin: 0;
  padding: 0;
  list-style: none;
}

.register li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  transition: background-color 0.2s var(--ease);
}

.register li:last-child { border-bottom: 0; }
.register li[data-mark="absent"] { background: var(--absent-wash); }

.register .who {
  flex: 1 1 11rem;
  font-stretch: 108%;
  font-weight: 650;
}

.toggle {
  display: inline-flex;
  gap: 8px;
}

.toggle button {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-stretch: 108%;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.toggle button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.toggle button:hover { border-color: var(--ink); }

.toggle button[aria-pressed="true"] svg { stroke-width: 3; }

.toggle .p[aria-pressed="true"] {
  background: var(--present);
  border-color: var(--present);
  color: var(--surface);
}

.toggle .a[aria-pressed="true"] {
  background: var(--absent);
  border-color: var(--absent);
  color: var(--surface);
}

.panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  background: var(--limewash);
  font-size: 0.9rem;
}

.panel-foot .count {
  font-stretch: 108%;
  font-weight: 650;
}

.dots {
  display: inline-flex;
  gap: 6px;
}

.dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--hairline-strong);
}

.dots i[data-mark="present"] { background: var(--present); border-color: var(--present); }
.dots i[data-mark="absent"] { border-color: var(--absent); }

/* Student lookup */
.search {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}

.search label {
  display: block;
  margin-bottom: 6px;
  font-stretch: 108%;
  font-weight: 650;
  font-size: 0.875rem;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.search input:focus {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.students {
  margin: 0;
  padding: 0;
  list-style: none;
}

.students li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

.students li:last-child { border-bottom: 0; }
.students li[hidden] { display: none; }
.students .nm { font-stretch: 108%; font-weight: 650; }
.students .meta { color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }

.empty {
  padding: 16px;
  color: var(--ink-soft);
}

/* Fee card */
.fee-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-stretch: 108%;
  font-weight: 650;
  font-size: 0.8rem;
}

.chip-partial { background: var(--partial-wash); color: var(--partial); }
.chip-overdue { background: var(--absent); color: var(--surface); }
.chip-void { background: var(--muted-wash); color: oklch(50% 0.02 265); text-decoration: line-through; }

.ledger {
  width: 100%;
  border-collapse: collapse;
}

.ledger th,
.ledger td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: baseline;
}

.ledger th { font-weight: 400; color: var(--ink-soft); }
.ledger td:last-child, .ledger th:last-child { text-align: right; white-space: nowrap; }
.ledger tr.total th, .ledger tr.total td { font-stretch: 108%; font-weight: 650; color: var(--ink); border-bottom: 0; }
.ledger .voided td, .ledger .voided th { color: oklch(50% 0.02 265); }
.ledger .voided td:last-child { text-decoration: line-through; }
.ledger .ref { display: block; font-size: 0.8125rem; color: var(--ink-soft); }

/* Staff list */
.roles {
  margin: 0;
  padding: 0;
  list-style: none;
}

.roles li {
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
}

.roles li:last-child { border-bottom: 0; }
.roles .label-type { display: block; margin-bottom: 4px; }
.roles span:not(.label-type) { color: var(--ink-soft); }

/* Closing */
.close {
  background: var(--ink);
  color: var(--surface);
  padding-block: 56px 64px;
}

.close h2 {
  font-size: clamp(1.9rem, 7vw, 3.25rem);
  max-width: 16ch;
}

.close p {
  margin-top: 16px;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: oklch(90% 0.012 265);
}

.steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  max-width: 34rem;
  counter-reset: s;
}

.steps li {
  counter-increment: s;
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid oklch(99.6% 0.002 175 / 0.25);
}

.steps li::before {
  content: counter(s);
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--saffron);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-stretch: 108%;
  font-weight: 650;
}

.close-grid {
  display: grid;
  gap: 32px;
}


.contact { color: var(--ink); }
.contact .fields { display: grid; gap: 16px; padding: 16px; }
.field label { display: block; margin-bottom: 6px; font-stretch: 108%; font-weight: 650; font-size: 0.875rem; }

.field input,
.field textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.field input { height: 44px; }
.field textarea { padding-block: 10px; resize: vertical; min-height: 7rem; }
.field input:focus,
.field textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--absent); }
.hint { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--ink-soft); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact .form-error {
  margin: 0;
  max-width: none;
  color: var(--absent);
  font-stretch: 108%;
  font-weight: 650;
  font-size: 0.95rem;
}

.contact .btn[disabled] { background: var(--muted-wash); color: oklch(50% 0.02 265); box-shadow: none; cursor: default; }
.contact p.sent {
  margin: 0;
  max-width: none;
  color: var(--ink);
  font-size: 1rem; padding: 24px 16px; font-stretch: 108%; font-weight: 650; }
.contact.is-sent .fields { display: none; }

footer {
  background: var(--ink-deep);
  color: oklch(82% 0.015 265);
  padding-block: 24px;
  font-size: 0.9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

footer a { color: var(--surface); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

.contact .fine { margin: 0; max-width: none; font-size: 0.8125rem; color: var(--ink-soft); }
.contact .fine a { color: var(--ink); }

/* Legal pages (privacy, terms) */
.legal { background: var(--limewash); padding-block: 40px 64px; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); margin-bottom: 8px; }
.legal .updated { color: var(--ink-soft); font-size: 0.9rem; }
.legal h2 { margin-top: 32px; margin-bottom: 8px; font-stretch: 108%; font-weight: 650; font-size: 1.2rem; line-height: 1.3; }
.legal p, .legal li { max-width: 65ch; margin-top: 12px; }
.legal ul { padding-left: 1.25rem; margin: 0; }
.legal a { color: var(--cobalt-deep); }
.legal .back { display: inline-block; margin-bottom: 24px; }

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .close-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
  .topbar .wrap { gap: 12px; }
  .topbar .btn-label-long { display: inline; }
  .topbar .btn-label-short { display: none; }
  .hero { padding-block: 72px 88px; }
  .band { padding-block: 72px 80px; }
  .band-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 56px; }
  .band-grid.flip > :first-child { order: 2; }
}

@media (min-width: 1024px) {
  .band-grid { gap: 80px; }
}

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