/* Layout: one centered column; scouting-card grid for athletes; sheets slide over for detail and editing. */
/* Anything marked hidden stays hidden, even where a class sets display (views, fields, notes). */
[hidden] { display: none !important; }
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #e9efeb;
  --ink: #0f1b2d;
  --muted: #566273;
  --line: #d6dfd9;
  --accent: #1d6b45;
  --accent-ink: #ffffff;
  --accent-soft: #dcece3;
  --chalk: #ffffff;
  --turf: #2f7d55;
  --turf-2: #297049;
  --ok: #1d6b45;
  --warn: #9a6400;
  --bad: #b3261e;
  --ok-soft: #dcece3;
  --warn-soft: #f6ead2;
  --bad-soft: #f7dedc;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1411; --surface: #141e19; --surface-2: #1b2821; --ink: #e6ede9; --muted: #98a69e;
    --line: #26352d; --accent: #57b886; --accent-ink: #08130d; --accent-soft: #1b3326;
    --chalk: #e6ede9; --turf: #1e4a33; --turf-2: #1a422d;
    --ok: #57b886; --warn: #e0a640; --bad: #f08b82; --ok-soft: #1b3326; --warn-soft: #33280f; --bad-soft: #3a1c1a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1411; --surface: #141e19; --surface-2: #1b2821; --ink: #e6ede9; --muted: #98a69e;
  --line: #26352d; --accent: #57b886; --accent-ink: #08130d; --accent-soft: #1b3326;
  --chalk: #e6ede9; --turf: #1e4a33; --turf-2: #1a422d;
  --ok: #57b886; --warn: #e0a640; --bad: #f08b82; --ok-soft: #1b3326; --warn-soft: #33280f; --bad-soft: #3a1c1a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; line-height: 1.05; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .85em; letter-spacing: .02em; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }

/* Prototype bar */
.proto-bar { background: var(--warn-soft); border-bottom: 1px solid var(--line); }
.proto-inner { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-block: 8px; }
.proto-note { font-size: .9rem; }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.seg-label { font-size: .8rem; color: var(--muted); margin-right: 4px; }
.seg button { border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; border-radius: 999px; font-size: .85rem; cursor: pointer; }
.seg .seg-reset { background: none; border-style: dashed; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-block: 12px; }
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .06em; }
.brand-arrow { color: var(--accent); font-weight: 700; }
.brand-sub { font-size: .8rem; color: var(--muted); margin-left: 8px; text-transform: uppercase; letter-spacing: .1em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; font-size: .95rem; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav .nav-cta { background: var(--accent); color: var(--accent-ink); }
/* Staff menu: on a wide screen the groups sit in one row of links; on a phone or small tablet they open from a Menu button. */
.nav-toggle, .nav-group-title { display: none; }
.nav-panel, .nav-group { display: contents; }
@media (max-width: 900px) {
  .staff-nav { flex: 1 1 auto; justify-content: flex-end; }
  .staff-nav .nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); background: var(--surface-2); }
  .staff-nav .nav-toggle::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
  .staff-nav.open .nav-toggle { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
  .staff-nav .nav-panel { display: none; }
  .staff-nav.open .nav-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px max(16px, env(safe-area-inset-left, 0px)) 18px; max-height: calc(100dvh - 120px); overflow-y: auto; }
  .staff-nav .nav-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .staff-nav .nav-group-title { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 0 10px 4px; }
  .staff-nav .nav-panel a, .staff-nav .nav-panel button { display: flex; align-items: center; min-height: 44px; text-align: left; font-size: 1rem; }
}

.main { padding-block: 32px 48px; display: flex; flex-direction: column; gap: 32px; }
.view { display: flex; flex-direction: column; gap: 24px; }
.view.narrow { max-width: 640px; }
.section-head { display: flex; flex-direction: column; gap: 6px; }
.row-between { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 16px; padding-block: 8px 0; max-width: 820px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Buttons */
.btn { border: 1px solid transparent; border-radius: 8px; padding: 10px 16px; font-weight: 600; cursor: pointer; line-height: 1.2; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger-ghost { background: none; color: var(--bad); border-color: var(--line); }
.btn[disabled] { opacity: .55; cursor: progress; }
.small-btn { padding: 6px 12px; font-size: .9rem; }
.icon-btn { border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }

/* Stats */
.teaser-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }

/* Athlete cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; box-shadow: var(--shadow); min-width: 0; }
.card:hover { border-color: var(--accent); }
.card.locked { cursor: default; box-shadow: none; }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); max-width: 100%; }
.card > .card-photo, .card > .card-body { width: 100%; } /* a card that is a button doesn't stretch its parts by itself */
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-code { position: absolute; left: 10px; top: 10px; background: var(--surface); color: var(--ink); border-radius: 6px; padding: 2px 7px; font-family: var(--mono); font-size: .75rem; }
.card-ovr { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 4px 10px; text-align: center; font-family: var(--display); line-height: 1; }
.card-ovr b { font-size: 1.6rem; display: block; }
.card-ovr span { font-size: .65rem; letter-spacing: .12em; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card-name { font-family: var(--display); font-size: 1.35rem; font-weight: 700; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip.neutral { background: var(--surface-2); color: var(--ink); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.lock-line { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pips { display: inline-flex; gap: 3px; }
.pip { width: 9px; height: 9px; border-radius: 2px; background: var(--line); }
.pip.on { background: var(--accent); }
.empty { padding: 32px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); grid-column: 1 / -1; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.price.best { border-color: var(--accent); }
.price b { font-family: var(--display); font-size: 2.2rem; line-height: 1; }
.price ul { margin: 0; padding-left: 18px; color: var(--muted); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline label { white-space: nowrap; }
.field label, .field legend { font-size: .85rem; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
input[type="file"] { font-size: .9rem; max-width: 100%; }
input:invalid.touched, select:invalid.touched { border-color: var(--bad); }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; color: inherit; resize: vertical; }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.courses legend { margin-bottom: 6px; }
.courses-done { display: flex; flex-direction: column; gap: 6px; }
.notes-text { white-space: pre-line; max-width: 65ch; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.plans legend { margin-bottom: 6px; }
.plan-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface); cursor: pointer; }
.plan-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt input { accent-color: var(--accent); margin-top: 4px; }
.form-error { color: var(--bad); font-size: .9rem; min-height: 1.2em; }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: 8px; padding: 12px 14px; }

/* Filters */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
/* A page with one filter keeps it narrow instead of stretching across. */
.filters.one-filter { grid-template-columns: minmax(150px, 300px); }

/* Checkout */
.checkout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.co-price { font-family: var(--display); font-size: 2rem; }
.co-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.co-card div { display: flex; flex-direction: column; gap: 2px; }

/* Facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; min-width: 0; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: block; background: var(--surface-2); }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px 0; }

/* Sheets */
.sheet { border: 0; padding: 0; margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(720px, 100%); max-width: 100%; background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.sheet::backdrop { background: rgba(8, 14, 11, .45); }
.sheet-inner { padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) 20px; display: flex; flex-direction: column; gap: 18px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: sticky; bottom: 0; background: var(--bg); padding-block: 12px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.group { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.group legend { font-family: var(--display); font-weight: 700; font-size: 1.1rem; padding: 0 6px; }
.tag { font-family: var(--body); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: var(--warn-soft); color: var(--warn); padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.photo-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.photo-preview { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }

/* Detail */
.d-top { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
.d-photo { width: 140px; aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: var(--surface-2); max-width: 100%; }
.d-id { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 9.5em 1fr 2.2em; gap: 10px; align-items: center; font-size: .9rem; }
.bar-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.bar-track i { height: 10px; border-radius: 2px; background: var(--line); }
.bar-track i.on { background: var(--accent); }
.bar b { font-variant-numeric: tabular-nums; text-align: right; }
.calc-out { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); font-weight: 700; min-height: 42px; }
.calc-out small { font-weight: 400; color: var(--muted); }
.label-like { font-size: .85rem; font-weight: 600; }
.chip.draft { background: var(--warn-soft); color: var(--warn); }
.bar.total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
.pitch { width: 100%; max-width: 100%; height: auto; display: block; border-radius: 8px; }
.pitch .turf { fill: var(--turf); }
.pitch .stripe { fill: var(--turf-2); }
.pitch .lines { fill: none; stroke: var(--chalk); stroke-opacity: .75; stroke-width: 1; }
.pitch .dot { fill: #f5c542; stroke: var(--ink); stroke-width: 1.5; }
/* The secondary dots and the "Also plays" key share one solid pale yellow, so they look the same on the turf and on the card. */
.pitch .dot-also { fill: #f8e3a3; stroke: var(--ink); stroke-opacity: .55; stroke-width: 1; }
.also-plays { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--muted); }
.also-key { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #f8e3a3; border: 1px solid rgba(20, 30, 25, .45); }
.other-pos[hidden] { display: none; }
.video-box { display: flex; flex-direction: column; gap: 8px; }
.video-ph { aspect-ratio: 16 / 9; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; text-align: center; padding: 12px; max-width: 100%; }
.video-ph span { font-size: .9rem; opacity: .85; }
video { width: 100%; border-radius: 8px; background: #000; max-width: 100%; }
.ask { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ask .field { flex: 1 1 220px; }
.fine { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

.footer-note { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; max-width: 80ch; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 50; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

@media (max-width: 560px) {
  .d-top { grid-template-columns: 96px 1fr; }
  .d-photo { width: 96px; }
  .brand-sub { display: none; }
  .bar { grid-template-columns: 7.5em 1fr 2.2em; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Vetted by line on the profile, and the Evaluators admin page */
.vetted { margin: 8px 0 0; }
.vetted strong { color: var(--ink, inherit); }
.evaluator-form { margin-bottom: 4px; }
.evaluator-form .field { flex: 1 1 220px; margin: 0; }
.table select.compact { min-width: 220px; padding: 6px 8px; font-size: 0.9rem; }

/* Featured schools: the same card as Founding Partners on campotocampus.com */
.featured { margin-top: 40px; }
.featured .eyebrow { margin: 0; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.featured-card { background: var(--surface); padding: 24px 22px; display: flex; gap: 18px; align-items: center; min-width: 0; }
.featured-tag { color: var(--accent); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.featured-name { font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.15; overflow-wrap: anywhere; }
.featured-loc { color: var(--muted); font-size: .85rem; }
.school-logo { width: 52px; height: 52px; object-fit: contain; flex: none; background: var(--surface-2); }
.logo-pick { display: flex; gap: 14px; align-items: center; }
.logo-pick .field { flex: 1; }

/* ---------- Family profiles, edit requests, staff and activity ---------- */
#editor-form.family-mode .staff-only { display: none !important; }
#editor-form:not(.family-mode) .family-only { display: none !important; }
.my-players, .change-list { display: grid; gap: 12px; }
.mp-card, .change-card { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.mp-card .thumb, .change-card .thumb { width: 64px; height: 64px; flex: none; }
.mp-body, .change-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.mp-body h2, .change-body h2 { font-size: 1.5rem; }
.mp-note { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: .95rem; }
.mp-note.bad { background: var(--bad-soft); }
.mp-note.warn { background: var(--warn-soft); }
.diff { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: .95rem; }
.diff dt { font-weight: 600; }
.diff dd { margin: 0; overflow-wrap: anywhere; }
.diff del { color: var(--muted); }
.diff ins { text-decoration: none; background: var(--ok-soft); border-radius: 4px; padding: 0 4px; }
.change-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.change-actions textarea { width: 100%; min-height: 60px; }
.sub-head { font-size: 1.4rem; margin-top: 8px; }
.table td.act-changes { white-space: normal; font-size: .9rem; color: var(--muted); max-width: 60ch; overflow-wrap: anywhere; }
/* Activity details: one changed field per line, old value struck through. */
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.act-list li { overflow-wrap: anywhere; }
.act-field { font-weight: 600; color: var(--ink); }
.act-list del { color: var(--muted); }
.act-list ins { text-decoration: none; color: var(--ink); background: var(--ok-soft); border-radius: 4px; padding: 0 4px; }
.act-more { margin-top: 6px; }
.act-more summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.act-more[open] summary { margin-bottom: 4px; }
@media (max-width: 560px) {
  .mp-card, .change-card { flex-direction: column; }
  .diff { grid-template-columns: 1fr; }
}

/* ---------- Long lists: Show more, search, phone layout ---------- */
.more-btn { display: block; margin: 16px auto 0; min-width: 220px; }
.more-btn[hidden] { display: none; }
.teaser-filters { grid-template-columns: repeat(auto-fit, minmax(160px, 220px)); align-items: end; margin-bottom: 14px; }
.teaser-filters p { margin: 0 0 10px; }
#a-search { min-width: 0; width: 180px; }
.table td.wrap { white-space: normal; min-width: 13em; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .teaser-filters { grid-template-columns: 1fr 1fr; }
  .teaser-filters p { grid-column: 1 / -1; margin: 0; }
  .more-btn { width: 100%; }
  #a-search { width: 100%; }
}

/* Tables on a phone: each row becomes a card, each cell a "Heading  value" line. Wider screens keep the table. */
@media (max-width: 640px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { position: relative; padding: 4px 14px 4px calc(14px + 36%); border-bottom: 0; white-space: normal; text-align: right; overflow-wrap: anywhere; min-height: 1.9em; }
  .table td::before { content: attr(data-label); position: absolute; left: 14px; top: 7px; width: 34%; text-align: left; font-size: .72rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
  .table td:not([data-label]) { padding-left: 14px; text-align: left; min-height: 0; }
  .table td:not([data-label])::before { content: none; }
  .table td.act-changes { max-width: none; text-align: left; padding: 24px 14px 6px; }
  .table td.act-changes:empty { display: none; }
  .table select.compact { min-width: 0; width: 100%; }
  .table-wrap { overflow-x: visible; }
}

/* Comp sheet (players/comp.js): a narrow side sheet on desktop, full width on a phone. */
.comp-sheet { width: min(520px, 100%); }
.comp-sheet p { margin: 0; }
.comp-now { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Comp column in the staff Schools and Families tables: chip above its button, so the column stays narrow. */
.comp-cell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.comp-btns { display: inline-flex; gap: 12px; }
.fee-terms { white-space: nowrap; }
.fee-preview { font-weight: 600; margin: 0; min-height: 1.4em; }
.promo-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px; border: 1px dashed var(--line, #c9d3cc); border-radius: 10px; }
.promo-box .small { flex-basis: 100%; }
.promo-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.25rem; letter-spacing: .06em; user-select: all; }
@media (max-width: 640px) { .comp-cell { align-items: flex-end; } }

/* Stages (one list for every athlete): a row per stage, its status and the date it was done.
   On a phone the status and date sit under the stage name; on a wide screen they sit beside it. */
.stage-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.stage-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stage-row.is-done .stage-name label { font-weight: 600; }
.stage-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.stage-name label { font-weight: 500; }
.stage-inputs { display: flex; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; }
.stage-inputs select, .stage-inputs input[type="date"] { min-height: 40px; font-size: 16px; }
.stage-inputs input[type="date"][hidden] { display: none; }
@media (max-width: 560px) { .stage-inputs { width: 100%; } .stage-inputs > * { flex: 1 1 140px; } }
.stage-btn { text-align: left; white-space: normal; }
.table td.status-stage { white-space: normal; min-width: 150px; max-width: 200px; }
.status-stage .stage-btn { padding-top: 6px; }
@media (min-width: 641px) { #a-stage, #a-scout, #a-due { max-width: 230px; } }

/* Staff page as the scout list: country and start date set in the row. */
.staff-list-head { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 -12px; }
.staff-list-head select { width: auto; min-width: 200px; }
.table a[data-scouted] { color: var(--accent); font-weight: 700; }
.staff-list-head p { margin: 0; }
.table select.compact.narrow { min-width: 150px; }
.table input[type="date"].compact { padding: 6px 8px; font-size: 0.9rem; min-width: 140px; }
@media (max-width: 640px) {
  .table input[type="date"].compact { width: 100%; min-width: 0; font-size: 16px; }
  .table select.compact.narrow { min-width: 0; }
  .staff-list-head .field { width: 100%; }
  .staff-list-head select { flex: 1; min-width: 0; }
}

/* Application tracker: a card per school inside the stages sheet. */
.app-section { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.app-section .sub-head { margin: 0; }
.app-section > p { margin: 0; }
.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-card { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px; background: var(--surface); }
.app-card .stage-row:last-child { border-bottom: 0; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.app-add, .app-new { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.app-add .field { flex: 1 1 240px; }
.app-new .field { flex: 1 1 180px; }
.app-add select, .app-new select, .app-new input { min-height: 40px; font-size: 16px; }
#sg-new-toggle { align-self: flex-start; }
.stage-row.per-school .stage-label { font-weight: 500; }
.stage-row.per-school.is-done .stage-label { font-weight: 600; }

/* Deadlines: a "Due" box beside an open stage or school step; overdue and due-soon chips. */
.due-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.due-field[hidden] { display: none; }
.due-field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stage-name .chip { margin-left: 4px; vertical-align: 1px; }
.due-line { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.app-deadlines { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.app-sd { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.app-sd[hidden] { display: none; }
.app-sd .field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; margin: 0; }
.app-sd input { min-height: 40px; font-size: 16px; }
.app-sd p { flex-basis: 100%; margin: 0; }
@media (max-width: 560px) {
  .due-field { flex: 1 1 100%; }
  .due-field input { flex: 1; min-width: 0; }
  .app-sd .btn { width: 100%; }
}
/* Family application checklist (C2C-050) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mp-card { flex-wrap: wrap; }
.mp-check { flex: 1 1 100%; min-width: 0; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.mp-check h3 { font-size: 1.15rem; }
.ck-head { align-items: baseline; }
.ck-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ck-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.ck-next { margin: 0; line-height: 1.6; }
.ck-next .chip { margin-left: 4px; vertical-align: 1px; }
.ck-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ck { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ck:last-child { border-bottom: 0; }
.ck-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-weight: 700; line-height: 1; }
.ck-done .ck-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ck-now .ck-mark { border-color: var(--accent); }
.ck-done .ck-text { color: var(--muted); }
.ck-text { min-width: 0; overflow-wrap: anywhere; }
.ck-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; text-align: right; }
.ck-sub { font-size: 1rem; margin: 4px 0 0; }
.ck-school { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ck-school .ck-list { margin-top: 4px; }
@media (max-width: 560px) {
  .mp-card { flex-wrap: nowrap; }
  .ck { grid-template-columns: 22px minmax(0, 1fr); }
  .ck-right { grid-column: 2; justify-content: flex-start; text-align: left; }
}

/* Family records, consent and academic ratings (migrations 025 to 027). */
.card-aca { right: 70px; background: var(--accent); color: var(--accent-ink, #fff); }
.acad-box { display: flex; flex-direction: column; gap: 8px; }
.acad-box.fam { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.acad-band { margin: 0; }
.acad-facts { padding: 12px 14px; }
.mp-docs { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.consent-line { margin: 0; }
.doc-need, .doc-list, .rc-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-need li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.doc-need li:last-child { border-bottom: 0; }
.doc-need-name { font-weight: 600; min-width: 0; }
.doc-need-right { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.doc-row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 14px; }
.doc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.doc-name { overflow-wrap: anywhere; }
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.doc-inline { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.doc-inline .field { flex: 1 1 180px; }
.share-link { flex-direction: column; align-items: stretch; }
.share-link .row-gap { flex-wrap: nowrap; }
.share-link input { flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: .8rem; }
.share-link p { margin: 0; }
.doc-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; background: var(--surface-2, var(--surface)); border: 1px dashed var(--line); border-radius: 8px; padding: 12px; }
.doc-upload .field { flex: 1 1 200px; }
.doc-upload input[type=file] { max-width: 100%; }
.doc-up-help, .doc-upload .form-error { flex: 1 1 100%; margin: 0; }
.doc-upload .form-error:empty { display: none; }
.bad-text { color: var(--bad); }
.consent-box { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; line-height: 1.45; }
.consent-box input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.consent-need { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.draft-label { align-self: flex-start; margin: 0; white-space: normal; }
#cs-body { display: flex; flex-direction: column; gap: 12px; }
.rc-body { display: flex; flex-direction: column; gap: 18px; }
.rc-sec { display: flex; flex-direction: column; gap: 10px; }
.rc-sec > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.rc-history li { font-size: .9rem; line-height: 1.4; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid.three { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .form-grid.two { grid-template-columns: 1fr; }
  .doc-row { padding: 10px; }
  .doc-actions { width: 100%; }
  .doc-inline:not(.share-link) .btn, .doc-upload .btn { width: 100%; }
  .share-link .btn { flex: 0 0 auto; }
  .card-aca { right: 64px; }
}

/* Evaluator credential: Other license or experience, with an (i) tip. */
.label-row { display: flex; align-items: center; gap: 6px; }
.info-tip { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; color: var(--muted); font: italic 700 .75rem/1 Georgia, serif; padding: 0; cursor: pointer; display: inline-grid; place-items: center; }
.info-tip[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tip-text { margin: 2px 0 0; }
.cred-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cred-other { display: flex; gap: 6px; align-items: center; }
.cred-other input { flex: 1 1 auto; min-width: 0; }
.cred-other[hidden] { display: none; }

/* Client service: new and moved families (migration 029). */
.notices { display: grid; gap: 8px; margin-bottom: 12px; }
.notices:empty { display: none; }
.notice-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 14px; background: var(--warn-soft); color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: .95rem; }
.table tr.row-new td { background: var(--accent-soft); }
.cred-other .btn { white-space: nowrap; flex: 0 0 auto; }

/* Client agreements (agreement.js, migration 031) */
.agree-sheet .sheet-inner { gap: 14px; }
.agree-text { max-height: min(52vh, 520px); overflow: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: .95rem; line-height: 1.5; }
.agree-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.agree-text h3 { font-size: 1rem; margin: 14px 0 4px; }
.agree-text h3:first-child { margin-top: 0; }
.agree-text p { margin: 0 0 8px; overflow-wrap: anywhere; }
.agree-full .agree-text { max-height: 50vh; margin-top: 10px; }
.agree-full summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.agree-notice { display: grid; gap: 10px; margin: 0 0 14px; }
.agree-notice p { margin: 0; }
.agree-done { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.agree-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.agree-line .chip { white-space: nowrap; }
.agree-facts dd { overflow-wrap: anywhere; }
.agree-hash { font-size: .78rem; word-break: break-all; }
@media (max-width: 560px) { .agree-facts { grid-template-columns: 1fr; gap: 2px; } .agree-facts dd { margin-bottom: 8px; } }
/* A fieldset grows to fit a file input by default; keep the account page inside a phone screen. */
fieldset.group { min-width: 0; }
.logo-pick .field { min-width: 0; }
.logo-pick input[type="file"] { max-width: 100%; }
.check input { flex: none; }
.agree-sub { font-size: 1rem; margin: 0 0 6px; }
.agree-mails { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.agree-mails li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.agree-mail-to { overflow-wrap: anywhere; min-width: 0; }

/* Scorecards (scorecard.js): one card per person, a tile per measure, green when a target is met. */
.sc-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 12px; }
.sc-controls select { max-width: 100%; }
.sc-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.sc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sc-card.is-me { border-color: var(--accent); }
.sc-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sc-rank { flex: none; min-width: 52px; height: 52px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-size: 1.4rem; font-weight: 700; display: grid; place-items: center; }
.sc-who { flex: 1 1 auto; min-width: 0; }
.sc-name { font-size: 1.25rem; margin: 0; overflow-wrap: anywhere; }
.sc-who p { margin: 2px 0 0; }
.sc-head-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sc-score { font-family: var(--display); font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sc-tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; background: var(--bg); min-width: 0; }
.sc-tile.met { background: var(--ok-soft); border-color: transparent; }
.sc-tile.short { background: var(--bad-soft); border-color: transparent; }
.sc-label { font-size: .85rem; color: var(--muted); }
.sc-num { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1.05; }
.sc-target { font-size: .85rem; }
.sc-tile.met .sc-target { color: var(--ok); font-weight: 600; }
.sc-tile.short .sc-target { color: var(--bad); font-weight: 600; }
.sc-change { font-size: .8rem; color: var(--muted); }
.sc-change.up { color: var(--ok); }
.sc-change.down { color: var(--bad); }
.sc-tile-rank { font-size: .8rem; font-weight: 600; color: var(--accent); }
.sc-funnel { border-top: 1px solid var(--line); padding-top: 10px; }
.sc-funnel-title { font-size: .85rem; color: var(--muted); }
.sc-funnel ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sc-funnel li { font-size: .9rem; }
.sc-funnel b { font-family: var(--display); font-size: 1.15rem; margin-right: 2px; }
.sc-t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sc-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc-group-title { font-size: 1rem; margin: 0; }
.sc-group-note { margin: 0; }
.sc-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sc-tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.sc-tile.shown { background: var(--surface); border-style: dashed; }
.sc-tile.shown .sc-tag { color: var(--muted); }
.sc-note, .sc-avg { font-size: .8rem; color: var(--muted); }
.sc-avg { font-weight: 600; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sc-top p { margin: 0; flex: 1 1 260px; min-width: 0; }
.sc-bar { margin: 4px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); overflow-wrap: anywhere; }
.sc-rules-h { font-size: 1rem; margin: 6px 0 0; }
.mf-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; color: var(--muted); margin: 4px 0 8px; }
.mf-pay select { font-size: .85rem; padding: 4px 6px; max-width: 100%; }
@media (max-width: 640px) {
  .sc-controls { flex-direction: column; align-items: stretch; }
  .sc-controls .field.inline { justify-content: space-between; }
  .sc-controls .field.inline select { flex: 1 1 auto; min-width: 0; }
  .sc-head { flex-wrap: wrap; }
  .sc-head-side { width: 100%; justify-content: space-between; }
  .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-num { font-size: 1.7rem; }
}

/* Next-step reminders to families (remind.js) */
.rm-sheet .sheet-inner { display: flex; flex-direction: column; gap: 12px; }
.rm-sheet select { width: 100%; max-width: 100%; }
.rm-to { margin: 0; overflow-wrap: anywhere; }
.rm-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.rm-subject { margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.rm-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .92rem; color: var(--ink); }
.rm-past { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rm-past li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-size: .9rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.rm-past li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rm-last { margin-top: 2px; }
/* Deadline reminders to staff (deadlines.js, C2C-054) */
.dl-panel, .dl-settings { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dl-settings { margin-top: 16px; }
.dl-panel .sub-head, .dl-settings .sub-head { margin: 0; font-size: 1.15rem; }
.dl-settings p { margin: 0; }
.dl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dl-item { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.dl-item:first-child { border-top: 0; }
.dl-what { min-width: 0; overflow-wrap: anywhere; font-size: .95rem; }
.dl-panel > p { margin: 0; }
.dl-settings .field select { width: 100%; max-width: 100%; }
@media (max-width: 640px) {
  .dl-item { grid-template-columns: minmax(0, 1fr) auto; }
  .dl-when { grid-column: 1 / -1; }
}
.dl-settings > .field { max-width: 420px; }
/* Founder dashboard (dashboard.js, C2C-044 and C2C-051) */
.db-section { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 22px; min-width: 0; }
.db-section .sub-head { margin: 0; font-size: 1.25rem; }
.db-section > p { margin: 0; }
.db-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.db-chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 8px; min-width: 0; }
.db-chart figcaption { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
#db-rev { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#db-rev > p { margin: 0; }
.db-h3 { margin: 6px 0 0; font-size: 1.05rem; }
.db-rev-chart { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.db-rev-total .sc-num { font-size: 1.9rem; }
.db-plot { position: relative; }
.db-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.db-base { stroke: var(--line); stroke-width: 1; }
.db-bar path { fill: var(--accent); transition: opacity .15s; }
.db-bar.dim path { opacity: .4; }
.db-bar:focus { outline: none; }
.db-bar:focus-visible .db-hit { stroke: var(--accent); stroke-width: 1.5; }
.db-hit { fill: transparent; }
.db-val { font-size: 12px; font-weight: 700; fill: var(--ink); }
.db-axis { font-size: 11px; fill: var(--muted); }
.db-tip { position: absolute; top: -6px; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--surface); font-size: .8rem; font-weight: 600; white-space: nowrap; pointer-events: none; }
.db-table summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.db-table .table-wrap { margin-top: 8px; }
.db-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.db-stages li { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: .92rem; }
.db-st-label { min-width: 0; overflow-wrap: anywhere; }
.db-st-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.db-st-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.db-st-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.db-split-head { display: flex; justify-content: flex-end; }
.db-split td, .db-split th { white-space: nowrap; }
@media (max-width: 760px) {
  .db-charts { grid-template-columns: 1fr; }
  .db-stages li { grid-template-columns: minmax(0, 1fr) 36px; }
  .db-st-bar { grid-column: 1 / -1; grid-row: 2; }
  .db-split-head { justify-content: stretch; }
  .db-split-head .field.inline { width: 100%; justify-content: space-between; }
}

/* School roster needs (C2C-037) */
.nd-form { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.nd-form .sub-head { margin: 0; }
.nd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#needs-root > .hero-actions { margin-bottom: 20px; }
.nd-grid .field { min-width: 0; }
.nd-grid select { width: 100%; }
.nd-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.nd-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nd-card.filled { opacity: .8; }
.nd-head { font-size: 1.02rem; }
.nd-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 4px; }
.nd-btns { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.link-btn.danger { color: var(--bad); }
.nd-filled summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.need-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); margin-bottom: 12px; }
.need-banner[hidden] { display: none; }
/* New roster-need alerts: a count beside Roster needs in the menu, and a banner on Browse. */
.nav-count { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; line-height: 1.5; text-align: center; vertical-align: 1px; }
.alerts-banner { border: 1px solid var(--accent); }
.alerts-banner a.btn { text-decoration: none; }
.alerts-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .nd-list { grid-template-columns: minmax(0, 1fr); }
  .nd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) { .nd-grid { grid-template-columns: minmax(0, 1fr); } }
/* Need alerts for schools (C2C-036) */
.na-panel { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.na-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.na-top .sub-head { margin: 0; }
.na-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.na-row { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
.na-row.fresh { border-color: var(--ok); background: var(--ok-soft); }
.na-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.na-fit { width: 100%; }
.na-fit summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.na-fit .fit-reasons { margin-top: 6px; }
.na-pass { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.na-pass select { width: 100%; max-width: 420px; }
.nd-ahead-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.nd-ahead-list li { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; overflow-wrap: anywhere; }
.na-email { margin: 0; }
@media (max-width: 720px) { .na-list { grid-template-columns: minmax(0, 1fr); } }
#db-needs .table-wrap { margin-top: 12px; }
/* Roster, program and fit scores (fit.js, C2C-037 second part and C2C-038) */
.fit-root { display: flex; flex-direction: column; gap: 22px; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.fit-team { max-width: 320px; }
.fit-team select { width: 100%; }
.fit-section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fit-section .sub-head { margin: 0; }
.fit-section > .muted.small { margin: 0; }
.fit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.fit-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fit-card > .btn { align-self: flex-start; }
.fit-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fit-top p { margin: 0; }
.fit-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fit-score { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; font-family: var(--display); font-weight: 700; font-size: 1.2rem; background: var(--surface-2); color: var(--ink); }
.fit-score.ok { background: var(--ok-soft); color: var(--ok); }
.fit-score.warn { background: var(--warn-soft); color: var(--warn); }
.fit-score.bad { background: var(--bad-soft); color: var(--bad); }
.fit-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: .9rem; }
.fit-r { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.fit-r > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.fit-mark { flex: none; width: 1.1em; text-align: center; font-weight: 700; }
.fit-r.ok .fit-mark { color: var(--ok); }
.fit-r.warn .fit-mark { color: var(--warn); }
.fit-r.no .fit-mark { color: var(--bad); }
.fit-roster { display: flex; flex-direction: column; gap: 12px; }
.fit-year-note { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); border-left: 3px solid var(--warn); overflow-wrap: anywhere; }
.fit-year-note b { color: var(--warn); }
.fit-roster p { margin: 0; }
.fit-pos-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fit-pos { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fit-pos-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.fit-pos-sum { display: inline-flex; align-items: center; gap: 6px; }
.fit-years { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.fit-years label { font-size: .78rem; font-weight: 600; }
.fit-years select { width: 100%; }
.fit-program { margin-bottom: 0; }
.fit-panel .fit-top { margin-top: 2px; }

/* ---------- Showcases (showcases.js, C2C-032 / C2C-033) ---------- */
.sh-kicker { margin: 0 0 4px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.sh-event-head h1 { margin: 0 0 6px; }
.sh-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 14px 0 18px; background: none; border: 0; padding: 0; }
.sh-form .sub-head, .sh-done .sub-head, .sh-done h1 { margin: 0; }
.sh-facts > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.sh-facts dt { font-size: .8rem; color: var(--muted); }
.sh-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-bottom: 14px; }
.sh-form .check { margin: 6px 0 4px; }
.sh-sub { font-size: 1rem; margin: 8px 0 10px; }
.sh-note { padding: 12px 14px; border-radius: 8px; background: var(--surface-2); font-weight: 600; }
.sh-note.ok { background: var(--ok-soft); color: var(--ok); }
.sh-note.bad { background: var(--bad-soft); color: var(--bad); }
.sh-ticket { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 14px 0; }
.sh-ticket > div:last-child { min-width: 0; flex: 1 1 180px; }
.sh-qr { width: 180px; max-width: 60vw; background: #fff; border-radius: 8px; padding: 6px; flex: none; }
.sh-qr svg { display: block; width: 100%; height: auto; }
.sh-label { margin: 0; font-size: .8rem; color: var(--muted); }
.sh-code-big { margin: 2px 0 6px; font: 700 1.6rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; overflow-wrap: anywhere; }
.sh-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-card a { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
.sh-card a:hover, .sh-card a:focus-visible { border-color: var(--accent); }
.sh-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sh-pick { flex: 1 1 260px; }
.sh-bar-btns, .sh-tool-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-meta { margin: 10px 0 14px; align-items: center; }
.sh-tiles { margin-bottom: 14px; }
.sh-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 6px; }
.sh-tools .field { flex: 1 1 200px; }
.sh-tools .sh-search { flex: 2 1 240px; }
.sh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sh-reg { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); }
.sh-reg.in { border-left: 4px solid var(--ok); }
.sh-reg.gone { opacity: .65; }
.sh-reg-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sh-reg-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-bib { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 1.05rem; }
.sh-reg-acts { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.sh-in { min-height: 44px; min-width: 120px; }
.sh-empty { padding: 12px 0; }
.sh-video { width: 100%; max-height: 60vh; background: #000; border-radius: 8px; }
@media (max-width: 600px) {
  .sh-reg-acts { width: 100%; }
  .sh-in { flex: 1 1 100%; }
  .sh-bar-btns { width: 100%; }
  .sh-bar-btns .btn { flex: 1; }
}

/* ---------- Coach rating at showcases (rate.js) ---------- */
.rt-head h1 { margin: 0 0 4px; }
.rt-head p { margin: 0; }
.rt-sync { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; margin: 14px 0; padding: 10px 12px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.rt-sync.wait { background: var(--surface-2); color: var(--ink); }
.rt-sync span { min-width: 0; }
.rt-bibform { display: flex; gap: 10px; align-items: flex-end; }
.rt-bibform .field { flex: 1 1 auto; margin: 0; }
.rt-bibform input { font-size: 1.4rem; font-weight: 700; min-height: 52px; }
.rt-bibform .btn { min-height: 52px; min-width: 96px; }
.rt-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.rt-filters .field { flex: 1 1 160px; }
.rt-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rt-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 56px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rt-row:hover, .rt-row:focus-visible { border-color: var(--accent); }
.rt-row.done { border-left: 4px solid var(--ok); }
.rt-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.rt-mine { flex: none; }
.rt-panel { margin: 18px 0 0; padding: 14px; border: 2px solid var(--accent); border-radius: 10px; background: var(--bg); scroll-margin-top: 70px; }
.rt-p-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.rt-p-head h2 { margin: 0; font-size: 1.2rem; }
.rt-p-head > div { flex: 1 1 auto; min-width: 0; }
.rt-p-head p { margin: 0; }
.rt-close { flex: none; }
.rt-scale { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.rt-scale legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.rt-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rt-btns button { min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: 700 1.15rem/1 inherit; cursor: pointer; }
.rt-btns button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rt-scale-key { margin: 8px 0 0; }
.rt-notes { border: 0; padding: 0; margin: 14px 0 6px; min-width: 0; }
.rt-notes legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-chips button { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: .92rem; cursor: pointer; text-align: left; }
.rt-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rt-panel textarea { width: 100%; }
.rt-p-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rt-p-acts .btn { min-height: 48px; flex: 1 1 200px; }
.cd-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.cd-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.cd-row.off { opacity: .65; }
.cd-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; overflow-wrap: anywhere; }
.cd-acts { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cd-made { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 12px; margin-bottom: 10px; border-radius: 8px; background: var(--surface-2); }
.cd-made .sh-qr { width: 160px; }
.cd-made-text { flex: 1 1 220px; min-width: 0; }
.cd-made-text p { margin: 0 0 8px; }
.cd-url { font: .85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
.cd-made-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Showcase results for founders (C2C-035) */
.rs-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.rs-head > div { min-width: 0; }
.rs-title { margin: 0; overflow-wrap: anywhere; }
.rs-send { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 14px; }
.rs-send:empty { display: none; }
.rs-send p { margin: 0; flex: 1 1 220px; min-width: 0; }
.rs-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; margin-bottom: 6px; }
.rs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 10px; }
.rs-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rs-card.on { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.rs-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.rs-who { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rs-rank { font-size: .85rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.rs-avg { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rs-bars { display: flex; flex-direction: column; gap: 6px; }
.rs-bar { display: grid; grid-template-columns: minmax(0, 10.5em) 1fr 2.2em; gap: 10px; align-items: center; font-size: .88rem; }
.rs-bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-track { height: 8px; border-radius: 4px; background: var(--line); overflow: visible; }
.rs-track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); max-width: 100%; }
.rs-bar b { font-variant-numeric: tabular-nums; text-align: right; }
.rs-track { position: relative; }
.rs-track s { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.rs-ev { grid-column: 2 / -1; margin-top: -4px; line-height: 1.3; overflow-wrap: anywhere; }
.rs-up, .rs-down { font-size: .75em; }
.rs-ev-key { display: flex; align-items: center; gap: 8px; margin: 0; }
.rs-ev-tick { flex: none; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; }
.rs-event-line { margin: -6px 0 12px; }
.rs-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-comments { margin: 0; padding: 0 0 0 2px; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.rs-comments li { overflow-wrap: anywhere; }
.rs-acts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: flex-end; }
.rs-acts .link-btn { min-height: 44px; }
.rs-acts .btn { min-height: 44px; }
.rs-sendlist { margin: 6px 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* Free family login for showcase registrants (C2C-077): their registrations on Your player profile. */
.mp-shows { margin: 0 0 18px; }
.mp-shows .sub-head { margin: 0 0 10px; }
.mp-shows-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.mp-show { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mp-show h3 { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.mp-show p { margin: 0; overflow-wrap: anywhere; }
.mp-show .btn { white-space: normal; }
.sh-login { margin: 12px 0 0; }

/* ---------- Matching and introductions (match.js, C2C-039) ---------- */
.intro-root { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.mt-tabs { margin-bottom: 14px; }
.mt-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mt-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.mt-bar p { margin: 0; }
.mt-bar .field { min-width: 0; max-width: 100%; }
.mt-bar select, .mt-search input { width: 100%; }
.mt-pickers .field { flex: 1 1 260px; max-width: 420px; }
.mt-search { flex: 1 1 260px; max-width: 420px; }
.mt-picks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mt-picks:empty { display: none; }
.mt-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.mt-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt-card > .link-btn { align-self: flex-start; }
.mt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.mt-head .fit-who b { overflow-wrap: anywhere; }
.mt-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mt-move { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.mt-move .field { flex: 1 1 140px; min-width: 0; margin: 0; }
.mt-move select { width: 100%; }
.in-new { border-color: var(--warn); }
.in-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.in-why { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.in-why .field { flex: 1 1 200px; min-width: 0; margin: 0; }
.in-why select { width: 100%; }
/* How matching is doing (C2C-040) */
.ml-bands, .ml-parts, .ml-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ml-bands { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.ml-band, .ml-part { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ml-stats { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .9rem; }
.ml-stats > div { display: contents; }
.ml-stats dt { color: var(--muted); }
.ml-stats dd { margin: 0; text-align: right; font-weight: 700; }
.ml-stats dd .muted { font-weight: 400; font-size: .8rem; }
.ml-why { gap: 4px; max-width: 520px; }
.ml-why li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.ml-parts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ml-part-head { display: flex; flex-direction: column; gap: 2px; }
.ml-part-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ml-part-row .field { margin: 0; max-width: 140px; }
.ml-part-row input { width: 100%; }
.ml-form { display: flex; flex-direction: column; gap: 10px; }
.ml-form p { margin: 0; }
/* Owners' sign-in security (security.js, C2C-030) */
.sec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sec-card .sub-head { margin: 0; font-size: 1.15rem; }
.sec-card p { margin: 0; }
.sec-card > .field { max-width: 420px; }
.sec-card .field select { width: 100%; max-width: 100%; }
.sec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sec-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.sec-row:first-child { border-top: 0; }
.sec-name { min-width: 0; overflow-wrap: anywhere; }
.sec-act:empty { display: none; }
@media (max-width: 640px) {
  .sec-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sec-act { grid-column: 1 / -1; }
}

/* Showcase results for families (C2C-080): the owner's share switch, the family's view and its preview on each athlete. */
.rs-share { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rs-share > div { flex: 1 1 260px; min-width: 0; }
.rs-share p { margin: 4px 0 0; overflow-wrap: anywhere; }
.rs-share .btn { min-height: 44px; }
.rs-fam-preview { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; min-width: 0; }
.rs-fam-preview .sh-kicker { margin: 0 0 6px; }
.fr-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fr-card p { margin: 0; overflow-wrap: anywhere; }
.fr-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fr-avg { font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.fr-top .small { flex: 1 1 180px; min-width: 0; }
.fr-sub { font-weight: 600; font-size: .9rem; }
.mp-results { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mp-results h4 { margin: 0; font-size: 1rem; }

/* International applicants on each school in the tracker (C2C-081) */
.app-tests { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.app-tests .fit-reasons { font-size: inherit; }
@media (max-width: 520px) { .rs-ev { grid-column: 1 / -1; margin-top: -6px; } }

/* Parent consent form for athletes with no family account (migration 053) */
.paper-form { border: 1px solid var(--line, #e3e3e3); border-radius: 10px; padding: 12px; display: grid; gap: 10px; min-width: 0; }
.paper-head { margin: 0; font-weight: 600; }
.paper-line { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; overflow-wrap: anywhere; }
.paper-grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.paper-grid .field, .paper-withdraw .field { min-width: 0; }
.paper-withdraw { display: grid; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line, #e3e3e3); }
#e-paper-file { max-width: 100%; }
@media (min-width: 640px) { .paper-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* Billing (C2C-055 to C2C-059, C2C-063) */
.bl-note { margin: 0 0 14px; }
.bl-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.bl-filters { margin-bottom: 12px; align-items: end; }
.bl-filters .btn { justify-self: start; }
.bl-table td { white-space: normal; }
/* Aging amounts can carry cents (an invoice converted to euros or pounds): the number column fits them. */
.bl-aging li { grid-template-columns: minmax(0, 240px) minmax(0, 1fr) auto; }
@media (max-width: 760px) { .bl-aging li { grid-template-columns: minmax(0, 1fr) auto; } }
.bl-acts { min-width: 210px; }
.bl-acts > .btn { margin: 2px 4px 2px 0; }
.bl-pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.bl-pay-btns { display: flex; gap: 6px; align-items: end; flex-wrap: wrap; }
.bl-dep { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bl-dep input { padding: 6px 8px; font-size: .9rem; max-width: 160px; }
.bl-place { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.bl-miss { margin-bottom: 12px; }
.bl-table select { min-width: 150px; max-width: 100%; }
@media (max-width: 640px) {
  .bl-acts { min-width: 0; }
  .bl-table select, .bl-dep input { width: 100%; max-width: none; }
}

/* ---------- Alerts inbox (C2C-090, migration 063) ---------- */
.view.al-view { max-width: 760px; }
.al-head { gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.al-lead { margin: 0; }
.al-filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 8px; scrollbar-width: thin; }
.al-chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; min-height: 36px; }
.al-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.al-n { display: inline-block; min-width: 1.4em; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; text-align: center; }
.al-chip[aria-pressed="true"] .al-n { background: var(--accent-ink); }
.al-sub { font-size: 1rem; margin: 8px 0 6px; }
.al-todo { margin-bottom: 14px; }
.al-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.al-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.al-item.al-unread { border-left: 4px solid var(--accent); padding-left: 9px; }
.al-item.al-done { opacity: .75; }
.al-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .95rem; }
.al-icon-action { background: var(--accent); color: var(--accent-ink); }
.al-icon-matches, .al-icon-support { background: var(--accent-soft); color: var(--accent); }
.al-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.al-title { font-weight: 500; overflow-wrap: anywhere; }
.al-unread .al-title { font-weight: 700; }
.al-detail { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.al-why { color: var(--ink); }
.al-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .82rem; color: var(--muted); }
.al-type { font-weight: 600; }
.al-side { align-self: center; }
.al-upload { grid-column: 1 / -1; }
.al-upload .doc-upload { margin-top: 6px; }
.al-empty { padding: 18px 0; }
.al-prefs { border-top: 1px solid var(--line); padding-top: 12px; }
.al-prefs summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.al-switch { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.al-switch input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
@media (max-width: 560px) {
  .al-item { grid-template-columns: 28px minmax(0, 1fr); }
  .al-icon { width: 28px; height: 28px; }
  .al-side { grid-column: 2; justify-self: start; }
}
/* Staff: asking a family for a document, in the Records sheet */
.rq-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; align-items: end; margin-top: 8px; }
.rq-form .field { margin: 0; }
.rq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rq-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rq-list .rq-name { font-weight: 600; flex: 1 1 200px; min-width: 0; }
.rq-list .rq-note { flex-basis: 100%; }
.al-view a.btn { text-decoration: none; }
.al-head { display: flex; justify-content: space-between; align-items: center; }

/* Support messaging (C2C-094, support.js): the Support button, a person's questions, and the staff Support inbox. */
.view.sp-view { max-width: 760px; }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-head p, .sp-lead { margin: 0 0 10px; }
.sp-view a.btn { text-decoration: none; }
.sp-back { display: inline-block; margin-bottom: 8px; text-decoration: none; min-height: 32px; }
.sp-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--ink); text-decoration: none; }
.sp-row:hover { border-color: var(--accent); }
.sp-row.sp-unseen { border-left: 4px solid var(--accent); padding-left: 9px; }
.sp-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-row-main strong { font-weight: 600; overflow-wrap: anywhere; }
.sp-unseen .sp-row-main strong { font-weight: 700; }
.sp-topic { font-size: .92rem; }
.sp-preview { color: var(--muted); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.sp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sp-h { font-size: 1.15rem; margin: 0; }
.sp-thead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-msgs { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sp-msg { display: flex; }
.sp-msg.sp-me { justify-content: flex-end; }
.sp-bubble { max-width: min(85%, 560px); background: var(--surface-2); border-radius: 14px; padding: 9px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-me .sp-bubble { background: var(--accent-soft); }
.sp-note .sp-bubble, .sp-draft .sp-bubble { max-width: 100%; width: 100%; background: var(--warn-soft); border: 1px dashed var(--warn); }
.sp-who { font-size: .8rem; font-weight: 700; color: var(--muted); }
.sp-note .sp-who, .sp-draft .sp-who { color: var(--warn); }
.sp-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-when { font-size: .75rem; color: var(--muted); align-self: flex-end; }
.sp-file { align-self: flex-start; border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; text-align: left; min-height: 36px; }
.sp-closed { border-top: 1px solid var(--line); padding-top: 10px; }
.sp-compose { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.sp-card > .sp-compose:first-of-type { border-top: 0; padding-top: 6px; }
.sp-compose.sp-noting textarea { background: var(--warn-soft); }
.sp-label { font-weight: 600; font-size: .92rem; display: block; }
.sp-compose select, .sp-compose textarea, .sp-controls select { width: 100%; box-sizing: border-box; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); min-height: 44px; }
.sp-compose textarea { resize: vertical; min-height: 96px; }
.sp-compose-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-attach { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; min-width: 0; max-width: 100%; }
.sp-attach input { font-size: .85rem; max-width: 100%; }
.sp-file-note { margin: 0; }
.sp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-actions .btn { min-height: 44px; }
.sp-help { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.sp-help p { margin: 4px 0; }
.sp-help details { padding: 4px 0; }
.sp-help summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.sp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 12px 0; }
.sp-facts div { min-width: 0; }
.sp-facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sp-facts dd { margin: 0; overflow-wrap: anywhere; }
.sp-facts .link-btn { padding: 0; text-align: left; }
.sp-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* The Support button: bottom right on every page for families and schools, above the page, clear of the phone's home bar. */
.sp-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.sp-fab:hover { filter: brightness(1.05); }
.sp-fab-n { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .75rem; display: inline-grid; place-items: center; }
body.has-sp-fab main { padding-bottom: 80px; }
@media (max-width: 560px) {
  .sp-row { grid-template-columns: minmax(0, 1fr); }
  .sp-row-side { flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; text-align: left; }
  .sp-card { padding: 12px; }
  .sp-bubble { max-width: 92%; }
  .sp-fab { right: 12px; padding: 0 14px; }
}
.sp-kind-hint { margin: 0; }
.ml-roster { max-width: 460px; margin-bottom: 12px; }
.ml-typ-sport { max-width: 220px; }
.ml-typ-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.ml-typ-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ml-typ-body { display: flex; flex-direction: column; gap: 8px; }
.ml-typ-body .field { margin: 0; max-width: 140px; }
#ml-bar { align-items: flex-end; flex-wrap: wrap; gap: 8px 12px; }
.nd-ahead summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: 4px 0 10px; }
.nd-ahead { margin-bottom: 16px; }

/* ---------- Game film clips on Mux (film.js, migration 082) ---------- */
.film-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.film-h { font-size: 1rem; margin: 0 0 4px; }
.film-note { color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.film-note:empty { display: none; }
.film-rows { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.film-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.film-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.film-main .chip, .film-clip .chip { white-space: normal; }
.film-why { flex-basis: 100%; color: var(--bad); }
.film-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.film-watch { flex-basis: 100%; }
.film-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 10px; }
.film-add .field { margin: 0; min-width: 0; }
.film-add input[type=file] { max-width: 100%; }
.film-progress { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.film-progress progress { flex: 1 1 160px; height: 10px; accent-color: var(--accent); }
.film-list { display: grid; gap: 14px; margin-bottom: 10px; }
.film-clip { margin: 0; min-width: 0; }
.film-clip figcaption { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.film-player { display: block; width: 100%; max-width: 100%; border-radius: 8px; overflow: hidden; background: #000; }
@media (max-width: 640px) {
  .film-add { grid-template-columns: minmax(0, 1fr); }
  .film-add .btn { width: 100%; }
  .film-actions { width: 100%; }
}
/* School fee by school year (migration 080): what the family paid each year, and the next year to record */
.bl-years { list-style: none; margin: 0; padding: 0; }
.bl-years li { margin: 0 0 2px; }
.bl-yr-add { margin-top: 4px; }
.bl-yr-add summary { cursor: pointer; color: var(--accent); font-weight: 700; padding: 6px 0; }
.bl-yr-add .bl-dep { margin-top: 4px; }

/* ---------- Admin tables on laptop and desktop: buttons always on screen (Steve, Nov 6) ----------
   1. The last column, when it holds buttons, stays pinned at the right edge while the rest scrolls.
   2. If buttons in other columns would still sit past the edge, table-fit.js adds .stack to the wrapper and the
      table shows as cards, the same layout a phone uses. */
@media (min-width: 641px) {
  .table:has(> tbody > tr > td:last-child :is(button, select, a)) > thead > tr > th:last-child,
  .table > tbody > tr > td:last-child:has(:is(button, select, a)) {
    position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: -10px 0 10px -10px rgba(0, 0, 0, .18);
  }
}
.table-wrap.stack { overflow-x: visible; }
.table-wrap.stack .table thead { display: none; }
.table-wrap.stack .table, .table-wrap.stack .table tbody, .table-wrap.stack .table tr, .table-wrap.stack .table td { display: block; width: 100%; }
.table-wrap.stack .table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
.table-wrap.stack .table tr:last-child { border-bottom: 0; }
.table-wrap.stack .table td { position: relative; padding: 4px 14px 4px calc(14px + 30%); border-bottom: 0; white-space: normal; overflow-wrap: anywhere; min-height: 1.9em; box-shadow: none; }
.table-wrap.stack .table td::before { content: attr(data-label); position: absolute; left: 14px; top: 7px; width: 28%; font-size: .72rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.table-wrap.stack .table td:not([data-label]) { padding-left: 14px; min-height: 0; }
.table-wrap.stack .table td:not([data-label])::before { content: none; }
.table-wrap.stack .table td.act-changes { max-width: none; }
.table-wrap.stack .table td.status-stage, .table-wrap.stack .table td.wrap { max-width: none; min-width: 0; }
/* Profiles: seven columns (athlete, details, ratings, consent, status, actions) so a laptop shows every button. */
@media (min-width: 641px) {
  #admin-table td.ath-cell { min-width: 12em; max-width: 18em; }
  #admin-table td.ath-details { min-width: 9em; max-width: 14em; }
  #admin-table td.ath-ratings { white-space: nowrap; }
}
/* Schools and My families: fewer, wrapping columns so a laptop shows every button (Steve, Nov 6). */
#my-families-table .fam-email { overflow-wrap: anywhere; }
@media (min-width: 641px) {
  #my-families-table td.fam-parent { min-width: 12em; max-width: 18em; }
  #my-families-table td:nth-child(2) { white-space: normal; min-width: 18em; }
  #schools-table td.wrap { min-width: 10em; max-width: 18em; }
}

/* Signing inside the family's profile form: the client agreement and the parent consent (Steve, Nov 6). */
.fam-sign { display: grid; gap: 14px; margin-top: 4px; }
.fam-sign[hidden] { display: none; }
.sign-part { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.sign-part:first-child { border-top: 0; padding-top: 0; }
.sign-head { font-size: 1rem; margin: 0; }
.sign-read { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.sign-read > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--accent); min-height: 44px; box-sizing: border-box; }
.sign-read[open] > summary { border-bottom: 1px solid var(--line); }
.sign-read .agree-text { border: 0; border-radius: 0 0 var(--r) var(--r); max-height: min(50vh, 460px); }
.fam-sign .consent-box input:disabled + span { opacity: .6; }
/* Schools to approve (launch mode): room between the schools table and the athletes below. */
#ta-schools .table-wrap { margin-bottom: 32px; }
#ta-schools .sub-head + p { margin-bottom: 12px; }
