/* Same design language as the other HSA apps (their src/Styles.html). */
:root {
  /* colours */
  --navy: #1a3a7a; --navy-dark: #122a5c; --orange: #d9772e; --green: #2e8540; --red: #9b1c1c;
  --bg-soft: #f4f6fb; --border: #dde3ef; --text: #2a2f3a; --text-soft: #5b6272; --muted: #7a8091;
  --tint-ok: #e9f6ec; --tint-warn: #fff8ee; --tint-bad: #fdecec; --tint-note: #fff3cd;
  /* layout */
  --page-width: 1000px; --tip-width: 260px; --narrow-width: 520px; --gutter: 44px; --gutter-phone: 16px;
  /* shape */
  --radius-s: 6px; --radius: 10px; --radius-l: 14px; --pill: 999px;
  --shadow-card: 0 4px 24px rgba(20, 40, 90, .08); --shadow-soft: 0 1px 4px rgba(20, 40, 90, .05);
  --shadow-bar: 0 -4px 16px rgba(20, 40, 90, .10); --focus-ring: 0 0 0 2px #fde3cc; --shadow-cta: 0 3px 10px rgba(217, 119, 46, .35);
  /* type: xs = fine print, s = tables and hints, m = body, l = emphasis; headings and the one big number */
  --text-2xs: 11px; --text-xs: 12.5px; --text-s: 13.5px; --text-m: 14.5px; --text-l: 16px; --h1: 24px; --h2: 19px; --h3: 16px; --kpi: 28px;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }  /* the frame does not jump sideways between short and long pages */
body { margin: 0; background: #eef1f7; color: var(--text); font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.55; }
a { color: var(--navy); }
.page { max-width: var(--page-width); margin: 32px auto 64px; background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-card); overflow: clip; }
/* overflow: clip (not hidden) keeps the rounded card AND lets the tab bar and the bottom bar stay sticky */
.page.wide { max-width: var(--page-width); }  /* one width for every page (2026-10-16) */
header.masthead { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; padding: 28px 40px 24px; display: flex; align-items: center; gap: 22px; }
header.masthead img.logo { width: 70px; height: 70px; border-radius: 50%; background: #fff; padding: 3px; flex-shrink: 0; }
.eyebrow { font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
header.masthead h1 { margin: 0; font-size: var(--h1); line-height: 1.3; }
header.masthead .subtitle { margin-top: 4px; font-size: var(--text-m); color: rgba(255, 255, 255, .9); }  /* not opacity: the Tools menu opens inside it */
header.masthead form { display: inline; }
.content { padding: 28px 44px 20px; }
footer { background: var(--bg-soft); padding: 20px 44px 24px; font-size: var(--text-xs); color: var(--muted); border-top: 1px solid var(--border); text-align: center; }
footer .org { color: var(--navy-dark); font-weight: 600; font-size: var(--text-s); margin-bottom: 4px; }

.callout { border-radius: var(--radius); padding: 14px 18px; font-size: var(--text-m); margin: 16px 0; border: 1px solid var(--border); }
.callout.note { background: var(--bg-soft); border-left: 4px solid var(--navy); }
.callout.tip { background: var(--tint-warn); border-left: 4px solid var(--orange); }
.callout.error { background: var(--tint-bad); border-left: 4px solid var(--red); }
.callout.ok { background: var(--tint-ok); border-left: 4px solid var(--green); }
.callout .label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; font-weight: 700; }
.muted { color: var(--muted); font-size: var(--text-s); }
.small { font-size: var(--text-s); }
h2 { color: var(--navy-dark); font-size: var(--h2); margin: 26px 0 6px; }
h3 { color: var(--navy-dark); font-size: var(--text-l); margin: 18px 0 6px; }

button, .button { font: inherit; border: 0; border-radius: var(--radius-s); padding: 10px 18px; cursor: pointer; display: inline-block; text-decoration: none; }
.primary { background: var(--navy); color: #fff; font-weight: 600; }
.primary.big { padding: 13px 26px; font-size: var(--text-l); }
.secondary { background: var(--bg-soft); color: var(--navy-dark); font-weight: 600; border: 1px solid var(--border); }
.danger { background: var(--red); color: #fff; font-weight: 600; }
.link-button { background: none; color: var(--navy); padding: 0; font-weight: 600; text-decoration: underline; }
.on-dark { color: #fff; }
button:disabled { opacity: .55; cursor: default; }
input[type=email], input[type=text], input[type=search], input[type=tel], input[type=number], input[type=url], textarea, select {
  font: inherit; font-size: var(--text-l); padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-s); width: 100%; background: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.row > input { flex: 1; min-width: 220px; width: auto; }
.row > .field.wide { flex: 1 1 100%; }
label.field { display: block; margin: 10px 0; font-weight: 600; font-size: var(--text-m); }
label.field span.hint { font-weight: 400; color: var(--muted); }
label.field input, label.field textarea { margin-top: 4px; font-weight: 400; }

/* children and clubs */
.child { border: 1px solid var(--border); border-radius: var(--radius-l); margin: 22px 0; overflow: hidden; }
.child > .head { background: var(--bg-soft); padding: 12px 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.child > .head h2 { margin: 0; font-size: var(--h2); }
.child > .body { padding: 6px 18px 14px; }
.badge { font-size: var(--text-xs); font-weight: 600; padding: 2px 9px; border-radius: var(--radius); background: var(--bg-soft); color: var(--text-soft); white-space: nowrap; }
.badge.grade { background: #e6ecf8; color: var(--navy-dark); }
.badge.ok { background: #dff3e4; color: var(--green); }
.badge.warn { background: #fdebd9; color: #9a4f12; }
.badge.bad { background: #fde2e1; color: var(--red); }
.badge.new { background: var(--orange); color: #fff; }
fieldset.day { border: 0; padding: 0; margin: 14px 0 6px; }
fieldset.day legend { font-weight: 700; color: var(--navy-dark); font-size: var(--text-l); padding: 0; margin-bottom: 6px; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 6px 0; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--orange); }
.choice input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--orange); }
.choice.selected { border-color: var(--orange); background: var(--tint-warn); box-shadow: var(--focus-ring); }
.choice.none { color: var(--muted); padding: 7px 12px; }
.choice .name { font-weight: 700; }
.choice .meta { font-size: var(--text-s); color: var(--text-soft); }
.choice .desc { font-size: var(--text-s); margin-top: 2px; }
.choice .right { margin-left: auto; text-align: right; white-space: nowrap; font-size: var(--text-s); }
.status-line { border-radius: var(--radius); padding: 10px 12px; margin: 6px 0; font-size: var(--text-m); }
.status-line.paid { background: var(--tint-ok); }
.status-line.waitlist { background: var(--bg-soft); }
.status-line.offered { background: var(--tint-note); }
.status-line.hold { background: var(--bg-soft); }
.status-line.gone { background: var(--tint-bad); }
.status-line form { display: inline; }

/* bottom bar */
.bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: var(--shadow-bar);
       padding: 12px 44px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; z-index: 3; }
.bar .what { flex: 1; min-width: 180px; font-size: var(--text-m); }

/* review */
table.lines { width: 100%; border-collapse: collapse; font-size: var(--text-m); }
table.lines td, table.lines th { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.lines td.money, table.lines th.money { text-align: right; white-space: nowrap; }
table.lines tr.total td { font-weight: 700; border-bottom: 0; }
tr.full td { background: var(--tint-bad); }
.waiver { white-space: pre-line; font-size: var(--text-s); background: var(--bg-soft); border-radius: var(--radius-s); padding: 10px 12px; max-height: 220px; overflow: auto; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { border: 1px solid var(--border); border-radius: var(--pill); padding: 6px 14px; cursor: pointer; }
.pills input { accent-color: var(--orange); }
.busy { opacity: .6; pointer-events: none; }

@media (max-width: 640px) {
  .page { margin: 0; border-radius: 0; }
  header.masthead { padding: 20px 18px 18px; gap: 14px; }
  header.masthead img.logo { width: 52px; height: 52px; }
  header.masthead h1 { font-size: var(--h1); }
  .content { padding: 18px 16px 10px; }
  .bar { padding: 10px 16px; }
  .choice { flex-wrap: wrap; }
  .choice .right { margin-left: 30px; text-align: left; }
  footer { padding: 16px 18px 20px; }
}
@media print {
  .bar, footer, .no-print, header.masthead form { display: none !important; }
  .page { box-shadow: none; margin: 0; max-width: none; }
}
.inline { display: inline; }

/* control center */
nav.tabs { display: flex; gap: 2px; flex-wrap: wrap; padding: 0 36px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
nav.tabs a { padding: 13px 9px; font-size: var(--text-m); color: var(--text-soft); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
nav.tabs a.active { color: var(--navy-dark); border-bottom-color: var(--orange); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .value { font-size: var(--kpi); font-weight: 700; }
.tile .label { font-size: var(--text-s); color: var(--text-soft); }
table.grid { width: 100%; border-collapse: collapse; font-size: var(--text-s); margin: 8px 0 16px; }
table.grid th { text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--border); }
table.grid td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grid .money { text-align: right; white-space: nowrap; }
table.grid tr.total td { font-weight: 700; }
table.grid td.keep { white-space: nowrap; }
.closed-row td { color: #a3a9b6; }
.failed-row td { background: var(--tint-bad); }
.ok-text { color: var(--green); }
.bad-text { color: var(--red); }
code { background: var(--bg-soft); padding: 1px 5px; border-radius: var(--radius-s); }
@media print { nav.tabs { display: none; } table.roster { font-size: var(--text-xs); } }

/* one tab per child (family page); without JavaScript every child shows one below the other */
.child-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 18px -4px 0; padding: 8px 4px 0; position: sticky; top: 0; z-index: 2;
              background: #fff; scrollbar-width: none; }
.child-tab { flex: 0 0 auto; text-align: left; background: var(--bg-soft); border: 1px solid var(--border); border-bottom: 0;
             border-radius: var(--radius) var(--radius) 0 0; padding: 10px 16px; color: var(--navy-dark);
             transition: background .2s ease, box-shadow .2s ease, border-color .2s ease, transform .15s ease; }
.child-tab:hover { transform: translateY(-1px); }
.child-tab:focus-visible { outline: 3px solid #fde3cc; outline-offset: 1px; }
.child-tab .tab-name { display: block; font-weight: 700; font-size: var(--text-l); }
.child-tab .tab-meta { display: block; font-size: var(--text-xs); color: var(--text-soft); }
.child-tab[aria-selected="true"] { background: #fff; border-color: var(--orange); box-shadow: inset 0 3px 0 var(--orange); }
.child-tab .tab-count.has { color: var(--green); font-weight: 600; }
form.tabbed section.child { display: none; margin-top: 0; border-top-left-radius: 0; }
form.tabbed section.child.active { display: block; animation: panel-in .22s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { form.tabbed section.child.active { animation: none; } .child-tab { transition: none; } }
/* phones: the tabs share the width so three children fit side by side (a fourth scrolls); a long name ends in "…",
   the grade and club count wrap rather than hide */
@media (max-width: 600px) {
  .child-tabs { gap: 4px; }
  .child-tab { flex: 1 1 0; min-width: 96px; padding: 8px 10px; }
  .child-tab .tab-name { font-size: var(--text-m); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* weekdays fold open and closed (native <details>: works without JavaScript) */
details.day { border: 1px solid var(--border); border-left: 5px solid var(--day, var(--navy)); border-radius: var(--radius); margin: 16px 0;
               background: #fff; interpolate-size: allow-keywords; box-shadow: var(--shadow-soft); }
/* Mon -> Fri: the HSA navy, a step lighter each day (edge and arrow only; names stay navy for contrast) */
details.day.day-mon { --day: #122a5c; } details.day.day-tue { --day: #1f4488; } details.day.day-wed { --day: #2f62b3; }
details.day.day-thu { --day: #4a82d1; } details.day.day-fri { --day: #74a6e6; }
details.day[open] > summary { background: var(--bg-soft); border-bottom: 1px solid var(--border); border-radius: var(--radius-s) var(--radius) 0 0; }
details.day[open] .day-body { padding-top: 6px; }
details.day > summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: baseline;
                        gap: 4px 12px; border-radius: var(--radius); }
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::before { content: "▸"; color: var(--day, var(--orange)); font-size: var(--text-s); transition: transform .2s ease; width: 10px; }
details.day[open] > summary::before { transform: rotate(90deg); }
details.day > summary:hover { background: var(--bg-soft); }
details.day .day-name { font-weight: 700; color: var(--navy-dark); font-size: var(--text-l); }
details.day .day-meta { color: var(--muted); font-size: var(--text-s); }
details.day .day-choice { margin-left: auto; font-size: var(--text-s); font-weight: 600; color: var(--text-soft); }
details.day .day-choice.picked { color: var(--orange); }
details.day .day-body { padding: 0 12px 10px; }
details.day::details-content { transition: height .22s ease, content-visibility .22s allow-discrete; height: 0; overflow: clip; }
details.day[open]::details-content { height: auto; }
.day-tools { text-align: right; margin: 8px 0 0; font-size: var(--text-s); }
.next-child { text-align: right; margin: 14px 0 4px; }
/* Hold a child's seats (family page): the main action of a child's tab before Continue */
.reserve-panel { margin: 18px 0 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.reserve-panel .reserve-hint { margin-top: 6px; font-size: var(--text-s); color: var(--text-soft); }
.reserve-panel.held { background: var(--tint-ok); border-color: var(--green); border-left: 4px solid var(--green); }
.reserve-panel .reserve-title { font-weight: 700; color: var(--green); font-size: var(--text-m); }
.reserve-panel .reserve-what { margin-top: 2px; font-size: var(--text-s); }
.reserve-panel .reserve-changed { margin-top: 12px; padding: 16px; text-align: center; background: var(--tint-warn); border: 2px solid var(--orange); border-radius: var(--radius); }
.reserve-panel .reserve-changed[hidden] { display: none; }
.child-tab .tab-held { display: block; font-size: var(--text-xs); font-weight: 700; color: var(--green); }

/* club descriptions: two lines, then More / Less (JavaScript adds .clamped; without it the full text shows) */
.choice .desc.clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { background: none; border: 0; padding: 2px 0 0; font: inherit; font-size: var(--text-s); font-weight: 600; color: var(--navy);
             text-decoration: underline; cursor: pointer; }

/* review page form rows: label on its own line, then the answer, then an optional hint */
.form-row { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.form-row:last-child { margin-bottom: 4px; }
.form-label { display: block; font-weight: 600; font-size: var(--text-m); color: var(--text); margin: 0 0 6px; padding: 0; }
.form-hint { font-size: var(--text-s); color: var(--muted); margin-top: 6px; line-height: 1.45; }
.form-hint-top { margin: -2px 0 10px; }
.readonly-value { padding: 9px 11px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-s); font-size: var(--text-l); }
.choice-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-pills label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius);
                      padding: 11px 14px; cursor: pointer; font-weight: 600; background: #fff; transition: border-color .15s ease, background .15s ease; }
.choice-pills label:hover { border-color: var(--orange); }
.choice-pills label:has(input:checked) { border-color: var(--orange); background: var(--tint-warn); box-shadow: var(--focus-ring); }
.choice-pills input { accent-color: var(--orange); width: 17px; height: 17px; margin: 0; }
section.child > .body { padding-top: 14px; }

/* the Books */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.toolbar .quick-search { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.toolbar .quick-search input { flex: 1; width: auto; }
.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--pill); overflow: hidden; }
.mode-switch a { padding: 7px 16px; font-weight: 600; font-size: var(--text-s); color: var(--text-soft); text-decoration: none; }
.mode-switch a.on { background: var(--navy); color: #fff; }
.status-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 7px 14px; border-radius: var(--pill); font-size: var(--text-s); font-weight: 600; text-decoration: none; }
.chip small { font-weight: 400; opacity: .8; }
.chip.ok { background: var(--tint-ok); color: var(--green); }
.chip.warn { background: var(--tint-note); color: #7a5200; }
.chip.bad { background: var(--tint-bad); color: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0 0 22px; }
.kpi { background: linear-gradient(160deg, #122a5c, #1b3d82); color: #fff; border-radius: var(--radius-l); padding: 16px 18px; }
.kpi .label { font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.kpi .value { font-size: var(--kpi); font-weight: 700; margin: 4px 0 2px; }
.kpi .value.ok-text { color: #9fe3b0; } .kpi .value.bad-text { color: #ffb4b4; }
.kpi .hint { font-size: var(--text-xs); opacity: .8; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 8px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-l); padding: 6px 18px 16px; }
.panel h2 { font-size: var(--text-l); margin: 12px 0 6px; }
.panel h2 .muted { font-weight: 400; font-size: var(--text-s); }
table.grid.compact { margin: 6px 0 10px; }
table.grid.compact td { padding: 6px 6px; }
.in { color: var(--green); } .out { color: var(--red); }
table.register td a { color: var(--navy-dark); text-decoration: none; font-weight: 500; }
table.register td a:hover { text-decoration: underline; }
.filters-fold { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; margin: 0 0 14px; }
.filters-fold summary { font-weight: 600; color: var(--navy-dark); cursor: pointer; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
.filters-grid label { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); color: var(--text-soft); font-weight: 600; }
.filters-grid select, .filters-grid input { width: 100%; min-width: 0; }
.filters-grid .actions { display: flex; gap: 8px; }
table.grid td.actions { white-space: nowrap; }
table.grid td.actions a { font-weight: 600; text-decoration: none; }
table.grid td.actions a:hover { text-decoration: underline; }
table.grid td.actions .link-button { text-decoration: none; }
.access-table th { white-space: nowrap; }
table.grid td.actions .link-button:hover { text-decoration: underline; }

/* file inputs look like the other buttons */
input[type="file"] { font-size: var(--text-m); color: var(--muted); }
input[type="file"]::file-selector-button { background: var(--bg-soft); color: var(--navy-dark); font-weight: 600; border: 1px solid var(--border);
  border-radius: var(--radius-s); padding: 9px 16px; margin-right: 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* receipt shown inside the site: the email's navy header card becomes a light heading (the masthead is already navy) */
.receipt-page .receipt { max-width: none; font-size: var(--text-m); }
.receipt-page .receipt table { font-size: var(--text-m); }
.receipt-page .receipt .r-head { background: none; color: var(--text); border-radius: 0; border-bottom: 2px solid var(--navy-dark); }
.receipt-page .receipt .r-head td { padding: 4px 0 12px; }
.receipt-page .receipt .r-org { color: var(--muted); opacity: 1; }
.receipt-page .receipt .r-title { color: var(--navy-dark); font-size: var(--h1); }
.receipt-page .receipt .r-meta { color: var(--text-soft); }
.receipt-page .receipt .r-head-logo img { background: none; padding: 0; border-radius: 0; width: 64px; }
.receipt-page .receipt .r-test { border-radius: 0 0 var(--radius-s) var(--radius-s); }

.callout .body { margin-top: 8px; }

.filters select, .filters input { width: auto; min-width: 160px; }  /* the Money pages' filter row */

/* page head: title + one-line lead on the left, mode switch and actions on the right (every Books page) */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 2px 0 14px; }
.page-head h2 { margin: 0; font-size: var(--h1); }
.page-head h2 .muted { font-weight: 400; font-size: var(--text-m); }
.page-head .lead { margin: 4px 0 0; max-width: 60ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.page-actions .quick-search { display: flex; gap: 6px; }
.page-actions .quick-search input { width: 260px; font-size: var(--text-m); padding: 7px 10px; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.subnav a { padding: 6px 13px; border-radius: var(--pill); font-size: var(--text-s); font-weight: 600; color: var(--text-soft); background: var(--bg-soft); text-decoration: none; }
.subnav a.on { background: var(--navy); color: #fff; }
.button.small, button.small { padding: 5px 11px; font-size: var(--text-s); }
.filters-grid { font-size: var(--text-s); }
.filters-grid label { font-size: var(--text-xs); }
.filters-grid select, .filters-grid input { font-size: var(--text-s); padding: 6px 9px; }
.filters-fold summary { font-size: var(--text-m); }
.back { font-size: var(--text-s); margin: 0 0 8px; }

/* tooltip: data-tip="..." on any element; shows at once on hover or keyboard focus (tabindex="0"), also on tap */
[data-tip] { position: relative; cursor: help; }
th[data-tip] { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: var(--tip-width);
  background: var(--navy-dark); color: #fff; font-size: var(--text-xs); font-weight: 400; line-height: 1.4; letter-spacing: normal;
  text-transform: none; text-align: left; white-space: normal; padding: 7px 10px; border-radius: var(--radius-s); box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none; }
[data-tip]:hover::after, [data-tip]:focus::after, [data-tip]:focus-within::after { opacity: 1; visibility: visible; }
.money[data-tip]::after, [data-tip].tip-left::after { left: auto; right: 0; }
.js-tips [data-tip]::after { content: none; }  /* app.js shows the floating box instead */
.tip-box { position: absolute; z-index: 50; max-width: var(--tip-width); background: var(--navy-dark); color: #fff; font-size: var(--text-xs);
  line-height: 1.4; padding: 7px 10px; border-radius: var(--radius-s); box-shadow: var(--shadow-card); pointer-events: none; }
.info { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: var(--pill);
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); font-weight: 700;
  vertical-align: middle; margin-left: 4px; }
.page-head h2 .info { font-size: var(--text-xs); }
/* filter panel: always visible, compact */
.filters-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0 0 14px; background: var(--bg-soft); }
.filters-panel .filters-grid { margin-top: 0; }
@media print { [data-tip]::after { display: none; } }
.kpi.tile-link { text-decoration: none; display: block; transition: transform .12s ease; }
.kpi.tile-link:hover { transform: translateY(-2px); }

/* yearbook photo page */
.yb-progress { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 14px; }
.bar-track { height: 8px; background: var(--bg-soft); border-radius: var(--pill); margin: 8px 0; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); width: 0; transition: width .3s ease; }
.yb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 8px; }
.yb-cat { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.yb-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.yb-photo { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.yb-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); background: var(--bg-soft); }
.yb-photo input { font-size: var(--text-s); padding: 5px 8px; }
.yb-photo input.saved { border-color: var(--green); }
.yb-nothumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px;
  background: var(--bg-soft); border-radius: var(--radius-s); color: var(--muted); font-size: var(--text-xs); }
.yb-add { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--border); border-radius: var(--radius-s);
  color: var(--navy); font-weight: 600; cursor: pointer; font-size: var(--text-s); }
.yb-add:hover { border-color: var(--orange); }
.yb-add input { display: none; }
.yb-status { min-height: 1.2em; margin-top: 6px; }
.yb-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.yb-card { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.yb-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-s); background: var(--bg-soft); }
.yb-review-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.yb-review-form input { flex: 1 1 100%; font-size: var(--text-s); padding: 5px 8px; }
.small-input, .row > input.small-input { flex: 0 0 140px; width: 140px; min-width: 0; font-size: var(--text-s); padding: 6px 9px; }
/* yearbook photo tiles: warnings wrap inside their own photo (they were one long line across the next photo) */
.yb-photo { min-width: 0; }
.yb-photo label { display: flex; flex-direction: column; gap: 3px; font-size: var(--text-xs); color: var(--text-soft); }
.yb-photo input { width: 100%; min-width: 0; }
.yb-photo .link-button { font-size: var(--text-xs); font-weight: 600; }
.yb-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yb-add { aspect-ratio: auto; min-height: 110px; }
.yb-photo img, .yb-nothumb { aspect-ratio: 4 / 3; }
/* a photo's warning: one short line; the full sentence is the tooltip (tap or hover) */
.yb-chip { display: block; font-size: var(--text-2xs); font-weight: 500; line-height: 1.4; padding: 1px 6px; border-radius: var(--radius-s);
  background: var(--tint-warn); color: #8a5a00; }
.yb-chip > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yb-chip.bad { background: var(--tint-bad); color: var(--red); }
.yb-chip[data-tip]::after { white-space: normal; }
.person-link { color: inherit; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.person-link:hover { color: var(--navy); }

/* tool hub (/admin): compact tool cards - name + status, one line, a strip of numbers, Open, everything else under Details */
.hub-group { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; }
summary.hub-group { cursor: pointer; }
.hub-group h3 { margin: 0; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--navy-dark); }
.hub-group .muted { font-size: var(--text-xs); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.tool-card { border: 1px solid var(--border); border-radius: var(--radius-l); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px;
             background: #fff; box-shadow: var(--shadow-soft); }
.tool-card.bad { border-color: #f1b8b8; background: var(--tint-bad); }
.tool-card .tool-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tool-card h4 { margin: 0; font-size: var(--text-l); line-height: 1.3; color: var(--navy-dark); }
.tool-card h4 a { color: inherit; text-decoration: none; }
.tool-card h4 a:hover { text-decoration: underline; }
.tool-card .summary { margin: 0; font-size: var(--text-s); color: var(--text-soft); line-height: 1.45; }
.metrics { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.metrics > div { flex: 1 1 78px; background: var(--bg-soft); border-radius: var(--radius-s); padding: 6px 9px; min-width: 0; }
.metrics > div.wide { flex-basis: 100%; }
.metrics dt { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.metrics dd { margin: 0; font-size: var(--text-s); font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.metrics dd.bad-text { color: var(--red); }
.tool-card .tool-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tool-card details.fold { font-size: var(--text-s); }
.tool-card details.fold summary { cursor: pointer; color: var(--text-soft); font-weight: 600; }
.tool-card details.fold[open] summary { margin-bottom: 6px; }
.tool-card .detail-links { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.tool-card .subnav { margin: 4px 0 8px; }
.tool-card table.grid { margin: 4px 0 8px; }

/* expenses (/expenses): a receipt row = thumbnail, where + when, amount, action */
.receipt-list { list-style: none; margin: 8px 0 14px; padding: 0; }
.receipt-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.receipt-thumb { flex: none; width: 56px; height: 56px; border-radius: var(--radius-s); overflow: hidden; background: var(--bg-soft);
                 display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); color: var(--muted); text-decoration: none; }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.receipt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: var(--text-s); }
.receipt-amount { font-weight: 700; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
input[type=date], input[type=datetime-local] { font: inherit; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-s); width: 100%; }

/* registration windows: timeline + editor checkboxes */
.window-timeline svg.timeline { width: 100%; height: auto; display: block; }
svg.timeline rect.bar { fill: #c9d4ea; }
svg.timeline rect.bar-fee { fill: #f2c9a1; }
svg.timeline rect.bar-open { fill: var(--green); }
svg.timeline .tick { stroke: var(--border); stroke-width: 1; }
svg.timeline .tick-label { font-size: var(--text-2xs); fill: var(--muted); text-anchor: middle; }
svg.timeline .bar-text { font-size: var(--text-xs); fill: var(--text); font-weight: 600; }
svg.timeline .bar-text-in { font-size: var(--text-xs); fill: #fff; font-weight: 600; }
svg.timeline .now-line { stroke: var(--red); stroke-width: 1.5; }
svg.timeline .now-label { font-size: var(--text-2xs); fill: var(--red); font-weight: 700; }
.timeline-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--text-s); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 14px; margin: 4px 0 10px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: var(--text-s); cursor: pointer; }

/* clubs list: a seats meter per club (native <meter>: green at/above the minimum, amber below) */
table.club-list { table-layout: fixed; }
table.club-list th:nth-child(1) { width: 46%; } table.club-list th:nth-child(2) { width: 30%; }
table.club-list th:nth-child(3) { width: 10%; } table.club-list th:nth-child(4) { width: 14%; }
table.club-list td.seats { white-space: nowrap; }
table.club-list meter { width: 110px; height: 10px; vertical-align: middle; margin-right: 8px; }
meter::-webkit-meter-bar { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--pill); }
meter::-webkit-meter-optimum-value { background: var(--green); border-radius: var(--pill); }
meter::-webkit-meter-suboptimum-value { background: var(--orange); border-radius: var(--pill); }
meter::-webkit-meter-even-less-good-value { background: var(--orange); border-radius: var(--pill); }
.toolbar .subnav { margin: 0; }

/* families list: one chip per registration, coloured by status; actions folded under Manage */
.reg-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: var(--pill); font-size: var(--text-xs);
            font-weight: 600; background: var(--bg-soft); color: var(--text-soft); white-space: nowrap; }
.reg-chip.paid, .reg-chip.paid_overfill { background: var(--tint-ok); color: var(--green); }
.reg-chip.waitlist, .reg-chip.offered, .reg-chip.hold { background: var(--tint-note); color: #7a5200; }
.reg-chip.withdrawn, .reg-chip.club_cancelled { background: var(--bg-soft); color: var(--muted); text-decoration: line-through; }
table.families details.manage summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: var(--text-s); }
table.families details.manage[open] { min-width: 260px; }

/* yearbook: a grade's school year on its own line under the title, small and grey */
.yb-cat-title { display: flex; flex-direction: column; line-height: 1.25; }
.yb-years { font-size: var(--text-2xs); color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.yb-need { font-size: var(--text-s); color: var(--text-soft); margin: 4px 0 2px; }

/* parents' guides: comfortable numbered steps */
ol.guide-steps, ul.guide-steps { margin: 6px 0 10px; padding-left: 22px; }
ol.guide-steps li, ul.guide-steps li { margin: 6px 0; line-height: 1.5; }
.guide-shot { margin: 14px auto 4px; width: min(100%, var(--tip-width) * 1.5); }
.guide-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.guide-shot figcaption { font-size: var(--text-s); color: var(--text-soft); margin-top: 8px; text-align: center; }
.guide-chip { display: inline-block; vertical-align: middle; }

/* Report a problem (/support) - the footer button on every page */
footer .support-button { margin-top: 10px; background: #fff; border: 1px solid var(--border); color: var(--navy); font-weight: 600; }
footer .support-button:hover { border-color: var(--orange); }
.support-form { max-width: var(--page-width); }
.support-topics { border: 0; margin: 12px 0 4px; padding: 0; }
.support-topics .pills label { font-size: var(--text-m); background: #fff; }
.support-topics .pills label:has(input:checked) { border-color: var(--orange); background: var(--tint-warn); box-shadow: var(--focus-ring); }
.support-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.support-ref { font-size: var(--text-l); }

/* Families: one page per entity, everything linked (templates/admin/people_*.html) */
.entity-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.entity-head .avatar { width: 52px; height: 52px; border-radius: var(--pill); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--text-l); background: var(--bg-soft); color: var(--navy); border: 1px solid var(--border); flex-shrink: 0; }
.entity-head .avatar.student { background: #e6ecf8; }
.entity-head .avatar.guardian { background: var(--tint-ok); color: var(--green); }
.entity-head .avatar.staff { background: var(--tint-warn); color: #9a4f12; }
.entity-head h2 { margin: 0; }
.entity-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; align-items: center; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0; font-size: var(--text-m); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--pill); padding: 4px 11px;
  font-size: var(--text-s); text-decoration: none; color: var(--text); background: #fff; }
a.chip:hover { border-color: var(--orange); }
.chip .muted { font-size: var(--text-xs); }
.search-big { display: flex; gap: 8px; margin: 4px 0 18px; }
.search-big input { flex: 1; font-size: var(--text-l); padding: 11px 14px; }
.grade-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.grade-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--text); background: #fff; }
.grade-card:hover { border-color: var(--orange); }
.grade-card .value { font-size: var(--kpi); font-weight: 700; color: var(--navy); }
.grade-card .classes { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }
.found-group h3 { margin: 14px 0 6px; font-size: var(--text-m); color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.filters select, .filters input { width: auto; }
.section-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.empty { color: var(--muted); font-size: var(--text-s); margin: 4px 0 8px; }
.contact-line form { margin-left: 4px; }
.edit-inline { margin: 2px 0 10px; }
.edit-inline summary, details > summary.small { cursor: pointer; color: var(--navy); }
.danger-link { color: var(--red); }

/* Families (tool-people): three clear title levels, quiet links, room between blocks (2026-10-20 design pass) */
.tool-people .page-head h2 .muted { font-size: var(--text-m); }
.tool-people h3, .tool-people .section-title { font-size: var(--h3); color: var(--navy-dark); margin: 26px 0 10px; padding-top: 16px;
  border-top: 1px solid var(--border); display: flex; align-items: baseline; gap: 8px; }
.tool-people h3 .muted, .tool-people .section-title .muted { font-size: var(--text-s); font-weight: 400; }
.tool-people .panel { padding: 4px 18px 14px; }
.tool-people .panel h2 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--text-soft); margin: 14px 0 10px;
  display: flex; align-items: center; gap: 8px; }
.tool-people .panel h2 .muted { font-size: var(--text-xs); background: var(--bg-soft); border-radius: var(--pill); padding: 0 8px; letter-spacing: 0; }
.tool-people .panel h2 a { color: inherit; }
.tool-people .panel + .panel, .tool-people details.panel, .tool-people .section-cards + .panel, .tool-people .section-cards + details { margin-top: 14px; }
.tool-people .section-cards { margin-bottom: 4px; }
.tool-people details.panel > summary { cursor: pointer; padding: 10px 0 6px; }
.tool-people .grid a, .tool-people .facts a, .tool-people .chips a, .tool-people .panel p a { text-decoration: none; color: var(--navy); font-weight: 600; }
.tool-people .grid a:hover, .tool-people .facts a:hover, .tool-people .panel p a:hover { text-decoration: underline; }
.tool-people .grid td.small a { font-weight: 500; }
.tool-people .grid tr.group-row th { background: var(--bg-soft); text-transform: none; letter-spacing: 0; font-size: var(--text-s); color: var(--navy-dark);
  padding-top: 7px; padding-bottom: 7px; }
.tool-people .grid tr.group-row th .muted { font-weight: 400; }
.tool-people .grid tr.group-row th a { font-weight: 700; }
.tool-people .person-name { font-size: var(--text-m); font-weight: 700; margin: 12px 0 2px; }
.tool-people .person-name:first-of-type { margin-top: 0; }
.tool-people .rel { color: var(--muted); font-weight: 400; font-size: var(--text-s); }
.tool-people .contact-line { color: var(--text); padding: 1px 0; }
.tool-people .contact-line .tag { font-size: var(--text-2xs); color: var(--muted); }
.tool-people .tiles a.tile { text-decoration: none; color: var(--text); }
.tool-people .tiles a.tile:hover { border-color: var(--orange); }
.tool-people .tiles .tile .value { color: var(--navy); }
.tool-people .tiles .tile .label { font-size: var(--text-s); color: var(--text-soft); }
.tool-people .filters { background: var(--bg-soft); border-radius: var(--radius); padding: 10px 12px; }
.tool-people .filters input[type=search] { min-width: 220px; }
.tool-people .filters label { display: inline-flex; align-items: center; gap: 6px; }
.tool-people .filters label input[type=checkbox] { width: auto; }
.tool-people .back { margin: 0 0 8px; font-size: var(--text-s); }
.tool-people .back a { text-decoration: none; color: var(--text-soft); }
.tool-people .panel + .page-head, .tool-people section + .page-head { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); }
.tool-people .section-cards > .panel { margin-top: 0; }
.tool-people .contact-line a { text-decoration: none; color: var(--navy); }
.tool-people .contact-line a:hover { text-decoration: underline; }
.tool-people .contact-line .link-button { font-weight: 400; color: var(--muted); text-decoration: none; margin-left: 6px; }
.tool-people .contact-line .link-button:hover { color: var(--red); }

/* Reimbursements: the send form and the sent list (templates/expenses/home.html) */
.send-step { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 14px 12px; margin: 0 0 14px; }
.send-step legend { font-weight: 700; color: var(--navy-dark); padding: 0 6px; font-size: var(--text-m); }
.send-step .choice + .choice { margin-top: 6px; }
[hidden] { display: none !important; }
.sent-list { list-style: none; margin: 0; padding: 0; }
.sent-list li { border-bottom: 1px solid var(--border); }
.sent-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 2px; text-decoration: none; color: var(--text); }
.sent-list a:hover .sent-title { text-decoration: underline; }
.sent-title { font-weight: 600; color: var(--navy); }
.sent-meta { color: var(--muted); font-size: var(--text-s); }
.sent-amount { font-weight: 700; text-align: right; grid-row: 1; grid-column: 2; }
.sent-list .badge { justify-self: end; grid-column: 2; grid-row: 2; }
.tiles a.tile { text-decoration: none; color: var(--text); }
.tiles a.tile .value { color: var(--navy); }
.tiles a.tile:hover { border-color: var(--orange); }
.budget-bar { height: 6px; border-radius: var(--pill); background: var(--bg-soft); overflow: hidden; margin-top: 4px; min-width: 80px; }
.budget-bar span { display: block; height: 100%; background: var(--green); }
.budget-bar span.near { background: var(--orange); }
.budget-bar span.over { background: var(--red); }
.budget-edit summary { cursor: pointer; color: var(--navy); font-size: var(--text-s); }
.budget-edit form { margin-top: 8px; }
.bar-fill.near { background: var(--orange); }
.bar-fill.over { background: var(--red); }
.budget-table .bar-track { margin: 4px 0 0; height: 6px; min-width: 90px; }
.budget-table td { vertical-align: top; }
/* Books -> Reimbursements */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.seg a { border: 1px solid var(--border); border-radius: var(--pill); padding: 5px 13px; text-decoration: none; color: var(--text-soft);
  font-size: var(--text-s); font-weight: 600; background: #fff; }
.seg a:hover { border-color: var(--orange); }
.seg a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg-n { display: inline-block; min-width: 1.6em; text-align: center; border-radius: var(--pill); background: var(--bg-soft); color: var(--navy-dark);
  font-size: var(--text-xs); padding: 0 6px; margin-left: 4px; }
.seg a.active .seg-n { background: rgba(255, 255, 255, .2); color: #fff; }
.reimb-total { margin: 12px 2px 6px; color: var(--text-soft); }
.reimb-filters .filters-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 12px; }
.reimb-filters .span-all { grid-column: 1 / -1; }
.reimb-filters select, .reimb-filters input { height: 34px; box-sizing: border-box; }
.reimb-filters .actions { align-self: end; }
@media (max-width: 760px) { .table-scroll { overflow-x: auto; } }  /* phones only: a scroll box would stop the sticky header */
.reimb-table { table-layout: fixed; min-width: 720px; }
.reimb-table col.c-req { width: 112px; } .reimb-table col.c-line { width: 17%; } .reimb-table col.c-payee { width: 13%; }
.reimb-table col.c-amount { width: 100px; } .reimb-table col.c-approvals { width: 104px; } .reimb-table col.c-status { width: 92px; }
.reimb-table thead th { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: inset 0 -1px 0 var(--border); }
.reimb-table td { vertical-align: top; overflow-wrap: anywhere; }
.reimb-table tr.clickable:hover td { background: var(--bg-soft); }
.reimb-serial { white-space: nowrap; }
.reimb-line { font-weight: 600; color: var(--navy-dark); }
.reimb-table a.reimb-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; }
.reimb-vendor { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reimb-table td.reimb-dots { white-space: nowrap; }
.tip-text { border-bottom: 1px dotted currentColor; cursor: help; }
.th-sep { color: var(--border); }
.reimb-table a { text-decoration: none; color: var(--navy); font-weight: 600; }
.reimb-table a:hover { text-decoration: underline; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--pill); border: 2px solid var(--border); margin-right: 3px; vertical-align: middle; }
.dot.on { background: var(--green); border-color: var(--green); }
.dot-p { display: inline-block; font-size: var(--text-2xs); font-weight: 700; border: 2px solid var(--border); border-radius: var(--pill); padding: 0 5px;
  color: var(--muted); vertical-align: middle; }
.dot-p.on { background: var(--green); border-color: var(--green); color: #fff; }
.approval-list { list-style: none; padding: 0; margin: 4px 0; }
.approval-list li { padding: 3px 0; }
/* /expenses: how it works, the receipt drop zone, the draft summary */
.how-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  padding: 0; margin: 0 0 18px; }
.how-steps li { counter-increment: step; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 10px 44px; position: relative;
  background: #fff; }
.how-steps li::before { content: counter(step); position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; border-radius: var(--pill);
  background: var(--bg-soft); color: var(--navy); font-weight: 700; font-size: var(--text-s); display: flex; align-items: center; justify-content: center; }
.how-steps li.now { border-color: var(--orange); background: var(--tint-warn); }
.how-steps li.now::before { background: var(--orange); color: #fff; }
.how-steps b { display: block; color: var(--navy-dark); }
.how-steps span { font-size: var(--text-s); color: var(--text-soft); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--border);
  border-radius: var(--radius); padding: 22px 12px; margin: 6px 0 12px; cursor: pointer; background: var(--bg-soft); text-align: center; }
.dropzone:hover { border-color: var(--orange); }
.dropzone input[type=file] { width: auto; max-width: 100%; font-size: var(--text-s); }
.dz-title { font-weight: 700; color: var(--navy); }
.dz-hint { font-size: var(--text-s); color: var(--muted); }
.draft-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.draft-total { font-size: var(--text-l); color: var(--text-soft); }
.draft-total b { color: var(--navy-dark); }
.add-receipt h2, .draft-head h2 { margin-top: 14px; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover, .sort-link.active { color: var(--navy); }
.receipt-thumb.missing { display: flex; align-items: center; justify-content: center; text-align: center; font-size: var(--text-2xs); font-weight: 700;
  color: #9a4f12; background: var(--tint-warn); border: 1px dashed #e8b07a; line-height: 1.2; text-transform: uppercase; }
.choice.no-receipt { margin: -4px 0 12px; }
.reimb-table th { white-space: nowrap; vertical-align: bottom; }
.reimb-table th[data-tip] { text-decoration: none; }
.reimb-table th .sort-link { display: inline-flex; align-items: center; gap: 4px; }
.reimb-table th .sort-link::after { content: "↕"; opacity: .25; font-size: var(--text-xs); }
.reimb-table th .sort-link.active::after { content: none; }
.reimb-table th .sort-link { color: var(--text-soft); font-weight: inherit; }
.reimb-table th .sort-link:hover, .reimb-table th .sort-link.active { color: var(--navy); text-decoration: none; }
.danger-zone { border-color: #f1c7c7; margin-top: 18px; }
.danger-zone h2 { color: var(--red); }
/* Clubs -> Edit club (admin/club_edit.html) */
.ce-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; }
.ce-head h2 { margin: 2px 0 8px; font-size: var(--h1); }
.ce-crumb { margin: 0; font-size: var(--text-xs); color: var(--muted); }
.ce-crumb a { color: var(--muted); }
.ce-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-capacity { display: flex; gap: 14px; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 16px 18px; margin: 0 0 18px; background: var(--bg-soft); }
.ce-cap-main { flex: 1; min-width: 0; }
.ce-cap-number { font-size: var(--text-l); color: var(--navy-dark); margin-bottom: 10px; }
.ce-cap-number b { font-size: var(--h2); }
.ce-bar { position: relative; height: 12px; border-radius: var(--pill); background: #fff; border: 1px solid var(--border); overflow: hidden; }
.ce-bar .bar-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.ce-bar-taken { background: var(--orange); opacity: .45; }
.ce-bar-taken.over { background: var(--red); opacity: .6; }
.ce-bar-paid { background: var(--green); }
.ce-bar-min { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--navy-dark); }
.ce-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: var(--text-xs); color: var(--text-soft); }
.ce-dot { display: inline-block; width: 9px; height: 9px; border-radius: var(--pill); margin-right: 5px; vertical-align: middle; }
.ce-dot.paid { background: var(--green); } .ce-dot.held { background: var(--orange); opacity: .55; } .ce-dot.min { background: var(--navy-dark); border-radius: var(--radius-s); width: 3px; }
.ce-cap-wait { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 96px; border-left: 1px solid var(--border);
  padding-left: 14px; text-decoration: none; color: var(--navy-dark); }
.ce-cap-wait b { font-size: var(--h2); }
.ce-cap-wait span { font-size: var(--text-xs); color: var(--muted); }
.ce-cap-wait:hover span { color: var(--orange); }
.ce-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.ce-card { border: 1px solid var(--border); border-radius: var(--radius-l); padding: 4px 18px 16px; margin: 0 0 14px; background: #fff; }
.ce-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border);
  margin: 0 -18px 12px; padding: 10px 18px 8px; }
.ce-card-head h3 { margin: 0; font-size: var(--text-l); color: var(--navy-dark); }
.ce-card-head p { margin: 0; }
.ce-card .field .hint { display: block; margin-top: 3px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 14px; }
.ce-money { display: flex; align-items: center; gap: 6px; max-width: var(--tip-width); }
.ce-money span { color: var(--muted); font-weight: 600; }
.ce-toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.ce-card .form-row { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }
.ce-toggles .choice { margin: 4px 0; }
.ce-toggles .choice .desc { display: block; color: var(--muted); }
.ce-side { position: sticky; top: 12px; }
.ce-preview { cursor: default; margin: 0; }
.ce-preview:hover { border-color: var(--border); }
.ce-wait { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ce-wait:last-of-type { border-bottom: 0; }
.ce-wait > div:nth-child(2) { flex: 1; min-width: 0; }
.ce-wait form { display: inline; }
.ce-wait-actions { display: flex; gap: 10px; white-space: nowrap; font-size: var(--text-s); }
.ce-wait .link-button { text-decoration: none; font-size: var(--text-s); }
.ce-wait .link-button:hover { text-decoration: underline; }
.ce-pos { flex: none; width: 26px; height: 26px; border-radius: var(--pill); background: var(--bg-soft); color: var(--navy-dark); font-weight: 700;
  font-size: var(--text-s); display: flex; align-items: center; justify-content: center; }
.ce-wait.offered .ce-pos { background: var(--tint-ok); color: var(--green); }
.ce-empty { margin: 4px 0 8px; }
.ce-wait-add { display: flex; gap: 8px; margin: 12px 0 4px; }
.ce-wait-add select { flex: 1; min-width: 0; }
.ce-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 6px -44px -32px;
  padding: 12px 44px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--border); box-shadow: var(--shadow-card); }
.ce-savebar [data-dirty-note] { margin-right: auto; }
.ce-savebar.dirty [data-dirty-note] { color: var(--orange); font-weight: 600; }
@media (max-width: 860px) { .ce-layout, .ce-toggles { grid-template-columns: 1fr; } .ce-side { position: static; } .ce-savebar { margin: 6px -16px -16px; padding: 12px 16px; } }
/* Navigation (templates/_tool_nav.html, _tool_switcher.html, _icons.html): work tabs + a gear menu; the header's Tools switcher */
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.chev { width: 13px; height: 13px; opacity: .7; transition: transform .15s ease; }
details[open] > summary .ico.chev { transform: rotate(180deg); }
details.gear-menu, details.tool-switcher { position: relative; }
details.gear-menu > summary, details.tool-switcher > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
details.gear-menu > summary::-webkit-details-marker, details.tool-switcher > summary::-webkit-details-marker { display: none; }
nav.tabs { align-items: stretch; }
details.gear-menu { margin-left: auto; display: flex; }
details.gear-menu > summary { padding: 13px 10px; font-size: var(--text-m); color: var(--text-soft); font-weight: 600; border-bottom: 3px solid transparent; }
details.gear-menu > summary:hover, details.gear-menu[open] > summary { color: var(--navy-dark); }
details.gear-menu.active > summary { color: var(--navy-dark); border-bottom-color: var(--orange); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 6px; display: flex; flex-direction: column; text-align: left;
  animation: menu-in .14s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-title { padding: 8px 10px 6px; font-size: var(--text-2xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
nav.tabs .menu-panel a.menu-item { padding: 8px 10px; border: 0; border-radius: var(--radius-s); font-size: var(--text-s); color: var(--text); font-weight: 500; }
nav.tabs .menu-panel a.menu-item:hover { background: var(--bg-soft); color: var(--navy-dark); }
nav.tabs .menu-panel a.menu-item.active { background: var(--tint-warn); color: var(--navy-dark); font-weight: 600; }
details.tool-switcher { display: inline-block; vertical-align: middle; }
details.tool-switcher > summary { padding: 3px 10px 3px 8px; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--pill); color: #fff;
  font-size: var(--text-s); font-weight: 600; background: rgba(255, 255, 255, .08); transition: background .15s ease; }
details.tool-switcher > summary:hover, details.tool-switcher[open] > summary { background: rgba(255, 255, 255, .18); }
.switcher-panel { left: 0; right: auto; width: min(400px, 88vw); padding: 6px; color: var(--text); }
.switcher-row { display: flex; align-items: stretch; gap: 2px; border-radius: var(--radius-s); }
.switcher-row:hover { background: var(--bg-soft); }
.switcher-row.current { background: var(--tint-warn); }
.switcher-open { flex: 1; display: flex; align-items: center; gap: 12px; padding: 9px 10px; text-decoration: none; color: var(--navy-dark); min-width: 0; }
.switcher-icon { flex: none; width: 34px; height: 34px; border-radius: var(--radius-s); display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; }
.switcher-icon .ico { width: 18px; height: 18px; }
.switcher-text { min-width: 0; }
.switcher-text b { display: block; font-size: var(--text-m); }
.switcher-text span { display: block; font-size: var(--text-xs); color: var(--muted); font-weight: 400; line-height: 1.35; }
.switcher-here { margin-left: auto; font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.switcher-gear { display: flex; align-items: center; padding: 0 12px; color: var(--muted); border-radius: var(--radius-s); }
.switcher-gear:hover { color: var(--navy-dark); background: #fff; }
.switcher-all { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding: 10px 10px 6px; border-top: 1px solid var(--border);
  font-size: var(--text-s); font-weight: 600; color: var(--navy); text-decoration: none; }
.switcher-all:hover { color: var(--orange); }
@media (max-width: 720px) { details.gear-menu { margin-left: 0; } .menu-panel { right: auto; left: 0; } }
@media print { details.tool-switcher { display: none; } }
.add-receipt .amount-only { max-width: var(--tip-width); }
/* live / testing next to each tool's name (web/tools.py status_of) */
.state-badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 8px; border-radius: var(--pill); font-size: var(--text-2xs);
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.state-badge.live { background: var(--tint-ok); color: var(--green); }
.state-badge.testing { background: var(--tint-warn); color: #9a4f12; }
.state-badge.on-dark { position: relative; top: -3px; }
.state-badge.on-dark.live { background: #9fe3b0; color: var(--navy-dark); }
.state-badge.on-dark.testing { background: #ffd8a8; color: var(--navy-dark); }
/* /expenses/how-it-works: the approval process as a flow (expenses/how.html) */
.how-lead { font-size: var(--text-l); color: var(--text-soft); max-width: 62ch; }
.how-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 6px 0 22px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--pill); }
.how-switch label { padding: 8px 16px; border-radius: var(--pill); cursor: pointer; font-weight: 600; color: var(--text-soft); font-size: var(--text-s); }
.how-switch label span { font-weight: 400; color: var(--muted); font-size: var(--text-xs); margin-left: 4px; }
.how-switch label.on { background: var(--navy); color: #fff; box-shadow: var(--shadow-card); }
.how-switch label.on span { color: rgba(255, 255, 255, .75); }
.how-switch input { position: absolute; opacity: 0; pointer-events: none; }
.flow { list-style: none; padding: 0; margin: 0 0 18px; position: relative; }
.flow::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 3px; background: var(--border); border-radius: var(--pill); }
.flow-step { position: relative; display: flex; gap: 18px; margin: 0 0 14px; opacity: 0; transform: translateY(8px); }
.flow.play .flow-step { animation: flow-in .45s ease-out forwards; }
.flow.play .flow-step:nth-child(2) { animation-delay: .35s; } .flow.play .flow-step:nth-child(3) { animation-delay: .7s; }
.flow.play .flow-step:nth-child(4) { animation-delay: 1.05s; } .flow.play .flow-step:nth-child(5) { animation-delay: 1.4s; }
@keyframes flow-in { to { opacity: 1; transform: none; } }
.flow[data-kind="hsa"] .flow-teacher { display: none; }
.flow-dot { flex: none; width: 44px; height: 44px; border-radius: var(--pill); background: var(--navy); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; outline: 5px solid #fff; }
.flow-teacher .flow-dot { background: var(--orange); font-size: var(--text-s); }
.flow-done .flow-dot { background: var(--green); }
.flow-card { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-l); padding: 12px 18px 14px; background: #fff; box-shadow: var(--shadow-card); }
.flow-card h3 { margin: 2px 0 6px; color: var(--navy-dark); font-size: var(--text-l); }
.flow-card p { margin: 6px 0; }
.flow-notes { margin: 6px 0; padding-left: 18px; color: var(--text-soft); font-size: var(--text-s); }
.flow-person { width: 32px; height: 32px; border-radius: var(--pill); border: 2px dashed var(--border); color: var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.flow-person.needed { border: 2px solid var(--green); color: var(--green); background: var(--tint-ok); }
.flow.play .flow-person.needed { animation: flow-tick .5s ease-out both; animation-delay: 1.1s; }
@keyframes flow-tick { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.flow-branch { display: flex; gap: 14px; align-items: flex-start; border: 1px dashed var(--orange); background: var(--tint-warn); border-radius: var(--radius-l);
  padding: 12px 18px; margin: 4px 0 20px 62px; }
.flow-branch h3 { margin: 0 0 4px; color: var(--navy-dark); font-size: var(--text-m); }
.flow-branch p { margin: 0; font-size: var(--text-s); }
.flow-branch-icon { font-size: var(--h2); color: var(--orange); line-height: 1; }
.how-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
@media (max-width: 640px) { .flow-branch { margin-left: 0; } .how-switch { display: flex; flex-direction: column; border-radius: var(--radius); } }
@media (prefers-reduced-motion: reduce) { .flow-step { opacity: 1; transform: none; } .flow.play .flow-step, .flow.play .flow-person.needed { animation: none; } }
.flow-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.persona { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: var(--pill);
  background: var(--bg-soft); }
.persona-avatar { width: 28px; height: 28px; border-radius: var(--pill); background: var(--navy); color: #fff; font-weight: 700; font-size: var(--text-s);
  display: flex; align-items: center; justify-content: center; }
.flow-teacher .persona-avatar { background: var(--orange); }
.persona-text b { display: block; font-size: var(--text-s); color: var(--navy-dark); }
.persona-text span { display: block; font-size: var(--text-2xs); color: var(--muted); }
.flow-progress { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.flow-progress .flow-person { width: 24px; height: 24px; font-size: var(--text-xs); }
.flow-mail { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 0; padding: 8px 12px; border-radius: var(--radius); background: var(--tint-note);
  border: 1px solid var(--border); }
.mail-icon { color: var(--navy); font-size: var(--text-l); line-height: 1.2; }
.mail-to { display: block; font-size: var(--text-2xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mail-subject { display: block; font-size: var(--text-s); color: var(--text); font-weight: 600; }
.flow-sub { font-size: var(--text-xs); color: var(--muted); margin: 8px 0 0; }
/* Families profile pages (people_guardian / people_student) */
.pf-crumb { margin: 0 0 12px; font-size: var(--text-xs); color: var(--muted); }
.pf-crumb a { color: var(--muted); }
.pf-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 18px; align-items: center; border: 1px solid var(--border);
  border-radius: var(--radius-l); padding: 18px 20px 0; margin: 0 0 18px; background: linear-gradient(180deg, var(--bg-soft), #fff 70%); }
.pf-hero h2 { margin: 0 0 6px; font-size: var(--h1); color: var(--navy-dark); }
.pf-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-avatar { width: 64px; height: 64px; border-radius: var(--pill); display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: var(--h2); color: #fff; background: var(--navy); flex: none; }
.pf-avatar.guardian { background: linear-gradient(135deg, var(--navy), var(--navy-dark)); }
.pf-avatar.student { background: linear-gradient(135deg, var(--orange), #b85d1d); }
.pf-avatar.sm { width: 38px; height: 38px; font-size: var(--text-s); }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pf-actions .button { display: inline-flex; align-items: center; gap: 6px; }
.pf-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 14px -20px 0; border-top: 1px solid var(--border); }
.pf-stats > div { padding: 10px 20px 12px; border-right: 1px solid var(--border); }
.pf-stats > div:last-child { border-right: 0; }
.pf-stats dt { font-size: var(--text-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pf-stats dd { margin: 2px 0 0; font-size: var(--h2); font-weight: 700; color: var(--navy-dark); }
.pf-stats dd small { font-size: var(--text-s); font-weight: 600; color: var(--text-soft); }
.pf-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.pf-side { position: sticky; top: 12px; }
.ce-card-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.pf-person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.pf-person:hover { background: var(--bg-soft); }
.pf-person b { display: block; color: var(--navy-dark); }
.pf-person .muted { display: block; }
.pf-go { margin-left: auto; color: var(--muted); font-size: var(--h2); }
.pf-contacts { list-style: none; padding: 0; margin: 0; }
.pf-contacts li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pf-contacts li:last-child { border-bottom: 0; }
.pf-contact-icon { flex: none; width: 30px; height: 30px; border-radius: var(--pill); background: var(--bg-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center; }
.pf-contact-value { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--text-s); }
.pf-contact-value a { color: var(--navy); font-weight: 600; text-decoration: none; }
.pf-contact-meta { display: block; font-size: var(--text-2xs); color: var(--muted); text-transform: capitalize; }
.pf-remove .link-button { font-size: var(--text-xs); color: var(--muted); text-decoration: none; }
.pf-remove .link-button:hover { color: var(--red); }
.pf-add { margin-top: 10px; }
.pf-add > summary { cursor: pointer; font-size: var(--text-s); font-weight: 600; color: var(--navy); }
.pf-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; font-size: var(--text-s); }
.pf-facts dt { color: var(--muted); }
.pf-facts dd { margin: 0; }
.pf-facts a { color: var(--navy); font-weight: 600; text-decoration: none; }
.pf-edit > summary { cursor: pointer; list-style: none; }
.pf-edit > summary::-webkit-details-marker { display: none; }
.pf-edit:not([open]) > summary { border-bottom: 0; margin-bottom: 0; }
.pf-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.pf-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.pf-timeline li { display: flex; gap: 12px; padding: 5px 0; position: relative; }
.pf-timeline b { display: block; font-size: var(--text-s); color: var(--text); font-weight: 600; }
.pf-tl-dot { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: var(--pill); background: #fff; border: 2px solid var(--navy); position: relative; z-index: 1; }
@media (max-width: 860px) { .pf-layout { grid-template-columns: 1fr; } .pf-side { position: static; } .pf-hero { grid-template-columns: auto 1fr; }
  .pf-actions { grid-column: 1 / -1; justify-content: flex-start; } .pf-stats { grid-template-columns: repeat(2, 1fr); } }
.tool-people .ce-card-head h3 { margin: 0; padding-top: 0; border-top: 0; font-size: var(--text-l); }  /* the section-heading rule is for loose h3s */
/* profile pages in edit mode (?edit=1): the same page, each value editable where it is shown (class "ie"), one save */
.ie { font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1.5px dashed var(--orange); border-radius: 0;
  padding: 0 2px; margin: 0; width: auto; min-width: 2ch; field-sizing: content; }
.ie:hover { background: var(--tint-warn); }
.ie:focus { outline: none; border-bottom-style: solid; background: var(--tint-warn); }
.ie::placeholder { color: var(--muted); font-weight: 400; }
.ie-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ie-h { font-weight: 700; color: var(--navy-dark); max-width: 100%; }
.ie-title { min-width: 3ch; }
.ie-soft { font-weight: 400; }
.ie-small { font-size: inherit; font-weight: 600; }
select.ie-chip { border: 1px solid var(--orange); border-radius: var(--pill); padding: 3px 10px; font-size: var(--text-xs); font-weight: 600;
  background: #fff; cursor: pointer; }
.ie-badge { display: inline-flex; align-items: baseline; gap: 4px; }
.ie-under { display: flex; align-items: center; gap: 12px; margin: -6px 0 6px 50px; font-size: var(--text-s); color: var(--text-soft); }
.ie-value { width: 100%; font-weight: 600; color: var(--navy); }
.ie-meta { display: inline-block; font-size: var(--text-2xs); color: var(--muted); text-transform: capitalize; border-bottom-width: 1px; }
.ie-meta-row { display: flex; gap: 10px; margin-top: 2px; }
select.ie-meta { cursor: pointer; }
.ie-x { flex: none; display: inline-flex; align-items: center; cursor: pointer; font-size: var(--text-s); color: var(--muted); user-select: none; }
.ie-x input { position: absolute; opacity: 0; pointer-events: none; }
.ie-x span { padding: 2px 7px; border-radius: var(--pill); }
.ie-x:hover span { color: var(--red); background: var(--tint-bad); }
.ie-x input:checked + span { color: #fff; background: var(--red); }
li:has(.ie-x input:checked) .pf-contact-value, .pf-guardian:has(.ie-x input:checked) .pf-person { opacity: .45; text-decoration: line-through; }
.ie-new .pf-contact-icon { font-weight: 700; color: var(--orange); }
.pf-editing .pf-hero { border-color: var(--orange); }
/* the first sign-in check (family/check.html) */
.check-card { border: 1px solid var(--border); border-radius: var(--radius-l); padding: 6px 18px 14px; margin: 0 0 14px; background: #fff; box-shadow: var(--shadow-card); }
.check-card h3 { margin: 12px 0 8px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.check-row b { display: block; color: var(--navy-dark); }
.check-row .muted { display: block; }
.check-answers { margin: 18px 0 10px; }
.check-answers > .primary { width: 100%; }
.check-fix { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0 0; background: var(--bg-soft); }
.check-fix > summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.check-fix[open] > summary { margin-bottom: 10px; }

/* Calendar invite for registered clubs (clubs/calendar.py) */
.calendar-links { margin: 6px 0 0; }
.calendar-box { margin: 16px 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); font-size: var(--text-s); }
.calendar-box p { margin: 6px 0 0; }
.calendar-box .calendar-title { font-weight: 600; font-size: var(--text-m); }
.calendar-box .calendar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }

/* The Hold seats call to action (owner 2026-10-27: more visible) - orange, centred, apart from the navy Continue */
.reserve-panel.cta { text-align: center; background: var(--tint-warn); border: 2px solid var(--orange); padding: 18px 16px; }
.reserve-panel .reserve-button, .offer-pay .reserve-button, .demo-start .reserve-button, .demo-checkout .reserve-button { background: var(--orange); min-width: 260px; box-shadow: var(--shadow-cta); }
.reserve-panel .reserve-button:hover { filter: brightness(.95); }
.reserve-panel.cta .reserve-hint, .reserve-changed .reserve-hint { margin-top: 8px; color: var(--text); }
@media (max-width: 600px) { .reserve-panel .reserve-button { width: 100%; min-width: 0; } }
.reserve-panel.cta[hidden] { display: none; }
/* A held seat's pay page (clubs/offers.py): one decision, one button */
.offer-pay { max-width: var(--narrow-width); margin: 0 auto; text-align: center; }
.offer-pay .lines { margin: 14px auto; text-align: left; }
.offer-pay .offer-deadline { margin: 10px 0 16px; }
/* The public demo site (web/demo_site.py): a banner on every page, the start page and the practice payment */
.demo-banner { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: var(--tint-note); border-bottom: 2px solid var(--orange); font-size: var(--text-s); }
.demo-banner form { display: inline; }
.demo-start, .demo-checkout { max-width: var(--narrow-width); margin: 0 auto; text-align: center; }
.demo-start .demo-steps { text-align: left; margin: 16px auto; }
.demo-checkout .lines { margin: 14px auto; text-align: left; }
.demo-card { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; margin: 14px auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.demo-card span { color: var(--text-soft); }
