/* SchoolsSportsHub365 public site — SSFA identity in the LeagueHub365 design
   tier: deep navy canvas, soft gradient orbs, glass panels, Plus Jakarta Sans.
   Accent is the crest red rather than LeagueHub's green. Dark by default, with
   a light theme the visitor can pick (see theme.js) that also follows the OS
   preference until they do. */

:root {
  --bg: #070e18;
  --panel: rgba(18, 28, 43, 0.82);
  --panel-solid: #121c2b;
  --text: #eaf0f7;
  /* Body copy reads noticeably brighter than the old #9cadc1 — headings keep
     their hierarchy through weight, not dimness. */
  --muted: #c3cfdf;
  --line: rgba(120, 150, 180, 0.22);
  --accent: #e63946;
  --accent-soft: #ff6b76;
  --gold: #f4c95d;
  --green: #35c977;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  /* Themeable surfaces — anything that used to hardcode a dark-only value. */
  --canvas-glow: #16324e;
  /* The whole page backdrop, so each theme can pick its own gradient shape
     rather than being forced through one radial. */
  --canvas: radial-gradient(circle at 80% -10%, var(--canvas-glow) 0%, var(--bg) 45%);
  /* Orb strength is themed: the same faint wash that glows on a near-black
     canvas simply disappears on a near-white one. */
  --orb-opacity: 0.26;
  --crest-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  --hover: rgba(255, 255, 255, 0.05);
  --hover-strong: rgba(255, 255, 255, 0.09);
  --input-bg: rgba(9, 16, 26, 0.75);
  --crest-plate: rgba(255, 255, 255, 0.9);
  --orb-a: rgba(230, 57, 70, 0.26);
  --orb-b: rgba(47, 125, 92, 0.26);
}

/* Light palette. The values live here once; the two selectors below only map
   them, so an OS-driven light theme and a chosen one can never drift apart.
   The accent trio is re-darkened: the dark-mode red/gold/green sit at 1.5–2.6
   contrast on a pale canvas, which fails even the 3.0 needed for large text. */
:root {
  --light-bg: #f4f7fb;
  --light-panel: rgba(255, 255, 255, 0.86);
  --light-panel-solid: #ffffff;
  --light-text: #0f1b2a;
  --light-muted: #55677d;
  --light-line: rgba(15, 27, 42, 0.14);
  --light-shadow: 0 18px 44px rgba(15, 27, 42, 0.12);
  --light-canvas-glow: #d6e6f7;
  /* Layered rather than a single radial: a cool top-right glow over a gentle
     vertical wash that warms slightly towards the SSFA green at the foot.
     Mirrors the app's light shell so the two read as one product. */
  --light-canvas:
    radial-gradient(circle at 80% -10%, var(--light-canvas-glow) 0%, rgba(214, 230, 247, 0) 46%),
    linear-gradient(180deg, #f7fafd 0%, #e9f1f9 52%, #edf6f1 100%);
  /* ~2x the dark value to land at a comparable perceived strength on a pale
     canvas (see --orb-opacity). */
  --light-orb-opacity: 0.5;
  /* A near-black drop shadow reads as grime on a pale canvas. */
  --light-crest-shadow: 0 8px 22px rgba(15, 27, 42, 0.18);
  --light-hover: rgba(15, 27, 42, 0.05);
  --light-hover-strong: rgba(15, 27, 42, 0.09);
  --light-input-bg: rgba(255, 255, 255, 0.92);
  --light-crest-plate: rgba(255, 255, 255, 0.95);
  --light-orb-a: rgba(230, 57, 70, 0.2);
  --light-orb-b: rgba(47, 125, 92, 0.22);
  --light-accent-soft: #c62230;
  --light-gold: #a16207;
  --light-green: #15803d;
}

/* Applied when the visitor picks light, or when their OS prefers it and they
   have not chosen — an explicit data-theme always wins. */
:root[data-theme='light'] {
  --bg: var(--light-bg);
  --panel: var(--light-panel);
  --panel-solid: var(--light-panel-solid);
  --text: var(--light-text);
  --muted: var(--light-muted);
  --line: var(--light-line);
  --shadow: var(--light-shadow);
  --canvas-glow: var(--light-canvas-glow);
  --canvas: var(--light-canvas);
  --orb-opacity: var(--light-orb-opacity);
  --crest-shadow: var(--light-crest-shadow);
  --hover: var(--light-hover);
  --hover-strong: var(--light-hover-strong);
  --input-bg: var(--light-input-bg);
  --crest-plate: var(--light-crest-plate);
  --orb-a: var(--light-orb-a);
  --orb-b: var(--light-orb-b);
  --accent-soft: var(--light-accent-soft);
  --gold: var(--light-gold);
  --gold-ink: color-mix(in srgb, var(--gold) 55%, #1f2937);
  --green: var(--light-green);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: var(--light-bg);
    --panel: var(--light-panel);
    --panel-solid: var(--light-panel-solid);
    --text: var(--light-text);
    --muted: var(--light-muted);
    --line: var(--light-line);
    --shadow: var(--light-shadow);
    --canvas-glow: var(--light-canvas-glow);
    --canvas: var(--light-canvas);
    --orb-opacity: var(--light-orb-opacity);
    --crest-shadow: var(--light-crest-shadow);
    --hover: var(--light-hover);
    --hover-strong: var(--light-hover-strong);
    --input-bg: var(--light-input-bg);
    --crest-plate: var(--light-crest-plate);
    --orb-a: var(--light-orb-a);
    --orb-b: var(--light-orb-b);
    --accent-soft: var(--light-accent-soft);
    --gold: var(--light-gold);
    --green: var(--light-green);
  }
}

* {
  box-sizing: border-box;
}

/* The `hidden` attribute must win. Any author `display` rule out-specifies the
   UA stylesheet's `[hidden] { display: none }`, so a hidden element with a
   layout rule renders anyway — that shipped three times here (an empty social
   icon linking to "#", the header set on mobile, and the external-form panel
   appearing with no form to go to). One rule, rather than remembering to guard
   every new selector. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The canvas gradient paints on a fixed, viewport-sized layer, NOT on body:
   painted on body it scales with document height, so long pages (honours,
   competitions) stretched and diluted the glow while short pages kept it
   tight — every page length looked subtly different, in both themes. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--canvas);
  pointer-events: none;
}

/* The .bg-orb decorations are position: fixed, so body's overflow-x never
   clipped them: on a phone the right-hand orb sat ~100px past the viewport
   and every page scrolled sideways. Clipping at the document element is what
   contains a fixed child. */
html {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.55;
}

.bg-orb {
  position: fixed;
  filter: blur(90px);
  opacity: var(--orb-opacity);
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
}

.bg-orb-a {
  width: 440px;
  height: 440px;
  background: var(--orb-a);
  top: -140px;
  left: -140px;
}

.bg-orb-b {
  width: 380px;
  height: 380px;
  background: var(--orb-b);
  bottom: -120px;
  right: -100px;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: calc(100% - 2rem);
}

/* ── header / nav ─────────────────────────────────────────────────────── */

.site-header {
  padding: 26px 0 8px;
  text-align: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

/* The crest sits in a filled circle, like a profile picture, so a shield, a
   roundel or a wordmark all read the same; the fill is the organisation's
   choice (white by default). */
.brand-lockup img,
.footer-brand img,
.district-hero-crest {
  border-radius: 50%;
  background: var(--crest-bg, #ffffff);
  object-fit: contain;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), var(--crest-shadow);
  filter: none;
}

/* Fixed insets per size: a percentage padding on an img resolves against the
   parent's width, which swallowed the small footer crest entirely. */
.brand-lockup img {
  width: 96px;
  height: 96px;
  padding: 8px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  padding: 4px;
}

.district-hero-crest {
  padding: 6px;
}

.brand-text {
  text-align: left;
}

.brand-text strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-text span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--hover);
}

/* Appearance cog — pinned to the top right of the content column.
   .site-header carries .shell, which is already position: relative. */
.appearance {
  position: absolute;
  top: 22px;
  right: 0;
  z-index: 3;
  text-align: left;
  /* Sign in (or the person's initial) sits beside the sun/moon toggle. */
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── account: sign in, the signed-in menu, the dialogs ───────────────── */
.nav-account {
  display: none;
}

.account {
  position: relative;
}

.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.account-button:hover,
.account-button[aria-expanded='true'] {
  background: var(--hover-strong);
}

/* Signed in: a round initial, the way a profile picture would sit. */
.account-button.is-signed-in {
  width: 38px;
  padding: 0;
  font-size: 0.95rem;
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.account-panel {
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 15rem;
  max-width: min(20rem, calc(100vw - 2rem));
  padding: 10px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  z-index: 7;
}

.account-panel[hidden] {
  display: none;
}

.account-who {
  padding: 6px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.account-who strong {
  display: block;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.account-who span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.account-panel a,
.account-panel button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  cursor: pointer;
  display: block;
  width: 100%;
}

.account-panel a:hover,
.account-panel button:hover {
  background: var(--hover-strong);
}

.account-panel .account-note {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 6px 10px;
  margin: 0;
}

/* The sign-in and ask-to-join dialogs: the form card, centred. */
.portal-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
}

.portal-dialog::backdrop {
  background: rgba(5, 10, 20, 0.55);
  backdrop-filter: blur(4px);
}

.portal-dialog .form-card {
  max-width: none;
  margin: 0;
  background: var(--panel-solid);
}

.portal-dialog h2 {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.portal-dialog .dialog-lead {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.portal-dialog .dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* The sign-in page: the house two-card shape (docs/house-sign-in-page.md),
   side by side on a wide screen, stacked on a phone. */
.sign-in-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

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

.sign-in-card {
  max-width: none;
  margin: 0;
}

.sign-in-card--other {
  display: grid;
  gap: 14px;
}

.sign-in-card h2 {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.sign-in-card .dialog-lead {
  margin: 0 0 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.sign-in-card .dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.sign-in-card input[name='code'] {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
}

/* "Continue with Google": a dark neutral button carrying Google's own
   four-colour G, as their sign-in branding asks - it reads as "sign in with
   them", not as ours. Same look in both modes. */
.sign-in-card .btn-google {
  width: 100%;
  color: #ffffff;
  background: #0b100d;
  border-color: #2c3531;
}

.sign-in-card .btn-google:hover {
  background: #141b17;
}

.sign-in-card .brand-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sign-in-card .or-divider {
  position: relative;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sign-in-card .or-divider::before,
.sign-in-card .or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--line);
}

.sign-in-card .or-divider::before {
  left: 0;
}

.sign-in-card .or-divider::after {
  right: 0;
}

.portal-dialog input[name='code'] {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
}

/* Members-only page: the calls to action in place of the body. */
.members-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* Squad and contact on a team card, for members. */
.card .squad-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card .squad-list li {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hover);
  border: 1px solid var(--line);
}

.card .manager-contact {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.card .manager-contact a {
  color: var(--text);
}

.appearance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.appearance-button:hover,
.appearance-button[aria-expanded='true'] {
  color: var(--text);
  background: var(--hover-strong);
  border-color: rgba(230, 57, 70, 0.5);
}

.appearance-panel {
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 12.5rem;
  padding: 8px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
}

.appearance-panel[hidden] {
  display: none;
}

.appearance-heading {
  margin: 4px 8px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.appearance-panel button {
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.appearance-panel button:hover {
  background: var(--hover-strong);
}

/* A second group in the cog menu: a rule separates it from the theme
   choices so the panel does not read as one list of five equal things. */
.appearance-heading-split {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.appearance-link {
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 9px;
  padding: 9px 10px;
  display: block;
}

.appearance-link:hover {
  background: var(--hover-strong);
}

/* Tick the active choice without needing an icon font. */
.appearance-panel button.is-selected::after {
  content: '✓';
  color: var(--accent-soft);
  font-weight: 700;
}

.site-nav a.active {
  color: var(--text);
  background: rgba(230, 57, 70, 0.16);
  border-color: rgba(230, 57, 70, 0.5);
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 30px 0 8px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
}

.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 auto;
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  /* The forms are grids, which stretches a submit button to full width. Without
     this its label sits at the flex start rather than centred — and text-align
     cannot centre a flex container's items. */
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #b3222f 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 16px 38px rgba(230, 57, 70, 0.42);
}

.btn-ghost {
  background: var(--hover);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--hover-strong);
}

/* .card .btn paints button text white for the primary buttons in cards; a
   ghost button in a card is white-on-white in light mode without this. */
.card .btn.btn-ghost {
  color: var(--text);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

/* ── sections & cards ─────────────────────────────────────────────────── */

section {
  margin: 46px 0;
}

.section-head {
  margin-bottom: 16px;
}

h2 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.015em;
  font-weight: 800;
}

/* Free-text blocks written in the admin app (district about / support-us
   pitch): preserve the author's paragraph breaks. */
.section-copy {
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 46rem;
  white-space: pre-line;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
  /* A column, so the action row can sit at the bottom (grid items already
     stretch to the row height) and a row of cards shares one baseline. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* A pill is inline-block; as a flex item it would stretch to the card's
   width, so it keeps its own. */
.card > .pill {
  align-self: flex-start;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 57, 70, 0.4);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.card .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Stacked action rows — "N member schools", "Express interest", "Fixtures &
   results" — otherwise butt together and read as one block of text rather
   than separate things to click. */
.card .meta + .meta {
  margin-top: 7px;
}

/* Every link in page content that isn't a button. Without this a new inline
   link falls through to the browser's default blue/purple, which on the dark
   canvas is close to invisible — buttons opt out via :not(.btn), and the more
   specific rules below still win where they apply. */
main a:not(.btn) {
  color: var(--accent-soft);
  font-weight: 650;
  text-decoration: none;
}

main a:not(.btn):hover {
  text-decoration: underline;
}

.card .meta a:not(.btn) {
  color: var(--accent-soft);
  font-weight: 650;
  text-decoration: none;
}

.card .meta a:not(.btn):hover {
  text-decoration: underline;
}

.district-crest {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--crest-plate);
  padding: 3px;
}

/* The crest is positioned out of flow, so the heading has to be told to keep
   clear of it — otherwise a long district name runs underneath the badge.
   Scoped with :has() so cards without a crest still use the full width. */
.card:has(.district-crest) h3,
.card:has(.district-crest) .meta {
  padding-right: 56px;
}

.pill {
  display: inline-block;
  background: rgba(53, 201, 119, 0.16);
  border: 1px solid rgba(53, 201, 119, 0.42);
  /* Theme-aware: the old hardcoded pale mint was unreadable in light mode. */
  color: var(--green);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pill-gold {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border-color: color-mix(in srgb, var(--gold) 50%, transparent);
  /* --gold is the organisation's accent, which can be a pale amber: in light
     mode the pill text is that colour darkened so it reads on a white card. */
  color: var(--gold-ink, var(--gold));
}

.empty {
  color: var(--muted);
  grid-column: 1 / -1;
  margin: 0;
}

/* ── school search ────────────────────────────────────────────────────── */

.search-wrap {
  position: relative;
  max-width: 38rem;
}

.school-search {
  width: 100%;
  font: inherit;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
}

.school-search::placeholder {
  color: #74869a;
}

.school-search:focus {
  outline: none;
  border-color: rgba(230, 57, 70, 0.6);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.14);
}

#school-results {
  max-width: 38rem;
}

.school-result {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  margin-top: 9px;
  backdrop-filter: blur(8px);
}

.school-result-name {
  font-weight: 750;
}

.school-result a {
  color: var(--accent-soft);
  font-weight: 650;
  text-decoration: none;
}

.school-result a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.88rem;
}

/* ── forms ────────────────────────────────────────────────────────────── */

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  max-width: 38rem;
  /* The shell is 1100px wide but the card is capped at 38rem, so without this
     it hugs the left edge while the hero above it is centred. */
  margin-inline: auto;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
  font-size: 0.9rem;
}

input,
select,
textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(230, 57, 70, 0.6);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.14);
}

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

/* Volunteer form: "how would you like to help" checkboxes. */
.checkbox-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 14px;
  margin: 0;
  display: grid;
  gap: 8px;
}

.checkbox-group legend {
  padding: 0 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  cursor: pointer;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
  cursor: pointer;
}

.checkbox-row.standalone {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.form-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.form-note a {
  color: var(--accent-soft);
}

.form-result {
  font-weight: 700;
  margin: 0;
}

.form-result.ok {
  color: #8ff0b6;
}

.form-result.error {
  color: var(--accent-soft);
}

/* ── footer ───────────────────────────────────────────────────────────── */

.site-footer {
  /* `auto` on the inline axis is load-bearing: .site-footer also carries
     .shell, and this shorthand comes later in the file — a plain 0 here
     overrides .shell's `margin: 0 auto` and the footer drifts to the far
     left while the rest of the page stays centred. */
  margin: 64px auto 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

/* Columns first, then a quiet legal bar — rather than four unrelated groups
   competing on one line. */
.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px 32px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  flex: none;
}

.footer-brand strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.3;
}

.footer-brand span {
  display: block;
  margin-top: 3px;
  font-size: 0.82rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h2 {
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-col p {
  margin: 0;
  font-size: 0.82rem;
}

.footer-social .social-links {
  margin-top: 4px;
}

/* Footer links: quiet by default, underline only on hover. Without this the
   new column markup falls through to the browser's underlined default. */
.footer-col a,
.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
}

.footer-col a:hover,
.footer-legal a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Social beside the appearance cog. Mirrors it on the opposite side so the
   header stays balanced, and only where there is room — on a phone the cog
   already claims the corner and the footer set covers it. */
/* Both selectors carry .social-links, whose `display: flex` is declared
   later in this file — so these must out-specify it rather than rely on
   order, or the header set renders on a phone and collides with the crest. */
.social-links.header-social {
  position: absolute;
  top: 22px;
  left: 0;
  z-index: 3;
  display: none;
  gap: 8px;
}

@media (min-width: 700px) {
  .social-links.header-social {
    display: flex;
  }
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

/* Company identification, under the footer bar. Legally required on a
   trading website, and quieter than the bar above it. */
.footer-entity {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.85;
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-powered {
  opacity: 0.75;
}

/* RKC Consultancy's logo as the maker's mark beside "Powered by", one file per
   theme. Dark is the default; light follows the same rules as the palette:
   the visitor's choice, else their system when they have not chosen. Copies
   of rkc-website/brand/, where the logo is built. */
.footer-credit {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}

.footer-maker {
  display: inline-flex;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.footer-maker:hover {
  opacity: 1;
}

.maker-logo {
  display: block;
  height: 38px;
  width: auto;
}

.maker-logo-light {
  display: none;
}

:root[data-theme='light'] .maker-logo-dark {
  display: none;
}

:root[data-theme='light'] .maker-logo-light {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .maker-logo-dark {
    display: none;
  }

  :root:not([data-theme]) .maker-logo-light {
    display: block;
  }
}

@media (max-width: 560px) {
  .footer-bar {
    justify-content: center;
    text-align: center;
  }
}

.site-footer a {
  color: var(--muted);
}

/* Outbound links to the main SSFA site — About, Contact, Volunteering and
   Sponsorship live there, and duplicating them here would create a second
   copy to keep in step. */
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  color: var(--text);
  border-bottom-color: var(--line);
}

@media (max-width: 560px) {
  .site-header {
    /* Symmetric, so the crest stays centred while clearing the pinned
       toggle in the top right. */
    padding-left: 46px;
    padding-right: 46px;
  }

  .brand-lockup img {
    width: 64px;
    height: 64px;
    padding: 5px;
  }

  .brand-lockup {
    gap: 10px;
  }

  /* On a 390px phone the crest, the padding that clears the settings cog and
     a 1.35rem name left too little room, so "Surrey Schools FA" broke across
     two lines. Scale the name with the viewport instead of wrapping it. */
  .brand-text strong {
    font-size: clamp(0.95rem, 4.6vw, 1.35rem);
    white-space: nowrap;
  }

  /* Five nav items wrapped onto THREE rows on an iPhone, so the header alone
     was 270px of a 664px viewport and pushed every page's content below the
     fold. Scrolling the row fixed the height but sliced the last item at the
     screen edge, which reads as broken rather than swipeable. So: compact
     metrics and short labels instead, sized to fit one row on a 390px phone
     and to WRAP — never clip — on anything narrower. */
  .site-header {
    padding-top: 16px;
  }

  .site-nav {
    gap: 2px;
    margin: 12px -40px 4px;
    padding: 0 8px;
  }

  .site-nav a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  section {
    margin: 34px 0;
  }
}

/* ── policy pages (privacy, terms) ────────────────────────────────────── */

.policy {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px 30px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  max-width: 48rem;
  margin-inline: auto;
}

.policy-meta {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.86rem;
}

.policy h2 {
  margin: 26px 0 8px;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.005em;
}

.policy h2:first-of-type {
  margin-top: 0;
}

.policy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.97rem;
}

.policy a {
  color: var(--accent-soft);
}

.county-line {
  margin-top: 4px;
  font-size: 0.9rem;
}

/* District page: member-school list */

.school-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

/* The district's own crest sits to the left of its page heading, on the same
   plate treatment as the site crest so light-on-dark badges stay legible.
   NOT .district-crest — that class is taken by the absolutely-positioned
   badge on district cards, and merging with it flung this into the corner. */
.district-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.district-title-row h1 {
  margin: 0;
}

.district-hero-crest {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* District support section: the CTA sits with the copy (hero-actions would
   centre it), and the social row pairs a label with the round icon buttons. */
.support-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 0;
}

.district-social {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Roll of honour: category groups, packed into columns on wider screens so a
   long history reads at a glance instead of as one tall list. */
.honours-category {
  margin: 20px 0 2px;
  font-size: 1.08rem;
  font-weight: 800;
}

.result-columns {
  column-count: 1;
  column-gap: 10px;
  margin-top: 6px;
}

@media (min-width: 700px) {
  .result-columns {
    column-count: 2;
  }
}

@media (min-width: 1000px) {
  .result-columns {
    column-count: 3;
  }
}

.result-columns .school-result {
  break-inside: avoid;
  margin-top: 0;
  margin-bottom: 9px;
}

/* Advertised volunteer roles */

.open-roles {
  margin: 4px 0 2px;
}

.open-roles .checkbox-row span {
  line-height: 1.35;
}

.role-cta {
  margin-top: 12px;
}

/* Volunteer page: form beside a board of open roles */

.volunteer-layout {
  display: grid;
  gap: 22px;
}

@media (min-width: 900px) {
  /* Only split into two columns when there are roles to show. With nothing
     advertised the board is hidden, and shifting the form off-centre for an
     empty column just looks broken. */
  .volunteer-layout:has(.role-board:not([hidden])) {
    grid-template-columns: minmax(0, 38rem) minmax(0, 1fr);
    align-items: start;
  }

  .volunteer-layout:has(.role-board:not([hidden])) .form-card {
    margin-inline: 0;
  }
}

.role-board h2 {
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.role-board .muted {
  margin: 0 0 12px;
}

#role-board-list {
  display: grid;
  gap: 10px;
}

.role-tile {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  color: inherit;
  font: inherit;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.role-tile:hover,
.role-tile:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.role-tile-role {
  font-weight: 700;
}

.role-tile-area,
.role-tile-detail {
  font-size: 0.86rem;
  color: var(--muted);
}

/* On a phone the roles come first — discovery before form-filling. */
.role-board {
  order: -1;
}

@media (min-width: 900px) {
  .role-board {
    order: 0;
  }
}

.role-board-note {
  margin-top: 12px;
  font-size: 0.88rem;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}


/* The invite card sits inside a column; slightly quieter than a team card so
   the real sides stay the focus. */
.county-cta {
  border-style: dashed;
}

/* Provision mismatch on the interest form: informative, not alarming. */
.provision-note {
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}

/* Handoff to a district's own application form */

.external-handoff {
  display: grid;
  gap: 12px;
  justify-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 4px 0 6px;
}

.external-handoff p {
  margin: 0;
}

.external-handoff .form-note {
  margin: 0;
}

/* Social channels — news lives on Instagram/X, the site points to it. */

.social-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--hover);
  border: 1px solid var(--line);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.social-links a:hover {
  color: var(--text);
  background: var(--hover-strong);
  border-color: var(--accent);
}

/* A card's title is where people click, but it should still read as a
   heading — so it keeps the heading's colour throughout and signals it is
   clickable with an underline on hover rather than a colour change. */
/* `main a.card-title-link` out-specifies `main a:not(.btn)`, which otherwise
   paints every content link accent red — including headings that happen to be
   links (card titles, the county section heading). The class marks "this is a
   title, keep the text colour" wherever it appears, card or not. */
main a.card-title-link {
  color: inherit;
  text-decoration: none;
}

main a.card-title-link:hover {
  color: inherit;
  text-decoration: underline;
}

/* Guide page: numbered steps, notes and tables inside the policy card. */

.policy ol.steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
  margin: 12px 0 16px;
}

.policy ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 10px;
}

.policy ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.policy .guide-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--hover);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 14px 0 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

.policy .guide-note strong {
  color: var(--text);
}

.policy .guide-result {
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
}

.policy table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0 18px;
}

.policy th,
.policy td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.92rem;
}

.policy th {
  background: var(--hover);
  color: var(--text);
}

/* At-a-glance pill row on the roll of honour. */
.stat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Secondary line under a hero paragraph: detail that matters (eligibility
   boroughs) without the weight of body copy pushing content below the fold. */
/* .hero .hero-note, not bare .hero-note: it has to out-specify the
   `.hero p { margin: 0 auto }` reset or the gap never applies. */
.hero .hero-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 16px auto 0;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  /* clamp()'s 2rem floor was sized for the one-line home hero; a two-line
     title ("Surrey County representative football") plus the two-row nav
     pushed the first section fractionally under the iPhone fold. */
  .hero h1 {
    font-size: 1.7rem;
  }
}

/* The constitution is long; a closed-by-default disclosure keeps the About
   page scannable while the full text stays one tap away. */
.constitution-rules summary {
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
}

.constitution-rules[open] summary {
  margin-bottom: 10px;
}

.constitution-rules h3 {
  margin: 18px 0 6px;
  font-size: 1rem;
}

/* Sponsor showcase. Logos sit on a light plate so dark-ink logos survive
   the dark theme; name-only supporters render as text chips. */
.sponsor-card {
  text-align: center;
}

 /* Sponsor cards: the logo as a tile, name centred under it; three across at
   most. */
.sponsor-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  max-width: 100%;
}

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

.sponsor-card {
  text-align: center;
}

.sponsor-card h3 {
  margin-top: 4px;
}

.sponsor-logo {
  display: block;
  margin: 0 auto 14px;
  width: 100%;
  max-width: 280px;
  max-height: 150px;
  object-fit: contain;
  border-radius: 12px;
}

a.sponsor-card-link,
a.sponsor-card-link h3 {
  display: block;
  color: var(--text);
  text-decoration: none;
}

/* The whole card is the link, so none of the copy inside reads as one. */
a.sponsor-card-link .meta {
  color: var(--muted);
  text-decoration: none;
}

a.sponsor-card-link:hover h3 {
  text-decoration: underline;
}

/* Signup school picker: directory suggestions under the name field. */
.signup-suggestions {
  display: grid;
  gap: 0;
  margin-top: -6px;
}

.signup-suggestion {
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  width: 100%;
}

.signup-suggestion:hover {
  background: var(--hover-strong);
}

.signup-pick-note {
  margin-top: -4px;
}

/* Buttons inside cards: the page-level .btn is sized for heroes, so in a
   ~250px card its label wrapped into a bloated two-line pill and the meta
   colour muddied the text. Compact, single-line, and explicitly white. */
.card .btn {
  padding: 9px 18px;
  font-size: 0.9rem;
  white-space: nowrap;
  color: #fff;
  margin-top: 2px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SportsClubHub365: the organisation's branding over the design system above.
   portal.js sets the brand, accent and backdrop custom properties from the
   profile; everything that was the crest red or SSFA gold now follows them.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --brand-light: #1d4ed8;
  --accent-light: #f59e0b;
  --brand-dark: #60a5fa;
  --accent-dark: #fbbf24;
  --bd-from: #1d4ed8;
  --bd-to: #f59e0b;
  --bd-strength: 0.35;
  --bd-angle: 135deg;
  --accent: var(--brand-dark);
  --accent-soft: var(--brand-dark);
  --gold: var(--accent-dark);
  --orb-a: var(--bd-from);
  --orb-b: var(--bd-to);
  --orb-opacity: calc(var(--bd-strength) * 0.7);
}

:root[data-theme='light'] {
  --accent: var(--brand-light);
  --accent-soft: var(--brand-light);
  --gold: var(--accent-light);
  --gold-ink: color-mix(in srgb, var(--gold) 55%, #1f2937);
  --orb-a: var(--bd-from);
  --orb-b: var(--bd-to);
  --orb-opacity: var(--bd-strength);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --accent: var(--brand-light);
    --accent-soft: var(--brand-light);
    --gold: var(--accent-light);
    --gold-ink: color-mix(in srgb, var(--gold) 55%, #1f2937);
    --orb-a: var(--bd-from);
    --orb-b: var(--bd-to);
    --orb-opacity: var(--bd-strength);
  }
}

/* Backdrop styles. 'orbs' is the design system's own pair of blurred discs;
   'gradient' and 'band' paint the canvas instead; 'none' hides the lot. */
body.backdrop-none .bg-orb,
body.backdrop-gradient .bg-orb,
body.backdrop-band .bg-orb {
  display: none;
}

body.backdrop-gradient::before {
  background:
    linear-gradient(
      var(--bd-angle),
      color-mix(in srgb, var(--bd-from) calc(var(--orb-opacity) * 100%), transparent),
      color-mix(in srgb, var(--bd-to) calc(var(--orb-opacity) * 100%), transparent)
    ),
    var(--canvas);
}

body.backdrop-band::before {
  background:
    linear-gradient(
      var(--bd-angle),
      color-mix(in srgb, var(--bd-from) calc(var(--orb-opacity) * 100%), transparent) 0 38%,
      transparent 38% 62%,
      color-mix(in srgb, var(--bd-to) calc(var(--orb-opacity) * 100%), transparent) 62%
    ),
    var(--canvas);
}

/* Everything that hard-coded the crest red. */
.site-nav a.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 72%, black) 100%);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-primary:hover {
  box-shadow: 0 16px 38px color-mix(in srgb, var(--accent) 42%, transparent);
}

.card:hover,
.role-tile:hover,
.role-tile:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

input:focus,
select:focus,
textarea:focus,
.school-search:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.appearance-button:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.pill-brand {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-soft);
}

/* Portal pieces the SSFA pages did not have. */
.hero .district-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .district-title-row h1 {
  margin: 0;
}

.hero .hero-sub {
  margin-top: 10px;
}

.section-copy {
  color: var(--muted);
  max-width: 60rem;
}

.section-copy p {
  margin: 0 0 12px;
}

.card .card-crest {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--crest-plate);
  padding: 4px;
  margin-bottom: 10px;
}

.card .card-actions {
  /* Pushed to the bottom of the card; the padding keeps the 12px gap above
     it when the content already fills the card. */
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card .card-actions .btn {
  padding: 8px 14px;
  font-size: 0.86rem;
}

.card details {
  margin-top: 8px;
}

.card summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--accent-soft);
}

.plain {
  margin: 8px 0 0;
  padding-left: 18px;
  columns: 2;
}

.news-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.facebook-feed {
  width: 100%;
  max-width: 500px;
  height: 130px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 12px;
}

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 14px;
  max-width: 600px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

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

.form-status {
  min-height: 1.4em;
  margin: 0;
  font-weight: 700;
}

.find-us {
  display: grid;
  gap: 10px;
}

.find-us .address {
  margin: 0;
}

.directory-link {
  color: inherit;
  text-decoration: none;
}

.footer-powered a {
  color: inherit;
}

@media (max-width: 640px) {
  .plain {
    columns: 1;
  }

}

/* ── hero banner (home page) ──────────────────────────────────────────── */
/* The cover: contained to the shell, rounded like a card, carrying only the
   photo or artwork. The crest circle overlaps its bottom edge and the name
   sits beside the crest underneath (the social-profile layout). */
.hero-banner {
  position: relative;
  width: 100%;
  margin: 10px 0 6px;
  min-height: clamp(200px, 30vh, 360px);
  display: block;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: linear-gradient(var(--bd-angle, 135deg), var(--bd-from), var(--bd-to));
}

.hero-banner .hero-art-wrap,
.hero-banner .hero-photo,
.hero-banner .hero-shade {
  position: absolute;
  inset: 0;
}

.hero-banner .hero-art-wrap {
  z-index: 0;
}

.hero-banner .hero-art-wrap svg {
  width: 100%;
  height: 100%;
  opacity: 0.32;
}

.hero-banner .hero-photo {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner .hero-shade {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, calc(var(--hero-tint, 0.55) * 0.08)) 0%, rgba(0, 0, 0, calc(var(--hero-tint, 0.55) * 0.5)) 100%);
}


/* ── identity row: crest overlapping the cover, name beside it ───────── */
.identity-row {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 0 28px;
  margin-top: -58px;
  position: relative;
  z-index: 2;
}

.identity-row--no-crest {
  margin-top: 14px;
}

.identity-crest {
  flex: none;
  width: 168px;
  height: 168px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--crest-bg, #ffffff);
  padding: 12px;
  box-sizing: border-box;
  border: 5px solid var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.identity-text {
  flex: 1 1 auto;
  min-width: 0;
  /* Starts just under the cover's bottom edge: the crest overlaps the cover,
     the name never does. */
  padding: 68px 0 14px;
  text-align: left;
}

.identity-text h1 {
  margin: 0 0 6px;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
}

.identity-text h1 .accent {
  background: linear-gradient(120deg, var(--accent-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.identity-text .hero-sub {
  margin: 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.identity-text .hero-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

/* The three calls to action under the banner at 44px, not the generic
   .btn's ~52px; .btn is inline-flex with centred items so the label holds. */
.identity-text .hero-actions .btn {
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.home-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.identity-text .county-line {
  margin: 12px 0 0;
}

@media (max-width: 640px) {
  .hero-banner {
    min-height: 170px;
    border-radius: 12px;
  }

  /* On a phone the crest overlaps the cover centrally and the name sits
     under it, as the profile layout does on a phone. */
  .identity-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    margin-top: -56px;
  }

  .identity-row--no-crest {
    margin-top: 12px;
  }

  .identity-crest {
    width: 120px;
    height: 120px;
    padding: 8px;
    border-width: 4px;
  }

  .identity-text {
    text-align: center;
    padding: 0 0 4px;
  }

  .home-actions {
    justify-content: center;
  }

  .identity-text .hero-sub {
    margin: 0 auto;
  }

  .identity-text .hero-actions {
    justify-content: center;
  }
}

/* While the home page shows the cover, the header is nav only: the crest
   and the name live in the identity row under the cover. */
body.has-hero-banner .brand-lockup {
  display: none;
}

body.has-hero-banner .site-header {
  padding-bottom: 2px;
}

/* With the cover showing, the nav shares the header's first row with the
   social icons (left) and Sign in + the theme toggle (right); keep it clear
   of both so the last item never sits under the Sign in pill. */
@media (min-width: 701px) {
  body.has-hero-banner .site-header .site-nav {
    padding: 0 130px 0 80px;
  }
}

body.has-hero-banner .hero-banner {
  margin-top: 4px;
}

/* ── roll of honour: compact cards packed into columns ───────────────── */
.honours-group + .honours-group {
  margin-top: 18px;
}

.honours-category {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
}

.honour-columns {
  column-count: 1;
  column-gap: 10px;
  margin-top: 6px;
}

@media (min-width: 700px) {
  .honour-columns {
    column-count: 2;
  }
}

@media (min-width: 1000px) {
  .honour-columns {
    column-count: 3;
  }
}

.honour-card {
  break-inside: avoid;
  margin: 0 0 9px;
  padding: 13px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.honour-title {
  font-weight: 750;
}

.honour-card .meta {
  margin: 2px 0 0;
}

/* ── phone menu: burger top-left, nav as a dropdown ──────────────────── */
.nav-toggle {
  display: none;
}

@media (max-width: 700px) {
  .nav-toggle {
    position: absolute;
    top: 22px;
    left: 0;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
  }

  .nav-toggle:hover,
  .nav-toggle[aria-expanded='true'] {
    color: var(--text);
    background: var(--hover);
  }

  /* The social icons live in the footer on a phone; the burger takes their spot. */
  .header-social {
    display: none;
  }

  /* No room beside the crest and name for a Sign in pill: the account
     entries close the burger menu instead (see .nav-account). */
  .account {
    display: none;
  }

  .site-header .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 5;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
  }

  body.nav-open .site-header .site-nav {
    display: flex;
  }

  .site-header .site-nav a {
    padding: 11px 14px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .site-header .site-nav .nav-account {
    display: grid;
    gap: 2px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .site-header .site-nav .nav-account a,
  .site-header .site-nav .nav-account button {
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--text);
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    cursor: pointer;
    display: block;
    width: 100%;
  }

  .site-header .site-nav .nav-account a:hover,
  .site-header .site-nav .nav-account button:hover {
    background: var(--hover-strong);
  }

  .site-header .site-nav .nav-account .account-who {
    padding: 6px 14px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
  }

  .site-header .site-nav .nav-account .account-note {
    font-size: 0.86rem;
    color: var(--muted);
    padding: 6px 14px;
    margin: 0;
  }

  /* Without the nav row the header is just the lockup, or nothing at all
     above a cover (the lockup hides then too), so it keeps a fixed band for
     the burger and the appearance toggle and sits above the page content so
     neither they nor the open menu end up under the cover. */
  .site-header {
    min-height: 78px;
    padding-bottom: 6px;
    z-index: 10;
  }

  /* On a phone the cover runs edge to edge; the crest still overlaps it. */
  body.has-hero-banner .hero-banner {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-top: 0;
    border-radius: 0;
  }
}

/* ── folded copy: first paragraph, then Show more ────────────────────── */
.section-copy.is-folded > p:not(:first-child) {
  display: none;
}

.show-more {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent-soft);
  background: none;
  border: 0;
  padding: 4px 0;
  margin-top: 2px;
  cursor: pointer;
}

.show-more:hover {
  text-decoration: underline;
}

/* ── company certifications (house setup doc, section 12) ────────────── */
/* The BlockMark badge is sized by this class, never an inline style, so a
   strict style CSP would still hold. */
.ce-badge {
  flex: none;
  width: 132px;
  height: 132px;
  border: 0;
}

.ce-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ce-text {
  flex: 1 1 16rem;
  min-width: 0;
}

.ce-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 750;
}

.policy .ce-item p {
  margin-bottom: 6px;
}

.policy .ce-item p:last-child {
  margin-bottom: 0;
}

.ce-number {
  overflow-wrap: anywhere;
}

/* A heading that follows copy keeps its space (the first-of-type rule above
   zeroes it for a policy that opens with a heading). */
.policy p + h2 {
  margin-top: 26px;
}

.footer-entity a {
  color: inherit;
}

.footer-entity a:hover {
  color: var(--text);
}
