.sample-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.parent-portal { margin: 0; }
.portal-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 24px; background: white; border-bottom: 1px solid #dbe4eb; }
.portal-header > a { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.portal-header form { margin: 0; }
.portal-main { max-width: 960px; margin: 0 auto; padding: 24px; overflow-wrap: anywhere; }
.portal-main h1 { font-size: 28px; }
.portal-main h2 { font-size: 22px; }
.portal-main h3 { font-size: 18px; }
.portal-form { max-width: 480px; }
.portal-child details > form { margin-top: 16px; }
.portal-organisations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.portal-organisation { background: white; border: 1px solid #dbe4eb; border-top: 3px solid #1ebfae; border-radius: 4px; padding: 18px; }
.portal-child, .portal-access-row { padding: 16px 0; border-bottom: 1px solid #dbe4eb; }
.portal-child { margin-bottom: 24px; }
.portal-child li { margin: 8px 0; }
.sample-area a[aria-disabled="true"] { color: var(--muted); cursor: default; text-decoration: none; }

:root {
  --bg: #f1f4f7;
  --top: #222;
  --panel: #fff;
  --ink: #444;
  --muted: #707d86;
  --blue: #30a5ff;
  --teal: #1ebfae;
  --green: #74c947;
  --orange: #ffb53e;
  --red: #f9243f;
  --line: #dfe5ea;
  --shadow: 5px 5px #555;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
}

.special-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.special-fields > label:last-child { grid-column: 1 / -1; }
.special-session { display: grid; grid-template-columns: minmax(150px, 2fr) repeat(3, minmax(100px, 1fr)) minmax(150px, 2fr) auto; gap: 12px; border: 1px solid var(--line); padding: 16px; margin: 16px 0; align-items: end; min-width: 0; }
.special-session label, .special-type label { min-width: 0; }
.special-type { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding-block: 12px; border-top: 1px solid var(--line); }
.special-type label { flex: 1 1 200px; margin: 0; }
.special-unavailable { color: #697680; background: #edf0f3; font-size: 12px; }
.special-day-label { color: #815015; font-size: 12px; }
#special-session-editor[hidden] { display: none; }
@media(max-width:1100px) { .special-session { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media(max-width:500px) { .special-session { grid-template-columns: minmax(0,1fr); } }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #e9ecf2;
  color: #1b3548;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
.button:hover {
  opacity: 0.85;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 18px;
  background: var(--top);
  color: #fff;
}

.brand,
.login-brand {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
}

.brand span,
.login-brand span {
  color: var(--blue);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe6ef;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-meta button {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar {
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  width: 250px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fff;
}

.search {
  display: grid;
  grid-template-columns: 1fr 46px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--blue);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.stacked {
  display: grid;
  gap: 12px;
}

.search input {
  border-radius: 4px 0 0 4px;
}

.search button {
  min-height: 42px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
  color: #fff;
}

.search-page form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.search-page label {
  margin-bottom: 0;
}

nav {
  display: grid;
  padding: 8px 0 28px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  color: #555;
  font-weight: 650;
}

.nav-section {
  border-top: 1px solid #eef2f5;
}

.platform-nav {
  margin-top: 24px;
  border-top: 2px solid var(--line);
}

.nav-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 12px 18px;
  color: #303d45;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.nav-section summary::-webkit-details-marker {
  display: none;
}

.nav-section summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 14px;
}

.nav-section[open] summary::after {
  content: "⌃";
}

.nav-section div {
  display: grid;
  padding-bottom: 6px;
}

.nav-section a {
  padding-left: 28px;
  font-size: 13px;
}

nav a:hover,
nav a.active {
  background: #f6f8fa;
  color: var(--blue);
}

nav span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  color: inherit;
  font-weight: 900;
}

.main {
  margin-left: 250px;
  padding: 84px 22px 32px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

button[data-call-log-submit]:disabled {
  background: #e6e9ed;
  border-color: #d5dbe2;
  color: #687483;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: 34px;
  font-weight: 300;
}

h2 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 300;
}

p,
small,
dd {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.record-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 18px;
  padding: 0;
}

.record-tabs a {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #40515c;
  font-size: 12px;
  font-weight: 800;
}

.record-tabs a:hover,
.record-tabs a.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.stat,
.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.stat {
  padding: 18px;
  border-top: 4px solid var(--blue);
}

.stat.teal {
  border-top-color: var(--teal);
}

.stat.green {
  border-top-color: var(--green);
}

.stat.orange {
  border-top-color: var(--orange);
}

.stat span,
.stat strong {
  display: block;
}

.stat strong {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 300;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

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

.operations-table {
  max-width: 100%;
  overflow-x: auto;
}

.operations-table td {
  overflow-wrap: anywhere;
}

.operations-table table {
  min-width: 640px;
}

.detail-row {
  margin-top: 18px;
}

/* Separate stacked page sections, including summary counters after filters. */
.main > :is(.grid, .panel) + :is(.grid, .panel, .stats) {
  margin-top: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 2px 0 13px;
}

.panel {
  padding: 18px;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title h2 {
  margin-bottom: 0;
}

.booking-group,
.booking-timeline {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.booking-group:last-child,
.booking-timeline:last-child {
  margin-bottom: 0;
}

.booking-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.booking-group-head h3,
.booking-timeline h3 {
  margin: 0;
  font-size: 15px;
}

.booking-calendar-scroll {
  overflow-x: auto;
}

.booking-calendar {
  min-width: 760px;
  table-layout: fixed;
}

.booking-calendar th:first-child,
.booking-calendar td:first-child {
  width: 150px;
}

.booking-calendar th {
  white-space: normal;
}

#child-booking-calendar { max-height: 70vh; overflow: auto; }
#child-booking-calendar .booking-calendar { border-collapse: separate; border-spacing: 0; }
#child-booking-calendar thead th { position: sticky; top: 0; z-index: 2; background: #e4ebef; box-shadow: 0 2px 0 #b8cbd6; }

.booking-calendar .week-plain td { background: #fff; }
.booking-calendar .week-shaded td { background: #e8f2f7; }
.booking-calendar .week-start td { border-top: 3px solid #b8cbd6; }
.booking-calendar .week-shaded .calendar-check { background: #f2f8fb; }

.calendar-check {
  display: grid;
  min-width: 86px;
  min-height: 54px;
  place-items: center;
  gap: 4px;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  font-size: 12px;
  text-align: center;
}

.calendar-check input {
  width: 18px;
  min-height: 18px;
}

.roll-filters {
  margin-bottom: 18px;
}

.roll-filters form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.roll-filters label {
  margin-bottom: 0;
}
.roll-filters .check-row { white-space: normal; min-width: 0; }
.roll-filters .check-row input { flex: 0 0 18px; }

.inline-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.inline-form input[type="password"] {
  min-width: 170px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.table-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f8fa;
  color: #2d6f9f;
  font-size: 12px;
  font-weight: 800;
}

th,
td {
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #333;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
  font-weight: 700;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.checkbox-label input[type="radio"] {
  border-radius: 999px;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.dashboard-widget {
  align-content: start;
}

.alert-list {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.alert-list li {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e9ecf2;
  color: #1b3548;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.pill.present,
.pill.confirmed,
.pill.connected,
.pill.active,
.pill.collected,
.pill.onboard,
.pill.dropped_off,
.pill.qualified,
.pill.converted {
  background: rgba(116, 201, 71, 0.18);
  color: #32751a;
}

.pill.absent,
.pill.waitlist,
.pill.cancelled,
.pill.paused,
.pill.closed,
.pill.rejected {
  background: rgba(249, 36, 63, 0.12);
  color: #b4172b;
}

.pill.late,
.pill.scheduled,
.pill.new,
.pill.contacted {
  background: rgba(255, 181, 62, 0.2);
  color: #8a5b04;
}

.pill.picked_up {
  background: rgba(48, 165, 255, 0.15);
  color: #17689d;
}

.pill.awaiting_payment,
.pill.draft {
  background: rgba(255, 181, 62, 0.2);
  color: #8a5b04;
}

.roll-mark {
  display: grid;
  gap: 8px;
}

.mark-buttons,
.roll-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mark-buttons button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.roll-extra input[type="time"] {
  max-width: 118px;
}

.roll-extra input:not([type="time"]) {
  min-width: min(100%, 220px);
  flex: 1;
}

.weekly-scroll {
  overflow-x: auto;
}

.weekly-roll {
  min-width: 980px;
}

.weekly-roll th:not(:first-child),
.weekly-roll td:not(:first-child) {
  width: 12%;
}

.weekly-cell {
  display: grid;
  gap: 4px;
  min-width: 118px;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f8fa;
  color: var(--ink);
}

.weekly-cell:last-child {
  margin-bottom: 0;
}

.weekly-cell span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
}

.weekly-cell .pill {
  justify-self: start;
}

.muted-cell {
  color: #a2abb2;
}

.batch-total {
  margin: 14px 0 0;
  text-align: right;
}

.merge-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merge-fields code {
  display: inline-flex;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f8fa;
}

.letter-preview,
.printable-letter {
  line-height: 1.6;
}

.letter-preview pre,
.printable-letter pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: var(--ink);
}

.letter-preview {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f9fbfc;
}

.letter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
}

.delivery-form {
  max-width: 520px;
  margin-top: 16px;
}

.big-status {
  color: var(--blue);
  font-size: 30px;
  font-weight: 300;
}

dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 18px;
}

.compact-dl {
  grid-template-columns: minmax(84px, 120px) minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  font-size: 12px;
}

.compact-dl dd {
  overflow-wrap: anywhere;
  color: var(--muted);
}

dt {
  font-weight: 800;
}

dd {
  margin: 0;
}

.checks {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.alert {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 4px;
  background: #e9ecf2;
}

.alert.danger {
  background: rgba(249, 36, 63, 0.1);
  color: #8c1020;
}

.danger-text {
  color: #8c1020;
}

.public-body {
  min-height: 100vh;
  background: #f6f8fb;
}

.public-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.public-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.public-brand span {
  color: var(--blue);
  text-transform: uppercase;
}

.public-top nav {
  display: flex;
  gap: 8px;
  padding: 0;
}

.public-top nav a {
  padding: 9px 12px;
  border-radius: 4px;
  color: #42515c;
}

.public-top nav a.active {
  background: #edf6ff;
  color: #17689d;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 64px 7vw 44px;
  background: linear-gradient(135deg, #fff 0%, #f2f7fb 52%, #eaf4f0 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-hero h1,
.public-form-page h1 {
  margin: 0;
  color: #1f2f3a;
  font-size: 64px;
  font-weight: 300;
}

.hero-copy {
  max-width: 680px;
  color: #526472;
  font-size: 20px;
  line-height: 1.55;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.product-snapshot,
.public-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.product-snapshot {
  padding: 18px;
}

.snapshot-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.snapshot-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--line);
}

.snapshot-grid,
.public-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.snapshot-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.snapshot-grid strong {
  display: block;
  color: #1f2f3a;
  font-size: 24px;
  font-weight: 800;
}

.snapshot-grid span {
  color: var(--muted);
  font-size: 12px;
}

.product-snapshot table {
  margin-top: 16px;
}

.public-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 36px 7vw;
  background: #fff;
}

.public-band article,
.public-split > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.public-band h2,
.public-split h2,
.public-card h2 {
  margin-top: 0;
}

.public-band p,
.public-split p,
.public-form-page p {
  color: var(--muted);
  line-height: 1.55;
}

.public-split,
.public-form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 26px;
  align-items: start;
  padding: 44px 7vw 70px;
}

.public-card {
  padding: 24px;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-brand {
  margin: -28px -28px 24px;
  padding: 18px;
  background: var(--top);
}

.login-card h1 {
  font-size: 30px;
}

.login-card button {
  width: 100%;
  margin-top: 4px;
}

code {
  color: #1b3548;
}

.programme-child-list,
.centre-schedule-form {
  display: grid;
  gap: 12px;
}

.programme-child-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.programme-child-card h3,
.programme-child-card p {
  margin: 0;
}

.programme-child-card p {
  color: var(--muted);
}

.selected-panel {
  border-color: #8db596;
}

.centre-schedule {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.centre-schedule:first-of-type {
  border-top: 0;
}

.centre-schedule summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.compact-check {
  display: inline-grid;
  place-items: center;
  width: 34px;
  margin: 0;
}

.compact-check input {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .public-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
  }

  .public-top nav {
    flex-wrap: wrap;
  }

  .public-hero,
  .public-split,
  .public-form-page,
  .public-band {
    grid-template-columns: 1fr;
    padding-right: 22px;
    padding-left: 22px;
  }

  .public-hero {
    min-height: auto;
  }

  .public-hero h1,
  .public-form-page h1 {
    font-size: 46px;
  }

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

  .sidebar {
    position: static;
    width: auto;
    margin-top: 0;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .topbar-meta {
    flex-wrap: wrap;
    width: 100%;
  }

  .main {
    margin-left: 0;
    padding-top: 24px;
  }

  .stats,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .roll-filters form {
    grid-template-columns: 1fr;
  }

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

  .search-page form {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .programme-child-card {
    grid-template-columns: 1fr;
  }
}

.nav-section .child-nav a {
  padding: 8px 18px 8px 42px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.search { position: relative; }
.search-suggestions { position: absolute; top: 100%; left: 8px; right: 8px; z-index: 20; background: #fff; border: 1px solid #b5c4cf; box-shadow: 0 4px 12px #0002; max-height: 360px; overflow-y: auto; }
.search-suggestions[hidden] { display: none; }
.search-suggestions a { display: block; padding: 10px; border-bottom: 1px solid #e1e7eb; color: #253b48; overflow-wrap: anywhere; }
.search-suggestions small { display: block; margin-top: 4px; }
.search-suggestions a:hover, .search-suggestions a:focus { background: #eaf5fc; }

.family-week, .family-overview {
  background: #fff;
  padding: 20px;
  border-top: 1px solid #dce3e7;
}

.child-week {
  padding: 18px 0;
  border-top: 1px solid #dce3e7;
}

.child-week h3 { margin: 0 0 6px; font-size: 18px; }
.family-week .panel-title { flex-wrap: wrap; gap: 12px; }
.family-child-week { margin: 16px 0; border:1px solid #d5e0e6; border-radius:8px; overflow:hidden; min-width:0; }
.family-child-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:14px 16px; background:#f7f9fb; border-top:4px solid var(--glance-accent, #dce3e8); }
.family-child-header h3 { margin:0; font-size:17px; overflow-wrap:anywhere; }
.family-child-header h3 a { color:#18586a; }
.family-child-header h3 span { font-size:15px; font-weight:normal; color:#354e58; }
.family-child-header .button-row { margin:0; flex-wrap:wrap; }
.family-child-header .button { white-space:normal; text-align:center; }
.family-week-scroll { padding:4px; }
.family-week-table { table-layout:fixed; min-width:700px; border-collapse:separate; border-spacing:6px; }
.family-week-table th { text-align:center; background:#edf2f7; border:1px solid #d5e0e6; border-radius:6px; white-space:normal; }
.family-week-table td { text-align:center; vertical-align:top; height:88px; border:1px solid #d5e0e6; border-radius:6px; padding:8px; overflow-wrap:anywhere; }
.family-child-week > .child-note { margin:0; padding:8px 16px 14px; font-size:13px; }
.week-session { display: block; padding: 8px; margin-bottom: 5px; background: #e5f3ed; color: #205e49; overflow-wrap: anywhere; }
.week-session small { display: block; margin-top: 4px; }
.child-note { margin-bottom: 0; }
.family-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.family-overview h2 { font-size: 18px; }
.family-overview li { margin-bottom: 8px; overflow-wrap: anywhere; }
.centre-schedule-form h3 { font-size: 17px; white-space: normal; }
.centre-schedule summary { flex-wrap: wrap; gap: 6px; white-space: normal; }

@media (max-width: 760px) {
  .family-overview { grid-template-columns: 1fr; }
  .family-week, .family-overview { padding: 14px; }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .topbar,
  .sidebar,
  .no-print {
    display: none !important;
  }

  .main {
    margin: 0;
    padding: 0;
  }

  .panel,
  .printable-letter {
    border: 0;
    box-shadow: none;
  }

  .printable-letter {
    padding: 0;
  }

  .printable-letter h1 {
    font-size: 24px;
    font-weight: 500;
  }
}
/* Keep today's indicator distinct from alternating calendar weeks. */
.parent-contacts { margin: 16px 0; }
.contact-edit-fields { min-width: 0; border: 0; padding: 0; margin: 0; }
@media (min-width: 901px) {
  .grid.two.parent-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.parent-contacts fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid #b8cbd6; }
.parent-contacts legend { font-weight: 600; padding: 0 8px; }
.parent-contacts textarea { width: 100%; resize: vertical; }
tr[data-family-url] { cursor: pointer; }
tr[data-family-url]:hover > td, tr[data-family-url]:focus-within > td { background-color: #edf6f2; }
.booking-calendar tr.calendar-today > td { box-shadow: inset 0 2px #16735e, inset 0 -2px #16735e; }

/* Public brand styles are isolated from the operational workspace. */
.public-body { background: #fff; color: #202c2b; font-family: Arial, Helvetica, sans-serif; line-height: 1.65; }
.public-body * { letter-spacing: 0; }
.public-body .public-top { min-height: 100px; padding: 20px max(24px, calc((100% - 1200px) / 2)); gap: 24px; border-color: #dce3df; }
.public-body .public-brand { align-items: center; gap: 12px; font-size: 21px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.public-body .public-brand span { text-transform: none; color: #202c2b; }
.public-body .public-brand small { display: block; font-size: 11px; color: #586461; font-weight: 400; margin-top: 3px; }
.public-body .public-brand .public-mark { display: grid; align-content: center; text-align: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 5px; background: #176b60; color: #fff; font-size: 26px; line-height: .9; }
.public-body .public-mark small { color: #fff; font-size: 13px; margin: 0; }
.public-body .public-top nav { gap: 16px; font-size: 14px; font-weight: 600; }
.public-body .public-top nav a { color: #202c2b; }
.public-body .public-top nav a.active { background: #e6ede4; color: #176b60; }
.public-body .eyebrow { color: #176b60; font-size: 11px; font-weight: 700; margin-bottom: 22px; }
.public-body .public-hero { display: block; min-height: 510px; padding: 64px max(24px, calc((100% - 1200px) / 2)); background: #eef0ee url('/roll-call-hero.png') center / cover no-repeat; }
.public-body .public-hero > div { max-width: 365px; }
.public-body .public-hero h1 { font-size: 78px; line-height: 1.13; font-weight: 600; color: #202c2b; }
.public-body .hero-copy { font-size: 30px; line-height: 1.2; color: #202c2b; margin: 22px 0; }
.public-body .public-hero-description { font-size: 16px; color: #384744; }
.public-body .button, .public-body button { border-radius: 4px; box-shadow: none; padding: 12px 22px; font-size: 15px; line-height: 1.5; }
.public-body .button { background: #fff; color: #176b60; border: 1px solid #176b60; }
.public-body .button.primary, .public-body button.primary { background: #176b60; border: 1px solid #176b60; color: #fff; }
.public-body .button.primary:hover, .public-body button.primary:hover { background: #104e46; }
.public-body :focus-visible { outline: 3px solid #bf6109; outline-offset: 3px; }
.public-body .public-band { gap: 36px; padding: 48px max(24px, calc((100% - 1200px) / 2)); background: #f1f5f3; }
.public-body .public-band article, .public-body .public-split > div { border: 0; border-radius: 0; background: transparent; padding: 0; box-shadow: none; }
.public-body .public-band h2, .public-body .public-split h2 { font-size: 24px; line-height: 1.2; }
.public-body .public-band p, .public-body .public-split p, .public-body .public-form-page p { color: #586461; }
.public-body .public-split, .public-body .public-form-page { padding: 60px max(24px, calc((100% - 1200px) / 2)); gap: 56px; }
.public-body .public-form-page h1 { font-size: 42px; line-height: 1.15; font-weight: 600; color: #202c2b; }
.public-body .public-card { box-shadow: none; border-color: #dce3df; }
.public-login-main { min-height: calc(100vh - 190px); display: grid; place-items: start center; background: #f1f5f3; padding: 56px 24px; }
.service-links { padding: 22px 18px; text-align: center; background: #f1f5f3; color: #354e58; }
.service-links nav { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.signup-privacy-notice { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.public-body .login-card { width: min(100%, 460px); box-shadow: none; border-color: #dce3df; padding: 32px; }
.public-body .login-card h1 { font-size: 30px; line-height: 1.2; }
.public-body .login-card small a { color: #176b60; }
@media(max-width: 760px) {
  .public-body .public-top { flex-direction: row; flex-wrap: wrap; min-height: 82px; padding: 16px 18px; gap: 12px; align-items: center; }
  .public-body .public-brand { font-size: 18px; }
  .public-body .public-brand-name small { display: none; }
  .public-body .public-top nav { flex: 1; justify-content: flex-end; gap: 4px; font-size: 13px; }
  .public-body .public-top nav a { padding: 8px; }
  .public-body .public-hero { padding: 36px 24px; min-height: 430px; background-position: left center; }
  .public-body .public-hero > div { max-width: 300px; }
  .public-body .public-hero h1 { font-size: 60px; }
  .public-body .hero-copy { font-size: 27px; }
  .public-body .public-band, .public-body .public-split, .public-body .public-form-page { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; gap: 28px; }
  .public-body .public-form-page h1 { font-size: 34px; }
  .public-login-main { padding: 32px 18px; }
  .public-body .login-card { padding: 24px; }
}
@media(max-width: 480px) {
  .public-body .public-top nav { flex-basis: 100%; justify-content: flex-start; }
}
.list-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.list-pagination .button-row { align-items: center; flex-wrap: wrap; }
.list-pagination span { display: inline; width: auto; font-weight: 400; white-space: nowrap; }
.list-table { overflow-x: auto; }
.call-summary, .call-attachments { overflow-wrap: anywhere; }
.call-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.call-note { padding: 16px 0; border-bottom: 1px solid #dbe4ed; }
.call-detail small { display: block; }
.call-status-form { min-width: 190px; }
.call-status-form [data-call-assignment] { width: 100%; }
[data-call-assignment] .checkbox-label { margin-top: 10px; align-items: flex-start; }
.xero-company-form { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.xero-company-form .check-row { white-space: normal; align-items: flex-start; margin-bottom: 12px; }
.xero-company-form .check-row input { flex: 0 0 18px; }
.xero-company-form select { max-width: 100%; }
.public-brand-logo { display: block; width: 240px; max-width: 100%; height: auto; }
.holiday-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.holiday-section { margin-block: 24px; padding-block: 16px; border-top: 1px solid #d8e1e7; }
.holiday-section h2 { margin-bottom: 16px; }
.holiday-section td { overflow-wrap: anywhere; max-width: 320px; }
.holiday-section td form { margin-top: 8px; }
.holiday-section .list-table { overflow-x: auto; }
.holiday-section .list-table table { min-width: 760px; width: 100%; }
.holiday-section td .button, .holiday-section td button { white-space: nowrap; }
@media (max-width: 700px) { .public-brand-logo { width: 190px; } }
.tenant-management > .panel { margin-bottom: 20px; }
.tenant-management .stacked { max-width: 640px; }
.tenant-management td { overflow-wrap: anywhere; }

.family-glance { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 12px; margin-bottom: 20px; }
.family-glance--active { --glance-accent: #398451; }
.family-glance--attention { --glance-accent: #b07312; }
.family-glance--restricted { --glance-accent: #b44448; }
.family-glance--inactive { --glance-accent: #707681; }
.family-glance--managed { --glance-accent: #427baf; }
.family-glance-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 12px 14px; border: 1px solid #dce3e8; border-top: 4px solid var(--glance-accent, #dce3e8); background: #fff; border-radius: 4px; overflow-wrap: anywhere; }
.family-glance-card h2 { margin: 0; font-size: 14px; font-weight: 600; }
.family-glance-card strong { font-size: 17px; }
.family-glance-card :is(p,dl,dt,dd) { display: block; margin: 0; }
.family-glance-card dl:empty { display: none; }
.family-glance-card dl div { display: flex; flex-wrap: wrap; gap: 6px; }
.family-glance-card a { margin-top: auto; padding-top: 4px; }
.family-glance-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; }
.recovery-case { padding: 18px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.recovery-case header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.recovery-case h3 { margin: 0 0 8px; font-size: 18px; }
.recovery-case details { margin: 12px 0; }
.recovery-case form { margin-top: 12px; }
.family-glance-card .family-portal-status { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
@media (max-width: 1000px) { .family-glance { grid-auto-flow: row; grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 540px) { .family-glance { grid-template-columns: minmax(0,1fr); gap: 8px; } }
.family-summary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.family-summary-actions a:last-child { margin-inline-start: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal-booking-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 18px 0; }
.portal-booking-filter label { flex: 1 1 180px; min-width: 0; }
.portal-booking-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.portal-booking-day { min-width: 0; padding: 12px; border-top: 3px solid #358779; background: #fff; }
.portal-booking-day:nth-child(4n+3), .portal-booking-day:nth-child(4n+4) { background: #edf4f6; }
.portal-booking-day h3 { font-size: 16px; margin: 0 0 12px; }
.portal-slot { display: flex; align-items: start; gap: 10px; padding: 10px 0; overflow-wrap: anywhere; }
.parent-portal .portal-slot input[type="checkbox"], .parent-portal .portal-slot input[type="radio"] { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 2px 0 0; }
.portal-slot span { min-width: 0; }
.portal-slot small { display: block; margin-top: 4px; }
.portal-finance-summary { padding: 16px 0; border-block: 1px solid var(--line); margin: 20px 0; }
.portal-invoices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.portal-invoice { min-width: 0; background: white; padding: 16px; border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; }
.portal-invoice header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.portal-invoice h3 { margin: 0; font-size: 18px; }
.portal-invoice dl { display: block; margin: 16px 0; }
.parent-portal nav[aria-label="Invoice pages"] { align-items: center; }
.parent-portal nav[aria-label="Invoice pages"] span { width: auto; white-space: nowrap; font-weight: 400; }
.portal-invoice dl div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.portal-invoice dd { margin: 0; font-weight: 600; }
.family-ledger { min-width: 0; margin-top: 20px; }
.ledger-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.ledger-toolbar h2 { margin: 0; font-size: 21px; }
.ledger-note { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.ledger-scroll { max-width: 100%; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 4px; }
.ledger-table { width: 100%; min-width: 720px; margin: 0; border-collapse: collapse; }
.ledger-table th { background: #edf1f5; text-transform: none; font-weight: 600; padding: 10px 12px; }
.ledger-table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid #e5e9ee; }
.ledger-table tbody tr:nth-child(even) td { background: #f5f8fa; }
.ledger-table tbody tr:hover td { background: #eaf4fb; }
.ledger-table .ledger-money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger-table .ledger-date, .ledger-currency { white-space: nowrap; }
.ledger-table td:nth-child(2) { overflow-wrap: anywhere; min-width: 110px; max-width: 180px; }
.ledger-table td:nth-child(3) { overflow-wrap: anywhere; min-width: 180px; }
.ledger-table .ledger-balance { font-weight: 700; }
.ledger-description { display: block; color: #526577; font-size: 13px; margin-top: 3px; }
.ledger-table tfoot th { text-align: right; }
.ledger-table tfoot td { font-weight: 700; background: #edf1f5; }
.ledger-table .ledger-opening td { background: #eef5f5; font-style: italic; }
.ledger-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.ledger-pagination span { display: inline; width: auto; font-weight: 400; white-space: nowrap; }
.ledger-pagination .button-row { align-items: center; }
.ledger-pagination a.button { display: inline-flex; width: auto; }
.ledger-empty { padding: 24px 12px !important; }
@media (max-width: 640px) { .portal-invoices { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .portal-booking-days { grid-template-columns: minmax(0, 1fr); } }
.tour-layout { display: grid; grid-template-columns: minmax(185px, 245px) minmax(0, 1fr); gap: 24px; }
.holiday-booking-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.holiday-booking-day { min-width: 0; border-top: 3px solid #358779; padding: 12px; background: #f8fafc; }
.holiday-booking-day h3 { font-size: 17px; margin: 0 0 12px; }
.holiday-booking-option { padding: 10px 0; border-bottom: 1px solid var(--line); }
.holiday-booking-option .portal-slot { margin: 0; }
.holiday-booking-option span, .portal-slot span { min-width: 0; overflow-wrap: anywhere; }
.holiday-booking-option small { display: block; font-weight: 400; margin-top: 5px; }
@media (max-width: 760px) { .holiday-booking-days { grid-template-columns: minmax(0, 1fr); } }
.tour-steps ol { margin: 0; padding-left: 26px; }
.tour-steps li { padding: 6px 0; }
.tour-steps a[aria-current] { color: var(--ink); font-weight: 700; text-decoration: underline; }
.tour-step { border-top: 3px solid #358779; padding: 18px; background: white; min-width: 0; }
.tour-step ol { padding-left: 22px; max-width: 75ch; line-height: 1.55; }
.tour-step li { margin-bottom: 10px; }
.tour-step figure { margin: 20px 0 0; }
.tour-step img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.tour-step figcaption { margin-top: 6px; }
@media (max-width: 760px) { .tour-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
