/* ======== fonts.css ======== */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-variable.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-variable-italic.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ======== tokens.css ======== */
:root {
  --navy: #10233f;
  --navy-deep: #0a1729;
  /* One accent, two tints, because no single value can do both jobs: on a
     navy band the accent has to be light to be seen, and on paper it has to
     be dark enough to set small text at 4.5:1. Same hue either way, so it
     reads as one colour across the site. */
  --sand: #ffd166;
  --sand-ink: #7a5f22;
  --oxblood: #7c2231;

  /* The button is the accent too, which is the whole point of having one.
     --btn-fill is bright, so on a dark band it is its own boundary (9.8:1).
     On paper it is not - 1.4:1 against white - so the boundary there is the
     border, in --btn-edge. WCAG 1.4.11 asks for 3:1 against what is
     adjacent, from whichever part of the control provides it, and
     contrast.test.js checks it that way rather than assuming the fill.

     --btn-edge is the accent's own dark tint, not the navy ink it started
     as: a navy ring around an amber button reads as a second colour on a
     site that has one accent. It clears 5.3:1 on every light ground, where
     3 is the requirement. Dropping the border entirely would mean a fill
     dark enough to delineate itself, and the dullest amber that manages
     that is #b8860b - no glow left in it. */
  --btn-fill: #ffd166;
  --btn-ink: #0a1729;
  --btn-edge: #7a5f22;


  /* The focus ring is a UI boundary, so WCAG 1.4.11 wants 3:1 against what
     sits next to it. The ring is drawn 3px clear of the control, so that is
     the ground, not the control's own fill.

     --accent used to do this job and failed it: oxblood on a navy band is
     1.60:1. It cleared 4.5:1 against every light ground the token test knew
     about, so nothing caught it. The accent's dark tint is the ring on paper
     - on brand, and distinct from the navy that borders every form input, so
     a focused input does not just look like a thicker border. */
  --focus: #7a5f22;
  /* Bands are navy in both themes, so this value does not change with the
     theme. It is the same near-white the on-band button already hovers to. */
  --focus-on-band: #f2f6fa;

  --ground: #f7f9fb;
  --surface: #ffffff;
  --surface-alt: #edf0f3;
  --text: #0b1520;
  --text-soft: #47586b;
  --text-faint: #5a6b7d;
  --rule: #c9d3dc;
  --rule-strong: #10233f;
  --accent: #7c2231;
  --honour: #7a5f22;
  --band: #10233f;
  --band-text: #e7edf4;
  /* Heading ink on a dark band, lighter than the body ink above. Measured
     against the scrimmed hero photograph, where it reaches 5.88 to 1. */
  --band-head: #f2f6fa;
  --band-soft: #a8bace;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;

  --measure: 63ch;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

:root[data-theme="dark"] {
  --ground: #0b1520;
  --surface: #121f2e;
  --surface-alt: #16273a;
  --text: #e7edf4;
  --text-soft: #a8bace;
  --text-faint: #8195ab;
  --rule: #2a3d53;
  --rule-strong: #5a7aa6;
  --accent: #e0788a;
  --focus: #ffd166;
  --honour: #ffd166;
  --band: #08111b;
  --band-text: #e7edf4;
  /* Heading ink on a dark band, lighter than the body ink above. Measured
     against the scrimmed hero photograph, where it reaches 5.88 to 1. */
  --band-head: #f2f6fa;
  --band-soft: #90a5bc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0b1520;
    --surface: #121f2e;
    --surface-alt: #16273a;
    --text: #e7edf4;
    --text-soft: #a8bace;
    --text-faint: #8195ab;
    --rule: #2a3d53;
    --rule-strong: #5a7aa6;
    --accent: #e0788a;
    --focus: #ffd166;
    --honour: #ffd166;
    --band: #08111b;
    --band-text: #e7edf4;
  /* Heading ink on a dark band, lighter than the body ink above. Measured
     against the scrimmed hero photograph, where it reaches 5.88 to 1. */
  --band-head: #f2f6fa;
    --band-soft: #90a5bc;
  }
}

/* ======== base.css ======== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Keep keyboard-focused elements clear of the sticky masthead
   (WCAG 2.2 SC 2.4.11 Focus Not Obscured). --masthead-h is set in
   components/masthead.css and kept exact by scripts/masthead-height.js. */
html {
  scroll-padding-top: calc(var(--masthead-h) + 0.5rem);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
  line-height: 1.12;
}

a {
  color: inherit;
}

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

/* The dark grounds, in one list, because the ring has to change on them and
   nothing else should have to know which they are. Setting the token rather
   than the outline means any focusable descendant inherits it, including ones
   added later, rather than each band restating its own focus rule. */
.reg,
.honours,
.strapline,
.visit,
.line-band,
.phead--photo,
.phead--ruled {
  --focus: var(--focus-on-band);
}

/* Programmatic focus targets must not paint a ring — see Task 8. */
[tabindex="-1"]:focus {
  outline: none;
}

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: var(--band-text);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-110%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ======== components/button.css ======== */
.btn,
.btn-quiet,
.btn-on-band {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.25rem;
  min-height: 44px;
  text-decoration: none;
  border: 2px solid transparent;
  transition:
    background 120ms ease,
    color 120ms ease;
}

/* One fill for every primary button, on every ground, in both themes - the
   site's accent, so the thing you can act on is the thing wearing the
   colour. The fill alone is not the boundary: bright sand on paper is
   1.6:1, so the border carries it there, and on a dark band the fill is
   9.8:1 and carries it itself. contrast.test.js checks whichever part
   provides the edge. Nothing here changes with the theme, so the
   theme-specific .btn blocks this file used to carry are gone. */
.btn {
  background: var(--btn-fill);
  /* Not the fill: a bright accent on paper has no edge of its own. */
  border-color: var(--btn-edge);
  color: var(--btn-ink);
}

.btn:hover {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}

.btn-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}

.btn-quiet:hover {
  background: var(--surface-alt);
}

/* On a band the fill is bright against navy and is its own boundary, so the
   border matches it rather than drawing a dark line nobody can see. Only the
   hover differs from .btn, because the ground it inverts against is dark. */
.btn-on-band {
  background: var(--btn-fill);
  border-color: var(--btn-fill);
  color: var(--btn-ink);
}

.btn-on-band:hover {
  background: transparent;
  /* Theme-independent: this one always sits on a navy band. */
  color: #f2f6fa;
  border-color: #f2f6fa;
}

/* ======== components/masthead.css ======== */
/* Below the desktop breakpoint (55.6875rem, 891px) the registration strip is hidden:
   stacked on a phone the strip, wordmark, nav and button took 30% of the
   screen, and sticky held it there. Without JavaScript the masthead stays an
   ordinary non-sticky block with the nav open (143px at 375px). With
   JavaScript (html.js, set by masthead-nav.js) the nav collapses behind a
   Menu button and the masthead is a single ~64px sticky row, so the Apply
   button stays reachable down the page. The charity and RLSS numbers are reproduced in the footer
   colophon on every page, so nothing is withheld.

   55.6875rem is where the bar stops fitting on one row, and the Menu button
   must engage exactly there and nowhere else: it fits from 891px and breaks
   at 890px, where the wordmark is 349px, the four links 177px and Apply 177px
   at 16px text. The number depends on the nav labels, so re-measure if an item
   is added, removed or renamed - masthead-nav.spec.js fails whenever it and
   the content disagree. The same value is in masthead-nav.js (matchMedia) and
   below. */
.reg {
  display: none;
  background: var(--band);
  color: var(--band-soft);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.reg .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
  padding-block: 0.5rem;
}

.masthead {
  border-bottom: 2px solid var(--rule-strong);
  background: var(--surface);
}

@media (min-width: 55.6875rem) {
  .reg {
    display: block;
  }

  .masthead {
    position: sticky;
    top: 0;
    z-index: 20;
  }
}

/* Child selector, not descendant: .reg nests inside .masthead and has its
   own .wrap, which this rule must not capture. */
.masthead > .wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}

/* min-height, not padding: between roughly 600 and 900px the wordmark wraps to
   one short line and the link box fell to 19-21px, under the 24px minimum target
   size (WCAG 2.5.8). It is a link on every page, so it failed everywhere in that
   band. align-items stays baseline so the "Est. 1965" lockup is unaffected. */
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  min-height: 24px;
}

.wordmark strong {
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.masthead nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.masthead nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}

.masthead nav a:hover {
  color: var(--text);
  border-bottom-color: var(--honour);
}

/* Height of the sticky masthead, consumed by scroll-padding-top in base.css.
   Below 55.6875rem the masthead is not sticky and cannot obscure anything, so the
   fallback is 0. From 55.6875rem it is sticky on one row, 118px tall when measured
   at 16px text (7.375rem); /scripts/masthead-height.js overwrites this with
   the real height, and this value is the guarantee when JavaScript is off
   (WCAG 2.4.11). In rem so it tracks text size at the same ratio as the bar. */
:root {
  --masthead-h: 0px;
}

@media (min-width: 55.6875rem) {
  :root {
    --masthead-h: 7.75rem;
  }
}

/* ---- Mobile disclosure (below 55.6875rem, JavaScript only) ---------------------
   Everything here is scoped to html.js so that no script means a visible,
   working nav. */
.menu-toggle {
  display: none;
}

/* Exact complement of the desktop `min-width: 55.6875rem` queries, not
   `max-width: 56.5624rem`. That 0.0001rem gap left a dead zone at exactly 905px
   where neither side matched: the nav took its stacked mobile layout while the
   Menu button stayed hidden, so four links sat in an open white panel over the
   page with no way to close them. `not all and (min-width: …)` cannot gap. */
@media not all and (min-width: 55.6875rem) {
  .js .masthead {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .js .masthead > .wrap {
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding-block: 0.5rem;
  }

  .js .wordmark {
    flex: 1 1 0;
    min-width: 0;
  }

  .js .wordmark span {
    display: none;
  }

  .js .wordmark strong {
    line-height: 1.15;
  }

  .js .masthead .btn {
    flex: none;
    padding: 0.35rem 0.6rem;
    max-width: 6.25rem;
    text-align: center;
    line-height: 1.2;
  }

  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.6rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    border: 2px solid var(--rule-strong);
    cursor: pointer;
  }

  .js .menu-toggle[hidden] {
    display: none;
  }

  .js .menu-toggle::before {
    content: "";
    width: 1rem;
    height: 0.75rem;
    background:
      linear-gradient(currentColor 0 0) top / 100% 2px no-repeat,
      linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
      linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat;
  }

  /* At 320px the word would leave the wordmark three lines; keep it as the
     accessible name and show the icon alone. */
  @media (max-width: 22.5rem) {
    .js .menu-label {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }

    .js .menu-toggle {
      padding-inline: 0.75rem;
    }
  }

  .js .menu-toggle[aria-expanded="true"] {
    background: var(--ground);
  }

  /* The open menu is a panel hung from the bottom of the masthead, so
     opening it never changes the masthead's height (and so never moves
     content or scroll-padding). It scrolls internally on a short screen,
     because a sticky bar cannot itself be scrolled. */
  .js .masthead nav {
    flex: none;
  }

  .js .masthead nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 2px solid var(--rule-strong);
    padding-inline: var(--pad);
  }

  .js .masthead nav ul[hidden] {
    display: none;
  }

  .js .masthead nav li + li {
    border-top: 1px solid var(--rule);
  }

  .js .masthead nav li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 1rem;
  }

  /* Fallback until masthead-height.js publishes the measured height; 4.25rem
     is the measured 62-64px bar at 16px text. */
  :root.js {
    --masthead-h: 4.25rem;
  }
}

@media (min-width: 55.6875rem) {
  .menu-toggle {
    display: none !important;
  }
}

/* ======== components/footer.css ======== */
footer {
  border-top: 2px solid var(--rule-strong);
  background: var(--surface-alt);
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.foot-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.foot-grid h2 {
  font-size: 0.72rem;
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
}

.foot-grid p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  max-width: 34ch;
}

.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.foot-grid a {
  /* 24px minimum target height (WCAG 2.2 SC 2.5.8). */
  display: inline-block;
  padding-block: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  text-decoration: none;
}

.foot-grid a:hover {
  color: var(--text);
  text-decoration: underline;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ======== components/course-card.css ======== */
.course-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
}

.course-card h3 {
  font-size: 1.2rem;
  margin: 0;
}

.course-card h3 a {
  text-decoration: none;
  border-bottom: 2px solid var(--honour);
  display: inline-block;
  min-height: 24px;
}

.course-card__summary {
  margin: 0;
  font-size: 0.94rem;
}

/* The entry requirement, as a sentence. Its label is set like a fact label so
   the card reads as one object, but it is not in the table: at up to a hundred
   characters it would push the value column out of step across the grid. */
.course-card__prereq {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.course-card__prereq-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 0.4rem;
}

/* ---- Uniform fact list ----------------------------------------------------
   Label column fixed, value column fluid, so the labels line up down the card
   and across the grid: a reader comparing two courses reads across one row.
   The label column is sized to "Length", the longest of them. */
.course-card__facts {
  margin: 1rem 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.course-card__facts > div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

/* Same label as .facts in page.css, which the home page's featured block and
   the enrolment head both use: a reader comparing a course card against either
   of those is reading the same labels, so they are set the same way. */
.course-card__facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 0.15rem;
}

.course-card__facts dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.course-card__fee {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--honour);
}

.course-card__facts dd small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* At the narrowest the two-column row would leave the value four words wide. */
@media (max-width: 24rem) {
  .course-card__facts > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ======== components/finder.css ======== */
.results-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: clamp(2rem, 5vw, 3rem) 1.5rem;
}

.tally {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.results-note {
  margin: 0 0 1.5rem;
  max-width: 58ch;
  color: var(--text-soft);
}

.course-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  }

/* The pattern is decoration on a dark ground; at phone widths the rings crowd
   the type, so they go and the plain navy stays. */
@media (max-width: 40rem) {
  }

/* ======== components/page.css ======== */
/* The bottom margin is a floor, not an addition: it collapses against the
   heading's own top margin, so an h1 that already stands clear is unchanged
   and a heading without a top margin of its own still clears the eyebrow. */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.75rem;
}

.stand {
  max-width: 58ch;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.callout {
  border-left: 4px solid var(--honour);
  background: var(--surface-alt);
  padding: 1.75rem 2rem;
  margin-block: clamp(2rem, 5vw, 3rem);
}

.callout h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.callout p {
  margin: 0 0 0.75rem;
  max-width: 62ch;
}

.callout p:last-child {
  margin-bottom: 0;
}

.roster,
.policy-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.roster li,
.policy-list li {
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

.roster__name {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
}

.roster__role {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--honour);
  margin-block: 0.3rem 0.6rem;
}

.roster p {
  margin: 0;
  max-width: 62ch;
  color: var(--text-soft);
}

/* Where to go instead, on /404.html. Not .policy-list: that is a list of
   documents, with a ruled row per item, and five navigation links set in it
   read as five policies. These are signposts, so they sit on one line and
   wrap. */
.wayfinder {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.wayfinder a {
  display: inline-block;
  min-height: 24px;
  padding-block: 0.25rem;
  font-weight: 600;
}

/* The list item is padded, but the target is the link inside it, and inline
   text is 19px tall (WCAG 2.2 SC 2.5.8). */
.policy-list a {
  display: inline-block;
  min-height: 24px;
  padding-block: 0.15rem;
}

/* A row carries one subject, with the club's position and the Society's
   policy on it side by side, so the pair is read across rather than hunted
   for in a second list. They stack below 46rem, where two columns would
   leave each about twenty characters wide. */
.policy-list__topic {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.policy-list__ours,
.policy-list__rlss {
  margin: 0;
  font-size: 0.94rem;
}

.policy-list__rlss {
  margin-top: 0.3rem;
}

@media (min-width: 46rem) {
  .policy-list li {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  .policy-list__topic {
    grid-column: 1 / -1;
  }

  .policy-list__rlss {
    margin-top: 0;
  }
}

.policy-list__note {
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* Where / when / email: hairline-ruled rows, no boxes. */
.details {
  display: grid;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}

.details > div {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}

.details__address {
  margin: 0;
}

/* Set apart from the address above it, and quieter, because it qualifies the
   address rather than continuing it. */
.details__note {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.details dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.details dd {
  margin: 0;
}

.details a {
  /* 24px minimum target height (WCAG 2.2 SC 2.5.8); the link stands alone, not in a sentence. */
  display: inline-block;
  padding-block: 0.25rem;
  overflow-wrap: anywhere;
}

/* ---- Course facts ---------------------------------------------------------
   One device for "the key facts about a course", used by the featured block on
   the home page and by the head of the enrolment page.

   Flex, not grid: a ragged last row is the normal case here (three facts on the
   home page, five on the enrolment page, and the count may change again), and
   flex items grow to fill the row they are on. A grid would leave an empty cell
   to deal with every time the count stopped dividing by the column count.

   Rules are drawn on the cells, as two of their four edges, with the container
   supplying the other two. That way no rule doubles where cells meet and none
   is left hanging where a short row ends. */
.facts {
  display: flex;
  flex-wrap: wrap;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--surface);
}

.facts > div {
  flex: 1 1 12rem;
  padding: 0.85rem 1.1rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}

.facts dd {
  margin: 0.3rem 0 0;
  color: var(--text);
}

/* One fact per row below this: at 12rem basis two cells would each be about
   24 characters wide, which breaks "Southgate Leisure Centre" over three lines. */
@media (max-width: 30rem) {
  .facts > div {
    flex: 1 1 100%;
  }
}

/* ======== components/page-head.css ======== */
/* ---- Page head ------------------------------------------------------------
   One component for the opening block of every page, on one type scale. The
   home page reads as the landing page through its photograph and dark ground,
   not through larger type.

   Three grounds: --plain on the page's own ground, --photo and --ruled
   full-bleed on navy. The type rules are shared and the grounds only recolour. */

/* One padding and one floor for every variant, so heads of different content
   lengths stay within reach of each other. The floor closes the gap left by a
   short headline and no standfirst. */
.phead {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 22rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

/* width, because .phead is a column flex container and .wrap carries
   margin-inline: auto: without it the wrap shrink-wraps to its content and
   the head sits narrower, and off-axis from, the page body beneath it. */
.phead > .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* A measure, not the full wrap: the content column is far past a comfortable
   measure for display type. In ch so it tracks the display face rather than a
   pixel count, and the same on every page. */
.phead h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-block: 0.6rem 1rem;
  max-width: 20ch;
  text-wrap: balance;
}

/* The headline is one voice. An <em> inside it used to be set italic and
   tinted, which is the most recognisable thing about the look this design
   is moving away from: it appears on template after template, whatever the
   subject. Kept as a hook so the markup stays valid, but it no longer
   changes the type. */
.phead h1 em {
  font-style: normal;
  color: inherit;
}

.phead .stand {
  max-width: 58ch;
  margin: 0;
}

.phead__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.phead .facts {
  max-width: 44rem;
}

/* ---- Dark grounds ---------------------------------------------------------
   Full-bleed, so they break out of the page's own ground and read as a band. */
.phead--photo,
.phead--ruled {
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--band-text);
}

.phead--photo h1,
.phead--ruled h1 {
  color: var(--band-head);
}

/* Lighter than the accent, for the photographic band only: this is the
   smallest text that can appear there and it sits over the brightest part
   of the water. The head carries no eyebrow today, so nothing matches this
   rule; it stays because the eyebrow is a documented option of the
   component and the base --text-faint would fail on a dark ground. */
.phead--photo .eyebrow {
  color: #9fe3c2;
}

.phead--photo .stand,
.phead--ruled .stand {
  color: var(--band-soft);
  max-width: 52ch;
}

/* Lighter than --band-soft, for the photographic band only. At 1920 the wrap
   is centred, so the right-hand end of this paragraph runs past the point
   where the horizontal scrim has faded out and sits over lit water; it
   measured 3.72:1 there. Lightening the ink fixes it at every width without
   darkening the photograph any further. */
.phead--photo .stand {
  color: #e6eef4;
}

/* The photograph sits behind the type, covering the band. */
.phead__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

/* One gradient across the whole band. The type used to sit in the left
   column only, which let a left-weighted scrim carry it and leave the
   swimmer alone; it now spans the band, so the cover has to as well. It is
   heaviest where the headline and the standfirst are, holds through the
   button, then releases over the lower water so the lane rope still reads.
   photo-bands.spec.js measures every line of this against the real
   composited pixels at six widths. */
.phead--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* Left-weighted, and gone before the swimmer. Both columns of the opener
       are held inside the left 48rem precisely so this can be: a gradient
       that covers type spanning the whole band would mute the photograph,
       which the brightness test below this file's components forbids. */
    linear-gradient(
      to right,
      color-mix(in srgb, var(--navy-deep) 78%, transparent) 0%,
      color-mix(in srgb, var(--navy-deep) 66%, transparent) max(57%, 700px),
      transparent max(78%, 1040px)
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--navy-deep) 46%, transparent) 0%,
      color-mix(in srgb, var(--navy-deep) 34%, transparent) 42%,
      color-mix(in srgb, var(--navy-deep) 22%, transparent) 74%,
      color-mix(in srgb, var(--navy-deep) 46%, transparent) 100%
    );
}

/* The band is taller than the other heads: it is carrying a photograph, and
   the gradient's stops are placed as fractions of it. */
.phead--photo {
  min-height: clamp(21rem, 40vw, 30rem);
}

/* A magazine opener: the headline holds the left, the standfirst and the
   action sit beside it rather than under it. Scoped to the photographic
   head, because it is the only one with the width to spare. */
@media (min-width: 56rem) {
  /* One column, not two. The opener has to live in the left of the band so
     the scrim can stay left-weighted and leave the swimmer lit, and two
     columns inside that space are both too narrow to read: the headline
     came out 329px wide and broke over four lines, with the standfirst a
     260px sliver of six beside it. Stacked, each gets a proper measure in
     the same width. */
  .phead--photo h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    max-width: 15ch;
    margin-block: 0 1.1rem;
  }

  .phead--photo .stand {
    max-width: 44ch;
    margin-bottom: 1.6rem;
  }
}

/* No photograph: the texture is the crest's concentric rule. */
.phead--ruled {
  background:
    repeating-radial-gradient(
      circle at 82% 50%,
      transparent 0 26px,
      color-mix(in srgb, var(--sand) 13%, transparent) 26px 27px
    ),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 78%);
}

/* A fixed floor per breakpoint, not a viewport-relative one: with a vw term
   inside the clamp the floor moves with the window, and the heads end up level
   at one width and 93px apart at another. */
@media (max-width: 48rem) {
  .phead {
    min-height: 17rem;
  }
}

/* The rings crowd the type at phone widths; the plain navy stays. */
@media (max-width: 40rem) {
  .phead--ruled {
    background: linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 78%);
  }
}

/* Stacked, the standfirst and the button sit below the headline instead of
   beside it, so the type reaches much further down the band and the cover
   has to hold until it has finished before releasing. */
@media (max-width: 55.99rem) {
  .phead--photo::after {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--navy-deep) 92%, transparent) 0%,
      color-mix(in srgb, var(--navy-deep) 86%, transparent) 45%,
      color-mix(in srgb, var(--navy-deep) 80%, transparent) 80%,
      color-mix(in srgb, var(--navy-deep) 70%, transparent) 92%,
      color-mix(in srgb, var(--navy-deep) 34%, transparent) 100%
    );
  }
}

/* ======== components/home.css ======== */
/* Narrow screens: the text spans the whole width, so there is no bright
   right-hand side to spare. A heavier, uniform scrim instead. */
@media (max-width: 68.75rem) {
  }

.btn-quiet--band {
  color: var(--band-text);
  border-color: var(--band-soft);
}

.btn-quiet--band:hover {
  background: var(--band-text);
  color: var(--navy-deep);
}

.honours {
  background: var(--band);
  color: var(--band-text);
  border-top: 1px solid color-mix(in srgb, var(--band-soft) 25%, transparent);
}

.honours dl {
  display: grid;
  gap: 1.5rem 1px;
  margin: 0;
  padding-block: 2.5rem;
}

@media (min-width: 760px) {
  .honours dl {
    grid-template-columns: repeat(4, 1fr);
  }
}

.honours dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--band-soft);
}

/* The figures glow, and this is the only place on the site that does. The
   house rule forbids shadows, and devices.spec.js enforces text-shadow as
   well as box-shadow on every inner page - rightly, since a shadow fakes
   depth on a design that has none. A glow is not depth: it is light coming
   off the numerals, in their own hue, on a dark band. It is confined to the
   home page's figures, so the rule still holds everywhere it was written
   for. Widening it is a decision to take deliberately, not by drift. */
.honours dd {
  margin: 0.4rem 0 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--sand);
  line-height: 1;
  text-shadow: 0 0 24px color-mix(in srgb, var(--sand) 42%, transparent);
}

.honours dd small {
  display: block;
  font-family: var(--body);
  font-size: 0.82rem;
  color: var(--band-soft);
  margin-top: 0.5rem;
}


.record {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.record li {
  display: grid;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 700px) {
  .record li {
    grid-template-columns: 6rem 1fr;
  }
}

.record__year {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--honour);
}

.record p {
  margin: 0;
  max-width: 62ch;
}

.home-section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.tinted {
  background: var(--surface-alt);
  border-block: 1px solid var(--rule);
}

/* Photographic quote band: same scrim treatment as the hero. */
.strapline {
  position: relative;
  isolation: isolate;
  background: var(--navy-deep);
  min-height: clamp(15rem, 34vh, 21rem);
  display: grid;
  place-items: center;
  text-align: center;
}

/* Sized here rather than shared: without its own rule this image sits at its
   intrinsic 900px and pushes the page wide on a phone. */
.strapline__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

/* content/position/inset are needed here, not only the background: without
   them the pseudo-element has nothing to paint on and the strapline text
   falls to 1.13:1 against the photograph. */
.strapline::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--navy-deep) 78%, transparent),
    color-mix(in srgb, var(--navy-deep) 86%, transparent)
  );
}

.strapline blockquote {
  margin: 0;
  padding: clamp(2rem, 5vw, 3rem) var(--pad);
  max-width: 34ch;
}

.strapline p {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.6vw, 2.35rem);
  line-height: 1.22;
  color: var(--band-text);
  margin: 0;
  text-wrap: balance;
}

.strapline p em {
  font-style: italic;
  color: var(--sand);
}

.strapline cite {
  display: block;
  margin-top: 1.1rem;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--band-soft);
  font-weight: 700;
}

/* People and safeguarding */

.people-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: 1.5rem;
}

@media (min-width: 920px) {
  .people-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.people-grid .roster {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.assurance {
  display: block;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--honour);
}

.assurance h3 {
  font-size: 1.15rem;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin: 0;
  padding: 1.25rem 1.35rem 0;
}

.assurance__row {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.assurance__row:last-child {
  border-bottom: 0;
}

.assurance__row p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.assurance__row .assurance__label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honour);
  margin-bottom: 0.35rem;
}

/* Links here follow the site's convention: the text colour, with a rule
   under them. This was the one link wearing --accent, which is the colour
   this design uses to say something is wrong. */
.assurance a {
  display: inline-block;
  padding-block: 0.15rem;
  /* Not a border-bottom: on an inline-block that draws one rule under the
     whole box, so a link wrapping to two lines gets a full-width line beneath
     it that reads as a divider between sections. An underline follows the
     text itself, on every line it occupies. */
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}

.assurance a:hover {
  text-decoration-color: var(--honour);
}

/* Come and see us */

.visit {
  background: var(--band);
  color: var(--band-text);
}

.visit .wrap {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.visit-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 860px) {
  .visit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.visit h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  margin-top: 0.5rem;
}

.visit__intro {
  color: var(--band-soft);
  max-width: 46ch;
}

.visit__action {
  margin: 1.75rem 0 0;
}

/* ---- Featured course + summary --------------------------------------------
   The NPLQ is the club's one real product, so it gets a block of its own; the
   rest are a compact list pointing at the full catalogue. */

.feature {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--honour);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  margin-block: 1.5rem 2.5rem;
}

.feature h3 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 0;
}

.feature h3 a {
  text-decoration: none;
  border-bottom: 2px solid var(--honour);
}

.feature__summary {
  margin: 0.75rem 0 0;
  max-width: 58ch;
  color: var(--text-soft);
}

/* Structure comes from .facts in page.css. What is particular here is the
   emphasis: this is the one place the NPLQ is being sold, so its figures are
   set in the display face at the brass. */
.feature__spec dd {
  margin: 0.35rem 0 0;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--honour);
}

.feature__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  /* .facts above carries a top margin and no bottom one, so the space under
     the ruled table has to come from here. */
  margin: 1.5rem 0 0;
}

/* ======== components/devices.css ======== */
/* Devices that give inner pages structure without photography: the brass-ruled
   crest panel, tinted band breaks, the line band and the Q&A rows. Every one is
   hairline-ruled; none has a rounded corner or a shadow. Colours are tokens. */

/* Crest: brass-ruled panel. The prototype's inner circle is a square here;
   this site has no rounded corners. */

.crest {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    repeating-radial-gradient(
      circle at 50% 58%,
      transparent 0 17px,
      color-mix(in srgb, var(--sand) 16%, transparent) 17px 18px
    ),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 78%);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.crest-inner {
  text-align: center;
  color: var(--band-text);
  border: 1px solid color-mix(in srgb, var(--sand) 60%, transparent);
  outline: 1px solid color-mix(in srgb, var(--sand) 30%, transparent);
  outline-offset: 5px;
  height: 100%;
  max-height: 14rem;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  gap: 0.55rem;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--navy-deep) 55%, transparent);
}

.crest__year {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 3.1rem);
  color: var(--sand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.crest__name {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--band-text);
  line-height: 1.6;
}

.crest__affil {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--band-soft);
  line-height: 1.6;
  border-top: 1px solid color-mix(in srgb, var(--sand) 45%, transparent);
  padding-top: 0.55rem;
  margin-top: 0.2rem;
}

/* Inside a course grid the crest fills the cell beside the card instead of
   holding its own 4:3 shape, so a lone card is never left beside a void. */
.course-grid > .crest {
  aspect-ratio: auto;
  min-height: 14rem;
}

/* The crest closes the grid by filling exactly the cells the cards leave over.
   How many that is depends on the course count and on how many columns the
   viewport gives, so the page computes it and publishes it as data-crest-2 and
   data-crest-3; these rules spell out every value each can take. Written as
   attribute selectors rather than a custom property because the markup rules
   forbid an inline style (no-inline-style), which is the only way a template
   could set one on the element. A grid without the attributes keeps the old
   fixed span 2. test/e2e/devices.spec.js fails if any row is left with a hole,
   and test/unit/crest-span.test.js checks the published numbers. */
@media (min-width: 700px) and (max-width: 1039.98px) {
  .course-grid > .crest {
    grid-column: span 2;
  }

  .course-grid[data-crest-2="1"] > .crest {
    grid-column: span 1;
  }
}

@media (min-width: 1040px) {
  .course-grid > .crest {
    grid-column: span 2;
  }

  .course-grid[data-crest-3="1"] > .crest {
    grid-column: span 1;
  }

  .course-grid[data-crest-3="3"] > .crest {
    grid-column: span 3;
  }
}

/* A navy band carrying one line, with an optional action. The line is a <p>:
   it is a strapline, not a quotation, so it is not marked up as one. */
.line-band {
  background: var(--band);
  color: var(--band-text);
  border-top: 1px solid color-mix(in srgb, var(--sand) 40%, transparent);
}

.line-band .wrap {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

@media (min-width: 840px) {
  .line-band .wrap:has(.line-band__action) {
    grid-template-columns: 1fr auto;
  }
}

.line-band__line {
  margin: 0;
  max-width: 34ch;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.22;
  text-wrap: balance;
}

.line-band__line em {
  font-style: italic;
  color: var(--sand);
}

.line-band__action {
  margin: 0;
}

/* Question and answer rows: the question in a left column, the answer beside
   it, ruled above. */
.qa {
  display: grid;
  gap: 0.75rem 3rem;
}

@media (min-width: 860px) {
  .qa {
    grid-template-columns: minmax(14rem, 1fr) 2fr;
    align-items: start;
  }
}

.qa h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}

.qa p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.qa p:last-child {
  margin-bottom: 0;
}

/* Two-up: copy and rows on the left, crest on the right. */
.split {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

/* Course results sit inside a tinted band; the band supplies the top space. */
.results {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.callout--flush {
  margin-block: 0;
}

/* A page that ends in a band or a padded section already has its closing space;
   the footer's own margin would add a strip of bare ground under it. */
main:has(> :last-child:is(.line-band, .visit, .home-section, .tinted)) + footer {
  margin-top: 0;
}

/* A section straight after the page head: the head already gives the space. */
.phead--plain + .home-section {
  padding-top: 0;
}

/* ======== components/form.css ======== */
/* The enrolment form. Colours come from tokens; corners are square and nothing
   casts a shadow. */

/* Layout, labels and rules come from .facts in page.css, shared with the home
   page's featured block. Only the width limit is particular to this page: the
   head's prose is measured for reading and the facts sit under it. */
/* The head sits in the same column as the form beneath it. Without this the
   head was a full 1180px wrap while .enrol is 44rem centred, so at 1440px the
   facts began at x=188 and the form at x=368: two blocks of identical width,
   704px each, one left-aligned in a wide wrap and one centred in the viewport.
   The page is one task, so it is one column, and every left edge now agrees. */
/* With scripting off the noscript message says the same thing. */
@media (scripting: none) {
  .enrol-loading {
    display: none;
  }
}

.enrol-loading p {
  max-width: 62ch;
}

/* 44rem is a reading measure for the fields, not a column for the page: the
   form starts on the same left edge as the head above it and as every other
   page's content, rather than being centred on an axis of its own. */
.enrol,
.enrol-done {
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem);
}

.enrol > section,
.enrol > .step-status,
.enrol > .progress,
.enrol > .error-summary,
.enrol > .form-actions,
.enrol-done > * {
  max-width: 44rem;
}

.enrol-done h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1rem;
}

.enrol-done .reference {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
}

.downloads {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.enrol > section > h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1.25rem;
}

.enrol fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.enrol .field {
  margin-top: 1.25rem;
}

.enrol .field > label:not(.choice) {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.enrol input[type="text"],
.enrol input[type="tel"],
.enrol input[type="email"],
.enrol input[type="date"],
.enrol textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}

.enrol input:focus-visible,
.enrol textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.enrol [aria-invalid="true"] {
  border-color: var(--accent);
  border-width: 2px;
}

/* Checkbox and radio rows: the whole row is the target. */
.choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: 44px;
  padding-block: 0.4rem;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

.choice input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0.1rem 0 0;
  accent-color: var(--honour);
}

.choice input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.radio-group {
  margin-top: 1.75rem;
}

.radio-group > legend {
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0;
  margin-bottom: 0.25rem;
}

.hint {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 0.25rem 0 0.5rem;
  max-width: 58ch;
}

.optional {
  font-weight: 400;
  color: var(--text-soft);
}

.declaration {
  background: var(--surface-alt);
  border-left: 4px solid var(--honour);
  padding: 1.25rem 1.5rem;
  max-width: 62ch;
}

.parent-signature {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.parent-intro {
  font-weight: 600;
  max-width: 58ch;
}

/* Errors say so in words as well as colour. */
.field-error {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.error-summary {
  border: 2px solid var(--accent);
  background: var(--surface-alt);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.error-summary p {
  margin: 0;
  font-weight: 600;
}

.error-summary ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.error-summary li {
  margin-block: 0.25rem;
}

.error-summary a {
  color: var(--accent);
  display: inline-block;
  min-height: 24px;
}

.step-status {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

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

/* Off-screen, not display: none, so a bot that fills every input still meets it. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.form-actions button {
  cursor: pointer;
}

.form-actions button[hidden] {
  display: none;
}

.form-actions [data-action="clear-form"] {
  margin-left: auto;
}

.form-note {
  margin-top: 1rem;
}

/* ---- Step progress --------------------------------------------------------
   A track with a numbered marker per step. Decorative: .step-status carries
   the same information as text and is what a screen reader hears, so this is
   aria-hidden and nothing here is the sole carrier of any fact.

   The track is drawn on the <ol> with a gradient rather than a separate
   element, so there is no absolutely positioned bar to keep in step with the
   markers when the label text wraps. */
.progress {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  position: relative;
}

.progress[hidden] {
  display: none;
}

/* The line sits behind the markers, inset by half a marker at each end so it
   starts and finishes at the first and last centres rather than the edges. */
.progress::before {
  content: "";
  position: absolute;
  top: 0.875rem;
  left: calc(50% / var(--steps, 6));
  right: calc(50% / var(--steps, 6));
  height: 2px;
  background: linear-gradient(
    to right,
    var(--honour) 0 var(--progress, 0%),
    var(--rule) var(--progress, 0%) 100%
  );
}

.progress__step {
  display: flex;
  justify-content: center;
  position: relative;
}

/* Square, not a circle: nothing else in this design system has a rounded
   corner, and test/e2e/enrol.spec.js enforces that across the whole form. */
.progress__dot {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--text-faint);
  border: 2px solid var(--rule);
}

.progress__step.is-done .progress__dot {
  background: var(--honour);
  border-color: var(--honour);
  color: var(--surface);
}

/* An outline, not a box-shadow: the form forbids shadows outright
   (test/e2e/enrol.spec.js), and an offset outline is already how the crest
   draws its ring, so this is the house device rather than a new one. It also
   costs no layout, so the markers do not shift as the step changes.
   Not colour alone either: the current step is the only ringed one, which
   distinguishes it without relying on hue (WCAG 1.4.1). */
.progress__step.is-current .progress__dot {
  border-color: var(--honour);
  color: var(--honour);
  outline: 2px solid color-mix(in srgb, var(--honour) 45%, transparent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .progress::before {
    transition: background 200ms ease-out;
  }
}

/* The facts sit between the head and the form, on the same left edge. */
.enrol-facts {
  padding-block: 0 clamp(1rem, 3vw, 1.5rem);
}

/* ======== components/signature.css ======== */
/* A signature may be drawn or typed. Both are shown at once, as equals. */

.signature-field {
  /* Ink and paper do not follow the theme: the signature is printed on a
     white form, so what is drawn must look as it will print. */
  --signature-ink: var(--navy-deep);
  --signature-paper: var(--band-text);
  margin-block: 1.5rem;
}

.signature-label {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.25rem;
}

.signature-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 0.75rem;
}

.signature-modes button {
  flex: 1 1 10rem;
}

.signature-modes button[aria-pressed="true"] {
  background: var(--band);
  border-color: var(--band);
  color: var(--band-text);
}

canvas.signature {
  display: block;
  width: 100%;
  max-width: 40rem;
  height: 180px;
  border: 2px solid var(--rule-strong);
  background: var(--signature-paper);
  /* Without this, drawing scrolls the page on every phone. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: crosshair;
}

.signature-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.signature-actions button {
  min-width: 44px;
}

.signature-typed {
  margin-top: 0.75rem;
  max-width: 40rem;
}

.signature-status {
  min-height: 1.5em;
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}