/* The public admissions pages and an applicant's own pages (templates/admissions/), and the entrance practice pages
   that share their frame. Compact and square, in the school's own colours, like the rest of the portal.

   The school's colours arrive as --brand (its main colour: the header, panel titles, the main button) and --accent
   (the thin line under the header), set by templates/admissions/_base.html from the school's branding. --brand-dark
   and the tints are mixed from --brand here. Every other colour is fixed and passes 4.5:1 contrast on white.

   Type is IBM Plex Sans, with IBM Plex Mono only for numbers a person types or quotes (an application number, a
   payment code), all served from this server (static/fonts/fonts.css). Nothing here has rounded corners.

   On a computer the page is drawn at 90% (zoom on html.ad-root), so more fits; a phone keeps full size. */

.ad {
  --ink: #161a1d;
  --ink-2: #3b4248;
  --muted: #535b62;
  --line: #cdd2d8;
  --grid: #e3e6ea;
  --wash: color-mix(in srgb, var(--brand) 4%, #f4f5f7);
  --tint: color-mix(in srgb, var(--brand) 8%, #fff);
  --tint-line: color-mix(in srgb, var(--brand) 28%, #d8dde3);
  --brand-dark: color-mix(in srgb, var(--brand) 80%, #000);
  --good: #1d6b3a;
  --good-tint: #e8f3ec;
  --wait: #8a5a00;
  --wait-tint: #fbf3e2;
  --bad: #a1281f;
  --bad-tint: #fbeceb;
  --off: #e6e8eb;
  --fp-radius: 0;            /* the shared file picker (static/file-picker.css), square like everything here */
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--wash);
  color: var(--ink);
  font: 14px/1.45 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
/* (On the root element, so the page still fills the window; html.ad-root is set by templates/admissions/_base.html.) */
@media (min-width: 641px) { html.ad-root:not(:has(body.ad-print)) { zoom: .9; } }
.ad *, .ad *::before, .ad *::after { box-sizing: border-box; border-radius: 0; }
.ad a { color: var(--brand); }
.ad a:hover { color: var(--brand-dark); }
.ad h1, .ad h2, .ad h3 { margin: 0; font-weight: 600; line-height: 1.2; }
.ad h1 { font-size: 26px; letter-spacing: -.01em; }
.ad h2 { font-size: 15px; }
.ad h3 { font-size: 14px; }
.ad p { margin: 0; }
.ad-code { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .02em; }
.ad-muted { color: var(--muted); }
.ad-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.ad-skip { position: absolute; left: -9999px; }
.ad-skip:focus { left: 8px; top: 8px; z-index: 10; padding: 8px 12px; background: #fff; }

/* ---------------------------------------------------------------- the header
   A band of the school's colour: the school's mark and name, the word Admissions and the session, then the links.
   Signing in is a white outlined button; the other links are plain. */
.ad-bar { background: var(--brand); color: #fff; border-bottom: 3px solid var(--accent); }
.ad-bar .ad-wrap { min-height: 58px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; }
.ad-school { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.ad .ad-school, .ad .ad-school:hover { color: #fff; }
/* The school's logo: on a white plate (a logo drawn for a light background stays readable on the colour), as tall as
   the bar allows and as wide as the logo itself, so a wide logo (a crest with the name beside it) is not squeezed into
   a square. With no logo, the school's first letter in a square. */
.ad-mark { min-width: 40px; height: 40px; max-width: 180px; flex: none; padding: 4px; background: #fff; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; overflow: hidden; }
.ad-mark img { display: block; height: 100%; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; object-position: center; }
.ad-school strong { font-size: 15px; font-weight: 600; }
.ad-school > span:not(.ad-mark) { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .45); font-size: 13px; color: rgba(255, 255, 255, .9); }
.ad-bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.ad .ad-bar nav a, .ad .ad-bar nav button { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; color: #fff; background: none;
  border: 1px solid transparent; font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; }
.ad .ad-bar nav a:hover, .ad .ad-bar nav button:hover { background: rgba(255, 255, 255, .12); }
.ad .ad-bar nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 #fff; }
.ad .ad-bar nav .ad-bar__cta { border-color: rgba(255, 255, 255, .7); font-weight: 600; margin-left: 6px; }
.ad .ad-bar nav .ad-bar__cta:hover { background: #fff; color: var(--brand); }
.ad-bar form { margin: 0; }

/* ---------------------------------------------------------------- the title band
   Home and Sign in: the school's own photographs (the ones on its sign-in page) under a layer of its colour and a
   faint square grid, the same as the workspace selector. With more than one photograph each fades into the next:
   templates/admissions/_base.html writes the ad-fade keyframes for however many there are. Every other page has a
   plain white title strip (.ad-title). */
.ad-banner { position: relative; overflow: hidden; background: var(--brand-dark); color: #fff; }
.ad-banner__slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0;
  animation-name: ad-fade; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-fill-mode: both; }
.ad-banner__slide:first-child { opacity: 1; }
.ad-banner__slide:only-child { animation: none; }
.ad-banner::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, color-mix(in srgb, var(--brand-dark) 92%, transparent) 0%, color-mix(in srgb, var(--brand-dark) 82%, transparent) 45%,
                    color-mix(in srgb, var(--brand) 45%, transparent) 100%); }
/* (Strong behind the words on the left, so they stay readable; lighter to the right, so the photograph shows.) */
.ad-banner .ad-wrap { position: relative; z-index: 1; padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.ad-banner--tall .ad-wrap { padding-top: 34px; padding-bottom: 30px; }
.ad-banner p { color: rgba(255, 255, 255, .92); }
.ad-banner__copy { max-width: 620px; display: flex; flex-direction: column; gap: 8px; }
.ad-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.ad-banner--tall .ad-banner__copy > p:not(.ad-eyebrow) { font-size: 14.5px; }
@media (prefers-reduced-motion: reduce) { .ad-banner__slide { animation: none; } .ad-banner__slide + .ad-banner__slide { opacity: 0; } }
.ad-title { padding: 18px 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.ad-title .ad-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 24px; }
.ad-title h1 { font-size: 22px; }
.ad-title p { margin-top: 3px; color: var(--muted); }

/* ---------------------------------------------------------------- the sign-in page
   Two parts side by side: the school's photographs under its colour and grid, with the title and what the account is
   for (.ad-signin__side), and the form with where else to go (.ad-signin__main). Stacked on a phone. */
.ad-signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 0; background: #fff; border: 1px solid var(--line); }
.ad-signin__side { position: relative; overflow: hidden; min-height: 420px; background: var(--brand-dark); color: #fff; }
.ad-signin__side::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, color-mix(in srgb, var(--brand-dark) 90%, transparent) 0%, color-mix(in srgb, var(--brand) 72%, transparent) 100%); }
.ad-signin__copy { position: relative; z-index: 1; padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.ad-signin__copy p:not(.ad-eyebrow) { color: rgba(255, 255, 255, .92); max-width: 34em; }
.ad-signin__copy .ad-eyebrow + h1 { margin-top: -2px; }
.ad-signin__copy p.ad-eyebrow:not(:first-child) { margin-top: 10px; }
.ad-signin__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ad-signin__list li { position: relative; padding-left: 18px; color: rgba(255, 255, 255, .95); }
.ad-signin__list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; background: var(--accent); }
.ad-signin__main { padding: 22px; display: flex; flex-direction: column; gap: 14px; background: var(--wash); border-left: 1px solid var(--line); }
.ad-rows--boxed { padding: 2px 14px; background: #fff; border: 1px solid var(--line); }
.ad-rows--boxed dd { max-width: 60%; }
@media (max-width: 760px) {
  .ad-signin { grid-template-columns: 1fr; }
  .ad-signin__side { min-height: 0; }
  .ad-signin__main { border-left: 0; border-top: 1px solid var(--line); padding: 16px; }
}

/* ---------------------------------------------------------------- the page
   A main column and a narrower one beside it, stacked on a phone. */
.ad-page { flex: 1 0 auto; padding-top: 18px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 14px; }
.ad-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.ad-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ad-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ad-narrow { max-width: 640px; }
/* A short form page (sign-in help, passwords): the form, and its help beside it, side by side at a reading width. */
.ad-form-page { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 320px); gap: 14px; align-items: start; }
@media (max-width: 900px) { .ad-form-page { grid-template-columns: 1fr; } }
.ad-links li > span { color: var(--muted); }

/* ---------------------------------------------------------------- panels
   White, a hairline border, the title in the school's colour over a line of it. A lead panel (the one to act in)
   has its title on a band of the colour instead. */
.ad-panel { background: #fff; border: 1px solid var(--line); min-width: 0; }
.ad-panel__head { padding: 10px 14px 9px; border-bottom: 2px solid var(--brand); display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 2px 16px; }
.ad-panel__head h2 { color: var(--brand); }
.ad-panel__head span { font-size: 12.5px; color: var(--muted); }
.ad-panel__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.ad-panel--lead { border-color: var(--brand); }
.ad-panel--lead > .ad-panel__head { background: var(--brand); border-bottom-color: var(--brand); }
.ad-panel--lead > .ad-panel__head h2, .ad-panel--lead > .ad-panel__head span { color: #fff; }
.ad-panel__body--row { flex-direction: row; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--grid); }
.ad-list { margin: 0; padding-left: 30px; }
.ad-list li + li { margin-top: 4px; }
.ad-panel__foot { padding: 10px 14px; border-top: 1px solid var(--grid); background: var(--wash); color: var(--ink-2); font-size: 13px; }
/* Two halves side by side (paying online, or with a code), stacked on a phone */
.ad-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); border-top: 1px solid var(--grid); }
.ad-split > * + * { border-left: 1px solid var(--grid); }
/* A short list of things to open, such as receipts and letters */
.ad-links { margin: 0; padding: 0 14px; list-style: none; }
.ad-links li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--grid); }
.ad-links li:last-child { border-bottom: 0; }
.ad-links a { font-weight: 600; }

/* A checklist with a heading of its own over each part (Before you start, on the admissions home page) */
.ad-check-list { margin: 0; padding: 0; list-style: none; }
.ad-check-list li { position: relative; padding: 6px 0 6px 18px; border-top: 1px solid var(--grid); }
.ad-check-list li:first-child { border-top: 0; }
.ad-check-list li::before { content: ""; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; background: var(--brand); }
.ad-check-list--warn li::before { background: var(--wait); }
.ad-sub { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- notices
   What to do next, or what has happened: a white box with a bar of colour down its left side. */
.ad-notice { background: #fff; border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--brand); padding: 11px 14px 12px 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.ad-notice--good { border-color: color-mix(in srgb, var(--good) 40%, #fff); box-shadow: inset 4px 0 0 var(--good); background: var(--good-tint); }
.ad-notice p { color: var(--ink-2); margin-top: 2px; }

/* A session whose admissions open on a later date (on the admissions home page): amber, since it is "not yet". */
.ad-notice--soon { border-color: color-mix(in srgb, var(--wait) 30%, #fff); box-shadow: inset 4px 0 0 var(--wait); background: var(--wait-tint); }
.ad-notice--soon strong { color: var(--wait); }

/* ---------------------------------------------------------------- choosing a session
   With admissions open for this session and the next, the admissions home page asks first which one the child would
   start in: one panel for each, side by side (.ad-pick), the whole panel a link. Once one is chosen, a bar names it
   with a button back to the choice (.ad-chosen). */
.ad-pick { margin: 0; padding: 14px; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.ad .ad-pick__item { height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 0; border: 1px solid var(--tint-line);
  box-shadow: inset 0 3px 0 var(--brand); background: #fff; color: var(--ink); text-decoration: none; }
.ad .ad-pick__item:hover { border-color: var(--brand); background: var(--tint); color: var(--ink); }
.ad-pick__when { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.ad-pick__item strong { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-pick__line { color: var(--muted); }
.ad-pick__facts { margin: 8px 0 0; border-top: 1px solid var(--grid); }
.ad-pick__facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.ad-pick__facts dt { color: var(--muted); }
.ad-pick__facts dd { margin: 0; font-weight: 600; }
.ad-pick__go { margin: auto -16px 0; padding: 10px 16px; background: var(--brand); color: #fff; font-weight: 600; }
.ad .ad-pick__item:hover .ad-pick__go { background: var(--brand-dark); }
.ad-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 14px; background: #fff; border: 1px solid var(--line);
  box-shadow: inset 4px 0 0 var(--brand); }
.ad-chosen strong { font-size: 15px; }
.ad-chosen .ad-sub { margin-right: 4px; }

/* ---------------------------------------------------------------- facts
   One to a row (.ad-rows), or across in a strip (.ad-strip) with each value large. */
.ad-rows { margin: 0; padding: 2px 14px; }
.ad-rows > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.ad-rows > div:last-child { border-bottom: 0; }
.ad-rows dt { color: var(--muted); }
.ad-rows dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ad-strip { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); background: #fff; border: 1px solid var(--line); }
.ad-strip > div { padding: 10px 14px 11px; border-right: 1px solid var(--grid); display: flex; flex-direction: column; gap: 3px; }
.ad-strip > div:last-child { border-right: 0; }
.ad-strip dt { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ad-strip dd { margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-strip > .is-lead { box-shadow: inset 0 3px 0 var(--brand); }

/* ---------------------------------------------------------------- how applying works
   The steps across in one strip, each with its number in a square of the school's colour. */
.ad-flow { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  background: #fff; border: 1px solid var(--line); counter-reset: flow; }
.ad-flow li { position: relative; padding: 11px 14px 12px 50px; border-right: 1px solid var(--grid); counter-increment: flow; }
.ad-flow li:last-child { border-right: 0; }
.ad-flow li::before { content: counter(flow); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 700; }
.ad-flow strong { display: block; font-size: 13.5px; }
.ad-flow span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- the seven steps, across
   (templates/admissions/_parts.html, progress): a numbered square each, joined by a line. Done is filled with the
   school's colour and ticked, the step to do now is outlined in it on a tint, waiting for the school is amber, a step
   still to come is grey. */
.ad-progress { margin: 0; padding: 12px 14px; list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0;
  background: #fff; border: 1px solid var(--line); }
.ad-progress li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 10px; }
.ad-progress li::after { content: ""; position: absolute; top: 12px; left: 30px; right: 4px; height: 2px; background: var(--grid); }
.ad-progress li:last-child::after { display: none; }
.ad-progress li.is-done::after { background: var(--brand); }
.ad-progress__n { position: relative; z-index: 1; width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--line);
  background: #fff; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ad-progress__t { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.ad-progress .is-done .ad-progress__n { background: var(--brand); border-color: var(--brand); color: #fff; }
.ad-progress .is-done .ad-progress__t { color: var(--ink-2); }
.ad-progress .is-now .ad-progress__n { border-color: var(--brand); background: var(--tint); color: var(--brand); }
.ad-progress .is-now .ad-progress__t { color: var(--brand); font-weight: 700; }
.ad-progress .is-waiting .ad-progress__n { border-color: var(--wait); background: var(--wait-tint); color: var(--wait); }
.ad-progress .is-waiting .ad-progress__t { color: var(--wait); font-weight: 600; }
@media (max-width: 900px) {
  .ad-progress { grid-template-columns: 1fr; gap: 6px; }
  .ad-progress li { flex-direction: row; align-items: center; gap: 10px; }
  .ad-progress li::after { display: none; }
}

/* ---------------------------------------------------------------- a form in numbered parts
   (Create an account): each part's heading carries its number in a square of the school's colour; the promise the
   family makes sits in a tinted box of its own above the button, and the button says what comes next beside it. */
.ad-part { margin: 0; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--grid); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ad-part legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--brand); }
.ad-part__n { width: 22px; height: 22px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 12px; }
.ad-fields--3 { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.ad-declare { padding: 10px 12px; background: var(--tint); border: 1px solid var(--tint-line); }
.ad-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ad-strip--flush { border: 0; border-bottom: 1px solid var(--grid); }
.ad-strip dd small { font-size: 12px; font-weight: 500; color: var(--muted); }
.ad-strip__link { margin-left: 6px; font-size: 12.5px; font-weight: 500; }
/* What happens next, as a numbered line down the side */
.ad-timeline { margin: 0; padding: 12px 14px 14px; list-style: none; counter-reset: tl; }
.ad-timeline li { position: relative; padding: 0 0 12px 32px; counter-increment: tl; }
.ad-timeline li:last-child { padding-bottom: 0; }
.ad-timeline li::before { content: counter(tl); position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center;
  border: 2px solid var(--brand); color: var(--brand); font-size: 11px; font-weight: 700; background: #fff; }
.ad-timeline li::after { content: ""; position: absolute; left: 9px; top: 22px; bottom: 2px; width: 2px; background: var(--tint-line); }
.ad-timeline li:last-child::after { display: none; }
.ad-timeline strong { display: block; font-size: 13.5px; }
.ad-timeline span { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- choices in a strip, and a confirming window
   (Entrance practice: which class, and Begin practice). The strip is outlined in a tint of the school's colour, the
   chosen one filled with it. The window is square, its title in the school's colour. */
.ad-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--tint-line); background: #fff; }
.ad .ad-seg a { padding: 6px 12px; border-right: 1px solid var(--tint-line); color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; }
.ad .ad-seg a:last-child { border-right: 0; }
.ad .ad-seg a:hover { background: var(--tint); }
.ad .ad-seg a.is-on { background: var(--brand); color: #fff; }
.ad-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--brand); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.ad-dialog::backdrop { background: rgba(10, 16, 24, .55); }
.ad-dialog__in { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--brand); }
.ad-dialog h2 { font-size: 18px; color: var(--brand); }
.ad-dialog .ad-rows { padding: 0; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.ad-t__sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ad-strip--small dd { font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* ---------------------------------------------------------------- tables */
.ad-scroll { overflow-x: auto; }
.ad-t { width: 100%; border-collapse: collapse; }
.ad-t th, .ad-t td { padding: 7px 12px; text-align: left; vertical-align: middle; }
.ad-t th:first-child, .ad-t td:first-child { padding-left: 14px; }
.ad-t th:last-child, .ad-t td:last-child { padding-right: 14px; }
.ad-t thead th { padding-top: 7px; padding-bottom: 7px; background: var(--wash); font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--grid); }
.ad-t tbody tr { border-top: 1px solid var(--grid); }
.ad-t tbody th { font-weight: 600; }
.ad-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-t tr.is-off { color: var(--muted); }
.ad-t tr.is-off th { font-weight: 500; }
/* A heading row over each stage (early years, primary, ...) in a table of classes */
.ad-t tr.ad-t__group th { padding-top: 6px; padding-bottom: 6px; background: var(--tint); border-top: 1px solid var(--tint-line);
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.ad-t tr.ad-t__group small { margin-left: 6px; font-weight: 600; letter-spacing: 0; color: var(--muted); }

/* ---------------------------------------------------------------- tags: where something stands
   Filled tints: done or open in green, waiting in amber, the current step in the school's colour, closed or full
   in grey. */
.ad-tag { display: inline-block; padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--good) 35%, #fff); background: var(--good-tint);
  font-size: 12px; font-weight: 600; color: var(--good); white-space: nowrap; }
.ad-tag--now { background: var(--brand); border-color: var(--brand); color: #fff; }
.ad-tag--off { background: var(--off); border-color: var(--off); color: var(--ink-2); }
.ad-tag--plain { background: var(--wait-tint); border-color: color-mix(in srgb, var(--wait) 30%, #fff); color: var(--wait); }

/* ---------------------------------------------------------------- the seven steps of an application, as a task list */
.ad-steps { margin: 0; padding: 0; list-style: none; }
.ad-steps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 9px 14px; border-top: 1px solid var(--grid); }
.ad-steps li:first-child { border-top: 0; }
.ad-steps li[aria-current] { background: var(--tint); box-shadow: inset 3px 0 0 var(--brand); }
.ad-steps strong { font-weight: 600; }
.ad-steps small { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- buttons and fields */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 1px solid var(--tint-line);
  background: #fff; color: var(--brand); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ad .ad-btn { color: var(--brand); }
.ad .ad-btn:hover { border-color: var(--brand); background: var(--tint); }
.ad .ad-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ad .ad-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.ad .ad-btn--light { background: #fff; border-color: #fff; color: var(--brand); }
.ad .ad-btn--light:hover { background: var(--tint); border-color: var(--tint); color: var(--brand-dark); }
.ad .ad-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .75); color: #fff; }
.ad .ad-btn--ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.ad .ad-btn--sm { min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.ad-btn:disabled { opacity: .55; cursor: not-allowed; }
.ad-btn:focus-visible, .ad-input:focus-visible, .ad a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-actions--below { margin-top: 6px; }
.ad-form { display: flex; flex-direction: column; gap: 12px; }
.ad-group { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--grid); }
.ad-group:first-child { padding-top: 0; border-top: 0; }
.ad-group > h3 { font-size: 13px; color: var(--brand); }
.ad-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px 14px; }
.ad-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ad-field--wide { grid-column: 1 / -1; }
select.ad-input { padding-right: 6px; }
.ad-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* The three parts of the form step, as a strip with the current one marked */
.ad-parts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.ad-parts li { border-right: 1px solid var(--grid); border-top: 3px solid transparent; }
.ad-parts li:last-child { border-right: 0; }
.ad-parts li.is-now { border-top-color: var(--brand); background: var(--tint); font-weight: 600; }
.ad-parts a { display: flex; align-items: center; min-height: 40px; padding: 0 14px; color: var(--ink); text-decoration: none; }
.ad-field label, .ad-label { font-size: 13px; font-weight: 600; }
.ad-hint { font-size: 12.5px; color: var(--muted); }
.ad-input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #8a939b; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.ad-input:hover { border-color: var(--ink-2); }
.ad-input:focus { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); outline: none; }
textarea.ad-input { min-height: 84px; padding: 8px 10px; }
.ad-input--code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 15px; letter-spacing: .06em; }
/* The password-reset code box (reset_code.html): typed XXX-XXX, larger and spaced so each character is easy to check. */
.ad-input--reset { max-width: 220px; font-size: 20px; letter-spacing: .18em; text-transform: uppercase; }

/* Choosing the parent's username (_step_decision.html): the box and its Save button on one line, wrapping on a phone. */
.ad-choose-name { border-top: 1px solid var(--grid); }
.ad-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-inline .ad-input { flex: 1 1 220px; min-width: 0; }
/* A password box with the eye button inside its right edge (sign_in.html; static/admissions.js shows the button). */
.ad-pass { position: relative; display: block; }
.ad-pass .ad-input { padding-right: 42px; }
.ad-pass__eye { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-left: 1px solid var(--grid); background: #fff; color: var(--muted); cursor: pointer; }
.ad-pass__eye:hover { color: var(--brand); }
.ad-pass__eye[aria-pressed="true"] { color: var(--brand); background: var(--tint, #f3f4f6); }
.ad-pass__eye[aria-pressed="true"]::after { content: ""; position: absolute; width: 20px; height: 1.8px; background: currentColor; transform: rotate(-45deg); }
.ad-pass__eye:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.ad-pass__eye[hidden] { display: none; }
.ad-check { display: flex; gap: 10px; align-items: flex-start; }
.ad-check input { margin-top: 2px; width: 17px; height: 17px; flex: none; accent-color: var(--brand); }
.ad-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ad-errors { margin: 0; padding: 10px 14px 10px 32px; border: 1px solid color-mix(in srgb, var(--bad) 45%, #fff); box-shadow: inset 4px 0 0 var(--bad);
  background: var(--bad-tint); color: #7c1d16; }
.ad-flash { padding: 10px 14px 10px 18px; border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--brand); background: #fff; }
.ad-flash--error { border-color: color-mix(in srgb, var(--bad) 45%, #fff); box-shadow: inset 4px 0 0 var(--bad); background: var(--bad-tint); color: #7c1d16; }
.ad-flash--success { border-color: color-mix(in srgb, var(--good) 40%, #fff); box-shadow: inset 4px 0 0 var(--good); background: var(--good-tint); color: var(--good); }
/* The application number at the right of a title strip (My application) */
.ad-codebox { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 6px 12px; border: 1px solid var(--tint-line); background: var(--tint); }
.ad-codebox span:first-child { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ad-codebox .ad-code { font-size: 17px; font-weight: 600; color: var(--ink); }
.ad-title .ad-codebox { margin-top: 0; color: inherit; }
/* The application number in a frame of its own (Your account is ready), so it cannot be missed */
.ad-numbox { padding: 14px 16px; border: 2px solid var(--brand); background: var(--tint); text-align: center; }
.ad-numbox .ad-number { font-size: 30px; color: var(--brand-dark); }
.ad-number { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 24px; font-weight: 500; letter-spacing: .04em; }

/* ---------------------------------------------------------------- the footer
   The school: its mark, name and motto, then its address, phone and email, and the privacy notice. */
.ad-foot { border-top: 2px solid var(--brand); background: #fff; font-size: 12.5px; color: var(--muted); }
.ad-foot .ad-wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.ad-foot__school { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.ad-foot__school strong { display: block; font-size: 13.5px; color: var(--ink); }
.ad-foot__school small { display: block; }
.ad-foot__item span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ad-foot__item a { color: var(--ink-2); text-decoration: none; }
.ad-foot__item a:hover { color: var(--brand); text-decoration: underline; }
.ad-foot .ad-mark { min-width: 32px; height: 32px; max-width: 140px; padding: 3px; border: 1px solid var(--grid); font-size: 15px; }

@media (max-width: 640px) {
  .ad-wrap { padding: 0 16px; }
  .ad-strip > div, .ad-flow li { border-right: 0; border-bottom: 1px solid var(--grid); }
  .ad-banner--tall .ad-wrap { padding-top: 24px; padding-bottom: 22px; }
  .ad h1 { font-size: 22px; }
}

/* ---------------------------------------------------------------- a receipt or letter to print
   (templates/admissions/receipt.html): a sheet of paper on the page, plain on print */
.ad-print { background: var(--wash); }
.ad-paper { max-width: 794px; margin: 24px auto; padding: 40px 48px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.ad-paper__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 12px; border-bottom: 3px solid var(--brand); }
.ad-paper__head > div { display: flex; flex-direction: column; }
.ad-paper__head strong { font-size: 17px; }
.ad-paper__no { margin-left: auto; text-align: right; }
.ad-paper__no span:first-child { font-size: 20px; font-weight: 600; }
.ad-paper__rows { padding: 0; }
.ad-paper__code { border: 2px solid var(--ink); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.ad-paper__stamp { align-self: flex-start; padding: 4px 12px; border: 2px solid var(--bad); color: var(--bad); font-weight: 600; }
.ad-paper__foot { color: var(--ink-2); }
.ad-paper-actions { max-width: 794px; margin: 16px auto 0; }
.ad-paper__code h2 { font-size: 13px; color: var(--muted); }
.ad-paper__sign { display: flex; gap: 48px; margin-top: 24px; }
.ad-paper__sign span { flex: 1; padding-top: 6px; border-top: 1px solid var(--ink); color: var(--muted); }
@media print {
  .ad-paper--page { break-after: page; }
  .ad-print { background: #fff; }
  .ad-paper { margin: 0; border: 0; padding: 0; }
  .ad-noprint { display: none; }
}

/* ---------------------------------------------------------------- the examination hall's sign-in
   (templates/admissions/hall.html): one narrow panel in the middle */
.ad-hall { width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
/* On the hall computer: wider, with large boxes and a large Start button for a child to use without help. */
.ad-hall--big { max-width: 560px; }
.ad-hall--big .ad-input { min-height: 50px; font-size: 20px; }
.ad-hall--big .ad-field label { font-size: 14px; }
.ad-hall--big .ad-btn--primary { min-height: 48px; font-size: 16px; }
.ad-flow--3 li { padding-right: 10px; }
.ad-title--centre .ad-wrap { justify-content: center; text-align: center; }

/* ---------------------------------------------------------------- the table of classes on a phone
   (the admissions home page, .ad-t--stack): no sideways scrolling. Each class becomes a small block: its name, its
   entry assessment under it, then where it stands; the Apply button at the right. */
@media (max-width: 640px) {
  .ad-t--stack thead { display: none; }
  .ad-t--stack tbody tr:not(.ad-t__group) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 9px 14px; }
  .ad-t--stack tbody tr:not(.ad-t__group) > * { padding: 0 !important; text-align: left; white-space: normal; }
  .ad-t--stack tbody tr:not(.ad-t__group) > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .ad-t--stack tbody tr:not(.ad-t__group) > :nth-child(2) { grid-column: 1; grid-row: 2; font-size: 13px; color: var(--muted); }
  .ad-t--stack tbody tr:not(.ad-t__group) > :nth-child(3) { grid-column: 1; grid-row: 3; }
  .ad-t--stack tbody tr:not(.ad-t__group) > :nth-child(4) { grid-column: 2; grid-row: 1 / span 3; align-self: center; text-align: right; }
  .ad-t--stack tr.ad-t__group th { display: block; }
}
