/* Copied from dashboard/static/style.css (the video desk), plus the public-site rules at the end. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f0f2f5;
  --text: #17202a;
  --muted: #5d6b7a;
  --line: #dde2e8;
  --accent: #0b6e8a;
  --accent-soft: #e0f1f6;
  --ok: #1d7a46;
  --ok-soft: #e1f4e8;
  --warn: #9a5b00;
  --warn-soft: #fdf0d9;
  --bad: #b3261e;
  --expert: #0b6e8a;
  --inter: #7a4fb0;
  --inter-soft: #efe7f9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419; --panel: #171e26; --panel-2: #1f2832; --text: #e6ebf0; --muted: #94a3b3;
    --line: #2b3643; --accent: #4fb8d6; --accent-soft: #15323d; --ok: #5cc98a; --ok-soft: #143222;
    --warn: #f0b45a; --warn-soft: #3a2c14; --bad: #f2827a; --expert: #4fb8d6; --inter: #b892e8;
    --inter-soft: #2c2140; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1419; --panel: #171e26; --panel-2: #1f2832; --text: #e6ebf0; --muted: #94a3b3;
  --line: #2b3643; --accent: #4fb8d6; --accent-soft: #15323d; --ok: #5cc98a; --ok-soft: #143222;
  --warn: #f0b45a; --warn-soft: #3a2c14; --bad: #f2827a; --expert: #4fb8d6; --inter: #b892e8;
  --inter-soft: #2c2140; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 14px; margin: 0; }
.muted { color: var(--muted); }
.pad { padding: 24px; }
button {
  font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { background: transparent; }
button.small { padding: 3px 9px; font-size: 12px; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
input[type=search], textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; width: 100%;
}

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px;
  padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.topbar nav a:hover { text-decoration: none; background: var(--panel-2); }
.topbar nav a.active { background: var(--accent-soft); color: var(--accent); }
.count {
  background: var(--warn); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px;
  margin-left: 4px; font-weight: 600;
}

main { max-width: 1180px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.bar { height: 4px; background: var(--panel-2); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input { max-width: 320px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; border-radius: 0; padding: 6px 12px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* level sections + division cards */
.level { margin-bottom: 30px; }
.level-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.level-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.divisions { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.division { overflow: hidden; border-top: 3px solid var(--expert); }
.division.intermediate { border-top-color: var(--inter); }
.division-head { padding: 12px 14px 8px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.round-label { padding: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.heat-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 14px;
  border-top: 1px solid var(--line); color: var(--text);
}
.heat-row:hover { background: var(--panel-2); text-decoration: none; }
.heat-row .when { color: var(--muted); font-size: 12px; }
.heat-row .badges { grid-column: 1 / -1; }

.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500;
  padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.expert { background: var(--accent-soft); color: var(--expert); }
.badge.intermediate { background: var(--inter-soft); color: var(--inter); }
.badge.none { background: transparent; border: 1px dashed var(--line); }

/* jersey */
.jersey {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .25); vertical-align: -2px; flex: none;
}

/* heat page */
.video-panel { margin-bottom: 18px; padding: 12px 14px; }
.video-panel video { width: 100%; aspect-ratio: 16 / 9; max-height: 520px; background: #000; border-radius: 8px; margin-top: 10px; }
.tip { font-size: 12.5px; color: var(--muted); background: var(--panel-2); padding: 8px 12px; border-radius: 8px; margin-bottom: 14px; }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--panel); }
.entries { display: grid; gap: 12px; }
.entry { padding: 14px; display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; }
.entry-who { display: flex; gap: 12px; align-items: flex-start; }
.entry-who .name { font-weight: 600; font-size: 15px; }
.place { font-size: 12px; color: var(--muted); }
.place b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.rides { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ride { font-size: 11px; padding: 0 6px; border-radius: 5px; background: var(--panel-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.ride.counting { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.entry-work { display: grid; gap: 10px; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.thumb { position: relative; width: 110px; height: 74px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.thumb .del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; border-radius: 50%;
  font-size: 13px; line-height: 1; background: rgba(0, 0, 0, .6); color: #fff; border: 0; display: none;
}
.thumb:hover .del { display: block; }
.paste {
  width: 170px; min-height: 74px; border: 1.5px dashed var(--line); border-radius: 7px; padding: 8px;
  font-size: 11.5px; color: var(--muted); display: grid; place-items: center; text-align: center; cursor: text;
  outline: none;
}
.paste:focus, .paste.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.paste .pick { display: block; margin-top: 3px; }
.work-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.request-form { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 260px; }
.request-form input { flex: 1; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }

/* athletes */
table { width: 100%; border-collapse: collapse; }
.table-card { overflow: hidden; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--panel-2); }
td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }
td.num { font-variant-numeric: tabular-nums; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--panel-2); color: var(--muted);
  display: inline-grid; place-items: center; font-weight: 600; font-size: 12px; flex: none;
}
.avatar.lg { width: 72px; height: 72px; font-size: 22px; }
.who { display: flex; align-items: center; gap: 10px; }
.profile-head { display: flex; gap: 18px; align-items: center; }
.gallery-group { margin-bottom: 18px; }
.gallery-group h3 { margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
section.block { margin-top: 28px; }
section.block > h2 { margin-bottom: 12px; }

/* lightbox + toast */
#lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); display: grid; place-items: center; z-index: 50; padding: 30px; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
#lightbox .close { position: absolute; top: 14px; right: 18px; font-size: 26px; background: none; border: 0; color: #fff; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 8px; z-index: 60; font-weight: 500; }

@media (max-width: 760px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .topbar nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  main { padding: 16px; }
  .divisions { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
td.athlete-col { min-width: 230px; }
.division-group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.medals { white-space: nowrap; }
.medal { margin-right: 4px; }
.badge.medal-1 { background: #fbf0c4; color: #7a5a00; }
.badge.medal-2 { background: #e8ecf0; color: #4a5560; }
.badge.medal-3 { background: #f6e1cf; color: #7d4317; }
.explain { padding: 10px 16px; margin-bottom: 16px; }
.explain summary { cursor: pointer; font-weight: 600; }
.explain ul { padding-left: 20px; margin: 6px 0; }
.explain p { margin: 8px 0; }
th.num { width: 36px; }
td.num.muted { width: 36px; padding-right: 0; }
.aff-row { color: var(--accent); font-size: 12px; margin-top: 1px; }
.women-toggle { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; flex-wrap: wrap; }
.women-toggle .link { font-size: 13px; }

/* publish videos */
.pub-card { padding: 16px; margin-bottom: 18px; display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 18px; }
.pub-media video { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 16 / 9; }
.pub-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 13px; }
.pub-meta input[type=url] { width: 100%; }
.pub-actions { display: flex; gap: 12px; align-items: center; }
.pub-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pub-label { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pub-label b { flex: 1; }
.pub-label .over { color: #d32f2f; font-weight: 600; }
.pub-field input, .pub-field textarea, .pub-meta input { width: 100%; box-sizing: border-box; font: inherit; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); }
.pub-field textarea { resize: vertical; line-height: 1.45; }
@media (max-width: 800px) { .pub-card { grid-template-columns: 1fr; } }
.pub-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pub-check input { margin: 0; }
.pub-music { display: flex; align-items: center; gap: 8px; }
.pub-music select { flex: 1; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); }
.block audio { height: 32px; width: 100%; min-width: 380px; }
/* let long license names wrap so the wide player and the Copy credit button both fit */
.music-table .badge { white-space: normal; }
.small-text { font-size: 12px; }
.fav { border: 0; background: none; padding: 0 2px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.fav.on { color: #e0a800; }
.music-tools { display: flex; gap: 12px; align-items: center; }
.kayak-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kayak-row input { flex: 1 1 140px; min-width: 0; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }
.pub-covers { grid-column: 1 / -1; order: 1; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.cover-pick { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.cover-pick:hover { border-color: var(--accent); }
.cover-pick img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cover-pick span { position: absolute; top: 6px; right: 6px; font-size: 11px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 4px; }
.rate { white-space: nowrap; }
.dislike { border: 0; background: none; padding: 0 2px; font-size: 15px; line-height: 1; cursor: pointer; opacity: .45; filter: grayscale(1); }
.dislike:hover { opacity: 1; filter: none; }
.dislike.on { opacity: 1; filter: none; color: var(--accent); font-size: 18px; }
tr.disliked td:not(.rate) { opacity: .45; }
.length-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pub-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; text-align: left;
  font: inherit; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; }
.pub-head .badge { margin-left: auto; }
.pub-arrow { width: 1em; color: var(--muted, #888); }
.pub-card.collapsed { display: block; padding: 12px 16px; margin-bottom: 10px; }

/* highlight edit reports */
.edit-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.edit-version { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; color: inherit; text-decoration: none; }
.edit-version:hover { background: var(--accent-soft); }
.edit-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.edit-player { position: sticky; top: 70px; display: grid; gap: 8px; justify-items: start; }
.edit-top video { width: 100%; border-radius: 8px; background: #000; }
main:has(.edit-top), main:has(.ride-review) { max-width: none; }
.clip-feedback td, .clip-feedback th { white-space: nowrap; padding-top: 4px; padding-bottom: 4px; }
.clip-feedback td:last-child { width: 100%; white-space: normal; }
.clip-user-reply { margin-top: 4px; }
.clip-reply { margin-top: 4px; color: var(--muted); }
.clip-feedback textarea { display: block; width: 100%; min-width: 140px; }
.edit-side { min-width: 0; }
.edit-side .table-card { overflow-x: auto; }
@media (max-width: 800px) { .edit-top { grid-template-columns: 1fr; } .edit-player { position: static; } }
.proposal-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.edit-strip { display: grid; gap: 4px; margin-bottom: 8px; }
.strip-seg.song-proposed { box-shadow: inset 0 0 0 2px var(--accent); }
#edit-preview-status:empty { display: none; }
.strip-row { position: relative; height: 30px; }
.strip-seg { position: absolute; top: 0; bottom: 0; border-radius: 4px; padding: 0 4px; font-size: 11px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--panel); }
.strip-seg.card-seg { background: var(--panel-2); }
.strip-seg.song-0 { background: var(--ok-soft); color: var(--ok); }
.strip-seg.song-1 { background: var(--warn-soft); color: var(--warn); }
.strip-seg.song-2 { background: var(--inter-soft); color: var(--inter); }
.edit-notes { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.scroll-x { overflow-x: auto; }
.edit-matrix td, .edit-matrix th { text-align: center; }
.edit-matrix td:first-child, .edit-matrix th:first-child { text-align: left; }
.edit-roster { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.edit-roster.ok { border-color: #3a9a5b; background: color-mix(in srgb, #3a9a5b 10%, transparent); }
.edit-roster.warn { border-color: #c98a1b; background: color-mix(in srgb, #c98a1b 12%, transparent); }
.edit-roster .small-text { margin-top: 4px; color: var(--muted); }
.version-tag { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; vertical-align: middle; }
.version-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.version-switch a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; background: var(--panel); }
.version-switch a.final::after, .final-tag { padding: 1px 7px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 600; }
.version-switch a.final::after { content: "Final"; margin-left: 6px; }
.version-switch a.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.edit-elements th { width: 160px; text-align: left; vertical-align: top; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.edit-elements tr.changed td { background: var(--accent-soft); }
.edit-elements .version-tag { font-size: 11px; margin-left: 6px; }
.edit-elements td .small-text { margin-top: 4px; }
.elements-block { margin-top: 24px; }
.elements-block summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.elements-block summary::-webkit-details-marker { display: none; }
.elements-block summary h2 { margin: 0 0 10px; }
.elements-block summary h2::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
.elements-block[open] summary h2::before { transform: rotate(90deg); }
.elements-block summary .toggle-hint::after { content: "show"; }
.elements-block[open] summary .toggle-hint::after { content: "hide"; }
.pub-group { margin: 26px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.edit-matrix-total td { border-top: 2px solid var(--border, #d8dde3); background: rgba(127, 127, 127, 0.08); }
.badge.highlight { background: var(--inter-soft); color: var(--inter); }
.division-highlight { display: block; padding: 8px 18px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.division-highlight:hover { text-decoration: underline; }
.division-count { white-space: nowrap; }
.hl-request { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.hl-request.request-form input { min-width: 0; }
.candidates { margin-top: 24px; }
.candidate-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; align-items: start; margin-top: 8px; }
.candidate-player { position: sticky; top: 70px; display: grid; gap: 6px; }
.candidate-player video { width: 100%; border-radius: 8px; background: #000; }
.candidate-table tr.cand-row { cursor: pointer; }
.candidate-table tr.cand-row:hover td { background: rgba(127, 127, 127, 0.08); }
.candidate-table tr.cand-row.active td:not(.cand-athlete) { background: rgba(59, 130, 246, 0.14); }
.candidate-table tr.group-start td { border-top: 2px solid rgba(127, 127, 127, 0.35); }
.candidate-table td.cand-athlete { vertical-align: top; cursor: default; }
.candidate-table textarea { width: 100%; min-width: 140px; box-sizing: border-box; }
@media (max-width: 800px) { .candidate-layout { grid-template-columns: 1fr; } .candidate-player { position: static; } }
.candidate-table tr.cand-row.selected td:not(.cand-athlete) { background: rgba(34, 197, 94, 0.18); }
.candidate-table td.cand-athlete { display: table-cell; }
.candidate-table .cand-athlete > * + * { margin-top: 6px; }
.review-toggle { text-align: left; padding: 0; cursor: pointer; }
.review-music { display: grid; gap: 4px; margin-top: 8px; }
.review-music select { max-width: 100%; }
.cand-toggle { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; cursor: pointer; }
.candidate-table tr.cand-row.included td:not(.cand-athlete) { background: rgba(127, 127, 127, 0.06); }
.candidate-table tr.cand-row.included.active td:not(.cand-athlete) { background: rgba(59, 130, 246, 0.14); }
.in-video-tag, .cand-tag { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 11px; white-space: nowrap; }
.in-video-tag { background: rgba(127, 127, 127, 0.18); }
.cand-tag { background: rgba(34, 197, 94, 0.2); }
.cand-tag.review-cand { background: rgba(245, 158, 11, 0.22); }
button.removed-btn { background: #dc2626; border-color: #dc2626; color: #fff; }
.candidate-table tr.cand-row.removed td:not(.cand-athlete) { background: rgba(239, 68, 68, 0.13); }
.candidate-table tr.cand-row.removed td:nth-child(n+3):not(.review-marks):not(:last-child) { opacity: 0.6; }
.candidate-table td.review-marks { white-space: nowrap; }
.candidate-table td.review-marks button + button { margin-left: 4px; }
.candidate-table textarea { resize: vertical; overflow: hidden; min-height: 34px; }
button.selected-btn { background: #16a34a; border-color: #16a34a; color: #fff; }
.use-line { margin: 2px 0; }
.badge.draft-use { background: rgba(127, 127, 127, 0.16); }
a.badge.draft-use { color: inherit; text-decoration: none; }
.music-usage-box { margin-top: 8px; display: grid; gap: 4px; justify-items: start; }

/* division Results: one line per heat, the kayak boxes lined up with the heat they belong to */
.div-heat-line { min-height: 34px; display: flex; align-items: center; gap: 6px; }
.div-kayaks .kayak-row { flex-wrap: nowrap; }
.div-kayaks .kayak-row input { flex: 0 1 130px; padding: 3px 8px; }
.div-kayaks button { margin-top: 4px; }
td:has(> .div-heat-line), td.div-kayaks { vertical-align: top; }

/* ride review: filter the athletes by video part */
.review-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }

/* ---- public site ---------------------------------------------------- */
.entries:has(> .entry.public) { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.entry.public { grid-template-columns: 1fr; }
.podium { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 18px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.podium a { color: inherit; }
.block > .division-highlight { border-radius: 8px; margin-bottom: 6px; }
a.name-link { color: inherit; }
.site-foot { max-width: 1200px; margin: 24px auto 32px; padding: 0 16px; font-size: 13px; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
a.button-link { display: inline-block; padding: 7px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
a.button-link:hover { text-decoration: none; opacity: .9; }
.heat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; margin-bottom: 8px; }
.heat-card { overflow: hidden; scroll-margin-top: 80px; }
.heat-card-head { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.heat-table { width: 100%; border-collapse: collapse; }
.heat-table td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.heat-table tr:first-child td { border-top: 0; }
.heat-table .rides { margin-top: 0; }
.heat-card.flash { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 760px) { .heat-cards { grid-template-columns: 1fr; } }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.video-card { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.video-card:hover { text-decoration: none; }
.video-card:hover strong { color: var(--accent); }
.thumb16 { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.thumb16 img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.video-card:hover .thumb16 img { transform: scale(1.04); }
.thumb16 .len { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.thumb16 .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; opacity: 0; background: rgba(0,0,0,.25); transition: opacity .2s; }
.video-card:hover .play { opacity: 1; }
.video-meta { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
#player { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 16px; }
#player[hidden] { display: none; }
.player-box { width: min(1100px, 100%); background: #000; border-radius: var(--radius); overflow: hidden; }
.player-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: #fff; }
.player-head strong { flex: 1; }
.player-head a { color: #fff; font-size: 13px; opacity: .85; }
.player-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
#player-frame { aspect-ratio: 16 / 9; }
#player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.embed-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.embed16 { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.embed16 iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-card figcaption { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
@media (max-width: 760px) { .embed-grid { grid-template-columns: 1fr; } }
.thumb16.no-video { display: grid; place-items: center; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.embed-grid.one { grid-template-columns: minmax(0, 960px); }
.athlete-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.athlete-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text); }
.athlete-tile:hover { text-decoration: none; border-color: var(--accent); }
.athlete-tile > span { display: flex; flex-direction: column; gap: 2px; }
a.button-link.ghost { background: var(--panel); color: var(--accent); border: 1px solid var(--line); }
.medals.big { font-size: 20px; margin-top: 4px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
div.heat-row:hover { background: none; }
.division-highlight .muted { font-weight: 400; }
.rides-table a.seek { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.embed-grid.stack { grid-template-columns: minmax(0, 640px); }
.about-card { padding: 18px 20px; max-width: 760px; }
.about-card p { margin: 0 0 12px; line-height: 1.6; }
.about-card p:last-child { margin-bottom: 0; }
.about-links { display: flex; flex-wrap: wrap; gap: 8px; }
td.nowrap { white-space: nowrap; }
