/* Wallside styles. Change the colors here to rebrand the whole app. */
:root {
  /* Wallside: black, red, grey and white */
  --ink: #17181A;          /* text */
  --header: #0D0D0E;       /* black top bar and team header */
  --accent: #D0202C;       /* red: buttons, links, active tab */
  --accent-dark: #A8161F;  /* pressed / hover */
  --accent-soft: #FCEBEC;  /* light red tint */
  --good: #17703F;         /* faster, here, all set */
  --good-soft: #E7F4EC;
  --goal: #B4540A;         /* goal lines, warnings */
  --focus: #F08A92;
  --bg: #EDEEF0;           /* grey page */
  --card: #FFFFFF;
  --line: #DFE1E5;
  --line-strong: #C9CCD2;
  --muted: #5A5E66;
  --soft: #F1F2F4;
  --radius: 14px;
  --display: 'Barlow Condensed', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--display); font-size: 32px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
code, .code { font-family: ui-monospace, Menlo, monospace; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.page { padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grow { flex: 1; min-width: 0; }
.block { display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big { font-size: 19px; }
.ok-text { color: var(--good); font-weight: 600; }
.notice { background: var(--accent-soft); color: var(--accent-dark); padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.back { font-weight: 700; text-decoration: none; }

/* Header */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: var(--header); color: #fff; }
.brand { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }
.topnav { display: flex; gap: 16px; align-items: center; }
.topnav a, .topnav .link { color: #B9BCC2; font-size: 14px; font-weight: 700; text-decoration: none; background: none; border: 0; padding: 8px 0; cursor: pointer; font-family: var(--body); }
.team-head { background: var(--header); color: #fff; padding: 6px 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.team-head.teal { background: var(--header); }
.team-head p { color: #B9BCC2; font-size: 14px; }
.eyebrow { font-size: 12px !important; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.hero { padding-top: 64px; }
.hero-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.display { font-size: 52px; line-height: 1; }
.lead { font-size: 18px; color: var(--muted); }

/* Tabs and switchers */
.tabs { display: flex; gap: 4px; padding: 8px 16px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.tabs a { padding: 12px 14px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--accent-dark); border-bottom-color: var(--accent); }
.switcher { display: flex; gap: 8px; padding: 12px 16px 0; flex-wrap: wrap; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--soft); border-radius: 12px; }
.segmented button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 700 14px var(--body); cursor: pointer; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.empty { border-style: dashed; border-color: var(--line-strong); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
details.card > summary, details > summary { cursor: pointer; font-weight: 700; }
details.card { display: block; }
details.card[open] > summary { margin-bottom: 12px; }
.choice { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.choice strong { font-size: 18px; }
.swimmer-card { flex-direction: row; align-items: center; gap: 14px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list-row { display: flex; align-items: center; gap: 12px; }
.list-row.wrap { flex-wrap: wrap; }
.avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; border-radius: 28px; background: var(--accent); color: #fff; font-size: 18px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--soft); color: var(--ink); }
.pill.ok { background: var(--good-soft); color: var(--good); }
.code { font-size: 15px; font-weight: 700; letter-spacing: 0.06em; background: var(--bg); padding: 4px 8px; border-radius: 6px; }
.time { font-family: var(--display); font-size: 24px; font-weight: 700; }
.stat { font-family: var(--display); font-size: 32px; font-weight: 700; }

.note { display: flex; flex-direction: column; gap: 6px; }
.note-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.focus { font-weight: 700; }
.correction { background: #FDF0E8; color: var(--goal); padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.replies { list-style: none; margin: 4px 0 0; padding: 0 0 0 12px; border-left: 3px solid var(--soft); display: flex; flex-direction: column; gap: 8px; }
.goal { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.add-goal { border-top: 1px solid var(--line); padding-top: 12px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field[hidden] { display: none; }
label, .label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=number], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 14px;
  font: 16px var(--body); color: var(--ink); background: #fff;
}
textarea { resize: vertical; }
.code-input { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.row input { flex: 1; min-width: 140px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: 600 15px var(--body); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.chip.on { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.chip.add { border-style: dashed; color: var(--muted); }

/* Buttons */
.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: 700 15px var(--body); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; min-height: 52px; font-size: 16px; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent-dark); }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); max-width: 92vw; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; transition: transform .25s; z-index: 10; }
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--accent-dark); }
.toast.success { background: var(--good); }

/* ---------- Batch 1 ---------- */
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 8px 16px; background: #FEF3E2; color: #7A3A06; font-size: 14px; }
.demo-roles { display: flex; gap: 6px; }
.chip.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.notice-link { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); color: var(--ink); padding: 12px 14px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.row-link { color: inherit; text-decoration: none; min-height: 44px; }
.row-link:hover strong { color: var(--accent-dark); }
.chev { color: var(--muted); font-size: 20px; }
.center { display: flex; align-items: center; justify-content: center; text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.stack.tight { gap: 6px; }
.list.nested > li { padding: 8px 0; }
.pill.warn { background: #FEF3E2; color: var(--goal); }
.pill.level { align-self: flex-start; background: var(--accent-soft); color: var(--accent-dark); }
.warn-text { color: var(--goal); }
.btn.danger, .btn.ghost.danger { color: var(--goal); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.sticky-bottom { position: sticky; bottom: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 6px; }

.swim-row { display: flex; align-items: flex-start; gap: 10px; }
.swim-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
input.time-input { width: 104px; min-height: 40px; padding: 6px 10px; font-family: ui-monospace, Menlo, monospace; text-align: right; flex: none; }

.year-grid { display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 8px 10px; align-items: center; }
.year-grid input[type=number] { min-height: 40px; padding: 6px 10px; }
.year-grid input[type=checkbox] { width: 20px; height: 20px; justify-self: center; }
.year-name { font-weight: 600; }

/* Analytics */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile-value { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.tile.good .tile-value { color: var(--good); }
.tile.goal .tile-value { color: var(--goal); }
.chart { margin: 0; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { font: 600 11px var(--body); fill: var(--muted); }
.chart .trend { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .goal-line { stroke: var(--goal); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .goal-label { font: 700 11px var(--body); fill: var(--goal); }
.table-wrap { overflow-x: auto; }
table.splits { width: 100%; border-collapse: collapse; font-size: 15px; }
table.splits th, table.splits td { padding: 8px 6px; text-align: right; border-top: 1px solid var(--line); vertical-align: top; }
table.splits thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
table.splits th[scope=row], table.splits thead th:first-child { text-align: left; font-weight: 600; }
table.splits tr.total th, table.splits tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
table.splits td { font-family: ui-monospace, Menlo, monospace; }
.th-note { display: block; font-weight: 500; font-size: 11px; }
.goal-col { color: var(--goal); background: #FFF8F2; }
.delta { display: block; font-size: 12px; font-weight: 700; }
.delta.faster { color: var(--good); }
.delta.slower { color: var(--goal); }
.editor { border-top: 1px solid var(--line); padding-top: 12px; }
.split-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.split-inputs label { display: flex; flex-direction: column; gap: 4px; }
.split-inputs input.time-input { width: 100%; }
.code-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.code-label { width: 60px; }

/* ---------- Batch 2: compact, clean ---------- */
.page { gap: 12px; }
.card { padding: 14px; gap: 10px; }
.tabs { overflow-x: auto; scrollbar-width: none; gap: 0; padding: 4px 8px 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 11px; white-space: nowrap; font-size: 15px; }
.team-head { padding-bottom: 14px; }
.team-head h1 { font-size: 28px; }

.list-row.compact { gap: 10px; min-height: 44px; }
.list > li { padding: 9px 0; }
.avatar.sm { width: 32px; height: 32px; border-radius: 16px; font-size: 12px; }
.small-head { font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.row.between { justify-content: space-between; flex-wrap: nowrap; }

/* Roster dropdown */
details.roster-card > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 28px; }
details.roster-card > summary::-webkit-details-marker { display: none; }
details.roster-card > summary .chev { transition: transform .15s; font-size: 16px; }
details.roster-card[open] > summary .chev { transform: rotate(180deg); }
details.roster-card[open] > summary { margin-bottom: 10px; }
details.sub { border-top: 1px solid var(--line); padding-top: 10px; }
details.sub > summary { color: var(--accent-dark); font-size: 15px; }
details.sub[open] > summary { margin-bottom: 10px; }
.notice-link.quiet { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; font-size: 14px; padding: 10px 12px; }

/* Today + feedback */
.session-tag { width: 36px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font: 700 12px var(--body); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
span.btn { display: inline-flex; align-items: center; pointer-events: none; }
.meter { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
a.card.coverage { color: inherit; text-decoration: none; }
a.card.coverage:hover h2 { color: var(--accent-dark); }

/* Results inbox */

.small-time { font-size: 18px; }

/* Composer */
.composer .chips { gap: 6px; }
.composer textarea { min-height: 88px; }

/* Tiles: also used on the family page */
.tile-text { font-weight: 800; font-size: 15px; line-height: 1.2; }
.tiles .tile { min-width: 0; }

/* Attendance */
.practice-bar .segmented a.seg { min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--muted); font: 700 14px var(--body); text-decoration: none; }
.practice-bar .segmented a.seg.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.att-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.att { width: 100%; min-height: 56px; text-align: left; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; padding: 8px 10px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; font: 600 15px var(--body); color: var(--ink); cursor: pointer; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-status { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; background: var(--soft); }
.att-note { grid-column: 1 / -1; font-size: 12px; color: var(--goal); font-weight: 600; }
.att.here { border-color: #A9D9BC; background: var(--good-soft); }
.att.here .att-status { background: var(--good); color: #fff; }
.att.late { border-color: #F2C38B; background: #FFF6EA; }
.att.late .att-status { background: #D97706; color: #fff; }
.att.out { border-color: var(--line-strong); background: var(--soft); }
.att.out .att-status { background: var(--muted); color: #fff; }
.att.out .att-name { color: var(--muted); }
.att.none { opacity: .75; }
@media (min-width: 480px) { .att-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Time standards */
.time-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cut-badge { display: inline-block; font: 800 11px var(--body); letter-spacing: .03em; color: #fff; background: var(--ink); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.cut-next { font-size: 11px; color: var(--good); font-weight: 700; white-space: nowrap; }
.cut-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 14px; }
.chart .cut-line { stroke: #B8A6A9; stroke-width: 1; stroke-dasharray: 2 3; }
.chart .cut-label { font: 600 9px var(--body); fill: var(--muted); }
.year-grid.with-gender { grid-template-columns: minmax(0, 1fr) 96px 36px 60px; }
.year-grid select { min-height: 40px; padding: 6px 8px; }

/* ---------- Red theme: structure and interactions ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { font-feature-settings: 'tnum' 1; }   /* times line up */
h1 { letter-spacing: .005em; }
::selection { background: var(--focus); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Header: deep cardinal with a lane rope along the bottom */
.topbar { background: var(--header); }
.brand { font-size: 24px; letter-spacing: .04em; }
.topnav a:hover, .topnav .link:hover { color: #fff; }
.team-head { position: relative; padding-bottom: 28px; }
.team-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 7px; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='6'%3E%3Cg%3E%3Crect x='1' y='.5' width='11' height='5' rx='2.5' fill='%23D0202C'/%3E%3Crect x='14' y='.5' width='11' height='5' rx='2.5' fill='%23D0202C'/%3E%3Crect x='27' y='.5' width='11' height='5' rx='2.5' fill='%23D0202C'/%3E%3Crect x='40' y='.5' width='11' height='5' rx='2.5' fill='%23F4F4F5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 52px 6px repeat-x; }
/* the rope's cord: a hairline behind the floats */
.team-head::before { content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 2px; background: #2A2B2E; }
.team-head p { color: #B9BCC2; }
.team-head h1 { font-size: 30px; }

/* Tabs: sliding underline, clear current tab */
.tabs { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: saturate(1.2) blur(6px); }
.tabs a { position: relative; border-bottom: 0; transition: color .15s; }
.tabs a::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .2s var(--ease); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"]::after { transform: scaleX(1); }

/* Cards: flat by default, the cards that need action are raised */
.card { border-color: var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.card.inbox { border-color: var(--line); border-left: 4px solid var(--accent); background: #fff; box-shadow: 0 10px 24px -16px rgba(0,0,0,.35); }
a.card, .choice { transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); }
a.card:hover, .choice:hover { border-color: var(--accent); box-shadow: 0 8px 22px -14px rgba(0,0,0,.35); }
.choice:active, a.card:active { transform: scale(.99); }
.choice strong { color: var(--ink); }

/* Lists: rows respond to touch */
.row-link { border-radius: 10px; margin: 0 -8px; padding: 0 8px; transition: background-color .12s; }
.row-link:hover { background: var(--soft); }
.row-link:hover strong { color: var(--accent-dark); }
.row-link:active { background: #E4E6EA; }
.avatar { background: #E4E6EA; color: var(--ink); }
.avatar.lg { background: var(--header); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.small-head { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.eyebrow { text-transform: none !important; letter-spacing: .01em !important; opacity: .9; }

/* Buttons: weight, press feedback */
.btn { transition: background-color .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-dark), 0 8px 18px -10px rgba(168,22,31,.7); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.primary:active:not(:disabled) { box-shadow: 0 0 0 var(--accent-dark); transform: translateY(2px); }
.btn.ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.chip { transition: background-color .12s, border-color .12s, transform .08s; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(.96); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }

/* Forms */
input[type=text], input[type=email], input[type=number], input[type=url], input:not([type]), select, textarea { transition: border-color .15s, box-shadow .15s; }
input[type=url] { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 14px; font: 16px var(--body); color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input[type=file] { font: 14px var(--body); color: var(--muted); }
input[type=file]::file-selector-button { font: 700 14px var(--body); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); border-radius: 10px; padding: 9px 14px; margin-right: 10px; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent-dark); }

/* Details: arrow turns, content eases in */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details:not(.roster-card) > summary::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 1px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .18s var(--ease); }
details[open]:not(.roster-card) > summary::before { transform: rotate(45deg); }
details[open] > :not(summary) { animation: open-in .2s var(--ease); }
@keyframes open-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
details.sub > summary { color: var(--accent); }

/* Pills and meters */
.pill { border-radius: 999px; padding: 3px 9px; }
.meter > span { background: linear-gradient(90deg, var(--accent-dark), var(--accent)); transition: width .4s var(--ease); }
.notice-link.quiet { background: var(--soft); border-left-color: var(--line-strong); color: var(--ink); }
.notice-link { transition: filter .15s; }
.notice-link:hover { filter: brightness(.97); }

/* Times and big numbers read like a scoreboard */
.time, .stat, .tile-value { letter-spacing: .01em; }
.tile { border-color: var(--line); }
.cut-badge { background: var(--header); }
.session-tag { background: var(--header); }
.chart .trend { stroke: var(--accent); }
.chart .dot { fill: var(--accent); }

/* Attendance taps give a small bounce so the change is noticed */
.att { transition: background-color .15s, border-color .15s, transform .08s; }
.att:active { transform: scale(.97); }

/* Toast with a little lift */
.toast { box-shadow: 0 12px 28px -12px rgba(36,23,25,.6); transition: transform .3s var(--ease); }

/* Loading text pulses quietly */
main.page > p.muted:only-child { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* Demo bar */
.demo-bar { background: #26272A; color: #E4E6EA; }
.demo-bar .chip { background: transparent; color: #fff; border-color: #55585E; }
.demo-bar .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Login: the one bold moment — big condensed type on cardinal */
.hero { padding-top: 0; }
.hero-top { background: var(--header); color: #fff; margin: -16px -16px 8px; padding: 80px 20px 44px; position: relative; }
.hero-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 7px; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='6'%3E%3Cg%3E%3Crect x='1' y='.5' width='11' height='5' rx='2.5' fill='%23D0202C'/%3E%3Crect x='14' y='.5' width='11' height='5' rx='2.5' fill='%23D0202C'/%3E%3Crect x='27' y='.5' width='11' height='5' rx='2.5' fill='%23D0202C'/%3E%3Crect x='40' y='.5' width='11' height='5' rx='2.5' fill='%23F4F4F5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 52px 6px repeat-x; }
.hero-top::before { content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 2px; background: #2A2B2E; }
.hero-top .display { font-size: 64px; letter-spacing: .01em; }
.hero-top .lead { color: #C9CCD2; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Pool image behind the header (made by tools/make-pool-image.py) */
.topbar, .team-head, .hero-top {
  background-color: var(--header);
  background-image: linear-gradient(180deg, rgba(13,13,14,.62), rgba(13,13,14,.30)), url('img/pool.jpg');
  background-size: cover, 1100px auto;
  background-repeat: no-repeat;
}
.topbar { background-position: 0 0, 38% 0; }
.team-head { background-position: 0 0, 38% -52px; background-image: linear-gradient(180deg, rgba(13,13,14,.30), rgba(13,13,14,.15)), url('img/pool.jpg'); }
.hero-top { background-size: cover, cover; background-position: 0 0, 45% 55%; background-image: linear-gradient(180deg, rgba(13,13,14,.25), rgba(13,13,14,.55)), url('img/pool.jpg'); }
.team-head h1, .hero-top .display { text-shadow: 0 2px 14px rgba(0,0,0,.55); }

/* Card that is also a link (Feedback): keep card padding */
a.card.row-link { margin: 0; padding: 14px; border-radius: var(--radius); }
a.card.row-link:hover { background: #fff; }

/* Roster tab */
input[type=search].search { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 16px 10px 40px; font: 16px var(--body); color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235A5E66' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 14px 50% no-repeat; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chips.scroll-x .chip { flex: none; }
.chip-count { margin-left: 6px; font-size: 12px; font-weight: 800; opacity: .7; }
.chip.on .chip-count { opacity: 1; }
a.card.roster-link { flex-direction: row; align-items: center; gap: 10px; }
a.card.roster-link .chev { font-size: 22px; line-height: 1; }
.roster-actions .btn { width: 100%; }
