:root {
  --teal: #00E3D4; --teal-dark: #00857c; --ink: #10201f; --ink2: #1b3331;
  --bg: #f3f6f6; --card: #fff; --line: #dbe3e2; --muted: #5d6f6d; --text: #142221;
  --danger: #c0392b; --warn-bg: #fff4d6; --warn-line: #e5b93c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: 19px; margin-bottom: 6px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
code { background: #e9efee; padding: 1px 5px; border-radius: 4px; }

.top { display: flex; align-items: center; gap: 24px; background: var(--ink); color: #fff; padding: 0 20px; height: 52px; }
.top a { color: #d5e4e2; }
.brand { font-weight: 700; font-size: 17px; color: #fff !important; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--teal); }
.top nav { display: flex; gap: 18px; flex: 1; }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; }
#presence { display: flex; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 13px; white-space: nowrap; }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

.eventbar { background: var(--teal); color: var(--on-accent, #062624); padding: 16px 20px 0; }
.eventbar h1 { font-size: 22px; }
.eventbar p { margin: 2px 0 12px; opacity: .78; font-size: 14px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; color: inherit; opacity: .8; border-radius: 6px 6px 0 0; font-weight: 500; }
.tabs a:hover { text-decoration: none; opacity: 1; }
.tabs a.on { background: var(--bg); color: var(--text); font-weight: 600; opacity: 1; }
.tabs.standalone { margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs.standalone a { color: var(--muted); }
.tabs.standalone a.on { background: var(--card); border: 1px solid var(--line); border-bottom-color: var(--card); margin-bottom: -1px; color: var(--text); }

main { max-width: 1240px; margin: 0 auto; padding: 20px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 400px; margin: 60px auto; }
.subcard { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.cols4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; margin-bottom: 10px; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.muted { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.empty { color: var(--muted); text-align: center; padding: 30px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.count { font-size: 13px; background: #e4ecEB; border-radius: 999px; padding: 1px 9px; font-weight: 500; vertical-align: middle; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #fde2de; color: var(--danger); }

label { display: block; font-size: 13px; font-weight: 600; color: #33514e; margin-bottom: 12px; }
label.plain { margin: 0; font-size: 15px; color: var(--text); cursor: pointer; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; color: var(--text); margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 12px; }
input, select, textarea { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=color]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid #c3cfcd; border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal-dark); }
input[type=file] { display: block; margin-top: 4px; font-weight: 400; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--teal-dark); }
input[type=search] { width: 280px !important; margin: 0 !important; }
td input:not([type=checkbox]):not([type=color]), td select { margin-top: 0 !important; }
input.short { width: 72px !important; }
#points-form td:nth-child(2) input { min-width: 150px; }

.btn { display: inline-block; font: inherit; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 6px; border: 1px solid #b9c7c5; background: #fff; color: var(--text); cursor: pointer; }
.btn:hover { background: #eef3f2; text-decoration: none; }
.btn.primary { background: var(--teal); border-color: var(--teal-dark); color: var(--on-accent, #062624); }
.btn.primary:hover { background: var(--teal); filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: #e3b6b0; }
.btn.small { padding: 3px 10px; font-size: 13px; }

table.list { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list.tight td { padding: 5px 6px; }
.list tr.new td { background: #f6fbfa; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.list .actions { text-align: right; white-space: nowrap; }
.list .actions form { display: inline; }
main > table.list { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
tr.locked td { background: color-mix(in srgb, var(--c) 14%, #fff); }
tr.locked td:first-child { box-shadow: inset 4px 0 0 var(--c); }
.lockinfo { font-size: 12px; font-weight: 600; margin-left: 6px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: #d9f8f5; border: 1px solid #8fdcd5; }
.flash.err { background: #fde2de; border-color: #e3a79f; }
.flash.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.logo-prev { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.logo-prev img { max-height: 64px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }

dialog { border: 0; border-radius: 12px; padding: 22px; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(16,32,31,.55); }
dialog h3 { margin: 0 0 12px; font-size: 18px; }
@media (max-width: 700px) { .top { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; } .top nav { flex-wrap: wrap; row-gap: 4px; } main { padding: 12px; } .card { padding: 14px; overflow-x: auto; } }

/* --- 0.2.0: programme, races, results, screen --- */
.crumb { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.tag.st-planned { background: #e7eceb; color: #51615f; }
.tag.st-startlist { background: #dbe8ff; color: #1f4fa3; }
.tag.st-live { background: #ffe1c2; color: #a04b00; }
.tag.st-unofficial { background: #fff1bf; color: #7a5a00; }
.tag.st-official { background: #c9f4d4; color: #14602b; }
.tag { vertical-align: middle; white-space: nowrap; }
h2 .tag, h3 .tag { margin-left: 6px; }
tr.child td:nth-child(3), tr.child td:first-child a { padding-left: 28px; }
tr.child td { background: #fafcfc; }
tr.heat td { background: var(--tint, #e4f6f4); color: var(--teal-dark); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 5px 10px; }
.muted-cell { color: var(--muted); font-size: 13px; }
.results td { padding: 6px 10px; }
.racehead { margin: 0; font-size: 17px; }
.childcard { margin-left: 28px; }
details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; font-weight: 600; color: var(--teal-dark); margin-bottom: 12px; }
.bulk { background: #f4f9f8; border: 1px solid var(--line); border-radius: 8px; padding: 14px 14px 2px; margin-bottom: 14px; }
.sprints { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
input.time { width: 110px !important; font-variant-numeric: tabular-nums; }
label.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
label.inline input { margin-top: 0 !important; }
.cols-decision { display: grid; grid-template-columns: 200px 150px auto 1fr auto; gap: 0 12px; align-items: end; margin-top: 12px; }
.cols-decision [hidden] + label { grid-column: span 2; }
.tag.dc-WARN { background: #fff3cd; color: #7a5b00; } .tag.dc-REL { background: #ffe0cc; color: #8a3b00; } .tag.dc-DSQ { background: #f8d7da; color: #842029; } .tag.dc-FINE { background: #e2e3e5; color: #41464b; }
.tag.flag-OVL, .tag.flag-REL { background: #ffe0cc; color: #8a3b00; } .tag.flag-W { background: #fff3cd; color: #7a5b00; }
.splitgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 12px; }
.splitgrid ol { list-style: none; margin: 6px 0 0; padding: 0; font-variant-numeric: tabular-nums; }
.splitgrid li { display: grid; grid-template-columns: 70px 1fr 80px; padding: 2px 0; border-bottom: 1px solid var(--line, #e3e8e7); }
.splitgrid li span { color: #5a6967; } .splitgrid li em { font-style: normal; text-align: right; color: #5a6967; } .splitgrid li.lead em { color: #0a7d4f; font-weight: 700; }
.advance .row { margin: 8px 0; align-items: center; } .advance input:not(.short) { max-width: 260px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.statgrid > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.statgrid small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.statgrid b { font-size: 20px; font-variant-numeric: tabular-nums; }
.inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
select optgroup.done, select option.done { color: var(--muted); }
header.top a.back { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); color: #fff; text-decoration: none; font-size: 26px; line-height: 1; font-weight: 700; margin-right: 10px; }
header.top a.back:hover { background: rgba(255,255,255,.12); }
/* 1.8.0: the back button in front of the first heading of the page */
h2 a.back.inl { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid #c9d3d2; background: #fff; color: #234; text-decoration: none; font-size: 22px; line-height: 1; font-weight: 700; margin-right: 8px; vertical-align: -3px; }
h2 a.back.inl:hover { background: var(--tint, #eef5f4); }
.inp { border: 2px solid var(--line); border-radius: 8px; padding: 8px; min-height: 74px; }
.inp b { display: block; font-size: 18px; } .inp b em { font-style: normal; font-size: 11px; font-weight: normal; color: var(--muted); margin-left: 4px; } .inp.on b em { color: #fff; } .inp span { display: block; font-size: 13px; } .inp small { color: var(--muted); font-size: 11px; }
.inp.on { background: #c62828; border-color: #c62828; color: #fff; } .inp.on small { color: #fff; }
.eqlog { margin-top: 10px; height: 340px; overflow: auto; background: #0b1716; color: #cfe; border-radius: 8px; padding: 8px 10px; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }
.eqlog .k-event { color: #ffd54a; } .eqlog .k-cmd { color: #7dff9b; } .eqlog .k-error { color: #ff8a80; } .eqlog .k-info { color: #9fb; opacity: .8; }
@media (max-width: 700px) { .inputs { grid-template-columns: repeat(2, 1fr); } }
.transferbox { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cols-decision > div { margin-bottom: 12px; }
.modes { display: flex; gap: 8px; flex-wrap: wrap; }
dl.state { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; padding: 12px 14px; background: #f4f9f8; border-radius: 8px; }
dl.state dt { color: var(--muted); font-size: 13px; font-weight: 600; }
dl.state dd { margin: 0; }
.preview { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; }
.preview iframe { width: 100%; height: 100%; border: 0; }
.list td.actions .btn { margin-left: 4px; }
@media (max-width: 700px) { .cols-decision { grid-template-columns: 1fr; } .childcard { margin-left: 0; } }
section.locked { box-shadow: inset 4px 0 0 var(--c); }
.cols-list { line-height: 2.1; }

/* --- 0.3.0: run console --- */
.grid2.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .grid2.wide-left { grid-template-columns: 1fr; } }
.taps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.taps form { display: contents; }
.tap { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 12px 8px; border: 2px solid #b9c7c5; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: var(--text); min-height: 92px; }
.tap:hover, .tap:focus-visible { border-color: var(--teal-dark); background: var(--tint, #e9fbf9); outline: none; }
.tap:active { transform: scale(.97); }
.tap b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.tap span { font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.placed { margin: 0; padding-left: 28px; font-size: 16px; line-height: 1.9; }
.scored { margin: 8px 0 14px; }
.slot { width: 86px; text-align: center; border: 2px dashed #c3cfcd; border-radius: 10px; padding: 6px 4px 8px; }
.slot.set { border-style: solid; border-color: var(--teal-dark); background: var(--tint, #e9fbf9); }
.slot small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.slot b { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.laps .actions .btn { min-width: 64px; }
.ontrack-row { display: grid; grid-template-columns: 70px 1fr 190px 100px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ontrack-row > b { font-size: 40px; text-align: right; font-variant-numeric: tabular-nums; color: var(--teal-dark); line-height: 1; }
.ontrack-row .who { display: flex; flex-direction: column; font-size: 17px; min-width: 0; }
.ontrack-row select, .ontrack-row input { margin-top: 0 !important; }
input.bigtime { font-size: 26px !important; font-weight: 700; padding: 8px 10px !important; font-variant-numeric: tabular-nums; }
.btn.big { margin-top: 14px; padding: 12px 22px; font-size: 16px; }
.nextline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 16px; margin: 0; }
tr.current td { background: #fff6e8; }
@media (max-width: 640px) { .ontrack-row { grid-template-columns: 50px 1fr; } .ontrack-row input.bigtime, .ontrack-row select { grid-column: 1 / -1; } }
.compact { overflow-x: auto; }
.compact .results th:nth-child(4), .compact .results td:nth-child(4), .compact .results th:last-child, .compact .results td:last-child { display: none; }

/* --- 0.3.1 --- */
.span2 { grid-column: span 2; }
.total { font-size: 17px; margin: 0 0 8px; }

/* --- 0.3.2 --- */
.pending { background: #fde2de; border: 1px solid #e3a79f; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.pending h3 { margin: 0; }

/* --- 0.3.3: event colour --- */
input.hex { width: 104px !important; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; margin: 0 !important; }
input.hex.bad { border-color: #c62828 !important; background: #fff5f5; }
label.inline input[type=color] { vertical-align: middle; margin-right: 6px; }
.swatches input[type=color] { width: 54px; height: 34px; padding: 2px; border: 1px solid #c3cfcd; border-radius: 6px; background: #fff; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.2); }
.tabs.standalone a { opacity: 1; }

/* --- 0.4.0 --- */
.brand img { height: 22px; display: block; }
.brand .wordmark { font-weight: 800; letter-spacing: .02em; }
.brand .product { font-weight: 500; color: #a9c2bf; padding-left: 8px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.25); }
.foot a { color: inherit; text-decoration: underline; }
.brandprev { padding: 14px; border-radius: 8px; margin-bottom: 8px; }
.brandprev.dark { background: var(--ink); }
.brandprev.light { background: #fff; border: 1px solid var(--line); }
.brandprev img { max-height: 40px; }
.startbox { border: 2px solid var(--line); border-radius: 10px; padding: 14px; margin: 10px 0 6px; }
.startbox.active { border-color: #e5b93c; background: #fffaf0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.startbox .hw { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; }
.startbtn { background: #1f9d55; border-color: #167a41; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: .04em; padding: 16px 28px; }
.startbtn:hover { background: #24b062; }
.raceclock { font-size: 64px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.raceclock.count { color: #c0392b; }
.ontrack-row { grid-template-columns: 70px 1fr 190px 100px auto; }
.btn.stamp { background: var(--ink); color: #fff; border-color: var(--ink); white-space: nowrap; }
.btn.big0 { padding: 10px 20px; font-size: 15px; }
.queue-list { display: flex; flex-direction: column; gap: 6px; }
.queue-list form { display: contents; }
.qrow { display: grid; grid-template-columns: 86px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--text); padding: 10px 12px; border: 2px solid #c9d5d3; border-radius: 10px; background: #fff; cursor: pointer; }
.qrow:hover:not(:disabled) { border-color: var(--teal-dark); background: var(--tint, #e9fbf9); }
.qrow .qh { font-size: 18px; font-weight: 800; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qrow .qr { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 16px; }
.qrow .qr b { font-variant-numeric: tabular-nums; }
.qrow .qr i { font-style: normal; font-weight: 700; margin-left: 6px; font-variant-numeric: tabular-nums; }
.qrow .qs { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qrow.on { border-color: #e08a00; background: #fff6e8; cursor: default; }
.qrow.on .qs { color: #a04b00; }
.qrow.done { background: #eef1f1; border-color: #dfe6e5; color: #7a8a88; }
.qrow.done .qr i { color: #51615f; }

/* --- 0.4.1 --- */
.brand img { height: 24px; }
.flypick .tap.next { background: #ffd200; border-color: #c9a500; color: #3b2f00; } .flypick .tap.next small { color: #5a4700; font-weight: 700; }
.flypick .tap.next2 { border-color: #ffd200; box-shadow: inset 0 0 0 2px #ffd200; }
.startbox.fly { padding: 10px 12px; }
.proposal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 10px; border: 2px dashed var(--teal); border-radius: 8px; background: #f4fbfa; }
.proposal .slot.small { padding: 4px 8px; } .proposal .slot.small b { font-size: 18px; }
.clubcheck { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.clubchk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 13px; }
.clubchk img { height: 22px; width: auto; max-width: 40px; object-fit: contain; }
.clubchk.miss { border-color: #c62828; background: #fdecea; } .clubchk.miss::after { content: 'missing'; color: #c62828; font-weight: 600; font-size: 11px; }
.clubchk code { color: var(--muted); font-size: 11px; }
.logolib { margin: 0 0 14px; } .logolib summary { cursor: pointer; font-weight: 600; }
.logogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.logocard { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.logocard.same { border-color: var(--teal); }
.logocard img { max-height: 56px; max-width: 100%; background: #fff; border-radius: 4px; padding: 3px; border: 1px solid var(--line); }
.logocard small { line-height: 1.3; }
.logobox { border: 1px solid var(--line); border-radius: 8px; padding: 12px 12px 2px; margin-bottom: 12px; }
.logobox .logo-prev { min-height: 44px; }
.logobox .logo-prev img { max-height: 44px; }

/* --- 0.5.0 --- */
.livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; margin-left: 4px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(46,204,113,.25); }
.bigtoggle { font-size: 18px; padding: 14px 26px; }
details.race { margin: 0; border: 0; padding: 0; }
details.race > summary { list-style: none; display: flex; align-items: center; gap: 12px; margin: 0; color: var(--text); font-weight: 400; }
details.race > summary::-webkit-details-marker { display: none; }
details.race > summary::before { content: '▸'; color: var(--muted); font-size: 14px; width: 12px; transition: transform .15s; }
details.race[open] > summary::before { transform: rotate(90deg); }
details.race > summary .grow { flex: 1; min-width: 0; }
details.race > summary .lead { color: var(--muted); font-size: 14px; margin-left: 8px; }
details.race[open] > summary { margin-bottom: 12px; }
.card.slim { padding: 12px 16px; margin-bottom: 8px; }
tr.idle td { color: #8b9a98; }
form.row select { width: auto !important; min-width: 150px; }

/* --- 0.6.0 --- */
.tag.flag-TR { background: #ffd54a; color: #5a4300; }
.tag.flag-NR { background: #ef3b3b; color: #fff; }
.tag.flag-PB { background: #d6e9ff; color: #1f4fa3; }
.eventbar.pub { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.eventbar.pub p { margin: 2px 0 0; }
.publogo { max-height: 54px; max-width: 160px; background: #fff; border-radius: 6px; padding: 4px; }
body.public main { max-width: 980px; }
.bignow { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.speaker-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .speaker-grid { grid-template-columns: 1fr; } }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--tint, #e9fbf9); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
#qrbox { display: flex; justify-content: center; padding: 12px; background: #fff; }
.sharebox { margin-top: 6px; }
.orderbox { margin: 12px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.recordbox { border-color: #e5b93c; background: #fffaf0; }
.recordbox h3 { margin: 0 0 4px; }
details.race { overflow-x: auto; }
@media (max-width: 520px) { body.public .results th:nth-child(4), body.public .results td:nth-child(4), body.public .results th:last-child, body.public .results td:last-child { display: none; } body.public main { padding: 10px; } }

/* 0.7.0: programme with drag and drop, breaks and time summary */
.progset label.inline { margin: 0; }
.progsum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 10px; }
.progsum div { border: 1px solid var(--line, #dfe6e5); border-radius: 8px; padding: 10px 12px; background: #fafcfc; }
.progsum small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #5d6d6b; }
.progsum b { font-size: 20px; font-variant-numeric: tabular-nums; }
.prog td.handle { white-space: nowrap; width: 1%; padding-right: 0; }
.prog .grip { cursor: grab; font-size: 18px; letter-spacing: -3px; padding: 6px 10px 6px 6px; color: #7b8b89; user-select: none; display: inline-block; }
.prog .grip:active { cursor: grabbing; }
.prog .mv { border: 0; background: none; cursor: pointer; color: #7b8b89; font-size: 11px; padding: 4px 3px; }
.prog .mv:hover { color: var(--text); }
/* 1.2.0: public/hidden mark for the start time, the pencil editor and the status select in the programme */
.clkform { display: inline; margin-left: 4px; }
.clk { border: 1px solid #cfd8d7; background: #fff; color: #7b8b89; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; cursor: pointer; }
.clk.on { background: var(--teal, #00E3D4); border-color: transparent; color: var(--on-accent, #062624); }
span.clk { cursor: default; display: inline-block; }
.pubtimes { background: #f4f7f7; border: 1px solid var(--line, #dfe6e5); border-radius: 8px; padding: 8px 12px; margin: 10px 0; align-items: center; font-size: 13px; }
.pubtimes > span { flex: 1; min-width: 260px; }
.prog .pen { border: 0; background: none; cursor: pointer; color: #7b8b89; font-size: 14px; padding: 2px 4px; }
.prog .pen:hover { color: var(--text); }
.prog button.bo { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.prog .rowedit { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-top: 6px; padding: 8px 10px; background: #f4f7f7; border-radius: 8px; }
.prog .rowedit[hidden] { display: none; }
.prog .rowedit label { font-size: 12px; margin: 0; }
.prog .rowedit input, .prog .rowedit select { display: block; min-width: 150px; }
select.stsel { border: 0 !important; font-weight: 700; font-size: 12px; padding: 4px 6px !important; border-radius: 20px; cursor: pointer; width: 138px !important; min-width: 0; text-transform: none; letter-spacing: 0; }
.prog td:nth-child(8) { white-space: nowrap; }
.timetable td.tt-len { font-size: 13px; }
/* 1.4.5: links for the organiser's website (Results tab) */
details.weblinks { margin-top: 12px; }
details.weblinks > summary { cursor: pointer; font-weight: 600; }
details.weblinks input[readonly] { width: 100% !important; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; margin: 0 !important; }
.prog tr.dragging td { background: var(--tint, #e9fbf9); opacity: .7; }
.prog.saving, tbody.saving { opacity: .55; pointer-events: none; }
.prog tr.break td { background: #fff8e6; }
.prog tr.break input:not(.short) { min-width: 180px; }
.prog tr.child td:nth-child(5) { padding-left: 28px; }
.prog tr.child td:nth-child(3), .prog tr.child td:first-child a { padding-left: 10px; }
.tag.st-break { background: #ffe9b0; color: #6b4e00; }
@media (max-width: 800px) { .progsum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tap small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tap.out { background: #c81e1e; border-color: #8f1212; color: #fff; }
.tap.out:hover, .tap.out:focus-visible { background: #a81717; border-color: #6f0d0d; }
.tap.out.showing { box-shadow: 0 0 0 4px #ffd54a; }
.tap.off { background: #eef1f1; border-style: dashed; color: #7b8b89; cursor: default; }
.walkbox { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfc; display: flex; flex-direction: column; gap: 8px; }
.walkbox label.inline { margin: 0; }
.match { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.match.done { background: #f3fbf5; border-color: #b9e2c4; }
.match h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.match .rides { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.match .rides span { background: #e7eceb; border-radius: 5px; padding: 3px 8px; }
.tap.won { border-color: #1c8a3c; background: #e3f7e8; }
.tap .wins { font-size: 12px; font-weight: 700; color: #14602b; }
/* race status: clear colours everywhere */
.tag.st-planned { background: #e7eceb; color: #51615f; }
.tag.st-startlist { background: #dbe8ff; color: #1f4fa3; }
.tag.st-live { background: #d81e1e; color: #fff; }
.tag.st-unofficial { background: #ffd54a; color: #5a4300; }
.tag.st-official { background: #1c8a3c; color: #fff; }
.tag .dot, .schip.st-live i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 5px; animation: pulse 1.2s infinite; vertical-align: 1px; }
@keyframes pulse { 50% { opacity: .25; } }
.tag.big { font-size: 12px; padding: 5px 10px; min-width: 118px; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.card.rs { border-left: 6px solid #c9d3d2; }
.card.rs-startlist { border-left-color: #3d74d6; }
.card.rs-live { border-left-color: #d81e1e; }
.card.rs-unofficial { border-left-color: #f0b400; }
.card.rs-official { border-left-color: #1c8a3c; }
.statusbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.schip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; }
.schip i { width: 10px; height: 10px; border-radius: 50%; background: #c9d3d2; display: inline-block; }
.schip.st-startlist i { background: #3d74d6; } .schip.st-live i { background: #d81e1e; margin: 0; width: 10px; height: 10px; } .schip.st-unofficial i { background: #f0b400; } .schip.st-official i { background: #1c8a3c; }
.schip b { font-variant-numeric: tabular-nums; color: #5d6f6d; }
.schip.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (max-width: 700px) { details.race > summary { flex-wrap: wrap; } }
.prog th, .prog td { padding-left: 6px; padding-right: 6px; }
.prog td.actions { white-space: nowrap; }
.prog td.actions .btn.small { padding: 4px 8px; }
.prog input.short { width: 58px !important; }
/* 0.8.0: laps to go */
.lapbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 20px; }
.lapnum { display: flex; flex-direction: column; align-items: center; min-width: 110px; padding: 6px 14px; border-radius: 10px; background: #142221; color: #fff; }
.lapnum small { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.lapnum b { font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.lapnum.last { background: #d81e1e; }
.lapbar label.inline { margin: 0; }
.prog input.short.est { width: 52px !important; text-align: right; }
.logogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.logotile { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; position: relative; }
.logotile img { height: 54px; max-width: 100%; object-fit: contain; }
.logotile span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.logotile .btn { position: absolute; top: 4px; right: 4px; padding: 1px 6px; }
.clubthumb { height: 34px; max-width: 48px; object-fit: contain; }
/* 0.8.0: now and next on the public live page */
.card.nownext { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; border-left: 6px solid var(--teal, #00E3D4); }
.nownext small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.nn-now strong { display: block; font-size: 22px; line-height: 1.2; }
.nn-next div { padding: 3px 0; } .nn-next .tm { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }
.timetable tr.tt-done td { opacity: .5; } .timetable tr.tt-now td { background: #fff4f4; } .timetable tr.tt-break td { font-style: italic; }
@media (max-width: 600px) { .card.nownext { grid-template-columns: 1fr; } }
.lockednote { background: #e9f7ed; border: 1px solid #b9e2c4; color: #14602b; border-radius: 6px; padding: 6px 10px; font-size: 13px; margin: 6px 0; display: inline-block; }
.clubcheck em { display: none; font-size: 11px; color: #a04b00; height: 54px; align-items: center; font-style: normal; }
.clubcheck.missing em { display: flex; }
/* 0.9.0: public event pages */
.pubnav { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; font-size: 14px; }
.livecard { border: 2px solid #d81e1e; }
.livecard h2 { margin: 0 0 8px; }
.lapchip { background: #142221; color: #fff; font-weight: 800; padding: 6px 12px; border-radius: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lapchip.last { background: #d81e1e; }
.lastsprint { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 10px; }
.lastsprint span { background: var(--tint, #e9fbf9); border-radius: 6px; padding: 2px 8px; }
.yearhead { margin: 18px 0 8px; font-size: 18px; }
a.eventlink { display: flex; align-items: center; gap: 14px; color: var(--text); border-left: 6px solid var(--teal); padding: 14px 18px; margin-bottom: 10px; }
a.eventlink strong { display: block; font-size: 17px; }
a.eventlink:hover { background: #fafcfc; }
body.public details.race > summary .btn.small { white-space: nowrap; }
@media (max-width: 600px) { a.eventlink { flex-wrap: wrap; } body.public details.race > summary { flex-wrap: wrap; } }
a.eventlink .grow { flex: 1; min-width: 0; }
@media (max-width: 520px) {
  body.public .card { padding: 14px 12px; overflow-x: auto; }
  body.public .results th, body.public .results td { padding: 7px 5px; font-size: 14px; }
  body.public .results th { font-size: 10px; letter-spacing: .02em; }
  body.public .livecard h2 { font-size: 18px; }
  .nn-now strong { font-size: 19px; }
}
/* 0.9.1 */
.eventbar { position: relative; }
.eventlinks { position: absolute; right: 20px; top: 16px; display: flex; gap: 8px; }
.eventlinks .btn { background: rgba(255,255,255,.9); }
.eventlinks .btn.ghost { background: transparent; border-color: rgba(0,0,0,.25); color: inherit; opacity: .8; }
@media (max-width: 700px) { .eventlinks { position: static; margin: 0 0 10px; } }
.licsum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.licsum a { text-decoration: none; }
.passbox { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 18px 0 6px; background: #fafcfc; }
.passbox.on { border-color: #d81e1e; background: #fffafa; }
.passbox h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.candrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.candrow b { min-width: 44px; font-size: 20px; }
.cand { border: 2px solid #b9c7c5; background: #fff; border-radius: 8px; padding: 5px 10px; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.cand small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.cand.on { border-color: #1c8a3c; background: #e3f7e8; }
input.bigtime.fromtiming { border-color: #1c8a3c !important; background: #e3f7e8 !important; }
#pass-log { margin-top: 10px; } #pass-log summary { cursor: pointer; font-weight: 600; }
tr.ignored td { opacity: .45; text-decoration: line-through; } tr.ignored td.actions { opacity: 1; text-decoration: none; }
/* 0.9.2: bunch races from passings */
#bunchbox { margin-bottom: 16px; }
.lineorder { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 6px 0 10px; min-height: 24px; }
.lineorder span { background: #e7eceb; border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.lineorder em { color: var(--muted); font-style: normal; }
tr.unseen td { opacity: .5; }
/* 0.10.0: lap chart in the Run console, "Add race" filter */
.lapnow { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.lapnow > div { border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px 8px; background: #fff; }
.lapnow small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.lapnow b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lapnow b i { font-style: normal; font-size: 14px; font-weight: 600; color: var(--muted); }
.lapnow .hot { border-color: #d81e1e; background: #fff1f1; }
.lapchart { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 10px; align-items: flex-start; }
.lapchart .lc { flex: none; width: 86px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding-bottom: 6px; }
.lapchart .lc:first-child { border-color: var(--teal-dark); box-shadow: 0 0 0 2px var(--tint, #e9fbf9); }
.lapchart .lh { padding: 5px 6px 4px; border-bottom: 1px solid var(--line); text-align: center; line-height: 1.2; }
.lapchart .lh b { display: block; font-size: 14px; }
.lapchart .lh small { display: block; font-size: 11px; color: var(--muted); }
.lapchart .lh em { display: block; font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #8a5a00; }
.lapchart .lc.sprint { background: #fffbea; } .lapchart .lc.elim { background: #fff4f4; } .lapchart .lc.elim .lh em { color: #b01818; }
.lapchart ol { list-style: none; margin: 4px 0 4px; padding: 0 6px; counter-reset: lc; }
.lapchart li { counter-increment: lc; display: flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; line-height: 1.35; }
.lapchart li::before { content: counter(lc); width: 16px; text-align: right; font-size: 11px; color: var(--muted); }
.lapchart li b { font-size: 15px; }
.lapchart li.score b { background: #ffd54a; border-radius: 4px; padding: 0 4px; }
.lapchart li.down b { color: var(--muted); font-weight: 600; }
.lapchart li.lastover b { background: #d81e1e; color: #fff; border-radius: 4px; padding: 0 4px; }
.lc-down { font-size: 11px; font-weight: 800; color: #b01818; }
.lapchart form { text-align: center; } .lapchart form .btn { padding: 2px 6px; font-size: 12px; }
.filterbar { background: var(--tint, #e9fbf9); border-radius: 8px; padding: 8px 12px 2px; margin-bottom: 10px; align-items: end; }
.filterbar .muted-cell { align-self: center; }
/* 0.10.1: start order board and "who is on track" */
.orderboard { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: #fafcfc; }
.orderboard.dirty { border-color: var(--teal-dark); box-shadow: 0 0 0 2px var(--tint, #e9fbf9); }
.ob-heats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ob-heat { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px 8px; min-height: 74px; display: flex; flex-direction: column; gap: 5px; }
.ob-heat .ob-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ob-heat .ob-h b { color: var(--ink, #10201f); font-size: 14px; }
.ob-new { border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; cursor: pointer; }
.ob-unit { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; border: 2px solid #c9d5d3; border-radius: 8px; background: #fff; padding: 6px 8px; cursor: pointer; touch-action: manipulation; }
.ob-unit b { min-width: 34px; font-size: 18px; font-variant-numeric: tabular-nums; }
.ob-unit span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-unit i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ob-unit.picked { border-color: var(--teal-dark); background: var(--tint, #e9fbf9); box-shadow: 0 0 0 2px var(--teal-dark); }
.ob-unit.done { opacity: .55; cursor: default; border-style: dashed; }
.orderboard.lines .ob-heat .ob-unit:nth-of-type(1) { border-left: 8px solid #c81e1e; }
.orderboard.lines .ob-heat .ob-unit:nth-of-type(2) { border-left: 8px solid #12833a; }
.ob-red { color: #c81e1e; font-weight: 700; } .ob-green { color: #12833a; font-weight: 700; }
details.ob-table { margin-bottom: 12px; } details.ob-table > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.linetag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.linetag.red { background: #c81e1e; } .linetag.green { background: #12833a; }
.pickbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 14px 0; background: #fafcfc; }
.pickbox summary { cursor: pointer; font-weight: 700; }
.pickbox .checks label.other { opacity: .8; }
/* 0.10.2: days in the programme */
.prog tr.dayrow td { background: var(--teal, #00E3D4); color: var(--on-accent, #04201e); border-top: 3px solid var(--teal-dark, #00a99d); }
.prog tr.dayrow .muted-cell { color: inherit; opacity: .75; margin-left: 10px; }
.prog tr.dayrow .grip, .prog tr.dayrow .mv { color: inherit; }
.daysum { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 10px; }
.daysum div { border: 1px solid var(--line, #dfe6e5); border-left: 5px solid var(--teal-dark, #00a99d); border-radius: 8px; padding: 8px 12px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.daysum b { font-size: 15px; } .daysum span { font-variant-numeric: tabular-nums; }
.timetable tr.tt-day td { background: var(--tint, #e9fbf9); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
/* Line-up board of a bunch race (1.0.0): fixed columns, the place in each file is numbered */
.ob-heats.lines3 { grid-template-columns: 1fr 1fr .8fr; align-items: start; }
.orderboard.fixed .ob-heat { counter-reset: place; min-height: 120px; }
.orderboard.fixed .ob-heat:not(.ob-rest) .ob-unit::before { counter-increment: place; content: counter(place); min-width: 20px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.orderboard.fixed .ob-heat[data-line="F"] { border-top: 4px solid #1f4fa3; }
.orderboard.fixed .ob-heat[data-line="L"] { border-top: 4px solid #c81e1e; }
.orderboard.fixed .ob-rest { border-style: dashed; background: transparent; }
@media (max-width: 760px) { .ob-heats.lines3 { grid-template-columns: 1fr; } }
.omniumbar { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; background: var(--tint, #fafcfc); }
.omniumbar h3 { margin: 0 0 8px; }
.omgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.omcard { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--teal, #00b5a9); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.omcard form { display: inline; }
.omcard .omhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: nowrap; }
.omcard .row { flex-wrap: wrap; gap: 6px; }
.omtop { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.omtop li { display: flex; gap: 6px; align-items: baseline; }
.omtop li .num { width: 22px; text-align: right; color: var(--muted, #667); }
.omtop li b { margin-left: auto; }
.omchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: #fff; }
.omchip form { display: inline; }

/* 1.8.0: grouped lists (Admin › Users), inactive rows */
table.list tr.grp th { background: var(--tint, #eef5f4); color: #234; font-weight: 700; padding: 8px 10px; border-top: 2px solid #d5dedd; }
table.list tr.inactive td { opacity: .55; }

/* 1.8.0: the floppy that shows while a form with autosave has changes not yet saved */
.savefab { position: fixed; top: 60px; right: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 0; background: var(--teal, #00b5a9); color: var(--on-accent, #10201f); font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.22); cursor: pointer; animation: savefab-in .18s ease-out; }
.savefab:hover { filter: brightness(1.06); }
.savefab.busy { opacity: .85; cursor: default; }
.savefab.busy svg { animation: savefab-spin 1s linear infinite; }
@keyframes savefab-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes savefab-spin { to { transform: rotate(360deg); } }
table.list tr.warnrow td { background: #fff8e6; }
/* 1.8.1: logo archive cards */
.logocard input[name=name] { width: 100%; }
.logocard .row { flex-wrap: wrap; gap: 4px; }
/* 1.8.2: venue filter on the event list */
.venuefilter { margin: 0 0 12px; flex-wrap: wrap; gap: 6px; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.chipbtn:hover { background: var(--tint, #eef5f4); text-decoration: none; }
.chipbtn.on { background: var(--ink, #10201f); color: #fff; border-color: var(--ink, #10201f); }
.chipbtn.on .count { background: rgba(255,255,255,.2); color: #fff; }
.chipbtn .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
/* 1.8.3: race presets with a class picker and the coverage matrix */
table.presets td.clspick { min-width: 220px; }
table.presets .checks.small { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 4px; }
.tablewrap { overflow-x: auto; }
table.presets .checks.small label.check { font-size: 13px; margin: 0; }
table.presets input.short { width: 64px; }
table.matrix td.gap { background: #fff3f0; }
table.matrix td { vertical-align: top; font-size: 13px; }
table.presets input[name=name] { min-width: 150px; }
table.presets select[name=code] { min-width: 130px; }
/* 1.8.4: presets as collapsed rows, classes in a dropdown with ticks grouped by template */
details.preset { border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; background: #fff; }
details.preset > summary { cursor: pointer; padding: 8px 12px; list-style: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.preset > summary::-webkit-details-marker { display: none; }
details.preset > summary::before { content: "▸"; color: var(--muted); font-size: 12px; }
details.preset[open] > summary::before { content: "▾"; }
details.preset[open] > summary { border-bottom: 1px solid var(--line); background: var(--tint, #eef5f4); }
details.preset > .presetfields, details.preset > .row { padding: 0 12px; }
details.preset > .presetfields { padding-top: 10px; }
details.preset > .row { padding-bottom: 10px; }
details.preset.new { border-color: var(--teal); }
details.dd { position: relative; }
details.dd > summary { list-style: none; cursor: pointer; border: 1px solid #c9d3d2; border-radius: 6px; padding: 7px 28px 7px 10px; background: #fff; width: 100%; box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; font-size: 14px; }
details.dd > summary::-webkit-details-marker { display: none; }
details.dd > summary::after { content: "▾"; position: absolute; right: 9px; top: 6px; color: var(--muted); }
details.dd .ddmenu { position: absolute; z-index: 40; top: 100%; left: 0; min-width: 260px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px 10px; margin-top: 4px; }
details.dd .ddgroup { padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
details.dd .ddgroup:last-child { border-bottom: 0; }
details.dd .ddgroup strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0 2px; }
details.dd .ddgroup label.check { display: flex; margin: 0; padding: 3px 0; font-size: 14px; }
