/* Open Court Project
   Layout: phone-first single column (the design canvas at 390px); from 720px the same
   pages widen inside a centered frame, and grids gain columns. One light look, by choice. */
:root {
  --bg: #EEF8F1;          /* page */
  --map: #CDEFD9;         /* map band, photo wells */
  --card: #FFFFFF;
  --green: #0B7A43;       /* primary */
  --green-dark: #075C32;
  --land: #0E8A4F;        /* map land, kid avatars */
  --lime: #E5FF2E;        /* accent */
  --pale: #F4FFC4;        /* fact chips */
  --ink: #0B2416;
  --muted: #3F5649;
  --line: #A9C9B4;        /* field borders, dashed notes */
  --divider: #E1EEE5;
  --danger: #B3261E;
  --danger-bg: #FCEDEC;
  --on-green: #FFFFFF;
  --disabled: #9DB8A8;
  --scrim: rgba(11, 36, 22, 0.45);
  --font-display: Archivo, "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-card: 20px;
  --r-field: 14px;
  --frame: 1120px;
  --column: 560px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--font-body);
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 20px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.25; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
h1[tabindex="-1"]:focus, main:focus { outline: none; }
[hidden] { display: none !important; }
.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; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--on-green); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Shell ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.frame { width: 100%; max-width: var(--frame); margin: 0 auto; }

.demo-banner { background: var(--ink); color: var(--on-green); font-size: 13px; }
.demo-banner .frame { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-block: 8px; }
.demo-banner strong { color: var(--lime); }
.demo-banner .demo-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.demo-banner button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: var(--on-green); font-size: 13px; font-weight: 700; }
.demo-banner button[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }

.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); }
.topbar.on-map { background: var(--map); }
.topbar .frame { display: flex; align-items: center; gap: 10px; padding-block: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; text-decoration: none; }
.icon-btn:hover { color: var(--green); }
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.wordmark:hover { color: var(--ink); }
.wordmark svg { flex-shrink: 0; }
.wordmark span { font: 800 17px/1.1 var(--font-display); white-space: nowrap; }
.wordmark.big span { font-size: 20px; }
.topbar .spacer { flex: 1; }
.menu-wrap { position: relative; }
.menu-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--card); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.menu-btn .avatar { width: 36px; height: 36px; font-size: 13px; }
.menu { position: absolute; right: 0; top: 52px; width: 240px; background: var(--card); border-radius: 18px; box-shadow: 0 12px 32px rgba(11,36,22,.18); padding: 8px; display: flex; flex-direction: column; z-index: 30; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg); color: var(--ink); }
.menu .menu-who { padding: 8px 12px 10px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.menu .menu-who strong { display: block; color: var(--ink); font-size: 15px; }
.topnav { display: none; gap: 4px; }
.topnav a { padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.topnav a:hover { background: var(--card); color: var(--ink); }
@media (min-width: 900px) { .topnav { display: flex; } }

main { flex: 1; outline: none; }
.page { padding-block: 4px 32px; }
.column { width: 100%; max-width: var(--column); margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); line-height: 1.4; }
.eyebrow { font: 700 13px/1.2 var(--font-body); color: var(--green); letter-spacing: 0.01em; }
.page-head { display: flex; flex-direction: column; gap: 4px; padding-block: 8px 4px; }
.page-head .sub { color: var(--muted); font-size: 15px; }
.section-title { margin-top: 10px; }
.loading { padding: 48px 0; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--map); border-top-color: var(--green); margin: 0 auto 10px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 24px; border-radius: 28px; border: 0; background: var(--green); color: var(--on-green); font: 700 17px/1.2 var(--font-body); text-decoration: none; text-align: center; }
.btn:hover { background: var(--green-dark); color: var(--on-green); }
.btn[disabled], .btn.is-disabled { background: var(--disabled); color: var(--on-green); cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn-outline:hover { background: var(--card); color: var(--green-dark); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #D6F01F; color: var(--ink); }
.btn-white { background: var(--card); color: var(--ink); }
.btn-white:hover { background: var(--card); color: var(--green); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: var(--on-green); }
.btn-danger-solid:hover { background: #8F1E18; }
.btn-sm { min-height: 44px; width: auto; padding: 0 16px; border-radius: 22px; font-size: 14px; flex-shrink: 0; }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }
.link-btn { border: 0; background: none; padding: 0; color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards and notes ---------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 16px; }
.card-tight { padding: 12px 14px; }
.row-card { background: var(--card); border-radius: var(--r-card); padding: 12px 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 64px; }
.row-card:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--map); }
.row-card .title { font-size: 15px; font-weight: 700; display: block; }
.row-card .meta { font-size: 13px; color: var(--muted); display: block; }
.banner { background: var(--green); color: var(--on-green); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.banner:hover { color: var(--on-green); background: var(--green-dark); }
.banner .title { font-size: 16px; font-weight: 700; display: block; }
.banner .meta { font-size: 13px; display: block; }
.note { border: 2px dashed var(--line); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.note svg { flex-shrink: 0; color: var(--green); }
.alert { border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.4; background: var(--pale); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--map); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }

/* ---------- Avatars, badges, chips ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--land); color: var(--on-green); font: 800 15px/1 var(--font-display); flex-shrink: 0; overflow: hidden; width: 40px; height: 40px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.coach { background: var(--green); }
.avatar.lime { background: var(--lime); color: var(--ink); }
.avatar.s48 { width: 48px; height: 48px; font-size: 17px; }
.avatar.s56 { width: 56px; height: 56px; font-size: 20px; }
.avatar.s64 { width: 64px; height: 64px; font-size: 24px; }
.avatar.s100 { width: 100px; height: 100px; font-size: 36px; }
.avatar.s120 { width: 120px; height: 120px; font-size: 42px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.lg { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 14px; gap: 6px; }
.badge-open { background: var(--lime); color: var(--ink); }
.badge-sponsored { background: var(--green); color: var(--on-green); }
.badge-pending { background: var(--card); color: var(--muted); }
.badge-paused { background: var(--divider); color: var(--muted); }
.badge-check { background: var(--pale); color: var(--ink); }
.badge-lime { background: var(--lime); color: var(--ink); height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; }
.badge-green { background: var(--green); color: var(--on-green); height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; }
.badge-outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); }
.chip { align-self: flex-start; padding: 4px 9px; border-radius: 10px; background: var(--pale); font-size: 12px; font-weight: 700; }
.status-line { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.status-line.ok { color: var(--green); font-weight: 700; }
.status-line.warn { color: var(--danger); font-weight: 700; }

/* ---------- Home and map ---------- */
.home-band { background: var(--map); }
.home-band .frame { display: grid; gap: 8px; padding-block: 0 24px; }
.home-copy { display: flex; flex-direction: column; gap: 14px; }
.home-intro { font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.home-copy h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-copy .home-actions { display: none; }
.map-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.map { position: relative; width: min(100%, 340px); aspect-ratio: 340 / 464; margin: 24px auto 0; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map svg path { fill: var(--land); }
.pin { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 17px; border: 2.5px solid var(--ink); background: var(--lime); color: var(--ink); font: 700 14px/1 var(--font-body); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.pin:hover, .pin:focus-visible { color: var(--ink); box-shadow: 0 0 0 6px rgba(229, 255, 46, 0.6); transform: translate(-50%, -50%) scale(1.08); outline: none; }
.pin.big { width: 40px; height: 40px; border-radius: 20px; font-size: 15px; }
/* The line just above the Philippines, in the empty sea at the top of the map (the land starts 16.4% down). */
.map-caption { font: 700 20px/1.2 var(--font-display); text-align: center; margin: 0; }
.map > .map-caption { position: absolute; left: 0; right: 0; bottom: calc(83.6% + 20px); }
.area-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.area-list a { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.area-list a:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.area-list .count { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.area-list .dot { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--ink); background: var(--lime); font: 700 12px/1 var(--font-body); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.home-sections { display: grid; gap: 28px; padding-block: 24px 8px; }
.how-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.how-mini li { background: var(--card); border-radius: 18px; padding: 14px 16px 14px 56px; position: relative; font-size: 15px; line-height: 1.4; counter-increment: step; }
.how-mini li::before { content: counter(step); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 14px; background: var(--lime); font: 700 14px/28px var(--font-body); text-align: center; }
.how-mini strong { display: block; }
@media (min-width: 900px) {
  .home-band .frame { grid-template-columns: minmax(0, 1fr) 460px; align-items: center; gap: 40px; padding-block: 24px 40px; }
  .home-copy h1 { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 44px; line-height: 1.05; }
  .home-intro { font-size: 18px; color: var(--ink); }
  .home-copy .home-actions { display: flex; gap: 10px; }
  .home-copy .home-actions .btn { width: auto; }
  .map { width: 100%; max-width: 420px; margin-top: 0; }
  .home-sections { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ---------- Kid cards and profiles ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters a { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card); font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.filters a[aria-current="page"] { background: var(--ink); color: var(--on-green); }
.kid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .kid-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .kid-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kid-card { background: var(--card); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.kid-card:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.kid-card-top { height: 132px; background: var(--map); position: relative; display: flex; align-items: center; justify-content: center; }
.kid-card-top > img { width: 100%; height: 100%; object-fit: cover; }
.kid-card-top .badge { position: absolute; left: 10px; top: 10px; }
.kid-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.kid-name { font: 800 17px/1.2 var(--font-display); }
.kid-meta { font-size: 13px; color: var(--muted); }
.kid-card .chip { margin-top: 6px; }
.kid-hero { height: 300px; border-radius: 24px; background: var(--map); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kid-hero.short { height: 220px; }
.kid-hero > img { width: 100%; height: 100%; object-fit: cover; }
.kid-hero .badge { position: absolute; left: 14px; top: 14px; }
.kid-title h1 { font-size: 30px; }
.kid-title .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.goal { font-size: 16px; line-height: 1.4; margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--card); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact span { font-size: 12px; color: var(--muted); }
.fact strong { font-size: 15px; overflow-wrap: anywhere; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { background: var(--card); border-radius: 18px; padding: 10px; display: flex; gap: 12px; align-items: center; }
.thumb { width: 84px; height: 84px; border-radius: 14px; background: var(--map); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--land); overflow: hidden; border: 0; padding: 0; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb.video { background: var(--ink); }
.thumb .play { width: 38px; height: 38px; border-radius: 19px; background: var(--lime); display: flex; align-items: center; justify-content: center; }
.feed-item .title { font-size: 16px; font-weight: 700; display: block; }
.feed-item .meta { font-size: 13px; color: var(--muted); display: block; }

/* ---------- Coach profile ---------- */
.coach-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-top: 4px; }
.coach-head h1 { margin-top: 4px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border-radius: 18px; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.stat strong { font: 800 28px/1.1 var(--font-display); color: var(--green); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stats.big .stat strong { font-size: 40px; }

/* ---------- Sticky action bar ---------- */
.cta-bar { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding-block: 12px max(20px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; margin-top: 8px; box-shadow: 0 -12px 16px -12px rgba(11,36,22,.12); }
.cta-bar .fine { text-align: center; }
@media (min-width: 720px) { .cta-bar { position: static; box-shadow: none; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 14px; font-weight: 700; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="tel"], .field input[type="number"], .field input[type="date"], .field select, .field textarea {
  width: 100%; min-height: 52px; border-radius: var(--r-field); border: 1.5px solid var(--line); background: var(--card); padding: 0 14px; font-size: 16px; color: var(--ink);
}
.field textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: 3px solid var(--map); outline-offset: 0; }
.field .hint, .hint { font-size: 13px; color: var(--muted); }
.field .error { font-size: 13px; color: var(--danger); font-weight: 700; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 60px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 40px; padding: 0 10px; border: 0; background: transparent; color: var(--green); font-size: 14px; font-weight: 700; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--green); }
.agreements { display: flex; flex-direction: column; gap: 14px; border: 0; margin: 0; }
.agreements legend { padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--green); }
.radio-cards { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0; }
.radio-cards legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--green); }
.radio-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 16px; cursor: pointer; }
.radio-card:has(input:checked) { border: 2px solid var(--green); }
.radio-card input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
.radio-card .title { font-size: 16px; font-weight: 700; display: block; }
.radio-card .meta { font-size: 13px; color: var(--muted); display: block; }
.chips-choice { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.chips-choice legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.chip-choice { height: 44px; padding: 0 16px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.chip-choice:has(input:checked) { border: 2px solid var(--green); }
.chip-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.upload { position: relative; min-height: 120px; border-radius: 18px; border: 2px dashed var(--line); background: var(--card); color: var(--green); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; text-align: center; padding: 12px; cursor: pointer; overflow: hidden; }
.upload:hover { border-color: var(--green); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload.has-file { border-style: solid; border-color: var(--green); }
.upload .preview { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; }
.upload .file-name { font-size: 13px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.upload.short { min-height: 88px; flex-direction: row; }
.upload-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
.upload-label .lock { font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.step-card { display: flex; flex-direction: column; gap: 12px; }
.step-num { width: 28px; height: 28px; border-radius: 14px; background: var(--lime); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .title { font-size: 15px; font-weight: 700; display: block; }
.toggle-row .meta { font-size: 13px; color: var(--muted); display: block; }
.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 12px; background: var(--card); transition: transform .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Lists and admin ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { background: var(--card); border-radius: 18px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; min-height: 64px; }
.list-item.has-actions { flex-wrap: wrap; }
.list-item .actions { width: 100%; display: flex; gap: 8px; padding-left: 52px; }
.list-item .actions .btn { flex: 1; }
.list-item .title { font-size: 15px; font-weight: 700; display: block; }
.list-item .meta { font-size: 13px; color: var(--muted); display: block; }
.nav-list { background: var(--card); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.nav-list a, .nav-list button { min-height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--ink); font-size: 16px; border: 0; border-bottom: 1px solid var(--divider); background: transparent; text-align: left; width: 100%; }
.nav-list > :last-child { border-bottom: 0; }
.nav-list a:hover, .nav-list button:hover { background: var(--bg); color: var(--ink); }
.meter { height: 10px; border-radius: 5px; background: var(--divider); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 5px; }
.detail-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-table th, .mini-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--divider); }
.mini-table th { font-size: 12px; color: var(--muted); font-weight: 700; }

/* ---------- Content pages ---------- */
.prose { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.55; max-width: 65ch; }
.prose h2 { margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { background: var(--card); border-radius: 18px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; }
.steps li.money { background: var(--pale); box-shadow: inset 0 0 0 2px var(--lime); }
.steps .step-num { margin-top: 1px; }
.steps strong { display: block; font-size: 16px; }
.steps p { font-size: 15px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.faq details { background: var(--card); border-radius: 16px; padding: 4px 16px; }
.faq details + details { margin-top: 8px; }
.faq summary { min-height: 52px; display: flex; align-items: center; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--green); }
.faq details p { padding-bottom: 14px; color: var(--muted); }
.draft-note { font-size: 13px; color: var(--muted); background: var(--pale); border-radius: 12px; padding: 8px 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--divider); margin-top: 24px; }
.site-footer .frame { padding-block: 24px 32px; display: grid; gap: 14px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer nav a { color: var(--ink); font-weight: 500; }
.site-footer .contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-footer .contact code { font: 500 14px var(--font-body); color: var(--ink); user-select: all; }
.copy-btn { height: 30px; padding: 0 10px; border-radius: 15px; border: 1.5px solid var(--line); background: transparent; font-size: 12px; font-weight: 700; color: var(--ink); }

/* ---------- Overlays ---------- */
.toast-host { position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--on-green); padding: 12px 16px; border-radius: 14px; font-size: 15px; box-shadow: 0 8px 24px rgba(11,36,22,.25); animation: toast-in .2s ease; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.modal-host { position: fixed; inset: 0; z-index: 70; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); }
.modal { background: var(--bg); width: min(100%, 520px); max-height: 88vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 20px 20px max(20px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 720px) { .modal-host { align-items: center; padding-bottom: 16px; } .modal { border-radius: 24px; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-head h2 { flex: 1; }
.media-full { width: 100%; border-radius: 16px; background: var(--card); max-height: 60vh; object-fit: contain; }

/* Coach page: track record and checks */
.record { display: grid; margin: 0; }
.record > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 10px; border-top: 1px solid var(--divider); }
.record > div:first-child { border-top: 0; padding-top: 2px; }
.record dt { min-width: 0; font-size: 15px; }
.record dd { margin: 0; flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); }
.record dd.none { font-weight: 500; color: var(--muted); }
.record dd.bad { color: var(--danger); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.check-list svg { flex: none; width: 20px; height: 20px; color: var(--green); margin-top: 1px; }
button.icon-btn { cursor: pointer; }

/* Live counts (home and Impact) */
.counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.counts > div { background: var(--card); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column-reverse; gap: 2px; }
.counts dt { font-size: 12px; color: var(--muted); }
.counts dd { margin: 0; font: 800 24px/1.1 var(--font-display); color: var(--green); font-variant-numeric: tabular-nums; }
@media (min-width: 720px) { .counts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Sponsors' stories */
.stories { display: grid; gap: 12px; }
.story { margin: 0; background: var(--card); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.story blockquote { margin: 0; font-size: 16px; line-height: 1.45; text-wrap: pretty; }
.story blockquote::before { content: "\201C"; }
.story blockquote::after { content: "\201D"; }
.story figcaption { font-size: 13px; color: var(--muted); }
.story figcaption strong { color: var(--ink); }
.home-stories { grid-column: 1 / -1; }
@media (min-width: 900px) { .home-stories .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.changes li { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--divider); }
.changes li:first-child { border-top: 0; padding-top: 0; }
.changes .meta { font-size: 13px; color: var(--muted); }

/* How to reach a coach */
.reach .steps li { background: var(--bg); }
.reach .steps li p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.reach .steps li.done .step-num { background: var(--green); color: var(--on-green); }
.reach .steps li.done strong { color: var(--green); }

/* Where a coach teaches: label left, value right */
.record.plain dt { flex: none; color: var(--muted); }
.record.plain dd { flex: 0 1 auto; min-width: 0; color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Girl / Boy choice */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.seg span { flex: 1; text-align: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 600; }
.seg input:checked + span { border: 2px solid var(--green); background: var(--pale); }
.seg input:focus-visible + span { outline: 3px solid var(--map); outline-offset: 1px; }
.field input[type="date"] { display: block; -webkit-appearance: none; appearance: none; line-height: 52px; }

/* Name or anonymous: the choice in the request form */
.choice-list { display: grid; gap: 8px; }
@media (min-width: 560px) { .choice-list { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.choice:has(input:checked) { border: 2px solid var(--green); background: var(--pale); }
.choice input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--green); }
.choice strong { display: block; font-size: 15px; }
.choice .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Contact buttons on a white card */
.contact-actions .btn { background: var(--bg); }
.contact-actions .btn:hover { background: var(--map); }

/* What happens now: who does each step */
.next-steps li { background: var(--card); }
.next-steps li.now { box-shadow: inset 0 0 0 2px var(--green); }
.next-steps li.done .step-num { background: var(--green); color: var(--on-green); }
.next-steps li.done strong { color: var(--green); }
.next-steps .step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.next-steps .step-head strong { display: inline; }
.next-steps .who { font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--ink); background: var(--pale); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.next-steps p { font-size: 14px; }

/* Coach home: each kid's sponsor */
.sponsor-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 13px; color: var(--ink); text-decoration: none; }
.sponsor-line:hover { color: var(--green); }
.sponsor-line .tag { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 1px 7px; }

/* ---------- Admin area ---------- */
/* The bar only admins see, on every page: the admin tabs, and a shortcut to edit the page they are on. */
.admin-bar { background: var(--ink); color: var(--on-green); }
.admin-bar .frame { display: flex; align-items: center; gap: 6px; padding-block: 8px; overflow-x: auto; scrollbar-width: none; }
.admin-bar .frame::-webkit-scrollbar { display: none; }
.admin-bar a { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--on-green); text-decoration: none; white-space: nowrap; }
.admin-bar a:hover { background: rgba(255, 255, 255, .14); color: var(--on-green); }
.admin-bar a[aria-current="page"] { background: var(--on-green); color: var(--ink); }
.admin-bar a:focus-visible { outline-color: var(--lime); }
.admin-bar .admin-tag { flex: none; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lime); margin-right: 4px; }
.admin-bar .admin-edit { background: var(--lime); color: var(--ink); }
.admin-bar .admin-edit:hover { background: #D6F01F; color: var(--ink); }
.admin-bar .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--lime); color: var(--ink); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.column.wide { max-width: 720px; }

/* Lists you can search and filter */
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 48px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--card); padding: 0 16px 0 42px; font-size: 16px; }
.search input:focus { border-color: var(--green); outline: 3px solid var(--map); outline-offset: 0; }
.filters button { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: var(--card); font-size: 14px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--on-green); }
.filters button .n { font-weight: 500; opacity: .7; }
a.list-item.link { text-decoration: none; color: var(--ink); }
a.list-item.link:hover { box-shadow: inset 0 0 0 2px var(--map); color: var(--ink); }
a.list-item.link > svg:last-child { flex: none; color: var(--muted); }
.list-item .badge { flex: none; }
.list-item .meta { overflow-wrap: anywhere; }
.badge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.field .static { min-height: 52px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--r-field); background: var(--bg); font-size: 16px; overflow-wrap: anywhere; }
.field input[readonly] { background: var(--bg); color: var(--muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 14px; }
.log { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: flex; flex-direction: column; gap: 1px; padding-block: 9px; border-top: 1px solid var(--divider); font-size: 14px; }
.log li:first-child { border-top: 0; padding-top: 0; }
.log .meta { font-size: 12px; color: var(--muted); }
.steps li.now { box-shadow: inset 0 0 0 2px var(--green); }

/* Home: an optional line of news an admin can set */
.home-notice { align-self: flex-start; background: var(--lime); color: var(--ink); border-radius: 14px; padding: 8px 14px; font-size: 14px; font-weight: 700; line-height: 1.35; }
