/* Admission enquiries app: styles. The form sheet (section "Form sheet") is the same as the
   free template on mschoolsoftware.com, so the form looks the same as it does there. */

@font-face {
  font-family: "Figtree";
  src: url("figtree-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #16203a;
  --ink-soft: #47526e;
  --paper: #ffffff;
  --mist: #f2f5fb;
  --line: #d8dfec;
  --blue: #2a3bd0;
  --blue-deep: #1c2890;
  --red: #d0121b;
  --red-deep: #a70d15;
  --green: #17694b;
  --slip: #fff7d6;        /* the yellow office copy of a fee receipt */
  --slip-under: #ffdfe4;  /* the pink parent copy beneath it */

  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --serif: Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.45rem, 1.2rem + 1vw, 1.75rem);
  --step-3: clamp(1.8rem, 1.3rem + 2.2vw, 2.65rem);
  --step-4: clamp(2.2rem, 1.3rem + 4vw, 3.75rem);

  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 6px;
  --shadow: 0 1px 2px rgba(22, 32, 58, 0.08), 0 12px 32px -12px rgba(22, 32, 58, 0.28);
}

/* ---------- Base ---------- */
/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, address { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 650; line-height: 1.3; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
table { border-collapse: collapse; width: 100%; }
.icon { flex: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons, fields ---------- */
/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 2.75rem; padding: 0.55rem 1.15rem;
  font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-deep); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--quiet { color: var(--ink); }
.btn--quiet:hover { background: var(--mist); color: var(--ink); }
.btn--onDark { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--onDark:hover { background: #fff; color: var(--ink); }
.btn--large { min-height: 3.25rem; padding-inline: 1.5rem; font-size: 1.125rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.field label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.field__hint { font-weight: 400; color: var(--ink-soft); font-size: var(--step--1); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 3rem; padding: 0.65rem 0.8rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #99a3bd; border-radius: var(--radius);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(42, 59, 208, 0.3); border-color: var(--blue); }
.field.has-error [aria-invalid="true"] { border-color: var(--red); }
.field__error { margin-top: 0.3rem; font-size: var(--step--1); color: var(--red-deep); }
.field--trap { position: absolute; left: -200vw; }
.linklike { padding: 0.3rem 0; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.panel { padding: clamp(1.25rem, 3vw, 2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Form sheet (same as mschoolsoftware.com) ---------- */
/* ---------- 13. Admission enquiry form template (/school-admission-enquiry-form-format/) ---------- */
.ef { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.ef > :only-child { grid-column: 1 / -1; max-width: 52rem; margin-inline: auto; width: 100%; }
@media (max-width: 62rem) { .ef { grid-template-columns: minmax(0, 1fr); } .ef-output { order: -1; } }
.ef-editor__title { font-size: var(--step-2); margin-bottom: 1rem; }
.ef-editor__help { margin: 0.5rem 0 1rem; font-size: var(--step--1); color: var(--ink-soft); }
.ef-reg-key { display: inline-block; padding: 0 0.35rem; border: 1px solid var(--line); border-radius: 4px; font-size: 0.8em; font-weight: 650; background: var(--mist); }
.ef-group { margin: 0 0 1.25rem; padding: 0.75rem 0.9rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); }
.ef-group legend { padding: 0 0.35rem; font-weight: 700; }
.ef-items { list-style: none; margin: 0; padding: 0; }
.ef-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; gap: 0.35rem; align-items: center; padding: 0.2rem 0; }
.ef-item.is-off .ef-item__name { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(71, 82, 110, 0.5); }
.ef-item input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.ef-item__name { width: 100%; min-width: 0; padding: 0.3rem 0.45rem; font: inherit; font-size: 0.9375rem; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 4px; }
.ef-item__name:hover { border-color: var(--line); }
.ef-item__name:focus { outline: 3px solid rgba(42, 59, 208, 0.3); border-color: var(--blue); background: var(--paper); }
.ef-item__reg { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.8rem; font-weight: 650; color: var(--ink-soft); cursor: pointer; }
.ef-item__btn { width: 1.9rem; height: 1.9rem; padding: 0; font: inherit; line-height: 1; color: var(--ink); background: var(--mist); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.ef-item__btn:disabled { opacity: 0.35; cursor: default; }
.ef-item__btn:not(:disabled):hover { border-color: var(--ink); }
.ef-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.4rem; margin-top: 0.6rem; }
.ef-add input, .ef-add select { min-width: 0; padding: 0.45rem 0.55rem; font: inherit; font-size: 0.9375rem; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); }
.ef-add .btn { padding-inline: 0.9rem; border: 1px solid var(--line); }
@media (max-width: 30rem) { .ef-add { grid-template-columns: minmax(0, 1fr) auto; } .ef-add input { grid-column: 1 / -1; } }

.ef-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.ef-sheet { --ef-accent: var(--ink); --ef-tint: var(--mist); padding: clamp(1.1rem, 4vw, 2.4rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 0.9375rem; }
.ef-sheet__head { position: relative; text-align: center; border-bottom: 2px solid var(--ef-accent); padding-bottom: 0.75rem; }
.ef-sheet__school { font-size: var(--step-1); font-weight: 700; overflow-wrap: anywhere; color: var(--ef-accent); }
.ef-sheet__address { font-size: var(--step--1); color: var(--ink-soft); }
.ef-sheet__title { color: var(--ef-accent); margin-top: 0.6rem; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ef-sheet__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; font-size: var(--step--1); }
.ef-part { margin-top: 1rem; }
.ef-part h3 { margin-bottom: 0.4rem; padding: 0.2rem 0.5rem; font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ef-accent); background: var(--ef-tint); }
.ef-row { display: flex; align-items: flex-end; gap: 0.5rem; min-height: 2rem; padding-top: 0.35rem; }
.ef-row--wrap { flex-wrap: wrap; align-items: center; }
.ef-row--long { flex-wrap: wrap; }
.ef-label { flex: none; max-width: 60%; }
.ef-line { flex: 1 1 6rem; min-width: 4rem; border-bottom: 1px solid #8a93a8; height: 1.1rem; }
.ef-line--full { flex-basis: 100%; margin-top: 0.9rem; }
.ef-date { color: var(--ink-soft); letter-spacing: 0.04em; }
.ef-choices { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.35rem; }
.ef-box { display: inline-block; width: 0.85rem; height: 0.85rem; border: 1.5px solid var(--ink-soft); border-radius: 2px; vertical-align: -0.1em; }
.ef-sheet__sign { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2.5rem; font-size: var(--step--1); }
.ef-sheet__sign span { flex: 0 1 12rem; padding-top: 0.35rem; border-top: 1px solid var(--ink); }

.ef-register { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.ef-register th, .ef-register td { padding: 0.45rem 0.55rem; border: 1px solid var(--line); text-align: left; vertical-align: bottom; }
.ef-register th { background: var(--ef-tint, var(--mist)); font-weight: 700; min-width: 6rem; }
.ef-register th:first-child { min-width: 0; }
.ef-register td { height: 2.2rem; }
.ef-register-note { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.ef-gate { width: min(30rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: clamp(1.25rem, 4vw, 2rem); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); }
.ef-gate::backdrop { background: rgba(22, 32, 58, 0.55); }
.ef-gate .lead-form__note { margin-bottom: 1rem; }
.field--check label { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.8rem; font-weight: 400; line-height: 1.45; background: var(--slip); border: 1px solid #ecd98a; border-radius: var(--radius); cursor: pointer; }
.field--check input[type="checkbox"] { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--blue); }
.ef-gate__close { position: absolute; top: 0.5rem; right: 0.6rem; width: 2.2rem; height: 2.2rem; font-size: 1.5rem; line-height: 1; color: var(--ink); background: none; border: 0; cursor: pointer; }
.ef-editor__label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.ef-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.ef-logo__thumb { max-width: 5rem; max-height: 3.5rem; object-fit: contain; padding: 0.2rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.ef-logo__pick { border: 1px solid var(--line); cursor: pointer; }
.ef-logo__pick:focus-within { outline: 3px solid rgba(42, 59, 208, 0.3); }
.ef-seg { display: inline-flex; margin-top: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ef-seg label { padding: 0.35rem 0.75rem; font-size: 0.9375rem; cursor: pointer; border-left: 1px solid var(--line); }
.ef-seg label:first-child { border-left: 0; }
.ef-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ef-seg label:has(input:checked) { background: var(--ink); color: #fff; }
.ef-seg label:has(input:focus-visible) { outline: 3px solid rgba(42, 59, 208, 0.4); outline-offset: -3px; }
.ef-colours { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.ef-swatch { position: relative; cursor: pointer; }
.ef-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.ef-swatch span { display: block; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.ef-swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.ef-swatch input:focus-visible + span { outline: 3px solid rgba(42, 59, 208, 0.4); outline-offset: 2px; }
.ef-swatch__custom, .field .ef-swatch__custom { flex: none; width: 2.4rem; height: 2rem; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; cursor: pointer; }
.ef-swatch__custom.is-on { box-shadow: 0 0 0 2px var(--ink); }

.ef-fillbar { margin-bottom: 1rem; padding: 0.7rem 0.9rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--mist); }
.ef-fillbar__toggle { display: flex; align-items: center; gap: 0.5rem; font-weight: 650; cursor: pointer; }
.ef-fillbar__toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.ef-fillbar__note { margin-top: 0.4rem; font-size: var(--step--1); color: var(--ink-soft); }

.ef-sheet__logo { display: block; max-height: 4.5rem; max-width: 9rem; object-fit: contain; margin: 0 auto 0.5rem; }
.ef-sheet__head.is-logo-left, .ef-sheet__head.is-logo-right { min-height: 5rem; padding-inline: 6.5rem; }
.ef-sheet__head.is-logo-left .ef-sheet__logo, .ef-sheet__head.is-logo-right .ef-sheet__logo { position: absolute; top: 0; max-width: 6rem; max-height: 4.25rem; margin: 0; }
.ef-sheet__head.is-logo-left .ef-sheet__logo { left: 0; }
.ef-sheet__head.is-logo-right .ef-sheet__logo { right: 0; }
.ef-sheet__head.is-logo-left .ef-sheet__meta, .ef-sheet__head.is-logo-right .ef-sheet__meta { margin-inline: -6.5rem; }
@media (max-width: 30rem) {
  .ef-sheet__head.is-logo-left, .ef-sheet__head.is-logo-right { padding-inline: 4rem; }
  .ef-sheet__head.is-logo-left .ef-sheet__logo, .ef-sheet__head.is-logo-right .ef-sheet__logo { max-width: 3.5rem; }
  .ef-sheet__head.is-logo-left .ef-sheet__meta, .ef-sheet__head.is-logo-right .ef-sheet__meta { margin-inline: -4rem; }
}

.ef-fill { flex: 1 1 6rem; min-width: 4rem; padding: 0.1rem 0.3rem; font: inherit; color: #0f1750; background: #fffbea; border: 0; border-bottom: 1px solid #8a93a8; border-radius: 2px 2px 0 0; }
.ef-fill:focus { outline: 2px solid rgba(42, 59, 208, 0.35); background: #fff6cc; }
.ef-fill--long { flex-basis: 100%; resize: vertical; min-height: 2.6rem; }
.ef-fill--date { flex: 0 1 10rem; }
.ef-fill--short { width: 7rem; flex: none; }
.ef-sheet__meta label { display: inline-flex; align-items: center; gap: 0.3rem; }
.ef-choice { display: inline-flex; align-items: center; gap: 0.2rem; margin-right: 0.45rem; cursor: pointer; }
.ef-check { width: 1rem; height: 1rem; accent-color: var(--ef-accent); }

/* ---------- Form sheet: extras for the online form ---------- */
.ef-req { color: var(--red-deep); }
.ef-row.is-bad .ef-fill { background: #fdecee; border-bottom-color: var(--red); }
.ef-error { flex-basis: 100%; font-size: var(--step--1); font-weight: 600; color: var(--red-deep); }
.ef-answer { flex: 1 1 6rem; min-width: 4rem; padding: 0 0.3rem; color: #0f1750; border-bottom: 1px solid #8a93a8; overflow-wrap: anywhere; }
.ef-box.is-ticked { background: #0f1750; box-shadow: inset 0 0 0 2px #fff; }
.ef-sheet__body:empty { display: none; }
.ef-sheet .ef-fill { font-size: 1rem; }

/* On phones the online form is one column: the question above a full-width box. */
@media (max-width: 40rem) {
  .ef-sheet.is-filling { padding: 1rem; }
  .ef-sheet.is-filling .ef-row { display: block; padding-top: 0.7rem; }
  .ef-sheet.is-filling .ef-label { display: block; max-width: none; margin-bottom: 0.25rem; font-weight: 600; }
  .ef-sheet.is-filling .ef-fill { display: block; width: 100%; min-height: 2.75rem; padding: 0.5rem 0.6rem; font-size: 16px; border: 1px solid #99a3bd; border-radius: var(--radius); background: #fffdf3; }
  .ef-sheet.is-filling .ef-fill--long { min-height: 5rem; }
  .ef-sheet.is-filling .ef-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .ef-sheet.is-filling .ef-choice { padding: 0.45rem 0.7rem; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
  .ef-sheet.is-filling .ef-choice:has(input:checked) { border-color: var(--ef-accent); background: var(--ef-tint); }
  .ef-sheet.is-filling .ef-check { width: 1.15rem; height: 1.15rem; }
  .ef-sheet.is-filling .ef-sheet__head.is-logo-left, .ef-sheet.is-filling .ef-sheet__head.is-logo-right { padding-inline: 0; }
  .ef-sheet.is-filling .ef-sheet__head .ef-sheet__logo { position: static; margin: 0 auto 0.5rem; max-width: 7rem; }
  .ef-sheet.is-filling .ef-sheet__head .ef-sheet__meta { margin-inline: 0; }
}

/* ---------- Public page ---------- */
.page { min-height: 100vh; background: var(--mist); }
.page__wrap { max-width: 52rem; margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem) clamp(0.75rem, 3vw, 1.5rem) 3rem; }
.page--embed { background: transparent; min-height: 0; }
.page--embed .page__wrap { padding: 0.5rem 0 1rem; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.bar__grow { flex: 1 1 auto; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.tabs button { padding: 0.55rem 0.95rem; font: inherit; font-weight: 650; color: var(--ink); background: none; border: 0; border-left: 1px solid var(--line); cursor: pointer; }
.tabs button:first-child { border-left: 0; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.btn--accent { background: var(--accent, var(--ink)); color: #fff; }
.btn--accent:hover { filter: brightness(1.12); color: #fff; }
.btn--small { min-height: 2.3rem; padding: 0.35rem 0.8rem; font-size: 0.9375rem; }
.send { display: grid; gap: 0.6rem; margin-top: 1.25rem; }
.send .btn { width: 100%; font-size: 1.1rem; min-height: 3.25rem; }
.note { font-size: var(--step--1); color: var(--ink-soft); }
.status { font-weight: 600; }
.status:empty { display: none; }
.status.is-bad { color: var(--red-deep); }
.status.is-ok { color: var(--green); }
.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.done { display: grid; gap: 0.9rem; justify-items: start; padding: clamp(1.25rem, 4vw, 2.25rem); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); box-shadow: var(--shadow); }
.done h2 { font-family: var(--sans); font-size: var(--step-2); font-weight: 700; }
.done__no { font-size: var(--step-1); }
.done__no strong { font-size: 1.4em; letter-spacing: 0.03em; }
.done__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.share__label { font-size: var(--step--1); font-weight: 650; color: var(--ink-soft); margin-right: 0.2rem; }
.share a, .share button { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.3rem; padding: 0.3rem 0.75rem; font: inherit; font-size: 0.9375rem; font-weight: 650; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--ink); color: var(--ink); }
.share .is-wa { background: #25d366; border-color: #25d366; color: #06301a; }
.share svg { width: 1.05rem; height: 1.05rem; flex: none; }
.foot { margin-top: 1.5rem; text-align: center; font-size: var(--step--1); color: var(--ink-soft); }
[hidden] { display: none !important; }

/* ---------- Staff area ---------- */
.staff { min-height: 100vh; background: var(--mist); }
.top { background: var(--ink); color: #fff; }
.top__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; max-width: 80rem; margin: 0 auto; padding: 0.6rem clamp(0.75rem, 3vw, 1.5rem); }
.top__name { font-weight: 700; margin-right: auto; }
.top__name small { display: block; font-weight: 400; font-size: 0.8rem; color: #c9d1e6; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.1rem 0.25rem; }
.top nav a, .top .linklike { color: #fff; text-decoration: none; padding: 0.35rem 0.6rem; border-radius: var(--radius); font-weight: 600; font-size: 0.9375rem; }
.top nav a:hover, .top nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.top__who { font-size: 0.85rem; color: #c9d1e6; }
.main { max-width: 80rem; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) clamp(0.75rem, 3vw, 1.5rem) 3rem; }
.main--narrow { max-width: 33rem; padding-top: clamp(2rem, 8vh, 5rem); }
.main h1 { font-family: var(--sans); font-size: var(--step-2); font-weight: 700; margin-bottom: 1rem; }
.main h2 { font-family: var(--sans); font-size: var(--step-1); font-weight: 700; margin-bottom: 0.75rem; }
.card { padding: clamp(1rem, 3vw, 1.6rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 1.25rem; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; align-items: start; }
.grid2 > .card + .card { margin-top: 0; }
.msg { padding: 0.7rem 0.9rem; border-radius: var(--radius); font-weight: 600; border: 1px solid; line-height: 1.5; }
.msg--ok { color: var(--green); background: #e8f5ee; border-color: #b6dfc8; }
.msg--bad { color: var(--red-deep); background: #fdecee; border-color: #f3b8be; }
.msg--warn { color: #7a4d00; background: var(--slip); border-color: #ecd98a; }
.msg p + p { margin-top: 0.4rem; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2a3658; color: #fff; }
.btn--danger { border-color: var(--red-deep); color: var(--red-deep); background: #fff; }
.btn--danger:hover { background: var(--red-deep); color: #fff; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.tools input[type="search"], .tools select { min-height: 2.75rem; padding: 0.5rem 0.7rem; font: inherit; font-size: 1rem; border: 1px solid #99a3bd; border-radius: var(--radius); background: #fff; color: var(--ink); }
.tools input[type="search"] { flex: 1 1 16rem; }
.counts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.count { padding: 0.55rem 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.count strong { display: block; font-size: 1.35rem; line-height: 1.1; }
.count span { font-size: 0.85rem; color: var(--ink-soft); }
.scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.list { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.list th, .list td { padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.list th { position: sticky; top: 0; background: var(--mist); font-size: 0.85rem; white-space: nowrap; }
.list tbody tr[data-href] { cursor: pointer; }
.list tbody tr[data-href]:hover { background: #f7f9fd; }
.list td a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.list .is-empty td { padding: 2rem; text-align: center; color: var(--ink-soft); }
.tag { display: inline-block; padding: 0.05rem 0.5rem; font-size: 0.8rem; font-weight: 700; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); white-space: nowrap; }
.tag--admitted { background: #e8f5ee; border-color: #b6dfc8; color: var(--green); }
.tag--interested { background: #e9edff; border-color: #c3cbf5; color: var(--blue-deep); }
.tag--waiting { background: var(--slip); border-color: #ecd98a; color: #7a4d00; }
.details { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 0 1rem; }
.details dt { padding: 0.35rem 0; color: var(--ink-soft); font-size: 0.9375rem; border-bottom: 1px solid var(--mist); }
.details dd { padding: 0.35rem 0; font-weight: 600; overflow-wrap: anywhere; border-bottom: 1px solid var(--mist); }
.details .sec { grid-column: 1 / -1; margin-top: 0.8rem; padding: 0.2rem 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); border: 0; }
@media (max-width: 30rem) { .details { grid-template-columns: minmax(0, 1fr); } .details dt { border: 0; padding-bottom: 0; } }
.field { margin-bottom: 0.9rem; }
.code { font: 600 0.95rem/1.4 ui-monospace, Consolas, monospace; padding: 0.55rem 0.7rem; background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); overflow-wrap: anywhere; }
textarea.code { display: block; width: 100%; min-height: 5rem; resize: vertical; color: var(--ink); }
.qr { display: inline-block; padding: 0.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr img, .qr canvas { display: block; width: 180px; height: 180px; }
.office-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0 1rem; }
.office-form .field--wide { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding-top: 0.4rem; }
.checks label { display: inline-flex; gap: 0.35rem; align-items: center; font-weight: 400; margin: 0; }
.field .checks input { width: 1.1rem; height: 1.1rem; min-height: 0; }

/* ---------- Designer (admin): a design studio ----------
   Toolbar on top; settings on the left; the form on a desk on the right. On a wide screen the page
   itself never scrolls: the desk scrolls the form, the settings stay put. On a narrow screen the
   settings and the preview are tabs and the page scrolls normally, with the toolbar fixed. */
.field .ef-seg input, .field .ef-swatch input, .field input.visually-hidden { width: 1px; height: 1px; min-height: 0; padding: 0; }
.staff .top { position: sticky; top: 0; z-index: 20; }

.studio__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.6rem clamp(0.75rem, 2vw, 1.25rem); background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(22, 32, 58, 0.04); }
.studio__title { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
.studio__title h1 { margin: 0; font-family: var(--sans); font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.studio__form { font-size: 0.875rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio__grow { flex: 1 1 auto; }
.studio__status { font-size: 0.875rem; color: var(--ink-soft); }
.studio__status.is-dirty { color: #9a5b00; font-weight: 600; }
.studio__status.is-dirty::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.35rem; border-radius: 50%; background: #e09a00; vertical-align: 0.05em; }
.studio__status.is-ok { color: var(--green); font-weight: 600; }
.studio__status.is-bad { color: var(--red-deep); font-weight: 600; }
.studio__save { min-width: 6.5rem; }
.tabs--small button { padding: 0.35rem 0.8rem; font-size: 0.9rem; }

.studio__side { background: #fff; }
.studio__tabs { display: flex; gap: 0.15rem; padding: 0.6rem 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.studio__tabs::-webkit-scrollbar { display: none; }
.studio__tabs button { flex: 1 0 auto; padding: 0.55rem 0.55rem 0.6rem; font: inherit; font-size: 0.9rem; font-weight: 650; color: var(--ink-soft); white-space: nowrap; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.studio__tabs button:hover { color: var(--ink); }
.studio__tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.studio__panel { padding-top: 1rem; }
.studio__panel .ef-group { margin: 0; padding: 0; border: 0; }
.studio__help { margin: 1rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.studio__help + .studio__panel { padding-top: 0.5rem; }
.studio__reset { margin-top: 0.75rem; font-size: var(--step--1); }
.studio .ef-item { grid-template-columns: auto minmax(0, 1fr) auto auto auto auto auto; padding: 0.15rem 0; border-bottom: 1px solid var(--mist); }
.studio .ef-add { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--line); }

.studio__canvas { background: #e8ecf4; }
.studio__sheet { max-width: 50rem; margin: 0 auto; border: 0; box-shadow: 0 2px 4px rgba(22, 32, 58, 0.08), 0 18px 40px -18px rgba(22, 32, 58, 0.35); }

/* Wide: the studio fills the screen under the menu. */
@media (min-width: 56rem) {
  .staff--design { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .staff--design .main { flex: 1; min-height: 0; max-width: none; width: 100%; padding: 0; display: flex; flex-direction: column; }
  .staff--design .main > .stack { padding: 0.75rem 1.25rem 0; }
  .studio { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .studio__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(21rem, 27rem) minmax(0, 1fr); }
  .studio__side { min-height: 0; overflow-y: auto; padding: 0 1.25rem 1.5rem; border-right: 1px solid var(--line); scrollbar-width: thin; }
  .studio__tabs { position: sticky; top: 0; z-index: 2; background: #fff; }
  .studio__canvas { min-height: 0; overflow-y: auto; padding: clamp(1.25rem, 3vw, 2.5rem); }
  .studio__tab-preview { display: none; }
}

/* Narrow: one page that scrolls; the toolbar stays at the top; settings and preview are tabs. */
@media (max-width: 55.99rem) {
  .staff--design .top { position: static; }
  .staff--design .main { padding: 0; }
  .staff--design .main > .stack { padding: 0.75rem 0.75rem 0; }
  .studio__bar { position: sticky; top: 0; z-index: 15; }
  .studio__side { padding: 0 0.9rem 1rem; }
  .studio__tabs { position: sticky; top: var(--studio-bar, 3.25rem); z-index: 14; background: #fff; }
  .studio[data-view="edit"] .studio__canvas { display: none; }
  .studio[data-view="preview"] .studio__help, .studio[data-view="preview"] .studio__reset { display: none; }
  .studio__canvas { padding: 0.75rem; }
  .studio__sheet { padding: 1rem; }
  .studio__title h1 { font-size: 1.05rem; }
}

/* Forms (settings) and the form picker in the menu */
.top__form select { min-height: 2.1rem; max-width: 14rem; padding: 0.2rem 0.5rem; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--ink); background: #fff; border: 0; border-radius: var(--radius); }
.formrow { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.formrow__main { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.3rem; }
.formrow__main input { flex: 1 1 12rem; min-height: 2.5rem; padding: 0.4rem 0.6rem; font: inherit; border: 1px solid #99a3bd; border-radius: var(--radius); }
.formrow__main .formrow__prefix { flex: 0 0 5.5rem; text-transform: uppercase; }
.formrow .note a { overflow-wrap: anywhere; }
.formrow__remove { margin: -0.3rem 0 0.4rem; font-size: var(--step--1); }
.formadd { margin-top: 1rem; }
.formadd > summary { list-style: none; display: inline-flex; }
.formadd > summary::-webkit-details-marker { display: none; }

/* Live demo (mschoolsoftware.com) */
.demo-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.5rem clamp(0.75rem, 3vw, 1.5rem); font-size: 0.9rem; background: var(--slip); border-bottom: 1px solid #ecd98a; color: #5c4300; }
.demo-bar a { color: inherit; font-weight: 700; }
.demo-logins { margin-bottom: 1.25rem; padding: 0.8rem 0.9rem; background: var(--slip); border: 1px solid #ecd98a; border-radius: var(--radius); font-size: 0.9375rem; }
.demo-logins table { width: 100%; margin: 0.5rem 0; border-collapse: collapse; }
.demo-logins th, .demo-logins td { padding: 0.25rem 0.4rem 0.25rem 0; text-align: left; vertical-align: middle; }
.demo-logins td:nth-child(2) { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.demo-logins td:nth-child(2) span { color: var(--ink-soft); }
.demo-logins td:last-child { text-align: right; white-space: nowrap; }
.demo-logins .btn { min-height: 2rem; padding: 0.25rem 0.6rem; font-size: 0.85rem; background: #fff; border: 1px solid #ecd98a; }
@media (max-width: 26rem) { .demo-logins tr { display: grid; grid-template-columns: auto 1fr; } .demo-logins td:last-child { grid-column: 1 / -1; text-align: left; } }

@media print {
  .top, .tools, .no-print { display: none !important; }
  .staff, .page { background: #fff; }
}
