html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
/* Layout: a single trail of numbered checkpoints down a narrow column for parents; a wider camp-office workspace for leaders. Pine-green banner, neckerchief-yellow accent. */
:root {
  --bg: #f3f6f1;
  --surface: #ffffff;
  --fg: #1d2b22;
  --muted: #5a6b60;
  --line: #d5ded6;
  --pine: #1f5a3c;
  --pine-ink: #ffffff;
  --scarf: #f2b632;
  --scarf-ink: #2b2104;
  --lake: #2a7a8c;
  --danger: #b3261e;
  --ok: #2e7d4f;
  --warn: #9a6a00;
  --ok-bg: #e5f2e9;
  --field: #fbfcfa;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111814; --surface: #19231d; --fg: #e6eee8; --muted: #9fb2a5; --line: #2e3d33;
    --pine: #2f7d55; --pine-ink: #ffffff; --scarf: #f4c04f; --scarf-ink: #2b2104; --lake: #5bb3c6;
    --danger: #ff8a80; --ok: #7fd09d; --warn: #f0c060; --ok-bg: #1d3326; --field: #141d18; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111814; --surface: #19231d; --fg: #e6eee8; --muted: #9fb2a5; --line: #2e3d33;
  --pine: #2f7d55; --pine-ink: #ffffff; --scarf: #f4c04f; --scarf-ink: #2b2104; --lake: #5bb3c6;
  --danger: #ff8a80; --ok: #7fd09d; --warn: #f0c060; --ok-bg: #1d3326; --field: #141d18; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.2; }

.banner { background: var(--pine); color: var(--pine-ink); padding-block: 40px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); position: relative; overflow: hidden; }
.banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 28px; background: var(--bg); clip-path: polygon(0 100%, 0 60%, 8% 20%, 15% 55%, 24% 0, 33% 60%, 41% 30%, 50% 70%, 58% 15%, 67% 55%, 76% 25%, 84% 65%, 92% 10%, 100% 50%, 100% 100%); }
.banner-inner, .wrap { max-width: 760px; margin: 0 auto; }
body.wide .wrap, body.wide .banner-inner { max-width: 1080px; }
.brand { display: flex; align-items: center; gap: 20px; }
.brand-text { min-width: 0; }
.logo-badge { flex: none; width: 88px; height: 112px; display: grid; place-items: center; }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; filter: brightness(0) invert(1); }
body.office .logo-badge { width: 58px; height: 74px; }
@media (max-width: 480px) { .brand { gap: 14px; } .logo-badge { width: 62px; height: 80px; } }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--scarf); }
.banner h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 700; margin-top: 6px; }
.banner .school { font-family: var(--font-display); font-weight: 500; font-size: 20px; opacity: .92; margin-top: 2px; }
.banner p { max-width: 62ch; margin: 16px 0 0; opacity: .92; }

.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 8px 64px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 20px; }
.tab { font: 600 14px var(--font-body); border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.notice { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--muted); }
.notice.warn { border-color: var(--scarf); }
.req-note { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.req { color: var(--danger); font-weight: 700; }

form { display: grid; gap: 24px; }
fieldset.section { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 24px; margin: 0; min-width: 0; display: grid; gap: 20px; }
.section-head { display: flex; gap: 14px; align-items: flex-start; }
.step { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--scarf); color: var(--scarf-ink); font: 700 17px var(--font-display); display: grid; place-items: center; }
.section-head h2 { font-size: 22px; font-weight: 600; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: 2fr 1.3fr 1.3fr; gap: 16px; }
@media (max-width: 620px) { .grid2, .grid3 { grid-template-columns: 1fr; } fieldset.section { padding: 18px; } }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .legend-q { font-weight: 700; font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; font: 400 16px var(--font-body); color: var(--fg); background: var(--field);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input[readonly] { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.locked { position: relative; }
.locked input { padding-right: 34px; font-weight: 700; color: var(--fg); }
.locked svg { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: var(--muted); pointer-events: none; }
textarea { min-height: 84px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, .choice input:focus-visible + span, .drop:focus-within { outline: 3px solid var(--lake); outline-offset: 1px; }
.invalid input, .invalid select, .invalid textarea, .invalid .drop { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; font-weight: 600; }
.err:empty { display: none; }

.contact { border-top: 1px dashed var(--line); padding-top: 18px; display: grid; gap: 14px; }
.contact:first-of-type { border-top: 0; padding-top: 0; }
.contact h3 { font-size: 17px; font-weight: 600; color: var(--pine); }
:root[data-theme="dark"] .contact h3 { color: var(--lake); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contact h3 { color: var(--lake); } }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.stack { display: grid; gap: 8px; }
.choices.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--field); font-size: 15px; cursor: pointer; }
.choice span::before { content: ""; flex: none; width: 16px; height: 16px; border: 2px solid var(--muted); border-radius: 50%; }
.choice input[type="checkbox"] + span::before { border-radius: 4px; }
.choice input:checked + span { border-color: var(--pine); background: var(--ok-bg); font-weight: 600; }
.choice input:checked + span::before { border-color: var(--pine); background: var(--pine); box-shadow: inset 0 0 0 3px var(--field); }
.inline-check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }

/* Upload areas */
.uploads { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; }
.id-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .uploads { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .id-pair { grid-template-columns: 1fr; } }
.drop { position: relative; border: 2px dashed var(--line); border-radius: 12px; background: var(--field); min-height: 170px; display: grid; place-items: center; text-align: center; padding: 14px; cursor: pointer; overflow: hidden; }
.drop.photo { aspect-ratio: 4 / 5; min-height: 0; max-width: 100%; }
.drop.over { border-color: var(--lake); background: var(--ok-bg); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .ph { display: grid; gap: 6px; justify-items: center; color: var(--muted); font-size: 14px; pointer-events: none; }
.drop .ph svg { width: 34px; height: 34px; fill: none; stroke: var(--pine); stroke-width: 1.6; }
.drop .ph strong { color: var(--fg); font-size: 15px; }
.drop.has { border-style: solid; border-color: var(--pine); padding: 0; }
.drop.has .ph { display: none; }
.drop .preview { position: absolute; inset: 0; display: none; }
.drop.has .preview { display: block; }
.drop .preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drop .preview .pdf { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; font-size: 13px; color: var(--muted); padding: 10px; overflow-wrap: anywhere; }
.drop .preview .pdf b { font: 700 22px var(--font-display); color: var(--danger); }
.drop .remove { position: absolute; top: 8px; right: 8px; z-index: 2; display: none; border: 0; border-radius: 999px; padding: 5px 11px; font: 700 12px var(--font-body); background: var(--fg); color: var(--bg); cursor: pointer; }
.drop.has .remove { display: block; }
.slot-label { font-weight: 700; font-size: 14px; }

.declaration { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; font-size: 15px; display: grid; gap: 10px; max-height: 320px; overflow-y: auto; }
.declaration p { margin: 0; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { font: 700 16px var(--font-body); border: 0; border-radius: 10px; padding: 13px 24px; cursor: pointer; background: var(--pine); color: var(--pine-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger.armed { background: var(--danger); color: var(--surface); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.status { font-size: 14px; color: var(--muted); }
.status.bad { color: var(--danger); font-weight: 600; }
.status.good { color: var(--ok); font-weight: 600; }

.done { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; display: grid; gap: 14px; }
.done h2 { font-size: 26px; color: var(--pine); }
.ref { font: 700 15px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--ok-bg); padding: 2px 8px; border-radius: 6px; }

.list { display: grid; gap: 10px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.alert { border-color: var(--danger); color: var(--danger); }
.pill.swim { border-color: var(--lake); color: var(--lake); }
.st { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.st-new { color: var(--lake); }
.st-review { color: var(--warn); }
.st-approved { color: var(--surface); background: var(--ok); border-color: var(--ok); }
.st-waitlist { color: var(--warn); border-style: dashed; }
.st-declined { color: var(--muted); text-decoration: line-through; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
details.row { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
details.row summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; cursor: pointer; list-style: none; }
details.row summary::-webkit-details-marker { display: none; }
.who { font-weight: 700; }
.meta { color: var(--muted); font-size: 13px; }
dl.kv { display: grid; grid-template-columns: minmax(130px, 220px) minmax(0, 1fr); gap: 6px 16px; margin: 14px 0 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 6px; } }

/* Camp office (management) */
.office-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.office-head h2 { font-size: 26px; font-weight: 600; }
.office-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { font: 600 13px var(--font-body); border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip b { font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--pine); color: var(--pine-ink); border-color: var(--pine); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { flex: 1 1 240px; width: auto; }
.toolbar select { flex: 0 1 200px; width: auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table.apps { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.apps th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.apps td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.apps tr:last-child td { border-bottom: 0; }
table.apps tbody tr { cursor: pointer; }
table.apps tbody tr:hover td { background: var(--field); }
table.apps .num { font-variant-numeric: tabular-nums; }
.camper { display: flex; gap: 10px; align-items: center; }
.thumb { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--ok-bg); flex: none; display: grid; place-items: center; font: 700 14px var(--font-display); color: var(--pine); border: 1px solid var(--line); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--fg); font-weight: 700; cursor: pointer; text-align: left; }

.detail { display: grid; gap: 18px; }
.detail-top { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.portrait { width: 132px; aspect-ratio: 4 / 5; border-radius: 10px; object-fit: cover; background: var(--ok-bg); border: 1px solid var(--line); display: grid; place-items: center; font: 700 34px var(--font-display); color: var(--pine); flex: none; max-width: 100%; }
.detail-id { flex: 1 1 260px; min-width: 0; display: grid; gap: 10px; }
.detail-id h2 { font-size: 28px; font-weight: 600; }
.review-box { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; }
@media (max-width: 620px) { .review-box { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 16px; min-width: 0; }
.panel h3 { font-size: 18px; font-weight: 600; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.doc { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--field); display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.doc .doc-title { font-weight: 700; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.doc .doc-body { display: grid; place-items: center; min-height: 150px; color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.doc .doc-body img { max-width: 100%; max-height: 220px; object-fit: contain; display: block; }
.doc .doc-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.doc .doc-actions a { color: var(--lake); font-weight: 700; }
.doc .doc-actions label { color: var(--fg); font-weight: 700; cursor: pointer; position: relative; }
.doc .doc-actions label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
body.office .banner { padding-block: 20px 40px; }
body.office .banner p { display: none; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.subnav button { font: 700 14px var(--font-body); background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 12px; cursor: pointer; margin-bottom: -1px; }
.subnav button[aria-current] { color: var(--fg); border-bottom-color: var(--scarf); }
.subnav button:hover { color: var(--fg); }
.pane { display: grid; gap: 16px; min-width: 0; }
.pane-intro { margin: 0; color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; cursor: pointer; color: var(--fg); font: inherit; }
.tile:hover { border-color: var(--pine); }
.tile-l { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile-v { font: 600 32px var(--font-display); line-height: 1.1; }
.tile-s { font-size: 12px; color: var(--muted); }
.tile.alert .tile-v { color: var(--danger); }
.tile.swim .tile-v { color: var(--lake); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .charts { grid-template-columns: 1fr; } }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) 32px; gap: 10px; align-items: center; font-size: 14px; padding: 2px 0; border-radius: 4px; }
.bar-row:hover { background: var(--field); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bar-track { height: 14px; display: block; }
.bar { display: block; height: 100%; min-width: 3px; background: var(--pine); border-radius: 0 4px 4px 0; }
.bar-val { text-align: right; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mini-list { display: grid; }
.mini { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; flex-wrap: wrap; }
.mini:first-child { border-top: 0; }
.mini:hover { background: var(--field); }
.bulk { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--ok-bg); border: 1px solid var(--pine); border-radius: 10px; padding: 10px 14px; }
.bulk select { width: auto; padding: 7px 10px; font-size: 14px; }
table.apps th.ck, table.apps td.ck { width: 36px; padding-right: 0; }
table.apps input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--pine); cursor: pointer; }
table.apps.plain tbody tr { cursor: default; }
table.apps td.wrap { min-width: 150px; max-width: 260px; overflow-wrap: anywhere; vertical-align: top; }
.alert-t { color: var(--danger); }
table.apps td.wrap .pill { white-space: normal; display: inline-block; }
.copy { background: none; border: 0; padding: 0; font: 700 14px var(--font-body); color: var(--lake); cursor: pointer; }
.cert-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .cert-layout { grid-template-columns: 1fr; } }
.cert-canvas { width: 100%; height: auto; aspect-ratio: 1754 / 1240; max-width: 100%; display: block; border-radius: 6px; border: 1px solid var(--line); background: #ffffff; }
.cert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; }
.cert-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--field); min-width: 0; }
.cert-item.on { border-color: var(--pine); background: var(--ok-bg); }
.cert-check input { width: 18px; height: 18px; accent-color: var(--pine); cursor: pointer; }
.cert-name { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 0; font: inherit; color: var(--fg); text-align: left; cursor: pointer; }
.cert-name .who { overflow-wrap: anywhere; }
.danger-zone { border-color: var(--danger); }
.danger-zone p { margin: 0; color: var(--muted); font-size: 14px; }
footer { color: var(--muted); font-size: 13px; text-align: center; margin-top: 32px; }
@media (prefers-reduced-motion: no-preference) { .choice span, .tab, .btn, .chip, .drop { transition: background .15s, border-color .15s; } }

/* Standalone site additions */
a { color: var(--lake); }
a.tab { text-decoration: none; display: inline-block; }
.tab[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
input[type="email"], input[type="password"] {
  width: 100%; font: 400 16px var(--font-body); color: var(--fg); background: var(--field);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.auth-card { max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 12px; }
.auth-card h2 { font-size: 24px; font-weight: 600; }
.auth-card p { margin: 0; }
.auth-form { display: grid; gap: 14px; }
.forgot summary { cursor: pointer; font-weight: 700; color: var(--lake); font-size: 14px; }
.forgot[open] summary { margin-bottom: 12px; }
.login-box { display: grid; gap: 8px; background: var(--ok-bg); border: 1px solid var(--pine); border-radius: 10px; padding: 14px 16px; }
.notice + .notice { margin-top: 8px; }
