/* 2TR Cash Cup: GOV.UK Design System patterns, 2TR's own look ("2TR Matchday", design §6).
   The patterns (one question per page, error summary, labelled inputs, large targets) are
   GOV.UK's; the logo, colours, header, buttons and focus style are 2TR's, so the service never
   looks like a government one. System fonts only; no third-party fonts, images or scripts.
   Colour rule: brand red belongs to the page frame (the header and footer rules, "Cash Cup",
   the current-area bar). Inside <main>, red means only errors, destructive actions and
   red tags that flag something needing action, and green means go. Mobile first; 44px targets; a visible 3px focus ring; 4.5:1 text and 3:1 UI
   contrast; nothing by colour alone. The contrast table is in design §6. */

:root {
  color-scheme: light;
  /* Brand: 2TR Football's logo and website colours (2trfootball.com, 2026-11-20). Every brand
     value lives here; recheck the contrast table (design §6) if any changes. */
  --brand-red: #f20505;       /* frame rules only. 4.38:1 on white, 4.47 on ink: never text */
  --brand-red-dark: #a60303;  /* "Cash Cup", current-area bar. 7.97:1 */
  --brand-maroon: #590202;    /* header nav hover text. 14.64:1 */
  --ink: #0c0c0d;             /* logo, body text, focus ring. 19.55:1 */
  --go: #246b1c;              /* the logo's swoosh, darkened: buttons, checked controls. 6.57:1 */
  --go-dark: #1e5c17;         /* hover, links, confirmation panel. 8.08:1 */
  --go-pressed: #174a12;      /* :active. 10.37:1 */
  --go-tint: #e4f2e0;         /* secondary-button hover; --go on it 5.66:1 */
  --go-tint-pressed: #cbe6c4; /* --go on it 4.90:1 */
  --swoosh: #60ba4e;          /* the logo's own green: decorative only (2.43:1) */

  --text: #0c0c0d;
  --secondary-text: #5a5656;  /* 7.24:1 on white, 6.76 on light grey */
  --link: #1e5c17;            /* 8.08:1, always underlined */
  --link-visited: #5a2d82;    /* 9.85:1 */
  --link-hover: #113a0d;      /* 12.85:1 */
  --focus: #0c0c0d;
  --focus-halo: #ffffff;
  --focus-text: #0c0c0d;
  --error: #b8360a;           /* vermilion, not brand red. 5.88:1 white, 5.21 on tint, 5.49 light grey */
  --error-dark: #8f2a07;      /* destructive fill: white on it 8.39:1; 7.43 on tint */
  --error-hover: #6e2205;     /* 11.09:1 */
  --error-pressed: #4f1803;   /* 14.34:1 */
  --error-tint: #fdeee9;      /* ink on it 17.30:1 */
  --success: #1e5c17;
  --success-tint: #e6f3e2;    /* ink on it 17.02:1; --success on it 7.04 */
  --border: #d6d1d1;          /* decorative dividers only */
  --input-border: #5a5656;    /* every interactive boundary. 7.24:1 */
  --light-grey: #f7f7f7;      /* surface: consent box, secret code, dev note */
  --mid-grey: #8a8383;        /* conditional-reveal bar. 3.71:1 on white, 3.47 on light grey */
  --white: #ffffff;

  --button: var(--go);
  --button-hover: var(--go-dark);
  --button-pressed: var(--go-pressed);
  --secondary-button: #ffffff;
  --secondary-pressed: var(--go-tint-pressed);
  --warning-button: var(--error-dark);
  --warning-hover: var(--error-hover);
  --warning-pressed: var(--error-pressed);

  --footer-bg: var(--ink);
  --footer-text: #ffffff;
  --footer-meta: #c9c4c4;     /* 11.34:1 on ink */
  --disabled-bg: #e8e5e5;
  --disabled-text: #5a5656;   /* 5.78:1, plus a dashed border */
  --backdrop: rgba(12, 12, 13, .7);

  --radius: 8px;
  --radius-input: 4px;
  --radius-pill: 999px;
  --rule: 6px;
  --icon-size: 1.3em;

  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --space-6: 30px;
  --space-8: 40px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--white); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.1875rem; /* 19px */
  line-height: 1.32;
  color: var(--text);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 40.0525em) {
  body { font-size: 1rem; line-height: 1.25; }
}

/* ---------- Layout ---------- */

.width-container { max-width: 960px; margin: 0 15px; }
@media (min-width: 40.0625em) { .width-container { margin: 0 30px; } }
@media (min-width: 1020px) { .width-container { margin: 0 auto; } }

.main-wrapper { display: block; padding: var(--space-4) 0 var(--space-8); max-width: 40em; flex: 1 0 auto; }
body > .width-container { flex: 1 0 auto; }

/* ---------- Links: green, always underlined ---------- */

a { color: var(--link); text-decoration: underline; text-decoration-thickness: max(1px, .0625rem); text-underline-offset: .18em; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: max(3px, .1875rem); }
.link-button {
  font: inherit; color: var(--link); background: none; border: 0; padding: 10px 0; min-height: 44px;
  text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}
.link-button:hover { color: var(--link-hover); text-decoration-thickness: 3px; }

/* ---------- Focus: ink ring offset 2px, white halo filling the gap ---------- */
/* The ring always sits on the halo, so it keeps 19.55:1 whatever the element's fill. */

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-halo); }
a:focus-visible, .link-button:focus-visible, summary:focus-visible, .header__signout:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-halo);
  color: var(--focus-text); text-decoration-thickness: max(3px, .1875rem); border-radius: 2px;
}
[tabindex="-1"]:focus, .main-wrapper:focus { outline: none; box-shadow: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10; min-height: 44px;
  padding: var(--space-2) var(--space-3); background: var(--ink); color: var(--white); font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:visited { color: var(--white); }
.skip-link:focus { left: 0; }
.skip-link:focus-visible { color: var(--white); outline: 3px solid var(--white); outline-offset: -5px; box-shadow: none; }

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

/* ---------- Header: white, 2TR's logo, a brand-red rule ---------- */

.header { background: var(--white); color: var(--ink); border-bottom: var(--rule) solid var(--brand-red); }
.header__container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-1) var(--space-4); padding: var(--space-2) 0;
}
.header__brand {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0;
  color: var(--ink); text-decoration: none;
}
.header__brand:visited, .header__brand:hover { color: var(--ink); }
.header__brand:hover .header__service { text-decoration: underline; text-decoration-thickness: 3px; }
.header__brand:focus-visible { text-decoration: none; }
/* 2TR's "2R" mark: inline SVG with no fill or style attributes (CSP), painted here. */
.header__logo { display: block; flex: none; height: 48px; width: auto; aspect-ratio: 110 / 80; fill: currentColor; }
.header__service {
  display: inline-block; padding-left: 12px; border-left: 2px solid var(--border);
  font-weight: 800; font-size: 1.5rem; line-height: 1.1; color: var(--brand-red-dark);
}
.header__nav { flex: 1 1 auto; }
.header__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-4); justify-content: flex-end; }
.header__list a, .header__signout {
  display: inline-block; min-height: 44px; padding: 10px 0 8px; font: inherit; font-size: 1rem; font-weight: 700;
  color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.header__list a:visited { color: var(--ink); }
.header__list a:hover, .header__signout:hover {
  color: var(--brand-maroon); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .3em;
}
/* The area you are in: a dark-red bar under the link (a border, so it survives forced colours),
   plus aria-current for screen readers. The padding drops by the bar's width to keep 44px. */
.header__list a[aria-current] { padding-bottom: 4px; border-bottom: 4px solid var(--brand-red-dark); }
@media (max-width: 40.0525em) {
  .header__logo { height: 40px; }
  .header__service { font-size: 1.25rem; }
  .header__nav { flex-basis: 100%; }
  .header__list { justify-content: flex-start; }
}

/* ---------- Footer: ink band, brand-red rule, build version ---------- */

.footer {
  --focus: var(--footer-text); --focus-halo: var(--footer-bg); --focus-text: var(--footer-text);
  margin-top: auto; padding: var(--space-6) 0; font-size: 1rem;
  background: var(--footer-bg); color: var(--footer-text); border-top: var(--rule) solid var(--brand-red);
}
.footer a, .footer a:visited, .footer a:hover { color: var(--footer-text); }
.footer a:hover { text-decoration-thickness: 3px; }
.footer__list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.footer__list a { display: inline-block; min-height: 44px; padding: 10px 0; }
.footer__meta { margin: 0 0 var(--space-2); color: var(--footer-meta); }
/* The build identifier (design §6); a local-auth build also names itself as a development one. */
.footer__build { margin: 0; color: var(--footer-meta); font-family: var(--font-mono); font-size: .9375rem; overflow-wrap: anywhere; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 { margin-top: 0; font-weight: 700; }
.heading-l { font-size: 2.25rem; line-height: 1.11; margin-bottom: var(--space-6); }
.heading-m { font-size: 1.5rem; line-height: 1.25; margin: var(--space-6) 0 var(--space-3); }
.heading-s { font-size: 1.1875rem; margin: var(--space-4) 0 var(--space-2); }
@media (max-width: 40.0525em) {
  .heading-l { font-size: 1.75rem; margin-bottom: var(--space-4); }
  .heading-m { font-size: 1.3rem; margin-top: var(--space-4); }
}
.caption-l { display: block; color: var(--secondary-text); font-size: 1.5rem; margin-bottom: var(--space-1); }
@media (max-width: 40.0525em) { .caption-l { font-size: 1.125rem; } }
.body { margin: 0 0 var(--space-4); }
.body-l { font-size: 1.5rem; margin: 0 0 var(--space-6); }
.hint { color: var(--secondary-text); margin: 0 0 var(--space-3); }
.list { margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.list > li { margin-bottom: var(--space-1); }
.list--bullet { padding-left: var(--space-4); list-style: disc; }
.list--number { padding-left: var(--space-4); list-style: decimal; }
.mono, code { font-family: var(--font-mono); overflow-wrap: anywhere; }
.line { display: block; }
.secret-code code {
  font-size: 1.3rem; letter-spacing: .05em; background: var(--light-grey); padding: var(--space-1) var(--space-2);
  display: inline-block; border-radius: var(--radius);
}
/* TOTP QR code (pages/mfa.rs): black on white in any theme; the quiet zone is in the viewBox. */
.qr-code {
  display: block; width: 100%; max-width: 14rem; height: auto; margin: var(--space-3) 0 var(--space-4);
  background: #fff; fill: #000; shape-rendering: crispEdges;
}

/* ---------- Badges: one round "!" for every error and the destructive button ---------- */
/* The empty alternative text after "/" keeps screen readers from announcing the glyph: the
   words ("Error:", "There is a problem", the button label) already carry the meaning. */

.error-message::before, .error-summary__title::before, .error-panel::before, .button--warning::before {
  content: "!"; content: "!" / ""; display: inline-block; flex: none; width: var(--icon-size); height: var(--icon-size);
  border-radius: 50%; background: var(--error); color: #fff; font-weight: 800; line-height: var(--icon-size); text-align: center;
}

/* ---------- Form controls ---------- */

.form-group { margin-bottom: var(--space-6); }
.form-group--error { padding-left: var(--space-3); border-left: 5px solid var(--error); }
.fieldset { margin: 0 0 var(--space-4); padding: 0; border: 0; min-width: 0; }
.fieldset__legend { display: table; max-width: 100%; margin-bottom: var(--space-2); padding: 0; font-weight: 700; white-space: normal; }
.fieldset__legend--l { font-size: 2.25rem; line-height: 1.11; margin-bottom: var(--space-4); }
.fieldset__legend--l h1 { font-size: inherit; margin: 0; }
.fieldset__legend--m { font-size: 1.5rem; margin-bottom: var(--space-3); }
.label { display: block; font-weight: 700; margin-bottom: var(--space-1); }
.label--l { font-size: 2.25rem; line-height: 1.11; }
.label-wrapper { margin: 0; }
/* Keep the visually-hidden "Error:" prefix: red is never the only signal. */
.error-message { display: flex; gap: 8px; align-items: flex-start; color: var(--error); font-weight: 700; margin: 0 0 var(--space-3); }

.input, .textarea, .select {
  font: inherit; width: 100%; min-height: 44px; padding: 5px; color: var(--text); background: var(--white);
  border: 2px solid var(--input-border); border-radius: var(--radius-input); appearance: none;
}
.select { appearance: auto; width: auto; max-width: 100%; }
.textarea { min-height: 6em; resize: vertical; display: block; }
.input:focus, .textarea:focus, .select:focus {
  outline: 3px solid var(--focus); outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-halo), inset 0 0 0 1px var(--input-border);
}
.input--error { border-color: var(--error); } /* same 2px width: no layout shift */
.input--error:focus { border-color: var(--input-border); }
.input--width-2 { max-width: 5.4ex; }
.input--width-3 { max-width: 7.2ex; }
.input--width-4 { max-width: 9ex; }
.input--width-10 { max-width: 23ex; }
.input--width-20 { max-width: 41ex; }

.date-input { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.date-input__item { margin: 0; }
.date-input__label { font-weight: 400; }

.checkboxes__item, .radios__item {
  position: relative; display: block; min-height: 44px; margin-bottom: var(--space-2); padding-left: 44px; clear: left;
}
.checkboxes__input, .radios__input {
  position: absolute; z-index: 1; top: -2px; left: -2px; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer;
}
.checkboxes__label, .radios__label { display: inline-block; font-weight: 400; margin-bottom: 0; padding: 8px 15px 5px; cursor: pointer; touch-action: manipulation; }
.checkboxes__label::before, .radios__label::before {
  content: ""; box-sizing: border-box; position: absolute; top: 2px; left: 2px; width: 40px; height: 40px;
  border: 2px solid var(--input-border); background: var(--white);
}
.checkboxes__label::before { border-radius: var(--radius-input); }
.radios__label::before { border-radius: 50%; }
.checkboxes__label::after {
  content: ""; box-sizing: border-box; position: absolute; top: 13px; left: 10px; width: 23px; height: 12px;
  transform: rotate(-45deg); border: solid var(--white); border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent;
}
.radios__label::after {
  content: ""; position: absolute; top: 12px; left: 12px; width: 0; height: 0; border: 10px solid var(--go); border-radius: 50%; opacity: 0; background: var(--go);
}
.checkboxes__input:checked + .checkboxes__label::before { background: var(--go); border-color: var(--go); }
.checkboxes__input:checked + .checkboxes__label::after, .radios__input:checked + .radios__label::after { opacity: 1; }
.checkboxes__input:focus-visible + .checkboxes__label::before,
.radios__input:focus-visible + .radios__label::before {
  border-width: 3px; outline: 3px solid transparent; /* transparent outline = forced-colours fallback */
  box-shadow: 0 0 0 2px var(--focus-halo), 0 0 0 5px var(--focus);
}
.checkboxes__item .hint { padding-left: 15px; }
.checkboxes__item--small { margin: 0; }
.radios--inline .radios__item { display: inline-block; margin-right: var(--space-4); }

.conditional { margin-left: 18px; padding-left: 33px; border-left: 4px solid var(--mid-grey); margin-bottom: var(--space-4); }
.emergency-contact { border-top: 1px solid var(--border); padding-top: var(--space-4); }
.age-group-row { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); align-items: flex-end; }
.age-group-row .form-group { margin-bottom: var(--space-3); }

/* ---------- Buttons: green pill, no drop shadow ---------- */

.button {
  font: inherit; font-weight: 700; line-height: 1.2; display: inline-block; position: relative; min-height: 44px;
  margin: 0 0 var(--space-4); padding: 9px 22px 8px; border: 2px solid transparent; border-radius: var(--radius-pill);
  color: var(--white); background: var(--button); box-shadow: none;
  text-align: center; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.button:link, .button:visited, .button:hover, .button:active, .button:focus-visible { color: var(--white); text-decoration: none; }
.button:hover { background: var(--button-hover); }
.button:active { background: var(--button-pressed); top: 1px; }
.button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-halo); }
.button--secondary, .button--secondary:link, .button--secondary:visited, .button--secondary:hover,
.button--secondary:active, .button--secondary:focus-visible { color: var(--go); background: var(--secondary-button); border-color: var(--go); }
.button--secondary:hover { background: var(--go-tint); }
.button--secondary:active { background: var(--secondary-pressed); }
/* Destructive (Withdraw, staff actions): the only solid red, always behind Confirm beside Cancel.
   Its fill is close to the green in luminance (1.28:1; near identical to red-green colourblind
   users), so it never relies on colour: it is a rounded rectangle, not a pill, and leads with a
   white "!" badge. */
.button--warning, .button--warning:link, .button--warning:visited, .button--warning:hover,
.button--warning:active, .button--warning:focus-visible { color: var(--white); background: var(--warning-button); border-radius: var(--radius-input); }
.button--warning:hover { background: var(--warning-hover); }
.button--warning:active { background: var(--warning-pressed); }
.button--warning::before { margin-right: .4em; vertical-align: -.15em; background: #fff; color: var(--error-dark); }
.button[disabled], .button[disabled]:hover, .button[disabled]:active {
  color: var(--disabled-text); background: var(--disabled-bg); border: 2px dashed var(--disabled-text); cursor: not-allowed; top: 0;
}
.button--warning[disabled]::before { display: none; }
.button--small { font-size: 1rem; padding: 7px 16px 6px; margin-bottom: var(--space-2); }
.button--start { font-size: 1.5rem; padding: 12px 28px 10px; }
.button--start::after {
  content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .55em;
  border: solid currentcolor; border-width: 3px 3px 0 0; transform: rotate(45deg); vertical-align: .08em;
}
.button-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-3); }
.button-group--stack { flex-direction: column; align-items: stretch; }
.button-group--stack .button { margin-bottom: var(--space-3); }
@media (max-width: 40.0525em) { .button { width: 100%; } .button--small { width: auto; } }

.back-link {
  display: inline-block; position: relative; min-height: 44px; margin: var(--space-3) 0 var(--space-4); padding: 10px 0 10px 14px;
  font-size: 1rem; color: var(--text);
}
.back-link:visited { color: var(--text); }
.back-link::before {
  content: ""; position: absolute; top: 50%; left: 3px; width: 7px; height: 7px; margin-top: -4px;
  border: solid; border-width: 1px 1px 0 0; transform: rotate(225deg);
}

/* ---------- Messages: red only for errors, green for done, ink for everything else ---------- */

.error-summary {
  margin-bottom: var(--space-6); padding: var(--space-4); border: 5px solid var(--error); border-radius: var(--radius);
  background: var(--error-tint);
}
.error-summary:focus { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-halo); }
.error-summary__title { display: flex; gap: 10px; align-items: center; font-size: 1.5rem; margin-bottom: var(--space-3); }
.error-summary__list { margin: 0; }
.error-summary__list a, .error-summary__list a:visited { color: var(--text); font-weight: 700; }
.error-summary__list a:hover { color: var(--error-dark); }
.error-summary__list a:focus-visible { color: var(--text); }

/* Not flex: the message and any "Try again" button stack normally; the badge sits in the padding. */
.error-panel {
  position: relative; margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + var(--icon-size) + 10px);
  border: 5px solid var(--error); border-radius: var(--radius); background: var(--error-tint);
}
.error-panel::before { position: absolute; left: var(--space-4); top: var(--space-3); }
.error-panel > :last-child { margin-bottom: 0; }

.inset-text { margin: var(--space-4) 0 var(--space-6); padding: var(--space-3); border-left: 8px solid var(--swoosh); clear: both; }
.inset-text > :last-child { margin-bottom: 0; }
.warning-text { margin: var(--space-4) 0; padding: var(--space-3) 0 var(--space-3) 50px; position: relative; }
.warning-text::before {
  content: "!"; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 35px; height: 35px;
  border-radius: 50%; background: var(--ink); color: var(--white); font-weight: 700; font-size: 1.75rem; line-height: 35px; text-align: center;
}
.notification { margin: 0 0 var(--space-6); padding: var(--space-3) var(--space-4); border: 5px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.notification > :last-child { margin-bottom: 0; }
/* Like the error panel: content stacks normally; the tick sits in the left padding. */
.notification--success {
  position: relative; padding-left: calc(var(--space-4) + var(--icon-size) + 10px);
  border-color: var(--success); background: var(--success-tint);
}
.notification--success::before {
  content: "\2713"; content: "\2713" / ""; position: absolute; left: var(--space-4); top: var(--space-3);
  width: var(--icon-size); height: var(--icon-size);
  border-radius: 50%; background: var(--success); color: #fff; font-weight: 800; line-height: var(--icon-size); text-align: center;
}
.live-status:empty { display: none; }

.panel { margin-bottom: var(--space-4); padding: 35px; text-align: center; border: 5px solid transparent; border-radius: var(--radius); }
.panel--confirmation { color: var(--white); background: var(--success); border-bottom: 8px solid var(--swoosh); }
.panel__title { font-size: 2.25rem; margin: 0 0 var(--space-4); }
.panel__body { font-size: 1.5rem; }
.reference { display: inline-block; font-size: 2rem; letter-spacing: .05em; overflow-wrap: anywhere; }

/* ---------- Tags: pill with a 1px currentcolor border; the word carries the meaning ---------- */

.tag {
  display: inline-block; padding: 2px 12px 3px; border: 1px solid currentcolor; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1rem; line-height: 1.25; overflow-wrap: break-word;
}
.tag--grey, .tag--revoked, .tag--withdrawn { color: #2f2b2b; background: #ebe8e8; }
.tag--green, .tag--submitted { color: #14501a; background: #dcefd6; }
.tag--blue, .tag--invited { color: #0b3a63; background: #d7e6f4; }
.tag--turquoise, .tag--opened { color: #0a4541; background: #ccece8; }
.tag--orange, .tag--expired { color: #6b3000; background: #fde2c6; }
/* Red tags flag something that needs action or care ("No photos", MFA "Not set up"), never a
   plain state such as Withdrawn (design §6). */
.tag--red { color: #7a1610; background: #fad9d5; }
.tag--purple, .tag--checked-in { color: #4b1d68; background: #eadcf4; }

/* ---------- Video guides (/help/videos) ---------- */
.guide { margin-bottom: var(--space-6); }
/* The width and height attributes give the aspect ratio, so nothing jumps when posters load. */
.guide__video { display: block; width: 100%; height: auto; margin: 0 0 var(--space-2); background: var(--ink); }
.guide__video--phone { max-width: 22rem; }
.guide__steps { margin-bottom: 0; }

/* ---------- Summary list, details, tables, cards ---------- */

.summary-list { margin: 0 0 var(--space-6); }
.summary-list__row { border-bottom: 1px solid var(--border); padding: var(--space-2) 0; }
.summary-list__key { font-weight: 700; margin: 0 0 var(--space-1); }
.summary-list__value { margin: 0 0 var(--space-1); overflow-wrap: anywhere; }
.summary-list__actions { margin: 0; }
@media (min-width: 40.0625em) {
  .summary-list { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
  .summary-list__row { display: table-row; }
  .summary-list__key, .summary-list__value, .summary-list__actions { display: table-cell; padding: var(--space-2) var(--space-4) var(--space-2) 0; border-bottom: 1px solid var(--border); vertical-align: top; }
  .summary-list__key { width: 35%; }
  .summary-list__actions { width: 20%; text-align: right; padding-right: 0; }
}

.details { margin-bottom: var(--space-6); }
.details__summary { display: inline-block; position: relative; padding: 10px 0 10px 25px; color: var(--link); cursor: pointer; list-style: none; }
.details__summary::-webkit-details-marker { display: none; }
.details__summary::before {
  content: ""; position: absolute; top: 50%; left: 0; margin-top: -7px; border-style: solid; border-color: transparent;
  border-width: 7px 0 7px 12.124px; border-left-color: currentcolor;
}
.details[open] > .details__summary::before { border-width: 12.124px 7px 0; border-color: transparent; border-top-color: currentcolor; margin-top: -4px; }
.details__summary-text { text-decoration: underline; }
.details__text { padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border-left: 5px solid var(--border); }

.consent { margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); background: var(--light-grey); border-radius: var(--radius); }
.consent > :last-child { margin-bottom: 0; }
.share-preview { overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin-bottom: var(--space-6); }
.table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.table th, .table td { padding: var(--space-2) var(--space-4) var(--space-2) 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-weight: 700; }
.table .num { text-align: right; }
.table--small { font-size: 1rem; }
/* IDs in a table break only when a column has no room left, not letter by letter (audit list). */
.table .mono { overflow-wrap: break-word; }

.card-list { list-style: none; margin: var(--space-4) 0; padding: 0; }
.card {
  border: 1px solid var(--border); border-top: 6px solid var(--ink); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
}
.card .heading-m { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.player-list { list-style: none; margin: 0 0 var(--space-6); padding: 0; }
.player { border-bottom: 1px solid var(--border); padding: var(--space-3) 0; }
.player__main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-1); }
.player__name { font-weight: 700; font-size: 1.3rem; }
/* Health information to read: a thick ink bar down the side and a worded tag, not colour alone. */
.health--flag { border-left: 6px solid var(--ink); }
.health__tag { margin-bottom: var(--space-2); }
.flags .tag { margin-right: var(--space-1); }

/* ---------- Dialog ---------- */

.dialog {
  width: min(36em, calc(100vw - 30px)); max-height: calc(100vh - 30px); overflow: auto; padding: var(--space-4);
  border: 4px solid var(--ink); border-radius: var(--radius); color: var(--text); background: var(--white);
}
.dialog::backdrop { background: var(--backdrop); }
.dialog .heading-m { margin-top: 0; }

/* ---------- Signature pad ---------- */

.signature-pad { max-width: 600px; border: 2px solid var(--input-border); background: var(--white); }
.signature-pad canvas { display: block; width: 100%; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; background: var(--white); }
.signature-pad canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.signature-pad__actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin-top: var(--space-2); max-width: 600px; }

/* ---------- Loading, noscript ---------- */

.loading, .static-message { padding: var(--space-4) 15px; max-width: 40em; }
.static-message { margin: 0 auto; }

/* ---------- Motion and forced colours ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .button:active { top: 0; }
}
@media (forced-colors: active) {
  .header__logo { fill: CanvasText; }
  .error-message::before, .error-summary__title::before, .error-panel::before, .button--warning::before,
  .notification--success::before { forced-color-adjust: none; background: CanvasText; color: Canvas; }
  .button { border-color: ButtonText; }
  .tag { border-color: CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* ---------- Print: emergency sheets, rosters, medical summaries ---------- */

.print-only { display: none; }
@media print {
  .header, .footer, .no-print, .back-link, .skip-link, .button, .live-status, .details__summary { display: none !important; }
  .print-only { display: block; }
  body { font-size: 11pt; }
  .main-wrapper { max-width: none; padding: 0; }
  .card { break-inside: avoid; border-top-width: 1px; }
  .health--flag { border-left-width: 4px; }
  .roster-team { break-inside: avoid; }
  a { color: var(--text); text-decoration: none; }
  .tag { border: 1px solid var(--text); background: none; color: var(--text); }
}
