/* Swim Team Manager — black & gold theme */
:root {
  color-scheme: dark;
  --bg: #0d0d0f;
  --panel: #17171a;
  --panel-2: #1e1e22;
  --line: #2a2a2f;
  --line-2: #36363c;
  --ink: #f3f3f4;
  --muted: #a3a3ab;
  --gold: #e2c35a;
  --gold-deep: #c9a63f;
  --gold-grad: linear-gradient(135deg, #c9a63f 0%, #e9cf6c 100%);
  --gold-soft: rgba(226, 195, 90, .12);
  --gold-glow: 0 6px 22px rgba(226, 195, 90, .22);
  --ok: rgba(74, 222, 128, .12);
  --ok-ink: #6ee7a0;
  --warn: rgba(250, 204, 21, .12);
  --warn-ink: #fcd968;
  --err: rgba(248, 113, 113, .12);
  --err-ink: #fca5a5;
  --pr: #6ee7a0;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(226, 195, 90, .06), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(255, 255, 255, .03), transparent 60%),
    var(--bg);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.65rem; margin: .2rem 0 1rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 .7rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 0 0 .6rem; font-weight: 650; }
::selection { background: rgba(226, 195, 90, .35); }

/* ---------- Logo tile ---------- */
.logo {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 34px; border-radius: 9px;
  background: var(--gold-grad); color: #111;
  font: 800 .6rem/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .08em;
  box-shadow: var(--gold-glow);
}
.logo.lg { width: 68px; height: 68px; border-radius: 18px; font-size: .95rem; box-shadow: 0 10px 34px rgba(226, 195, 90, .35); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem;
  padding: .65rem 1.4rem;
  background: rgba(10, 10, 12, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -1px 0 rgba(226, 195, 90, .18);
}
.topbar .brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; font-size: 1.02rem; }
.topbar .brand:hover { text-decoration: none; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.topbar nav a { color: var(--muted); padding: .4rem .8rem; border-radius: 10px; font-weight: 500; }
.topbar nav a:hover { color: var(--ink); background: var(--panel-2); text-decoration: none; }
.topbar nav a.active { color: #111; background: var(--gold-grad); font-weight: 650; }
.topbar .season-pick { margin-left: auto; }
.topbar .season-pick label { color: var(--muted); font-size: .85rem; }
.topbar .season-pick select { margin-left: .35rem; padding: .3rem .5rem; }
.topbar .logout { color: var(--muted); font-size: .88rem; }
.topbar .logout:hover { color: var(--gold); }

main { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.4rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 0 2.5rem; }

/* ---------- Messages ---------- */
.flash { padding: .75rem 1rem; border-radius: 12px; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-ok { background: var(--ok); color: var(--ok-ink); border-color: rgba(74, 222, 128, .25); }
.flash-warn { background: var(--warn); color: var(--warn-ink); border-color: rgba(250, 204, 21, .25); }
.flash-err { background: var(--err); color: var(--err-ink); border-color: rgba(248, 113, 113, .25); }

/* ---------- Layout ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.sub { color: var(--muted); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; margin-bottom: 1rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .25);
}
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 1.2rem; }
.stat {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .95rem 1.1rem;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold-grad); }
.stat .n { font-size: 1.9rem; font-weight: 750; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat .l, .stat .l a { color: var(--muted); font-size: .85rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--panel-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, .table-wrap tr:hover td, .event-block tr:hover td { background: rgba(255, 255, 255, .025); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.time { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card table th { background: transparent; }
.card table td:first-child, .card table th:first-child { padding-left: 0; }
.card table td:last-child, .card table th:last-child { padding-right: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; background: var(--gold-grad); color: #121212;
  padding: .5rem 1rem; border-radius: 10px; font: inherit; font-weight: 650; cursor: pointer; line-height: 1.2;
  box-shadow: var(--gold-glow); transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.07); box-shadow: 0 8px 26px rgba(226, 195, 90, .32); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--gold); border-color: rgba(226, 195, 90, .45); box-shadow: none; }
.btn.secondary:hover { background: var(--gold-soft); }
.btn.danger { background: transparent; color: var(--err-ink); border-color: rgba(248, 113, 113, .4); box-shadow: none; }
.btn.danger:hover { background: var(--err); }
.btn.small { padding: .28rem .65rem; font-size: .84rem; border-radius: 8px; }
.btn.block { display: block; width: 100%; padding: .8rem 1rem; font-size: 1.02rem; border-radius: 12px; }
.linkbtn { background: none; border: 0; color: var(--err-ink); cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline; }

/* ---------- Forms ---------- */
label.f { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .9rem; }
label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: .35rem; font-weight: 400; }
input[type=text], input[type=search], input[type=datetime-local], input[type=email], input[type=date], input[type=time], input[type=number], input[type=password], select, textarea {
  font: inherit; color: var(--ink); padding: .55rem .75rem;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #75757d; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 195, 90, .18); }
input[type=checkbox] { accent-color: var(--gold); width: 1rem; height: 1rem; vertical-align: -2px; }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.hint { color: var(--muted); font-size: .82rem; font-weight: 400; }
.form-actions { display: flex; gap: .7rem; align-items: center; margin-top: .6rem; }
.form-actions .right { margin-left: auto; }

.checks { columns: 3 200px; margin: .4rem 0 1.1rem; }
.checks label { display: block; break-inside: avoid; padding: .2rem 0; font-weight: 400; }

/* ---------- Meet entry ---------- */
.event-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.event-block > h3 {
  display: flex; align-items: center; gap: .6rem; margin: 0; padding: .7rem 1rem;
  background: linear-gradient(90deg, rgba(226, 195, 90, .14), rgba(226, 195, 90, 0) 70%);
  border-bottom: 1px solid var(--line); color: var(--gold);
}
.event-block > h3 .count { color: var(--muted); font-weight: 400; font-size: .85rem; }
.event-block > h3 .btn { margin-left: auto; }
.event-block table th { background: transparent; }
.event-block table td, .event-block table th { padding-left: 1rem; }
.add-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .7rem 1rem; border-top: 1px dashed var(--line-2); background: rgba(255, 255, 255, .015); }
.add-row select { min-width: 200px; }
.add-row input.t { width: 110px; }
.add-row input.p { width: 80px; }
.add-row label { font-size: .85rem; color: var(--muted); }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .7rem; font-weight: 750; padding: .1rem .45rem; border-radius: 6px; vertical-align: middle; letter-spacing: .03em; }
.badge.pr { background: rgba(74, 222, 128, .15); color: var(--pr); }
.badge.sb { background: var(--gold-soft); color: var(--gold); }
.badge.dq { background: var(--err); color: var(--err-ink); }
.badge.lo, .badge.first { background: rgba(255, 255, 255, .08); color: #c9c9cf; }
.drop { color: var(--pr); font-size: .82rem; }
.slower { color: var(--muted); font-size: .82rem; }
.legs { font-size: .88rem; color: #cfcfd4; }
.legs span { white-space: nowrap; margin-right: .9rem; }

td.best-pr { background: rgba(74, 222, 128, .07); }
td.best-pr .time { color: var(--pr); }
.swatch-pr { background: rgba(74, 222, 128, .15); color: var(--pr); padding: 0 .35rem; border-radius: 4px; }
.bests td, .bests th { white-space: nowrap; }
.bests .life { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }
.bests .life.drop { color: var(--pr); }

/* ---------- Reports ---------- */
.tabs { display: flex; gap: .35rem; margin-bottom: 1.1rem; flex-wrap: wrap; padding: .3rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: fit-content; }
.tabs a { padding: .45rem .95rem; border-radius: 9px; color: var(--muted); font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; background: var(--panel-2); }
.tabs a.active { background: var(--gold-grad); color: #121212; font-weight: 650; }
.filters { display: flex; flex-wrap: wrap; gap: .9rem; align-items: end; margin-bottom: 1.1rem; }
.filters label { font-size: .85rem; color: var(--muted); }
.filters select { display: block; margin-top: .25rem; }

.chart-box { position: relative; height: 340px; }
.empty { color: var(--muted); padding: .9rem 1rem; font-style: italic; }
.rank { color: var(--muted); width: 2.2rem; }
.card table tr:first-child td.rank { color: var(--gold); font-weight: 700; }

/* ---------- Login / setup ---------- */
body.auth { display: grid; place-items: center; padding: 2rem 1rem; }
body.auth main { width: 100%; max-width: 440px; padding: 0; }
.auth-card {
  background: linear-gradient(180deg, #1b1b1f, #151518); border: 1px solid var(--line-2); border-radius: 22px;
  padding: 2.2rem 2rem 1.8rem; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.auth-card h1 { margin: 1.1rem 0 .2rem; font-size: 1.75rem; }
.auth-card .sub { margin: 0 0 1.4rem; }
.auth-card form { text-align: left; }
.auth-card label.f input { padding: .75rem .9rem; border-radius: 12px; }
.auth-card .btn.block { margin-top: .4rem; }
.auth-card .note { margin: 1.1rem 0 0; color: var(--muted); font-size: .88rem; }

/* ---------- Print: always light ---------- */
@media print {
  :root { color-scheme: light; --ink: #111; --muted: #555; --line: #ccc; --gold: #7a5d00; --pr: #0b6b3a; }
  .topbar, .foot, .no-print, .btn, .add-row, .filters, .tabs { display: none !important; }
  html, body { background: #fff !important; color: #111; font-size: 12px; }
  main { max-width: none; padding: 0; }
  .card, .event-block, .table-wrap, .stat { background: #fff !important; box-shadow: none; border-color: #bbb; break-inside: avoid; }
  th, .event-block > h3 { background: #f1f1f1 !important; color: #333; }
  .grid { grid-template-columns: 1fr 1fr; }
}

/* spacing tweaks */
.grid > .card { margin-bottom: 0; }
.grid { margin-bottom: 1rem; }
.card > .empty { padding-left: 0; }

/* ---------- Meet scoring / both teams ---------- */
.scoreboard { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1.2rem; }
.score-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.score-div { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .4rem; font-weight: 600; }
.score-row { display: flex; align-items: baseline; justify-content: space-between; padding: .2rem 0; }
.score-row .team { font-weight: 650; color: var(--muted); }
.score-row.us .team { color: var(--gold); }
.score-row .pts { font-size: 1.7rem; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--muted); }
.score-row .pts.lead { color: var(--ink); }
.score-row.us .pts.lead { color: var(--gold); }
.div-tag { font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--ink); letter-spacing: .04em; }
.div-tag.jv { background: rgba(147, 197, 253, .14); color: #a9cdfb; }
.team-us { color: var(--gold); font-weight: 650; font-size: .85rem; }
.team-opp { color: var(--muted); font-weight: 600; font-size: .85rem; }
tr.opp td { color: #c4c4ca; }
tr.opp .time { color: #d6d6da; font-weight: 600; }
tr.entry td { background: rgba(226, 195, 90, .04); }
form.record { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
form.record input.t { width: 95px; padding: .3rem .5rem; }
form.record input.p { width: 60px; padding: .3rem .5rem; }
details.add-opp { border-top: 1px dashed var(--line-2); }
details.add-opp summary { cursor: pointer; padding: .5rem 1rem; color: var(--muted); font-size: .85rem; }
details.add-opp summary:hover { color: var(--gold); }
details.add-opp .add-row { border-top: 0; }
.td-legs { font-size: .85rem; }
.event-block .legs { margin-top: .15rem; }

/* ---------- Entries grid ---------- */
.entry-grid th, .entry-grid td { text-align: center; padding: .4rem .45rem; }
.entry-grid th:first-child, .entry-grid td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); z-index: 1; }
.entry-grid td.cell { min-width: 74px; }
.entry-grid td.cell label { display: block; cursor: pointer; border-radius: 8px; padding: .25rem; }
.entry-grid td.cell label:hover { background: var(--panel-2); }
.entry-grid td.cell .seed { display: block; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry-grid td.cell.on label { background: var(--gold-soft); outline: 1px solid rgba(226, 195, 90, .45); }
.entry-grid td.cell.locked label { opacity: .7; cursor: default; }
.entry-grid select { padding: .2rem .3rem; font-size: .82rem; }
.entry-grid .count { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.entry-grid tr.over td { background: var(--err); }
.entry-grid tr.over .count { color: var(--err-ink); }
.relay-entry { display: grid; gap: .5rem; grid-template-columns: 70px repeat(4, minmax(140px, 1fr)); align-items: center; margin-bottom: .5rem; }
.relay-entry .lbl { font-weight: 650; color: var(--gold); }
.relay-entry select { width: 100%; }
.relay-entry .leg-h { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; margin-top: 1rem;
  background: rgba(13, 13, 15, .92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; }
.sticky-save .hint { margin-left: auto; }

@media print {
  tr.entry td, tr.opp td { background: #fff !important; color: #111; }
  .score-card { background: #fff !important; }
  .score-row .pts, .score-row .pts.lead, .score-row.us .pts.lead { color: #111; }
  details.add-opp, form.record input, form.record button, form.record label { display: none !important; }
}

/* ---------- Import ---------- */
.formats { display: grid; gap: .6rem; margin-bottom: 1rem; }
.format { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--panel-2); }
.format:hover { border-color: rgba(226, 195, 90, .5); }
.format:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.format input { margin-top: .2rem; accent-color: var(--gold); }
.format .hint { display: block; }

/* segmented Link / Add new / Ignore */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; margin-right: .5rem; vertical-align: middle; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .3rem .7rem; font-size: .84rem; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line-2); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--gold-grad); color: #121212; font-weight: 650; }
.seg label:last-child input:checked + span { background: rgba(255,255,255,.12); color: var(--ink); }
tr.person[data-how="ignore"] td:first-child strong { color: var(--muted); text-decoration: line-through; }
table.mini th, table.mini td { padding: .3rem .4rem; font-size: .88rem; }
table.mini tr.us td { color: var(--gold); font-weight: 650; }
.scoreboard.invite { grid-template-columns: minmax(280px, 520px); }
.scoreboard.invite .score-row { padding: .25rem 0; border-bottom: 1px solid var(--line); }
.scoreboard.invite .score-row:last-child { border-bottom: 0; }
.scoreboard.invite .score-row .pts { font-size: 1.15rem; }
.score-row .rk { width: 1.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.score-row .team { flex: 1; }

/* ---------- Entries: event cards + chips + sidebar ---------- */
.ent-bar { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; padding: .8rem 1.1rem; }
.switch { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 40px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(226,195,90,.3); }

.ent-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.ent-side { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; border-radius: var(--radius); }
.ent-side .card { margin: 0; }
@media (max-width: 900px) { .ent-layout { grid-template-columns: 1fr; } .ent-side { position: static; max-height: none; order: -1; } }

.ent-ev { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; overflow: hidden; }
.ent-ev > h3 { margin: 0; padding: .6rem 1rem; color: var(--gold); border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(226,195,90,.14), rgba(226,195,90,0) 70%); }
.ent-divs { display: grid; }
.ent-divs.two { grid-template-columns: 1fr 1fr; }
.ent-divs.two .ent-box + .ent-box { border-left: 1px solid var(--line); }
@media (max-width: 700px) { .ent-divs.two { grid-template-columns: 1fr; } .ent-divs.two .ent-box + .ent-box { border-left: 0; border-top: 1px solid var(--line); } }
.ent-box { padding: .7rem 1rem .8rem; min-width: 0; }
.ent-div { font-size: .72rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; margin-bottom: .45rem; color: var(--ink); }
.ent-div.jv { color: #a9cdfb; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .55rem; min-height: 1.6rem; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .35rem .28rem .7rem; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line-2); font-size: .88rem; cursor: pointer; white-space: nowrap; }
.chip .seed { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.chip .x { width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--ink); cursor: pointer; line-height: 1; font-size: .95rem; padding: 0; }
.chip .x:hover { background: var(--err); color: var(--err-ink); }
.chip.locked { padding-right: .7rem; opacity: .8; cursor: default; }
.chip .lock { color: var(--pr); font-size: .8rem; }
.chip.hl, .leg.hl select { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 2px rgba(226,195,90,.25); }
select.adder { width: 100%; max-width: 360px; color: var(--muted); }

.rel-row { display: grid; grid-template-columns: 1.4rem repeat(4, minmax(0, 1fr)); gap: .4rem; align-items: end; margin-bottom: .5rem; }
.ent-divs.two .rel-row { grid-template-columns: 1.4rem repeat(2, minmax(0, 1fr)); }
.ent-divs.two .rel-row .lbl { grid-row: span 2; align-self: center; }
.rel-row .lbl { font-weight: 800; color: var(--gold); }
.rel-row .leg { display: block; min-width: 0; }
.rel-row .leg .hint { display: block; font-size: .72rem; margin-bottom: .1rem; }
.rel-row .leg select { width: 100%; padding: .3rem .4rem; font-size: .85rem; }
.rel-row.locked { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.side-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .32rem .45rem; border-radius: 8px; cursor: pointer; font-size: .88rem; }
.side-row:hover { background: var(--panel-2); }
.side-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row .cnt { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .8rem; }
.side-row .cnt small { font-size: .65rem; margin-right: .15rem; }
.side-row .cnt b { color: var(--ink); margin-left: .25rem; }
.side-row.zero .nm { color: var(--muted); }
.side-row.full .cnt b { color: var(--gold); }
.side-row.over { background: var(--err); }
.side-row.over .cnt b, .side-row.over .nm { color: var(--err-ink); }
.side-row.hl { outline: 1px solid var(--gold); background: var(--gold-soft); }

.badge.round { background: rgba(147, 197, 253, .14); color: #a9cdfb; }

/* ---------- Calendar ---------- */
:root { --c-meet: #e2c35a; --c-practice: #60a5fa; --c-dryland: #f97316; --c-team: #a78bfa; --c-other: #94a3b8; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cat-meet { --c: var(--c-meet); } .cat-practice { --c: var(--c-practice); } .cat-dryland { --c: var(--c-dryland); }
.cat-team { --c: var(--c-team); } .cat-other { --c: var(--c-other); }
.dot[class*="cat-"] { background: var(--c); }

.cal-head h1 { min-width: 11ch; }
.cal-nav { display: flex; gap: .3rem; }
.cal-nav .btn { min-width: 2.2rem; text-align: center; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: -.4rem 0 .9rem; }
.cat-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; cursor: pointer; color: var(--ink); }
.cat-toggle input { accent-color: var(--gold); }

.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .cal-layout { grid-template-columns: 1fr; } }
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow div { padding: .5rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: .35rem .35rem .45rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: rgba(0,0,0,.18); }
.cal-day.out .num { color: #5d5d64; }
.cal-date { display: flex; align-items: center; justify-content: space-between; padding: 0 .15rem; }
.cal-date .num { font-size: .85rem; font-weight: 650; color: var(--muted); width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .num { background: var(--gold-grad); color: #121212; }
.cal-add { opacity: 0; color: var(--muted); font-weight: 700; padding: 0 .35rem; border-radius: 6px; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--panel-2); color: var(--gold); text-decoration: none; }
.pill { display: block; font-size: .76rem; line-height: 1.25; padding: .18rem .4rem; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink); background: color-mix(in srgb, var(--c) 18%, transparent); border-left: 3px solid var(--c); }
.pill:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 30%, transparent); }
.pill.cat-meet { font-weight: 650; }
.pill .t { color: var(--muted); margin-right: .3rem; font-variant-numeric: tabular-nums; }
.cal-day .more { font-size: .74rem; color: var(--muted); padding-left: .3rem; }
@media (max-width: 700px) { .cal-day { min-height: 70px; } .pill .t { display: none; } }

.cal-side { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; border-radius: var(--radius); }
@media (max-width: 1000px) { .cal-side { position: static; max-height: none; } }
.cal-side .card { margin: 0; }
.agenda-day { display: grid; grid-template-columns: 2.6rem 1fr; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.agenda-day.past { opacity: .6; }
.agenda-date { text-align: center; line-height: 1.1; }
.agenda-date .dw { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.agenda-date .dn { display: block; font-size: 1.25rem; font-weight: 750; }
.agenda-day.today .dn { color: var(--gold); }
.agenda-items { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.agenda-item { display: flex; gap: .5rem; align-items: baseline; color: var(--ink); padding: .2rem .35rem; border-radius: 8px; }
.agenda-item:hover { background: var(--panel-2); text-decoration: none; }
.ai-main { min-width: 0; }
.ai-title { display: block; font-weight: 600; font-size: .92rem; }
.ai-sub { display: block; color: var(--muted); font-size: .8rem; }

.cat-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.cat-pick label { cursor: pointer; }
.cat-pick input { position: absolute; opacity: 0; pointer-events: none; }
.cat-pick label > span { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2); font-weight: 600; font-size: .9rem; }
.cat-pick input:checked + span { border-color: var(--gold); background: var(--gold-soft); }
.cat-pick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(226,195,90,.3); }
.repeat-box { border: 1px dashed var(--line-2); border-radius: 12px; padding: .8rem 1rem; margin: .4rem 0 1rem; display: flex; flex-direction: column; gap: .6rem; }
.dow-pick { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.dow-pick label { cursor: pointer; }
.dow-pick input { position: absolute; opacity: 0; pointer-events: none; }
.dow-pick label span { display: inline-block; min-width: 3rem; text-align: center; padding: .35rem .5rem; border: 1px solid var(--line-2); border-radius: 8px; font-size: .86rem; color: var(--muted); }
.dow-pick input:checked + span { background: var(--gold-grad); color: #121212; border-color: transparent; font-weight: 650; }

.upcoming { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem 1rem; }
.up-day { min-width: 0; }
.up-date { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: .2rem; }
.up-day.today .up-date { color: var(--gold); }
.up-item { display: flex; align-items: baseline; gap: .4rem; color: var(--ink); font-size: .9rem; padding: .1rem 0; flex-wrap: wrap; }
.up-item .dot { position: relative; top: -1px; }
.up-item:hover { text-decoration: none; color: var(--gold); }

@media print {
  .cal-day.out { background: #f4f4f4 !important; }
  .pill { color: #111; background: #fff !important; border-left-color: #888; }
  .cal-side, .cal-legend, .cal-nav, .cal-add { display: none !important; }
  .cal-layout { grid-template-columns: 1fr; }
  .cal, .cal-dow div { background: #fff !important; }
}

[hidden] { display: none !important; }
main:has(.cal-layout) { max-width: 1560px; }

input[type=time]:disabled { opacity: .45; }
.allday { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; align-self: end; margin-bottom: 1.35rem; cursor: pointer; }

/* ---------- Attendance ---------- */
:root { --st-P: #4ade80; --st-L: #facc15; --st-E: #60a5fa; --st-A: #f87171; }
.att-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .att-layout { grid-template-columns: 1fr; } }
.att-week { position: sticky; top: 70px; padding: .8rem; }
@media (max-width: 900px) { .att-week { position: static; } }
.att-week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.att-sess { display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem; border-radius: 10px; color: var(--ink); }
.att-sess:hover { background: var(--panel-2); text-decoration: none; }
.att-sess.active { background: var(--gold-soft); outline: 1px solid rgba(226,195,90,.5); }
.att-sess.today .as-title { color: var(--gold); }
.as-main { flex: 1; min-width: 0; }
.as-title { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-sub { display: block; font-size: .78rem; color: var(--muted); }
.as-count { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--muted); padding: .1rem .4rem; border-radius: 6px; background: rgba(255,255,255,.06); }
.as-count.part { color: var(--warn-ink); }
.as-count.done { color: var(--pr); background: rgba(74,222,128,.12); }
.empty-state { padding: 2rem; text-align: center; }

.att-head { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; }
.att-title { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.att-tally { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .88rem; color: var(--muted); }
.att-tally b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.att-tally .st-P b { color: var(--st-P); } .att-tally .st-L b { color: var(--st-L); }
.att-tally .st-E b { color: var(--st-E); } .att-tally .st-A b { color: var(--st-A); }
.att-tally .unmarked b { color: var(--ink); }
.att-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .8rem; }
.att-tools #find { min-width: 220px; }
.att-list { padding: .3rem .6rem; }
.att-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: .3rem 1rem; align-items: center; padding: .55rem .4rem; border-bottom: 1px solid var(--line); }
.att-row:last-child { border-bottom: 0; }
.att-row .att-note { grid-column: 1 / -1; padding: .35rem .6rem; font-size: .88rem; }
.att-row.err { background: var(--err); }
.att-name a { color: var(--ink); font-weight: 600; }
.att-btns { display: flex; gap: .35rem; }
.att-btn { min-width: 46px; min-height: 42px; padding: 0 .7rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2);
  color: var(--muted); font: inherit; font-weight: 750; cursor: pointer; transition: background .1s, color .1s; }
.att-btn .lbl { display: none; font-weight: 600; }
@media (min-width: 1100px) { .att-btn .lbl { display: inline; } }
.att-btn:hover { color: var(--ink); }
.att-btn.st-P.on { background: var(--st-P); border-color: var(--st-P); color: #062b14; }
.att-btn.st-L.on { background: var(--st-L); border-color: var(--st-L); color: #2b2200; }
.att-btn.st-E.on { background: var(--st-E); border-color: var(--st-E); color: #071a33; }
.att-btn.st-A.on { background: var(--st-A); border-color: var(--st-A); color: #330808; }
.att-row.st-row-none .att-name a { color: var(--ink); }
.att-row.st-row-A .att-name a { color: var(--st-A); }

/* attendance chips / bars used in reports and the swimmer page */
.st { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; font-size: .75rem; font-weight: 800; }
.st.P { background: rgba(74,222,128,.18); color: var(--st-P); } .st.L { background: rgba(250,204,21,.18); color: var(--st-L); }
.st.E { background: rgba(96,165,250,.18); color: var(--st-E); } .st.A { background: rgba(248,113,113,.2); color: var(--st-A); }
.st.none { background: rgba(255,255,255,.04); color: #55555c; }
.rate { display: inline-flex; align-items: center; gap: .5rem; min-width: 130px; }
.rate .bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; min-width: 60px; }
.rate .bar span { display: block; height: 100%; background: var(--st-P); }
.rate.mid .bar span { background: var(--st-L); } .rate.low .bar span { background: var(--st-A); }
.rate b { font-variant-numeric: tabular-nums; width: 3rem; text-align: right; }
.att-grid th, .att-grid td { padding: .25rem .2rem; text-align: center; white-space: nowrap; }
.att-grid th:first-child, .att-grid td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); z-index: 1; padding-left: .6rem; }
.att-grid th.d { font-size: .68rem; line-height: 1.1; }
.att-grid th.d .cat { display: block; margin: .15rem auto 0; }
.att-strip { display: flex; flex-wrap: wrap; gap: .25rem; }
@media print {
  .st { border: 1px solid #999; color: #111 !important; background: #fff !important; }
  .att-grid th:first-child, .att-grid td:first-child { background: #fff !important; }
}

/* keep the top bar on one line with the longer menu */
.topbar { gap: .5rem .9rem; }
.topbar nav a { padding: .4rem .62rem; }
@media (max-width: 1420px) { .topbar .me-link { display: none; } }
@media (max-width: 1250px) { .topbar .brand .brand-text { display: none; } .topbar nav a { padding: .38rem .5rem; font-size: .92rem; } }
.att-grid td:last-child, .att-grid th:last-child { padding-right: .9rem; min-width: 150px; }

/* ---------- Public pages / sign-ups ---------- */
.public-main { max-width: 900px; }
.pub-hero { margin: .5rem 0 1.2rem; }
.pub-hero h1 { font-size: 2rem; margin-bottom: .3rem; }
.pub-month { margin: 1.4rem 0 .6rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.pub-list { display: flex; flex-direction: column; gap: .6rem; }
.pub-sheet { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1rem; align-items: center; color: var(--ink); margin: 0; transition: border-color .15s; }
.pub-sheet:hover { text-decoration: none; border-color: rgba(226,195,90,.5); }
.pub-date { text-align: center; line-height: 1.05; }
.pub-date .dw { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pub-date .dn { display: block; font-size: 1.6rem; font-weight: 750; color: var(--gold); }
.pub-title { font-weight: 700; font-size: 1.05rem; }
.pub-left { font-size: .88rem; color: var(--ok-ink); white-space: nowrap; }
.pub-left b { font-size: 1.1rem; }
.pub-left.full { color: var(--muted); }
.fillbar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: .5rem; max-width: 320px; }
.fillbar span { display: block; height: 100%; background: var(--gold-grad); }
.pub-head h1 { margin-bottom: .3rem; }
.pub-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.pub-slots .card { margin: 0; }
.pub-slot-head { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; margin-bottom: .6rem; }
.pub-slot.full { opacity: .75; }
.pub-names { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.chip.open-spot { border-style: dashed; color: var(--muted); background: transparent; padding-right: .7rem; }
.pub-done { border-color: rgba(74,222,128,.4); background: linear-gradient(180deg, rgba(74,222,128,.08), var(--panel)); }
.pub-done h2 { margin-top: 0; color: var(--ok-ink); }
.pub-done a { word-break: break-all; }
.pub-cancel { border-color: rgba(248,113,113,.4); }
.pub-mine { border-color: rgba(226,195,90,.4); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .pub-sheet { grid-template-columns: 2.6rem 1fr; } .pub-sheet .pub-left { grid-column: 2; } }

/* coach-side sign-up management */
.sheet-row .fillbar { margin-top: .3rem; max-width: 180px; }
.need { color: var(--warn-ink); font-weight: 650; }
.need.zero { color: var(--pr); }
.slot-edit { display: grid; grid-template-columns: minmax(0, 2fr) 90px minmax(0, 3fr) 40px; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.slot-edit .rm { background: none; border: 0; color: var(--err-ink); font-size: 1.2rem; cursor: pointer; }
.resp-slot { margin-bottom: 1rem; }
.resp-slot h3 { display: flex; gap: .6rem; align-items: baseline; }
.copy-link { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.copy-link input { flex: 1; min-width: 260px; font-size: .85rem; }

.vol-card { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; padding: .7rem 1.1rem; }
.vol-item { display: inline-flex; gap: .5rem; align-items: baseline; }
.pill .vol { margin-right: .25rem; font-size: .72rem; }
.ai-sub.need { color: var(--warn-ink); } .ai-sub.need.zero { color: var(--pr); }

/* ---------- Public home / calendar / top times ---------- */
.public-main:has(.cal-layout) { max-width: 1400px; }
.public-main:has(.grid > .card table) { max-width: 1180px; }
.public-main:has(.pub-hero) { max-width: 1100px; }
.next-meet { border-color: rgba(226,195,90,.45); background: linear-gradient(120deg, rgba(226,195,90,.12), var(--panel) 60%); }
.pub-link-card { display: block; color: var(--ink); }
.pub-link-card:hover { text-decoration: none; border-color: rgba(226,195,90,.5); }
.ai-notes { white-space: normal; margin-top: .15rem; color: #c4c4ca; }
.sub-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
body.public .topbar nav a.active { color: #111; }

.pub-home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.pub-home-grid > div > .card:last-child { margin-bottom: 0; }
@media (max-width: 800px) { .pub-home-grid { grid-template-columns: 1fr; } }
td.time, .time { white-space: nowrap; }

/* ---------- News / posts ---------- */
.badge.post-draft { background: #2a2a30; color: #b9b9c2; }
.badge.post-scheduled { background: rgba(96,165,250,.16); color: #93c5fd; }
.badge.post-published { background: rgba(74,222,128,.14); color: #86efac; }
.badge.pin { background: rgba(226,195,90,.14); color: var(--gold); }
.posts-table td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.post-form textarea { width: 100%; min-height: 320px; font: inherit; line-height: 1.55; resize: vertical; }
.editor-tabs { margin: .9rem 0 .5rem; }
.preview-box { min-height: 320px; border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; background: rgba(255,255,255,.02); }
.fmt-help code { background: rgba(255,255,255,.07); padding: 0 .3rem; border-radius: 4px; font-size: .85em; }
.post-options { display: grid; gap: .9rem; }
.post-options select { max-width: 420px; }
.when-pick { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; }
.when-pick label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.when-pick input[type=datetime-local] { width: auto; }
.post-body { line-height: 1.65; font-size: 1.02rem; }
.post-body p { margin: 0 0 .85rem; }
.post-body ul { margin: 0 0 .85rem 1.2rem; padding: 0; }
.post-body li { margin: .2rem 0; }
.post-body h3 { margin: 1.1rem 0 .45rem; font-size: 1.05rem; color: var(--gold); }
.post-body a { text-decoration: underline; text-underline-offset: 2px; }
.post-body > :last-child { margin-bottom: 0; }
.public-main:has(article.post) { max-width: 820px; }
article.post { padding: 1.4rem 1.6rem; }
article.post.pinned { border-color: rgba(226,195,90,.45); }
.post-title { margin: .15rem 0 .25rem; font-size: 1.45rem; }
.post-title a { color: var(--ink); }
.post-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.post-meet { color: var(--gold); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.post-nav a.card { flex: 1; display: flex; flex-direction: column; gap: .2rem; color: var(--ink); margin: 0; max-width: 48%; }
.post-nav a.card.right { text-align: right; margin-left: auto; }
.home-news .news-item { display: grid; gap: .1rem; padding: .7rem 0; border-top: 1px solid var(--line); color: var(--ink); }
.home-news .news-item:first-of-type { border-top: 0; }
.home-news .news-item:hover { text-decoration: none; }
.home-news .news-item:hover .news-title { color: var(--gold); }
.news-title { font-weight: 650; font-size: 1.05rem; }
.news-excerpt { color: #c4c4ca; font-size: .95rem; }
.post-options label.check { display: inline-flex; align-items: center; gap: .5rem; }
.post-options label.check input { width: auto; }

.post-form > .card > label:first-child { display: grid; gap: .35rem; }
.post-form > .card > label:first-child input { width: 100%; font-size: 1.1rem; }

/* ---------- Gear menu ---------- */
.gear-menu { position: relative; }
.gear-menu summary { list-style: none; cursor: pointer; }
.gear-menu summary::-webkit-details-marker { display: none; }
.gear-menu summary.active { color: var(--gold); }
.gear-pop { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60; min-width: 200px; display: grid; padding: .35rem;
  background: #17171b; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.gear-pop a { padding: .55rem .75rem; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.gear-pop a:hover { background: rgba(226,195,90,.12); color: var(--gold); text-decoration: none; }

/* ---------- Post editor ---------- */
.rte-label { margin-top: 1rem; }
.rte { position: relative; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); margin-top: .35rem; }
.rte.drop { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,195,90,.18); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .45rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; background: #141417; border-radius: 12px 12px 0 0; }
.rte-bar button { background: transparent; border: 1px solid transparent; color: var(--ink); border-radius: 8px; padding: .35rem .6rem;
  font: inherit; font-size: .92rem; cursor: pointer; min-width: 2.1rem; line-height: 1.2; }
.rte-bar button:hover { background: rgba(255,255,255,.06); }
.rte-bar button.on { background: rgba(226,195,90,.18); color: var(--gold); border-color: rgba(226,195,90,.35); }
.rte-bar button.photo { color: var(--gold); border-color: rgba(226,195,90,.4); }
.rte-bar .sep { width: 1px; height: 1.4rem; background: var(--line); margin: 0 .2rem; }
.rte-bar .grow { flex: 1; }
.rte-area { min-height: 340px; padding: 1rem 1.2rem; outline: none; }
.rte-area:empty::before, .rte-area:has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); color: var(--muted); position: absolute; pointer-events: none; }
.rte-area img { cursor: pointer; }
.rte-area img.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.rte-up { display: flex; align-items: center; gap: .6rem; padding: 1.2rem; border: 1px dashed rgba(226,195,90,.5); border-radius: 10px; color: var(--muted); user-select: none; }
.rte-spin { width: 18px; height: 18px; border: 2px solid rgba(226,195,90,.3); border-top-color: var(--gold); border-radius: 50%; animation: rtespin .8s linear infinite; }
@keyframes rtespin { to { transform: rotate(360deg); } }
.rte-imgbar { position: absolute; z-index: 6; display: flex; gap: .2rem; padding: .25rem; background: #17171b; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.rte-imgbar[hidden] { display: none !important; }
.rte-imgbar button { background: transparent; border: 0; color: var(--ink); padding: .35rem .6rem; border-radius: 7px; font: inherit; font-size: .88rem; cursor: pointer; }
.rte-imgbar button:hover, .rte-imgbar button.on { background: rgba(226,195,90,.18); color: var(--gold); }
.rte-imgbar .danger-text { color: #f87171; }
.rte-toast { position: absolute; right: .8rem; bottom: .8rem; background: #1d1d22; border: 1px solid var(--line); padding: .5rem .8rem; border-radius: 10px; font-size: .9rem; max-width: 70%; }
.rte-toast.bad { border-color: rgba(248,113,113,.6); color: #fecaca; }

/* pictures and quotes inside posts */
.post-body img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: .4rem auto; }
.post-body p:has(> img) { margin: .9rem 0; }
.post-body blockquote { margin: 0 0 .85rem; padding: .3rem 0 .3rem 1rem; border-left: 3px solid var(--gold); color: #d4d4d8; }
.post-body ol { margin: 0 0 .85rem 1.4rem; padding: 0; }
.post-body h2 { margin: 1.1rem 0 .45rem; font-size: 1.2rem; color: var(--gold); }
.home-news .news-item.has-thumb { grid-template-columns: 120px 1fr; column-gap: 1rem; }
.home-news .news-item.has-thumb > :not(img) { grid-column: 2; }
.news-thumb { grid-row: 1 / span 3; width: 120px; height: 84px; object-fit: cover; border-radius: 8px; }
@media (max-width: 600px) { .home-news .news-item.has-thumb { grid-template-columns: 84px 1fr; } .news-thumb { width: 84px; height: 64px; } }

/* ---------- Equipment ---------- */
.equip-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1rem; }
.equip-stats .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1.1rem; min-width: 120px; display: grid; }
.equip-stats .stat .n { font-size: 1.6rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.equip-stats .stat .l { color: var(--muted); font-size: .85rem; }
.equip-stats .stat.warn .n { color: #fbbf24; }
.filters .chip { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .9rem; }
.filters .chip.on { background: rgba(226,195,90,.18); border-color: rgba(226,195,90,.45); color: var(--gold); }
.filters .chip:hover { text-decoration: none; border-color: rgba(226,195,90,.45); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.equip-find { margin-left: auto; max-width: 260px; }
.equip-table td { vertical-align: middle; }
.equip-table tr[hidden] { display: none; }
.equip-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.equip-big { color: var(--gold); font-variant-numeric: tabular-nums; }
.checkout-inline { display: inline-flex; gap: .4rem; }
.checkout-inline select { width: auto; max-width: 200px; padding: .3rem .5rem; font-size: .9rem; }
form.inline { display: inline; margin: 0; }
td.right, th.right { text-align: right; }
.badge.eq-damaged { background: rgba(251,191,36,.15); color: #fcd34d; }
.badge.eq-lost { background: rgba(248,113,113,.15); color: #fca5a5; }
.badge.eq-retired { background: #2a2a30; color: #b9b9c2; }
.add-items .row, .equip-item-grid .row, .equip-quick { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.add-items .row label { flex: 0 1 220px; }
.equip-item-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.stack { display: grid; gap: .8rem; }
.stack .row label { flex: 1 1 160px; }
.assign-table .num-in { width: 7.5rem; padding: .35rem .55rem; font-variant-numeric: tabular-nums; }
.assign-table .num-in.changed { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(226,195,90,.18); }
.assign-note { display: inline-block; margin-left: .5rem; font-size: .82rem; color: var(--muted); }
.assign-note.bad { color: #fca5a5; }
.inline-date { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 0 1rem; color: var(--muted); }
.inline-date input { width: auto; }
.equip-chips { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.equip-chip { display: grid; gap: .25rem; padding: .7rem .9rem; border: 1px solid rgba(226,195,90,.35); border-radius: 12px; background: rgba(226,195,90,.06); min-width: 170px; }
.equip-chip a { color: var(--ink); font-weight: 600; }
.equip-chip .equip-big { font-size: 1.25rem; }
.equip-chip form { margin-top: .25rem; }
.equip-quick select { width: auto; }
.equip-past { margin-top: 1rem; }
.equip-past summary { cursor: pointer; }
.print-only { display: none; }
@media print {
  .print-only { display: revert; }
  th.print-only, td.print-only { display: table-cell; }
  .check-box { font-size: 1.2rem; text-align: center; }
}

/* ---------- Users & roles ---------- */
.badge.role-coach { background: rgba(226,195,90,.18); color: var(--gold); }
.badge.role-manager { background: rgba(96,165,250,.16); color: #93c5fd; }
.badge.role-swimmer { background: rgba(74,222,128,.14); color: #86efac; }
tr.muted-row td { opacity: .55; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.role-opt { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; }
.role-opt:has(input:checked) { border-color: rgba(226,195,90,.6); background: rgba(226,195,90,.07); }
.role-opt input { margin-top: .2rem; width: auto; }
.role-opt span { display: grid; gap: .2rem; }
.bulk-logins { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; border-color: rgba(226,195,90,.45); }
.check-line { display: grid; gap: .3rem; align-content: end; }
.check-line input { width: auto; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; margin-top: .75rem; }
.slip { border: 1px dashed rgba(226,195,90,.5); border-radius: 10px; padding: .8rem 1rem; display: grid; gap: .3rem; }
.slip-team { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.slip-name { font-weight: 700; font-size: 1.05rem; }
.slip code { font-size: 1rem; padding: .05rem .35rem; background: rgba(255,255,255,.07); border-radius: 5px; }
.login-card { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
@media print {
  .new-logins { border: 0; padding: 0; background: none; box-shadow: none; }
  .slips { grid-template-columns: 1fr 1fr; gap: 0; }
  .slip { border: 1px dashed #999; border-radius: 0; padding: 14px 18px; break-inside: avoid; color: #000; }
  .slip .hint, .slip-team { color: #555; }
  .slip code { background: none; border: 1px solid #ccc; color: #000; }
}

.upcoming-meets .um-row { display: flex; gap: 1rem; align-items: flex-start; padding: .6rem 0; border-top: 1px solid var(--line); }
.upcoming-meets .um-row:first-of-type { border-top: 0; }
.um-date { display: grid; text-align: center; min-width: 58px; }
.um-date .dw { font-size: .75rem; text-transform: uppercase; color: var(--muted); }
.um-date .dn { font-weight: 700; color: var(--gold); }

/* ---------- Time trials ---------- */
.badge.tt { background: rgba(167,139,250,.16); color: #c4b5fd; }
.tt-picks { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0; }
.chip-check { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; margin: 0; }
.chip-check input { width: auto; margin: 0; }
.chip-check:has(input:checked) { border-color: rgba(226,195,90,.55); background: rgba(226,195,90,.1); color: var(--gold); }
.tt-events summary { cursor: pointer; }
.tt-grid td { vertical-align: top; }
.tt-in { width: 6.5rem; padding: .35rem .5rem; font-variant-numeric: tabular-nums; text-align: right; }
.tt-in.changed { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(226,195,90,.18); }
.tt-in.bad { border-color: #f87171; box-shadow: 0 0 0 2px rgba(248,113,113,.2); }
.tt-hint { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem; min-height: 1em; font-variant-numeric: tabular-nums; }
.tt-hint.drop { color: #86efac; }
.tt-hint.add { color: #fca5a5; }

/* ---------- Meet Manager export ---------- */
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; align-items: start; }
.export-grid .card { margin: 0; }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .5rem 0 .9rem; }
.export-nums input { width: 5rem; text-align: right; padding: .3rem .5rem; }
.export-nums input.bad { border-color: #f87171; box-shadow: 0 0 0 2px rgba(248,113,113,.2); }
#dupWarn { color: #fca5a5; }
.check-inline { display: inline-flex; gap: .5rem; align-items: center; margin: .5rem 0 0; }
.check-inline input { width: auto; }
.mm-help { margin-top: 1rem; }
.mm-help summary { cursor: pointer; color: var(--gold); }
.mm-help ol { margin: .6rem 0 .4rem 1.2rem; padding: 0; line-height: 1.6; }

.tt-paste summary { cursor: pointer; }
.tt-paste textarea { width: 100%; margin-top: .75rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; }
.tt-paste-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
#pasteReport { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--line); }
#pasteReport ul { margin: .3rem 0 .5rem 1.1rem; padding: 0; }
#pasteReport li { margin: .2rem 0; color: #fecaca; }
#pasteReport code { color: var(--ink); background: rgba(255,255,255,.06); padding: 0 .3rem; border-radius: 4px; }
.bad-head { color: #fca5a5; margin-bottom: 0; }
.tt-in.pasted { background: rgba(226,195,90,.12); }

/* ---------- Public menu with drop-downs ---------- */
.nav-dd { position: relative; }
.nav-dd summary { list-style: none; cursor: pointer; color: var(--muted); padding: .4rem .8rem; border-radius: 10px; font-weight: 500; user-select: none; }
.nav-dd summary::-webkit-details-marker { display: none; }
.nav-dd summary:hover, .nav-dd[open] summary { color: var(--ink); background: var(--panel-2); }
.nav-dd summary.active { color: #111; background: var(--gold-grad); font-weight: 650; }
.nav-dd .caret { font-size: .75em; opacity: .7; }
.dd-menu { position: absolute; left: 0; top: calc(100% + .35rem); z-index: 70; min-width: 220px; display: grid; padding: .35rem;
  background: #17171b; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.topbar nav .dd-menu a { padding: .55rem .75rem; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.topbar nav .dd-menu a:hover { background: rgba(226,195,90,.12); color: var(--gold); }
.topbar nav .dd-menu a.active { background: rgba(226,195,90,.18); color: var(--gold); }
.site-nav .ext { font-size: .8em; opacity: .6; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: .4rem .75rem; font: inherit; cursor: pointer; }
@media (max-width: 760px) {
  body.public .topbar { flex-wrap: wrap; }
  body.public .nav-toggle { display: inline-block; margin-left: auto; }
  body.public .topbar > .logout { display: none; }
  body.public .site-nav { display: none; width: 100%; flex-direction: column; gap: .15rem; padding: .5rem 0 .25rem; }
  body.public .topbar.nav-open .site-nav { display: flex; }
  body.public .topbar.nav-open > .logout { display: inline-block; order: 3; margin: .25rem 0 0; }
  .nav-dd summary { display: block; }
  .dd-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 1rem; min-width: 0; }
}

/* ---------- Website pages ---------- */
.public-main:has(article.site-page) { max-width: 900px; }
article.site-page { padding: 1.6rem 1.8rem; }
.site-page-title { margin: 0 0 1rem; }
.roster-head { display: flex; align-items: baseline; gap: .75rem; margin: 1.5rem 0 .75rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.roster-head h2 { margin: 0; color: var(--gold); }
.roster-classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.roster-class h3 { margin: 0 0 .4rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.roster-class ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.roster-class li { padding: .35rem .6rem; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 8px; }
.site-updated { margin: 1.4rem 0 0; }

/* ---------- Website admin ---------- */
.starter-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .75rem; }
.slug-row { display: flex; align-items: center; gap: .3rem; }
.slug-row input { max-width: 260px; }
.menu-editor #menuRows { display: grid; gap: .45rem; margin: .8rem 0; }
.menu-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.menu-row.child { margin-left: 2.2rem; border-style: dashed; }
.menu-row.parent { border-color: rgba(226,195,90,.45); }
.menu-row input[type=text] { width: auto; flex: 1 1 160px; padding: .35rem .55rem; }
.menu-row select { width: auto; max-width: 260px; padding: .35rem .5rem; }
.menu-row [hidden] { display: none !important; }
.mr-move { display: inline-flex; gap: .15rem; }
.mr-move button, .mr-del { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 7px; width: 1.9rem; height: 1.9rem; cursor: pointer; font: inherit; }
.mr-move button:hover { border-color: var(--gold); color: var(--gold); }
.mr-del { color: #f87171; margin-left: auto; }
.mr-check { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-size: .88rem; color: var(--muted); }
.mr-check input { width: auto; }
.menu-add { display: flex; flex-wrap: wrap; gap: .4rem; }
.menu-preview { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: flex-start; }
.pv-item { display: grid; gap: .25rem; }
.pv-top { padding: .35rem .7rem; border-radius: 9px; background: var(--panel-2); font-weight: 600; }
.pv-kids { display: grid; gap: .15rem; padding-left: .7rem; font-size: .9rem; color: var(--muted); }
body.public .topbar nav .dd-menu a.active { color: var(--gold); background: rgba(226,195,90,.18); font-weight: 600; }

/* ---------- Records ---------- */
.rec-events { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.rec-admin-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .rec-admin-grid { grid-template-columns: 1fr; } }
.rec-table td { padding-top: .35rem; padding-bottom: .35rem; }
.rec-table tr.rec-top td { color: var(--gold); font-weight: 650; }
.rec-table .rec-name { line-height: 1.3; }
.badge.rec-new { background: rgba(74,222,128,.16); color: #86efac; font-size: .68rem; letter-spacing: .04em; }
.src-tag { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .4rem; }
.src-tag.app { color: #93c5fd; border-color: rgba(96,165,250,.35); }
.rec-paste textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.rec-problems { margin: .3rem 0 .8rem 1.1rem; padding: 0; }
.rec-problems li { color: #fecaca; margin: .2rem 0; }
.rec-problems code { color: var(--ink); background: rgba(255,255,255,.06); padding: 0 .3rem; border-radius: 4px; }
.rec-preview { border-color: rgba(226,195,90,.5); }
.rec-pool td { vertical-align: middle; }
.public-main:has(.rec-grid) { max-width: 1240px; }
.rec-events .chip { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .9rem; background: transparent; }
.rec-events .chip:hover { text-decoration: none; border-color: rgba(226,195,90,.45); }
.rec-events .chip.on { background: var(--gold-grad); color: #111; border-color: transparent; font-weight: 650; }
.tabs a.active .hint { color: rgba(17,17,17,.6); }

/* ---------- Email settings ---------- */
.mail-presets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 .4rem; }
.mail-status { padding: .5rem .75rem; border-radius: 8px; font-size: .92rem; }
.mail-status.ok { background: rgba(74,222,128,.1); color: #86efac; }
.mail-status.bad { background: rgba(248,113,113,.1); color: #fecaca; }
.test-mail { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.test-mail label { flex: 1 1 260px; margin: 0; }

/* ---------- Workouts ---------- */
main:has(.wo-page) { max-width: 1680px; }
.wo-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.wo-fields { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1 1 600px; }
.wo-fields input, .wo-fields select { width: auto; padding: .45rem .6rem; }
.wo-fields .wo-title { flex: 1 1 260px; font-weight: 600; }
.wo-fields select { max-width: 330px; }
.wo-actions { display: flex; gap: .5rem; align-items: center; }
.wo-status { display: inline-flex; align-items: center; gap: .4rem; margin: 0 .4rem 0 0; font-weight: 600; }
.wo-status input { width: auto; }
.wo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .wo-layout { grid-template-columns: 1fr; } }
.wo-stats { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.wo-clockbox { border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: .6rem; }
.wo-clockbox summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .4rem; }
.wo-clockbox summary::-webkit-details-marker { display: none; }
.wo-clockbox summary::after { content: '▾'; color: var(--muted); margin-left: auto; }
.wo-clockbox:not([open]) summary::after { content: '▸'; }
.wo-clockbox summary h3, .wo-tot-h { margin: 0 0 .4rem; }
.wo-layout .card { margin: 0; }
.wo-toolbar { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .6rem; }
.wo-toolbar .sep { width: 1px; height: 1.4rem; background: var(--line); margin: 0 .25rem; }
.wo-toolbar .grow { flex: 1; }
.tag-btn { border: 1px solid var(--c); color: var(--c); background: transparent; border-radius: 999px; padding: .2rem .6rem; font: inherit; font-size: .85rem; cursor: pointer; }
.tag-btn:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.tool-btn { border: 1px solid var(--line); color: var(--ink); background: transparent; border-radius: 8px; padding: .25rem .6rem; font: inherit; font-size: .85rem; cursor: pointer; }
.tool-btn:hover { border-color: var(--gold); color: var(--gold); }
.wo-help { font-size: .88rem; line-height: 1.6; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .6rem; display: grid; gap: .15rem; }
.wo-help[hidden] { display: none; }
.wo-help code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.wo-editor { position: relative; border: 1px solid var(--line); border-radius: 10px; background: #111114; overflow: hidden; }
.wo-editor textarea { display: block; width: 100%; height: 62vh; min-height: 420px; resize: vertical; border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; line-height: 26px; padding: 10px 150px 10px 14px; white-space: pre; overflow: auto; tab-size: 2; }
.wo-editor textarea:focus { box-shadow: none; }
.wo-gutter { position: absolute; top: 0; right: 0; width: 140px; bottom: 0; overflow: hidden; pointer-events: none; border-left: 1px solid var(--line); background: #141418; }
#woMarks { padding-top: 10px; }
.gl { height: 26px; display: flex; align-items: center; gap: .3rem; padding: 0 .5rem; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gl b { color: var(--ink); font-weight: 650; }
.gl i { font-style: normal; color: var(--gold); }
.gl .gt { margin-left: auto; }
.gl .gt.est { opacity: .6; }
.gl.rep { color: var(--gold); font-weight: 700; }
.gl.head { border-top: 1px dashed var(--line); }
.gdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; vertical-align: middle; }
.gdot.all { background: conic-gradient(#3b82f6 0 25%, #f97316 0 50%, #a78bfa 0 75%, #14b8a6 0); }
.wo-warn { margin-top: .5rem; color: #fcd34d; font-size: .9rem; }
.wo-notes { margin-top: .8rem; }
.wo-notes summary { cursor: pointer; }
.wo-notes textarea { width: 100%; margin-top: .4rem; }
.gstat { border-bottom: 1px solid var(--line); padding: .55rem 0; }
.gstat summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto auto auto; gap: .7rem; align-items: center; }
.gstat summary::-webkit-details-marker { display: none; }
.gname { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; }
.gnum { font-variant-numeric: tabular-nums; font-size: .92rem; }
.gbreak { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.2rem; padding: .7rem 0 .3rem; font-size: .88rem; }
.gbreak h4 { margin: 0 0 .25rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gbreak div > div { display: flex; justify-content: space-between; gap: .5rem; }
.gbreak b { font-variant-numeric: tabular-nums; }
table.clock { font-size: .88rem; width: 100%; table-layout: fixed; }
table.clock th, table.clock td { padding: .3rem .3rem; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
table.clock tr > :first-child { text-align: left; width: 34%; }
table.clock th .cg { font-size: .76rem; margin-left: .2rem; text-transform: none; letter-spacing: 0; }
table.clock tr > :last-child, table.clock tr:first-child th { overflow: visible; text-overflow: clip; }
table.clock tr:first-child th .gdot { width: 7px; height: 7px; }
table.clock tr:first-child th .cg { margin-left: .12rem; }
table.clock .gap { padding: .05rem .35rem; font-size: .72rem; }
table.clock tbody tr:hover td, table.clock tr:hover td { background: rgba(255,255,255,.03); }
table.clock tr.end td { border-top: 2px solid var(--line); }
.gap { background: rgba(248,113,113,.18); color: #fca5a5; border-radius: 999px; padding: .1rem .5rem; font-size: .78rem; }
.wo-lib { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; display: grid; place-items: center; }
.wo-lib[hidden] { display: none; }
.wo-lib-box { width: min(720px, 94vw); max-height: 80vh; overflow: auto; }
.wo-lib-head { display: flex; gap: .6rem; align-items: center; }
.wo-lib-head h3 { margin: 0; }
.wo-lib-head input { flex: 1; }
.lib-item { display: flex; gap: .5rem; align-items: center; width: 100%; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; margin-top: .45rem; color: var(--ink); font: inherit; cursor: pointer; }
.lib-item:hover { border-color: var(--gold); }
.lib-item[hidden] { display: none; }
.lib-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .lib-grid { grid-template-columns: 1fr; } }
.lib-row { border-top: 1px solid var(--line); padding: .7rem 0; }
.lib-row[hidden] { display: none; }
.lib-row-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.lib-row-head .grow { flex: 1; }
pre.wo-text { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; color: #d4d4d8; margin: .5rem 0 0; }
textarea.mono { width: 100%; font-size: .9rem; }
.tg-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .tg-grid { grid-template-columns: 1fr; } }
.tg-table { width: 100%; table-layout: fixed; }
.tg-table th, .tg-table td { padding: .45rem .35rem; vertical-align: middle; }
.tg-table col.c-color { width: 2.8rem; } .tg-table col.c-tag { width: 30%; } .tg-table col.c-pace { width: 5.5rem; } .tg-table col.c-n { width: 5rem; } .tg-table col.c-del { width: 5rem; }
.tg-table input[type=text] { padding: .35rem .5rem; width: 100%; min-width: 0; }
.tg-color { width: 2.2rem; height: 2rem; padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.tg-tagwrap { display: flex; align-items: center; gap: .2rem; }
.tg-hash { color: var(--muted); }
.tg-pace { text-align: center; }
.tg-assign td, .tg-assign th { text-align: center; }
.tg-assign td:first-child, .tg-assign th:first-child { text-align: left; }
.tg-assign input { width: 1.1rem; height: 1.1rem; }
.wo-list td { vertical-align: middle; }
.ychip { display: inline-flex; align-items: center; gap: .3rem; margin: .1rem .5rem .1rem 0; font-size: .9rem; }
.copy-form input { width: auto; padding: .25rem .4rem; font-size: .85rem; }
.month-label { min-width: 8.5rem; text-align: center; }
.wo-missing { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.wo-missing .chip { display: inline-block; padding: .3rem .7rem; border: 1px dashed rgba(226,195,90,.5); border-radius: 999px; color: var(--gold); font-size: .9rem; }
.wo-view { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .wo-view { grid-template-columns: 1fr; } }
.wo-view .card { margin-top: 0; }
.mygroup { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; margin-bottom: .6rem; }
.gcard-head { display: flex; gap: .9rem; align-items: center; justify-content: space-between; }
.wtext { font-size: 1.05rem; line-height: 1.6; }
.wtext .wl { display: flex; gap: 1rem; justify-content: space-between; }
.wtext .wl.blank { height: .5rem; }
.wtext .wl.head { font-weight: 800; font-size: 1.12rem; color: var(--gold); margin-top: .5rem; }
.wtext .wl.rep, .wtext .wl.close { font-weight: 700; color: var(--gold); }
.wtext .wl.note { font-style: italic; color: var(--muted); }
.wtext .wl.rest { color: var(--muted); }
.wtext .wl.other { opacity: .45; }
.wtext .wl.mine { background: rgba(226,195,90,.08); border-radius: 6px; }
.wtext .wy { color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; }
.wchip { display: inline-block; border: 1px solid var(--c); color: var(--c); border-radius: 999px; padding: 0 .5em; font-size: .78em; font-weight: 650; margin-right: .25em; }
.wchip.unknown { --c: #f87171; }

table.clock th:first-child { min-width: 72px; }
table.clock td { text-align: center; font-variant-numeric: tabular-nums; }
table.clock tr.gaprow td, table.clock tr.gaprow th { border-top: 2px solid var(--line); }
table.clock th { font-size: .75rem; }

/* ---------- Training reports ---------- */
.tr-tiles .stat.small .n { font-size: 1.2rem; }
.tr-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.tr-grid .card { margin: 0 0 1rem; }
@media (max-width: 900px) { .tr-grid { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: .35rem; height: 220px; padding-top: 1.2rem; overflow-x: auto; }
.bar { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar .b { width: 70%; background: linear-gradient(180deg, #e9cf6c, #c9a63f); border-radius: 5px 5px 0 0; min-height: 2px; }
.bar .v { font-size: .7rem; color: var(--ink); margin-bottom: .2rem; white-space: nowrap; }
.bar .k { font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.hbars { display: grid; gap: .5rem; padding-top: .4rem; }
.hbar { display: grid; grid-template-columns: 2.5rem 1fr 4rem; align-items: center; gap: .5rem; font-size: .88rem; }
.hbar .t { background: rgba(255,255,255,.04); border-radius: 4px; height: 14px; overflow: hidden; }
.hbar .b { display: block; height: 100%; background: #3b82f6; border-radius: 4px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }
.tr-pies { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tr-pies .card { margin: 0; }
.donut-wrap { display: flex; gap: 1rem; align-items: center; }
.donut { width: 130px; height: 130px; flex: none; transform: rotate(0deg); }
.donut-legend { display: grid; gap: .25rem; font-size: .86rem; flex: 1; }
.donut-legend div { display: grid; grid-template-columns: 12px 1fr auto 2.6rem; gap: .4rem; align-items: center; }
.donut-legend b { font-variant-numeric: tabular-nums; }
.donut-legend .hint { text-align: right; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.tr-days { max-height: 420px; overflow: auto; }
.donut-legend div { grid-template-columns: 12px 1fr auto; }
.training-card { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; align-items: center; }
.training-card .big { font-size: 1.35rem; font-weight: 700; color: var(--gold); }

/* workouts list filters */
.wo-filter { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; }
.wo-filter label { display: flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--muted); }
.wo-filter select { width: auto; padding: .3rem .5rem; }
.wo-period { display: flex; align-items: center; gap: .4rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg a { padding: .35rem .85rem; color: var(--ink); font-size: .9rem; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: rgba(226,195,90,.18); color: var(--gold); }
.seg a:hover { text-decoration: none; color: var(--gold); }
.wo-sum { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; margin: -.3rem .2rem 1rem; }
.wo-sum-g { display: inline-flex; align-items: center; gap: .35rem; }
.wo-sum b { font-variant-numeric: tabular-nums; }
.wo-list tr.wk-row td { background: rgba(255,255,255,.03); color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .3rem .6rem; }

/* dashboard: two-week grid */
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.wk-dow { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .35rem .55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03); }
.wk-cell { min-height: 92px; padding: .4rem .5rem .5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.wk-cell.wkend { background: rgba(255,255,255,.015); }
.wk-cell.past { opacity: .45; }
.wk-cell.today { background: rgba(226,195,90,.08); box-shadow: inset 0 0 0 2px rgba(226,195,90,.55); }
.wk-date { display: flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
.wk-dn { display: none; }
.wk-cell.today .wk-date { color: var(--gold); }
.wk-att { margin-left: auto; background: var(--gold-grad); color: #121212 !important; border-radius: 999px; padding: .1rem .5rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.wk-att:hover { text-decoration: none; filter: brightness(1.08); }
.wk-item { display: block; color: var(--ink); font-size: .84rem; line-height: 1.3; padding: .15rem 0; }
.wk-item:hover { text-decoration: none; color: var(--gold); }
.wk-item .dot { margin-right: .3rem; }
.wk-item .hint { display: block; font-size: .74rem; padding-left: 1rem; }
@media (max-width: 760px) {
  .wk-grid { grid-template-columns: 1fr; }
  .wk-dow { display: none; }
  .wk-cell { min-height: 0; }
  .wk-cell.past:not(.today) { display: none; }
  .wk-dn { display: inline; }
}
.dash-att { box-shadow: 0 0 0 3px rgba(226,195,90,.25), 0 6px 18px rgba(226,195,90,.25); }
/* dashboard: workouts card */
.wo-flag { border-radius: 10px; padding: .5rem .7rem; margin-bottom: .6rem; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.wo-flag.warn { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.4); color: #fcd34d; }
.wo-flag.ok { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3); }
.wo-flag .btn { margin-left: auto; }
.dash-wo-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.dash-wo-tiles > div { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
.dash-wo-tiles b { display: block; font-size: 1.4rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.dash-wo-tiles span { font-size: .78rem; color: var(--muted); }
.dash-wo-tiles em { font-style: normal; font-weight: 700; }
.dash-wo-tiles em.up { color: #4ade80; } .dash-wo-tiles em.down { color: #f87171; }
.dash-wo-groups th { font-size: .72rem; }
.dash-sub { margin: .9rem 0 .2rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dash-wo .wo-write { color: #fcd34d; white-space: nowrap; }
.dash-wo td { vertical-align: middle; }

/* reports: tabs + separate Team records button */
.tabs-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-start; margin-bottom: 1.1rem; }
.tabs-row .tabs { margin-bottom: 0; }
.rec-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1.1rem; border-radius: 12px; border: 1px solid rgba(226,195,90,.45); background: var(--panel); color: var(--gold); font-weight: 600; align-self: stretch; }
.rec-btn:hover { text-decoration: none; background: rgba(226,195,90,.1); }
.rec-btn.active { background: var(--gold-grad); color: #121212; border-color: transparent; }
@media print { .tabs-row { display: none !important; } }

/* team settings */
.ts-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .ts-grid { grid-template-columns: 1fr; } }
.ts-grid .card label.f { margin-bottom: .9rem; }
.ts-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.ts-codes code { display: inline-block; margin: 0 .2rem .3rem 0; }
.src-badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; margin-left: .35rem; background: rgba(255,255,255,.07); color: var(--muted); vertical-align: middle; }
.src-badge.cfg { background: rgba(251,191,36,.15); color: #fcd34d; }
.mail-status.warn { background: rgba(251,191,36,.1); color: #fcd34d; }
.spaces-form { margin: .4rem 0 .8rem; }

/* workout import */
.imp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .imp-grid { grid-template-columns: 1fr; } }
.imp-how ol { padding-left: 1.2rem; line-height: 1.6; }
.imp-paste { margin: .6rem 0; }
.imp-paste summary { cursor: pointer; color: var(--gold); }
.imp-paste textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; margin: .5rem 0; }
.imp-opts { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; align-items: center; }
.imp-opts label { display: flex; align-items: center; gap: .4rem; }
.imp-opts select { width: auto; }
.imp-table td { vertical-align: top; }
.imp-table tr.no-season td { opacity: .55; }
.imp-table .ychip { margin: 0 .3rem .3rem 0; }
.imp-warn { margin-top: .2rem; color: #fcd34d; }
.linkish { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; font-size: .88rem; padding: 0; }
.imp-bodyrow pre { white-space: pre; font-size: .8rem; max-height: 420px; overflow: auto; background: rgba(0,0,0,.25); padding: .6rem .8rem; border-radius: 8px; margin: 0 0 .3rem; }
.imp-more { margin: .5rem 0; }
.imp-add { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.imp-add input[type=file] { width: auto; }

/* pace tools */
.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .pt-grid { grid-template-columns: 1fr; } }
.pt-grid h3 { margin-top: 0; }
.pt-mode { margin-bottom: .9rem; }
.pt-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
@media (max-width: 520px) { .pt-fields { grid-template-columns: 1fr; } }
.pt-fields input { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pt-in { position: relative; display: block; }
.pt-in .hint { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
label.solved input { opacity: .45; }
.pt-answer { margin-top: 1rem; border-radius: 12px; padding: .9rem 1.1rem; background: linear-gradient(135deg, rgba(226,195,90,.14), rgba(226,195,90,.03)); border: 1px solid rgba(226,195,90,.35); display: grid; gap: .1rem; }
.pt-answer > span:first-child { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.pt-answer b { font-size: 2.1rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.pt-head { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin-bottom: .6rem; }
.pt-head h3 { margin: 0 auto .5rem 0; }
.pt-head label.f { margin: 0; }
.pt-head label.f input[type=text] { width: 6.5rem; }
.pt-head label.f select { width: auto; display: block; }
.pt-head label.f { display: flex; flex-direction: column; gap: .25rem; }
.pt-splits td, .pt-splits th { padding: .42rem .6rem; }
.pt-splits td.num, .pt-splits th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: .9rem; }
.pt-tiles > div { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; display: grid; gap: .1rem; background: rgba(255,255,255,.02); }
.pt-tiles > div > span:first-child { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pt-tiles b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.pt-unit { margin-top: .3rem; }
.pt-bestlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .45rem; margin-top: .6rem; }
.pt-b { text-align: left; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; color: var(--ink); cursor: pointer; display: grid; font: inherit; }
.pt-b:hover, .pt-b.on { border-color: rgba(226,195,90,.6); background: rgba(226,195,90,.08); }
.pt-b span { font-size: .78rem; color: var(--muted); }
.pt-b b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pt-b i { font-style: normal; font-size: .78rem; color: var(--gold); }
.pt-bestlist > p { grid-column: 1 / -1; margin: 0; }

/* varsity letter points */
.lp-rules-line { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; font-size: .92rem; }
.lp-rules-line b { color: var(--gold); }
.lp-tools { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin-bottom: .6rem; }
.lp-tools a.on { color: var(--gold); font-weight: 700; }
.lp-table { width: 100%; }
.lp-table th.num, .lp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lp-table .lp-row td { vertical-align: middle; }
.lp-x { display: block; font-size: .72rem; color: var(--muted); }
.lp-x::before { content: '= '; }
.lp-career { color: var(--gold); font-size: 1.05rem; }
.lp-sw.open .lp-row td { background: rgba(226,195,90,.06); }
.lp-detail td { background: rgba(255,255,255,.02); }
.lp-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.2rem; padding: .3rem 0 .6rem; }
@media (max-width: 900px) { .lp-detail-grid { grid-template-columns: 1fr; } }
.lp-meets td { padding: .35rem .5rem; vertical-align: top; font-size: .9rem; }
.lp-meets td.num { text-align: right; }
.lp-year label { display: inline-flex; gap: .3rem; align-items: center; cursor: pointer; }
.lp-year i { font-size: .68rem; color: var(--muted); font-style: normal; }
.lp-adj { display: flex; gap: .4rem; align-items: baseline; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.lp-adj b { color: var(--gold); min-width: 3.2rem; }
.lp-del { margin-left: auto; color: var(--muted); }
.lp-adjform { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; gap: .4rem; margin-top: .6rem; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
@media (max-width: 900px) { .lp-grid { grid-template-columns: 1fr; } }
.lp-grid textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.lp-rule-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem .8rem; }
.lp-kinds td { padding: .25rem .4rem; font-size: .88rem; }
.lp-kinds select { width: auto; padding: .2rem .4rem; }
form.inline { display: inline; }
@media print {
  .lp-tools, .lp-grid, .lp-rules-line a, .lp-detail form, .lp-detail .hint:last-child { display: none !important; }
  .lp-year input { appearance: auto; }
}
.lp-short { background: rgba(248,113,113,.15); color: #fca5a5; }
.lp-summary { margin: 0 .2rem .8rem; }
.lp-short-text { color: #fca5a5; }

/* season swims / PRs */
.ss-bar { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; align-items: center; }
.ss-bar .seg b { margin-left: .3rem; font-variant-numeric: tabular-nums; }
.ss-filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.ss-filters select { width: auto; }
.ss-bar a.on { color: var(--gold); font-weight: 700; }
.ss-note { margin: -.3rem .2rem .8rem; }
.ss-table td.num, .ss-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ss-table tr.is-pr td { background: rgba(74,222,128,.05); }
.ss-drop { color: #4ade80; font-weight: 700; }

/* parent contacts */
.contact-rows { display: grid; gap: .45rem; margin-bottom: .5rem; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) 9rem minmax(0, 1.3fr) 2rem; gap: .45rem; align-items: center; }
@media (max-width: 640px) { .contact-row { grid-template-columns: 1fr 1fr; } }
.contact-del { color: var(--muted); font-size: 1rem; }
.sw-parents { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; }
.sw-parents-act { margin-left: auto; }
.ct-table td { vertical-align: top; padding: .4rem .35rem; }
.ct-table input, .ct-table select { padding: .3rem .45rem; font-size: .88rem; }
.ct-parent { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: .3rem; min-width: 260px; }
.ct-parent input[type=email] { grid-column: 1 / -1; }
.ct-save { position: sticky; bottom: 0; background: var(--panel); padding: .6rem 0; }
.ct-missing { margin: -.4rem .2rem .8rem; }
.ct-paste textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
/* team email */
.em-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .em-grid { grid-template-columns: 1fr; } }
.em-compose { display: grid; gap: 1rem; }
.em-compose .card { margin: 0; }
.em-compose .rte-area { min-height: 260px; }
.em-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-top: .8rem; }
.em-test { display: inline-flex; gap: .4rem; align-items: center; }
.em-test input { width: 14rem; padding: .35rem .5rem; }
.em-pick { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.em-pick h3 { margin-top: 0; }
.em-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.em-filter { margin: .7rem 0 .4rem; }
.em-filter input[type=search] { width: 100%; padding: .4rem .6rem; }
.em-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.chip { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: .15rem .65rem; font-size: .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.chip.on { border-color: var(--gold); color: var(--gold); background: rgba(226,195,90,.12); }
.em-list { overflow-y: auto; border-top: 1px solid var(--line); margin-top: .3rem; min-height: 120px; }
.em-sw { display: flex; flex-wrap: wrap; gap: .25rem .4rem; align-items: center; padding: .45rem .2rem; border-bottom: 1px solid var(--line); }
.em-sw.picked { background: rgba(226,195,90,.05); }
.em-swname { flex: 1 1 100%; font-size: .9rem; font-weight: 600; }
.em-box { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; padding: .12rem .55rem; cursor: pointer; color: var(--ink); }
.em-box:has(input:checked) { border-color: rgba(226,195,90,.7); background: rgba(226,195,90,.12); }
.em-box.off { opacity: .45; cursor: default; }
a.em-box.off { cursor: pointer; opacity: .6; color: var(--muted); }
.em-box input { margin: 0; }
.em-history td { padding: .4rem .5rem; }
.em-view { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .em-view { grid-template-columns: 1fr; } }
.em-rlist { list-style: none; padding: 0; margin: 0; max-height: 60vh; overflow: auto; }
.em-rlist li { padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
/* workout: email menu */
.wo-mail { position: relative; display: inline-block; }
.wo-mail summary { list-style: none; cursor: pointer; }
.wo-mail summary::-webkit-details-marker { display: none; }
.wo-mail-pop { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40; min-width: 260px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .4rem; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: grid; gap: .15rem; }
.wo-mail-pop a { display: grid; grid-template-columns: auto 1fr; column-gap: .35rem; align-items: center; padding: .45rem .6rem; border-radius: 8px; color: var(--ink); }
.wo-mail-pop a b { grid-column: 1 / -1; }
.wo-mail-pop a .hint { grid-column: 1 / -1; font-size: .78rem; }
.wo-mail-pop a:hover { background: rgba(226,195,90,.1); text-decoration: none; }
.wo-mail-note { padding: .3rem .6rem .2rem; font-size: .76rem; border-top: 1px solid var(--line); margin-top: .2rem; }
.wo-mail-to { display: grid; gap: .4rem; padding: .5rem .6rem; border-top: 1px solid var(--line); margin-top: .2rem; }
.wo-mail-to label { display: grid; gap: .3rem; font-size: .88rem; }
.wo-mail-to input, .wo-mail-to select { padding: .35rem .5rem; font-size: .88rem; width: 100%; }
.wo-mail-to .btn { justify-self: start; }
.em-extra { margin-bottom: .2rem; }
.em-extra input { width: 100%; }
.em-or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; margin: .7rem 0 .6rem; }
.em-or::before, .em-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.em-attach { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem .7rem; margin: .3rem 0 .7rem; border: 1px solid rgba(226,195,90,.35); border-radius: 10px; background: rgba(226,195,90,.05); font-size: .9rem; }
.em-attach select { width: auto; padding: .25rem .4rem; margin-left: .3rem; }
.em-attach label { display: inline-flex; align-items: center; }

/* public meets */
.pm-h { font-size: 1.1rem; margin: 1.2rem 0 .6rem; color: var(--gold); }
.pm-list { display: grid; gap: .6rem; }
.pm-meet { display: flex; gap: 1rem; align-items: center; margin: 0; color: var(--ink); }
.pm-meet:hover { text-decoration: none; border-color: rgba(226,195,90,.55); }
.pm-date { display: grid; justify-items: center; min-width: 3.4rem; padding: .3rem .4rem; border-radius: 10px; background: rgba(226,195,90,.1); border: 1px solid rgba(226,195,90,.35); line-height: 1.1; }
.pm-date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pm-date b { font-size: 1.45rem; color: var(--gold); }
.pm-main { display: grid; gap: .15rem; flex: 1; }
.pm-score { font-weight: 650; font-size: .9rem; }
.pm-go { color: var(--gold); font-weight: 650; white-space: nowrap; }
.pm-meet.upcoming .pm-date { background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.35); }
.pm-meet.upcoming .pm-date b { color: #93c5fd; }
.pm-posts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.pm-prs { font-size: 1.05rem; margin: .2rem .2rem .8rem; }
.pm-ours { margin: 0 .2rem .6rem; }
.pm-event table tr.ours td { background: rgba(226,195,90,.05); }
.pm-scores { margin-bottom: .8rem; }

/* import: check the results */
.chk-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.chk-ev { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.chk-ev h3 { margin: 0 0 .4rem; font-size: .95rem; }
.chk-table { width: 100%; font-size: .86rem; }
.chk-table td, .chk-table th { padding: .25rem .3rem; vertical-align: middle; }
.chk-table input[type=text] { width: 4.8rem; padding: .15rem .35rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.chk-table input.chk-pl { width: 2.6rem; text-align: center; }
.chk-table td:has(input[type=text]:disabled) { cursor: text; }
.chk-table input[type=text]:disabled { background: transparent; border-color: transparent; color: var(--ink); pointer-events: none; }
.chk-table tr.skipped td { opacity: .35; text-decoration: line-through; }
.goes-ok { color: #86efac; }
.goes-new { color: #93c5fd; }
.goes-diff { color: #fca5a5; font-weight: 700; }
.goes-bad { color: #fcd34d; }
.goes-leg { font-size: .82rem; line-height: 1.35; }
.chk-legend { white-space: nowrap; }

/* Activity log */
.act-filters { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; }
.act-filters label { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: .25rem; }
.act-filters label.grow { flex: 1 1 12rem; }
.act-filters label.chk { flex-direction: row; align-items: center; gap: .35rem; padding-bottom: .45rem; }
.act-day { margin: 1.4rem 0 .5rem; font-size: 1rem; }
.act-list { padding: .2rem 0; }
.act-row { display: grid; grid-template-columns: 4.6rem 5.6rem 1fr; gap: .7rem; align-items: start; padding: .55rem 1rem; border-top: 1px solid var(--line); }
.act-row:first-child { border-top: 0; }
.act-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; padding-top: .1rem; }
.act-badge { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: .2rem .4rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.act-added .act-badge, .act-imported .act-badge { color: #7fd49b; border-color: rgba(127,212,155,.4); }
.act-deleted .act-badge, .act-failed .act-badge { color: #f08a8a; border-color: rgba(240,138,138,.45); }
.act-changed .act-badge, .act-sent .act-badge { color: var(--gold); border-color: rgba(226,195,90,.45); }
.act-sum { line-height: 1.35; }
.act-open { font-size: .85rem; white-space: nowrap; }
.act-who { font-size: .8rem; margin-top: .15rem; }
.act-det summary { cursor: pointer; font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.act-det table { margin-top: .35rem; font-size: .85rem; border-collapse: collapse; }
.act-det th { text-align: left; font-weight: 600; color: var(--muted); padding: .15rem .8rem .15rem 0; vertical-align: top; white-space: nowrap; }
.act-det td { padding: .15rem 0; word-break: break-word; }
.act-keep { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.5rem; }
@media (max-width: 640px) { .act-row { grid-template-columns: 4rem 1fr; } .act-badge { display: none; } }
.act-det table { width: auto; }
.act-det th, .act-det td { border: 0; text-transform: none; letter-spacing: 0; font-size: .85rem; }

/* sortable column headings */
th a.sort-head { color: inherit; text-decoration: none; white-space: nowrap; }
th a.sort-head:hover { color: var(--gold); }
th a.sort-head.on { color: var(--gold); }
th a.sort-head span { font-size: .7em; }

/* entries export: heats & lanes */
.export-grid .hl-card { grid-column: 1 / -1; }
.hl-card summary { cursor: pointer; list-style: none; }
.hl-card summary::-webkit-details-marker { display: none; }
.hl-card summary h3 { display: inline; }
.hl-card summary h3::before { content: '▸ '; color: var(--gold); }
.hl-card details[open] summary h3::before { content: '▾ '; }
.hl-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .8rem 1.2rem; }
.hl-event { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.hl-event h4 { margin: 0 0 .4rem; font-size: .95rem; }
.hl-num { color: var(--gold); font-variant-numeric: tabular-nums; }
.hl-event table { width: 100%; }
.hl-event th, .hl-event td { padding: .2rem .3rem; border: 0; font-size: .88rem; }
.hl-event input { width: 3.6rem; text-align: center; padding: .25rem .3rem; }
.hl-event input.bad { border-color: #f87171; box-shadow: 0 0 0 2px rgba(248,113,113,.2); }
.hl-warn { color: #f8a5a5; margin: .3rem 0 0; }

/* Sign in with Google */
.auth-card .google-btn { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.auth-card .google-btn:hover { background: #f4f6f8; color: #1f1f1f; }
.or-line { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0 .9rem; color: var(--muted); font-size: .85rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
code.copy-me { word-break: break-all; }

/* ---------- workout formatting ---------- */
.wtext .wf-big, .wf-big { font-size: 1.25em; }
.wtext .wf-small, .wf-small { font-size: .85em; }
.wtext a { color: var(--gold); text-decoration: underline; }
.wo-toolbar [hidden] { display: none; }
.fmt-tools { display: inline-flex; gap: .2rem; align-items: center; }
.fmt-btn { min-width: 2rem; height: 1.85rem; border: 1px solid var(--line); color: var(--ink); background: transparent; border-radius: 7px; font: inherit; font-size: .9rem; cursor: pointer; padding: 0 .45rem; }
.fmt-btn:hover { border-color: var(--gold); }
.fmt-btn small { font-size: .7em; }
.fmt-a { border-bottom: 3px solid #e5484d; line-height: 1; padding: 0 .1rem; }
.fmt-drop { position: relative; display: inline-block; }
.fmt-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; background: #1b1b20; border: 1px solid var(--line); border-radius: 10px; padding: .35rem; display: flex; flex-direction: column; gap: .2rem; box-shadow: 0 10px 30px rgba(0,0,0,.45); min-width: 7rem; }
.fmt-menu[hidden] { display: none; }
.fmt-menu button { background: transparent; border: 0; color: var(--ink); text-align: left; padding: .3rem .5rem; border-radius: 6px; cursor: pointer; font: inherit; }
.fmt-menu button:hover { background: rgba(255,255,255,.07); }
.fmt-colors { flex-direction: row; flex-wrap: wrap; width: 9.6rem; min-width: 0; }
.fmt-colors button { width: 1.7rem; height: 1.7rem; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; }
.fmt-colors button:hover { background: var(--c); border-color: #fff; }

/* the editor: text typed in the box, formatting painted behind it in the same spot */
.wo-backdrop { position: absolute; inset: 0; overflow: hidden; pointer-events: none; color: var(--ink);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; line-height: 26px; padding: 10px 150px 10px 14px; white-space: pre; tab-size: 2; }
.wo-editor textarea { position: relative; z-index: 1; color: transparent; caret-color: var(--ink); }
.wo-editor textarea::placeholder { color: #6b6b75; }
.wo-editor textarea::selection { background: rgba(226,195,90,.32); color: transparent; }
.wo-gutter { z-index: 2; }
.wo-backdrop .fm { opacity: .35; }
.wo-backdrop b { font-weight: 800; }
.wo-backdrop .fb-big { color: #fff; font-weight: 800; background: rgba(226,195,90,.13); border-radius: 3px; }
.wo-backdrop .fb-small { opacity: .7; }
.wo-backdrop .fb-link { color: #7cb3ff; text-decoration: underline; }

/* who a workout is for */
.wo-for { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: -.2rem 0 .8rem; }
.wo-for-l { font-weight: 700; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-right: .2rem; }
.wo-for label { display: inline-flex; align-items: center; cursor: pointer; }
.wo-for input { position: absolute; opacity: 0; pointer-events: none; }
.wo-for label span { border: 1px solid var(--line); border-radius: 999px; padding: .22rem .7rem; font-size: .88rem; color: var(--muted); }
.wo-for-g input:checked + span { border-color: var(--c); color: var(--ink); background: color-mix(in srgb, var(--c) 22%, transparent); }
.wo-for-all input:checked + span { border-color: var(--gold); color: var(--ink); background: rgba(226,195,90,.15); }
.wo-for label.clash span { border-color: #f87171; box-shadow: 0 0 0 2px rgba(248,113,113,.25); }
.wo-for .hint a { color: var(--gold); }
.wo-groups { display: inline-flex; gap: .25rem; flex-wrap: wrap; vertical-align: middle; }
.wo-sibs { margin-top: .3rem; font-size: .88rem; }
.wo-sibs a { color: var(--gold); }

/* training reports: drill down + filters */
.tr-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-height: 1.6rem; margin: -.3rem 0 .8rem; font-size: .92rem; }
.tr-crumbs a { color: var(--gold); }
.tr-crumbs .chip a { color: inherit; margin-left: .25rem; text-decoration: none; font-weight: 700; }
.tr-tiles a.stat { text-decoration: none; color: inherit; cursor: pointer; }
.tr-tiles a.stat:hover, .tr-tiles a.stat.on { border-color: var(--gold); }
.tr-tiles a.stat.on .n { color: var(--gold); }
.bars a.bar { text-decoration: none; color: inherit; cursor: pointer; border-radius: 6px; }
.bars a.bar:hover { background: rgba(255,255,255,.04); }
.bars a.bar.sel { background: rgba(226,195,90,.12); }
.bar .b-stack { width: 70%; display: flex; flex-direction: column; min-height: 2px; }
.bar .b-stack .b { width: 100%; }
.bar .b-ghost { display: block; background: rgba(255,255,255,.08); border-radius: 5px 5px 0 0; }
.bar .b-ghost + .b { border-radius: 0; }
.donut .slice { cursor: pointer; transition: opacity .15s, stroke-width .15s; }
.donut .slice.dim { opacity: .28; }
.donut .slice:hover { opacity: 1; }
.donut-legend a { display: grid; grid-template-columns: 12px 1fr auto; gap: .4rem; align-items: center; color: inherit; text-decoration: none; padding: .05rem .25rem; border-radius: 5px; }
.donut-legend a:hover { background: rgba(255,255,255,.05); }
.donut-legend a.on { background: rgba(226,195,90,.14); }
.donut-legend a.dim { opacity: .45; }
.tr-click tr[data-b] { cursor: pointer; }
.tr-click tr[data-b]:hover td { background: rgba(255,255,255,.03); }
.tr-click tr.sel td { background: rgba(226,195,90,.10); }
.tr-tip { margin: .4rem 0 .6rem; }
@media print { .tr-crumbs .chip a, .tr-tip { display: none; } }

/* ---------- test sets ---------- */
.f .lbl, div.f > .lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
div.f { margin-bottom: .9rem; }
.seg-pick { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2, rgba(255,255,255,.02)); }
.seg-pick label { flex: 1; cursor: pointer; }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span { display: block; text-align: center; padding: .55rem .6rem; font-size: .9rem; color: var(--muted); border-right: 1px solid var(--line); }
.seg-pick label:last-child span { border-right: 0; }
.seg-pick input:checked + span { background: rgba(226,195,90,.16); color: var(--gold); font-weight: 650; }
.seg-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.ts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
.ts-row [hidden], .ts-edit [hidden] { display: none !important; }
.ts-groups { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ts-groups label { display: inline-flex; cursor: pointer; }
.ts-groups input { position: absolute; opacity: 0; pointer-events: none; }
.ts-groups label span { border: 1px solid var(--line); border-radius: 999px; padding: .22rem .7rem; font-size: .88rem; color: var(--muted); }
.ts-groups input:checked + span { border-color: var(--c); color: var(--ink); background: color-mix(in srgb, var(--c) 22%, transparent); }
.ts-edit .form-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ts-edit .form-actions .grow { flex: 1; }
.ts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.ts-card { display: block; color: inherit; text-decoration: none; margin: 0; transition: border-color .15s; }
.ts-card:hover { border-color: var(--gold); text-decoration: none; }
.ts-card-head { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: 1.1rem; margin-bottom: .2rem; }
.ts-head .crumb { font-size: .85rem; margin-bottom: .1rem; }
.ts-head .crumb a { color: var(--gold); }
.ts-instr { background: rgba(226,195,90,.07); border: 1px solid rgba(226,195,90,.25); border-radius: 10px; padding: .6rem .9rem; margin: -.3rem 0 1rem; font-size: .92rem; }
.ts-new, .ts-more { position: relative; }
.ts-new summary, .ts-more summary { list-style: none; cursor: pointer; }
.ts-new summary::-webkit-details-marker, .ts-more summary::-webkit-details-marker { display: none; }
.ts-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 280px; background: #1b1b20; border: 1px solid var(--line); border-radius: 12px; padding: .9rem; box-shadow: 0 12px 34px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: .2rem; }
.ts-pop .btn { align-self: flex-start; }
.ts-sheet-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 820px) { .ts-sheet-wrap { grid-template-columns: 1fr; } .ts-dates { flex-direction: row; overflow-x: auto; } }
.ts-dates { display: flex; flex-direction: column; gap: .4rem; }
.ts-dates a { display: block; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.ts-dates a .hint { display: block; font-size: .78rem; }
.ts-dates a:hover { border-color: var(--line-2, #444); }
.ts-dates a.on { background: rgba(226,195,90,.12); border-color: rgba(226,195,90,.5); }
.ts-sheet { margin: 0; }
.ts-sheet-head { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.ts-sheet-head h3 { margin: 0; }
.ts-sheet-head .grow { flex: 1; }
.ts-grid th, .ts-grid td { padding: .3rem .35rem; }
.ts-grid td:first-child { padding-right: 1rem; }
.ts-in { width: 5.4rem; text-align: right; font-variant-numeric: tabular-nums; padding: .4rem .5rem; background: rgba(255,255,255,.03); border: 1px solid transparent; border-radius: 7px; color: var(--ink); }
.ts-in:hover { border-color: var(--line); }
.ts-in:focus { border-color: var(--gold); background: rgba(226,195,90,.08); outline: none; }
.ts-in.bad { border-color: #f87171; background: rgba(248,113,113,.1); }
.ts-grid .ts-score { font-weight: 700; border-left: 1px solid var(--line); padding-left: .8rem; }
.ts-grid .ts-score-h { border-left: 1px solid var(--line); padding-left: .8rem; }
.ts-grid .ts-fade { font-size: .85rem; color: var(--muted); }
.ts-grid tr.unsaved td:first-child { color: #f87171; }
.ts-chg.good, .ts-fade.good, .ts-big.good { color: #4ade80; }
.ts-chg.bad, .ts-fade.bad, .ts-big.bad { color: #f87171; }
.ts-foot .ok { color: #4ade80; } .ts-foot .err { color: #f87171; }
.ts-season-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.ts-season-head .grow { flex: 1; }
.ts-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.ts-tiles .card { margin: 0; }
.ts-big { font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.ts-big .ts-chg { font-size: .9rem; font-weight: 600; margin-left: .3rem; }
.ts-chg { font-size: .8rem; font-variant-numeric: tabular-nums; }
.ts-season th a { color: inherit; }
.ts-season td.num { white-space: nowrap; }
.badge.pb { background: rgba(74,222,128,.14); color: #4ade80; border: 1px solid rgba(74,222,128,.35); font-size: .7rem; padding: .05rem .35rem; border-radius: 5px; }
.ts-spark { width: 64px; height: 22px; vertical-align: middle; }
.ts-spark polyline { fill: none; stroke: #8b8d98; stroke-width: 1.5; }
.ts-spark circle { fill: #3b82f6; }
@media print { .ts-season-head, .ts-tabs, .ts-new, .page-head .actions { display: none !important; } }
.ts-sheet-wrap { grid-template-columns: 190px minmax(0, 1fr); }
.ts-in { width: 4.6rem; padding: .38rem .4rem; }
.ts-grid th, .ts-grid td { padding: .28rem .22rem; }
.ts-grid td:first-child, .ts-grid th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel, #161618); padding-right: .8rem; }
.ts-sheet .table-wrap { overflow-x: auto; }
.ts-sheet-wrap { grid-template-columns: 1fr; }
.ts-dates { flex-direction: row; overflow-x: auto; padding-bottom: .2rem; }
.ts-dates a { flex: none; }
.ts-grid { width: auto; }
.ts-in { width: 5rem; }

.att-share { display: flex; gap: .4rem; margin: .6rem 0 .2rem; }
.em-staff { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: -.4rem 0 .9rem; }
.em-staff .chip { cursor: pointer; font: inherit; font-size: .85rem; }
.em-staff .chip:disabled { opacity: .45; cursor: default; }
