/* Visual system: SPEC.md Amendment A1, "Broadcast Blue". Tokens, type scale and screens follow A1 exactly. */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-800-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "DSEG7"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/dseg7-classic-bold.woff2) format("woff2"); }

:root {
  --blue: #3769A0;
  --navy: #3D5482;
  --red: #B72126;
  --win: #1E7A3A;
  --gold: #F2B134;
  --white: #FFFFFF;
  --paper: #F4F3F1;
  --ink: #3C3533;
  --ink-2: #6B6663;
  --line: #E6E3E0;
  --loss: #686F7D;
  --tint: #EEF2F8;
  --tint-2: #FBEAEA;
  --tint-3: #EAF4EC;
  --warn-bg: #FFF4D6;
  --err: #B3261E;
  --f-body: Barlow, "Helvetica Neue", Arial, sans-serif;
  --f-disp: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--f-body);
  overflow-x: hidden;
}
body.noscroll { }
[hidden] { display: none !important; }
a { color: var(--blue); }
h1, h2, h3, h4, p { margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type scale */
h1, h2, h3, .disp {
  font-family: var(--f-disp); font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1;
}
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
.lab {
  font: 600 13px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2);
}
.num { font-family: var(--f-disp); font-weight: 700; font-variant-numeric: tabular-nums; }
.dash { color: var(--loss); }
.struck { text-decoration: line-through; }

/* Page heading: label, H1, red stripe */
.ph .lab { margin-bottom: 6px; }
.pg { color: var(--navy); }
.pg::after { content: ""; display: block; width: 44px; height: 3px; background: var(--red); margin-top: 10px; }

/* Focus */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.top :focus-visible, .login :focus-visible { outline-color: var(--white); }

/* Buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--navy); border-radius: 6px;
  background: var(--white); color: var(--navy);
  font: 600 16px/1 var(--f-body); cursor: pointer; text-decoration: none;
}
.btn.primary {
  background: var(--red); border-color: var(--red); color: var(--white);
  font-family: var(--f-disp); font-weight: 800; font-style: italic; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.linkbtn {
  background: none; border: 0; border-radius: 6px; color: var(--white);
  font: 600 14px/1 var(--f-body); min-height: 44px; padding: 0 4px; cursor: pointer;
}
input[type=text], input[type=number], input[type=password], input[type=email], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--ink-2); border-radius: 6px;
  background: var(--white); color: var(--ink);
  font: 400 16px/1.3 var(--f-body);
}
textarea { min-height: 88px; resize: vertical; }
textarea.json { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; min-height: 120px; }
label.fld { display: block; font: 600 13px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
label.fld > input, label.fld > select, label.fld > textarea { margin-top: 4px; text-transform: none; letter-spacing: 0; color: var(--ink); }
label.chk { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
label.chk input { width: 22px; height: 22px; accent-color: var(--blue); }
.msg { font-weight: 600; font-size: 14px; }
.msg.ok { color: var(--navy); }
.msg.err { color: var(--err); }

/* Login */
.login {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 30px 30px 210px; background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 850 1100' preserveAspectRatio='xMidYMid slice'%3E%3Cpolygon fill='%233D5482' points='0,0 850,0 850,1100 0,1100'/%3E%3Cpolygon fill='%235D7AA8' points='0,0 850,0 850,560 0,1070'/%3E%3Cpolygon fill='%233769A0' points='0,0 850,0 850,300 0,830'/%3E%3Cpolygon fill='%23B72126' points='0,0 850,0 850,320 0,140'/%3E%3Cg stroke='%23382C30' stroke-width='14' fill='none'%3E%3Cline x1='0' y1='140' x2='850' y2='320'/%3E%3Cline x1='0' y1='830' x2='850' y2='300'/%3E%3Cline x1='0' y1='1070' x2='850' y2='560'/%3E%3C/g%3E%3C/svg%3E"); background-size: cover; background-position: center; background-repeat: no-repeat;
}
.login-box { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-logo { display: block; width: 150px; height: auto; }
.login-sub { font: 600 12px/1.3 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 1px #382C30, 0 0 3px #382C30; text-align: center; }
.login input { height: 48px; min-height: 48px; border: 0; border-radius: 6px; padding: 0 14px; }
.login input::placeholder { color: var(--ink-2); opacity: 1; }
.login .btn { width: 100%; height: 48px; }
.login-msg { color: #F5C465; min-height: 1.4em; font-weight: 600; text-align: center; width: 100%; }
.login-msg:not(:empty) { background: #382C30; border-radius: 6px; padding: 6px 10px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20; height: 56px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 max(14px, calc((100% - 960px) / 2 + 16px));
  background: var(--blue); color: var(--white);
}
.brand { display: flex; align-items: center; min-height: 44px; border-radius: 6px; }
.brand img { display: block; height: 36px; width: auto; }
.live { display: inline-flex; align-items: center; gap: 7px; font: 600 12px/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #9EA6B5; display: inline-block; }
.live.on i { background: var(--red); box-shadow: 0 0 0 3px rgba(183, 33, 38, 0.25); }
.hdr-tag {
  position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  border: 1px solid var(--white); border-radius: 3px;
  color: var(--white); font: 600 11px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.hdr-tag::after { content: ""; position: absolute; inset: -8px -4px; }

/* S20: the header carries the menu button, logo, LIVE and the role chip only. Navigation lives in the drawer (below). */
.live { margin-left: auto; }
@media (max-width: 340px) { .live span { display: none; } }
@media (min-width: 900px) { .top { gap: 14px; } }

main { max-width: 960px; margin: 0 auto; padding: 20px 16px 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0 18px; margin: -6px 0 8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; font: 600 14px/1 var(--f-body); color: var(--blue); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Overview */
.ep-head { scroll-margin-top: 112px; }
.ep-head.later { margin-top: 36px; }
.seg {
  position: sticky; top: 56px; z-index: 10; display: flex;
  margin: 14px -16px 16px; padding: 0 16px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.seg button {
  position: relative; flex: 1; min-height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer;
  font: 600 13px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy);
}
.seg button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } }
.gcard {
  background: linear-gradient(var(--blue), var(--blue)) top / 100% 3px no-repeat, var(--white);
  padding: 3px 14px 4px;
}
.gh { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.gh h3 a::after { content: ""; position: absolute; inset: 0 -14px; }
.gh h3 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); text-decoration: none; }
.gh h3 a:hover { text-decoration: underline; }
.rowlist { list-style: none; margin: 0; padding: 0; }
.rowlist li { display: flex; align-items: stretch; gap: 8px; min-height: 46px; padding: 0; border-top: 1px solid var(--line); }
.rowlist li > * { align-self: center; }
.sd { flex: none; width: 26px; font-size: 18px; color: var(--ink-2); }
.who { flex: 1; min-width: 0; padding: 6px 0; overflow-wrap: break-word; }
.nm { color: var(--ink); font-weight: 600; text-decoration: none; padding: 8px 0; }
.nm:hover { text-decoration: underline; }
.rec { flex: none; width: 30px; margin: 0 4px 0 auto; text-align: right; font-size: 20px; color: var(--navy); }
/* the seed cell of an overview row; in the 'seed' rank layout it also holds the small "#N" line under the numeral */
.sdc { flex: none; width: 26px; }
.sdc .sd { display: block; width: auto; }
.rkl { display: block; margin-top: 1px; font-size: 14px; line-height: 1; color: var(--navy); }
/* A6.4 rank column ("#N", navy Barlow Condensed 700 16px): rightmost in an overview row and in the group standings */
.rkc { font-family: var(--f-disp); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; color: var(--navy); }
.rowlist li > .rkc { flex: none; width: 28px; text-align: right; }
/* slim column-label row under an overview card's header strip, and on the Ranking card */
.cols { display: flex; align-items: flex-end; gap: 8px; padding: 0 0 4px; }
.cols > span { font: 600 11px/1.2 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.cols .sdc { flex: none; width: 26px; letter-spacing: 0.02em; }
.cols .sd { flex: none; width: 26px; }
.cols .who { flex: 1; min-width: 0; padding: 0; }
.cols .rec { flex: none; width: 30px; margin: 0 4px 0 auto; font-size: 11px; color: var(--ink-2); }
.cols .bcol { flex: none; width: 94px; padding-left: 12px; border-left: 1px solid var(--line); text-align: right; white-space: nowrap; }
.cols .rkc { flex: none; width: 28px; text-align: right; font: 600 11px/1.2 var(--f-body); color: var(--ink-2); }

/* Tags */
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.tag {
  display: inline-block; padding: 0 7px; border: 1px solid transparent; border-radius: 3px;
  font: 600 11px/1.6 var(--f-body); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.tag.teen { border-color: var(--blue); color: var(--blue); }
.tag.rk { background: var(--gold); border-color: var(--gold); color: #374C75; }
.tag.alt, .tag.wd { background: var(--line); border-color: var(--line); color: var(--ink); }

/* Group page */
.cnotes { background: var(--warn-bg); color: var(--ink); padding: 10px 12px; margin: 14px 0 0; white-space: pre-wrap; }
.surface { background: var(--white); margin-top: 16px; }
table { border-collapse: collapse; width: 100%; }
.standings th {
  padding: 12px 6px 10px; text-align: left; vertical-align: middle;
  font: 600 13px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.standings td { padding: 12px 6px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.standings tbody tr:last-child td { border-bottom: 0; }
.standings th:first-child, .standings td:first-child { width: 1%; white-space: nowrap; padding-left: 12px; padding-right: 10px; }
.standings th:last-child, .standings td:last-child { padding-right: 12px; }
.standings .r { text-align: right; white-space: nowrap; width: 1%; padding-left: 3px; padding-right: 3px; }
.standings th:nth-child(2), .standings td:nth-child(2) { padding-left: 2px; }
.standings .nm { font-weight: 400; padding: 0; }
.standings td.num { font-size: 18px; }
.standings .sd { color: var(--ink-2); }
.standings td.wl { font-size: 20px; color: var(--navy); }
.races { margin-top: 24px; }
.races > .lab { padding-left: 12px; margin-bottom: 2px; }
.race { position: relative; padding: 12px 0 12px 12px; border-top: 1px solid var(--line); }
.race.dirty { background: linear-gradient(var(--gold), var(--gold)) left / 3px 100% no-repeat; }
.mrow { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 8px; align-items: start; }
.rn { padding-top: 1px; font-size: 18px; color: var(--ink-2); }
.side { min-width: 0; overflow-wrap: anywhere; }
.side .nm { padding: 0; font-weight: 600; color: var(--ink); }
.side.lost .nm { font-weight: 400; color: var(--loss); }
.side.pend .nm { font-weight: 400; color: var(--ink-2); }
.wm { margin-left: 5px; font: 700 italic 14px/1 var(--f-disp); color: var(--win); }
.wm.lm { color: var(--loss); }
.meta { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.meta.num { font-weight: 700; }
.rnotes { margin: 4px 0 0 42px; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.rtop { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
/* A4: time fields in error, winner segmented control */
input.bad, input.bad:focus { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.ferr { display: block; margin-top: 3px; font: 600 12px/1.3 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--err); }
.ferr[hidden] { display: none; }
input[data-mask] { font-family: var(--f-disp); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.wsel { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.wsel legend { padding: 0; margin-bottom: 4px; }
.seg3 { display: grid; grid-template-columns: minmax(56px, 0.6fr) 1fr 1fr; border: 1px solid var(--navy); border-radius: 6px; overflow: hidden; background: var(--white); }
.wopt { position: relative; display: flex; min-width: 0; }
.wopt + .wopt { border-left: 1px solid var(--navy); }
.wopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.wopt span { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 4px 6px; text-align: center; font: 600 15px/1.15 var(--f-body); color: var(--navy); overflow-wrap: anywhere; }
.wopt input:checked + span { background: var(--navy); color: var(--white); }
.wopt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: -3px; }
.wopt input:checked:focus-visible + span { outline-color: var(--white); }
.rfoot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
@media (min-width: 640px) {
}

/* Competitor card modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: rgba(61, 84, 130, 0.6); }
.sheet {
  position: relative; width: 100%; max-width: 640px; max-height: 94vh; max-height: 94dvh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--white); border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(61, 84, 130, 0.28);
  padding: 24px 16px calc(28px + env(safe-area-inset-bottom));
}
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 0; padding: 28px 24px 32px; } }
.x:focus-visible { outline-offset: -4px; }
.x {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px;
  border: 0; border-radius: 6px; background: none; color: var(--navy);
  font-size: 32px; line-height: 1; cursor: pointer; z-index: 2;
}
.chead { display: flex; gap: 16px; align-items: center; padding-right: 36px; }
.photo { flex: none; width: 118px; height: 118px; padding: 3px; border-radius: 50%; background: var(--line); }
.photo.verified { background: var(--gold); }
.pimg {
  position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font: 800 italic 38px/1 var(--f-disp); letter-spacing: 0.02em;
}
.pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinfo { min-width: 0; }
.cname { font-size: 34px; color: var(--navy); overflow-wrap: anywhere; }
.csub { margin: 8px 0 0; }
.csub a { color: var(--blue); text-decoration: none; }
.csub a:hover { text-decoration: underline; }
.cinfo .tags { margin: 8px 0 0; }
.vbadge { display: inline-block; vertical-align: 2px; margin-left: 8px; line-height: 0; }
.vbadge svg { width: 20px; height: 20px; }
.vbadge.verified { color: var(--blue); }
.vbadge.partial { color: var(--ink-2); }
.sec { margin-top: 26px; }
.sec > h3 {
  font: 600 13px/1.3 var(--f-body); font-style: normal; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.sec p { white-space: pre-wrap; }
.links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.links a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; color: var(--blue); }
.sec table { font-size: 15px; }
.sec th { padding: 6px 8px 6px 0; text-align: left; font: 600 12px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.sec td { padding: 8px 8px 8px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
dl.kv dt { font-weight: 600; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 8px 0; border-top: 1px solid var(--line); }
ul.plain li:first-child { border-top: 0; }
ul.plain a.v { display: inline-block; padding: 6px 0; }
.frec { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.frec .num { font-size: 22px; color: var(--navy); }
.res { display: inline-block; min-width: 16px; margin-right: 6px; font: 700 italic 14px/1 var(--f-disp); color: var(--loss); }
.res.W { color: var(--win); }
.res.L { color: var(--loss); }
.rlab { display: inline-block; min-width: 38px; margin-right: 6px; font: 600 11px/1 var(--f-disp); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.fmeta.bknote { white-space: pre-wrap; }
.fmeta { font-size: 14px; color: var(--ink-2); }
.editbar { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.adminnote { background: var(--warn-bg); color: var(--ink); padding: 10px 12px; }
.adminnote strong { display: block; font: 600 12px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }

/* Edit form */
.eform { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.eform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eform .checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.pctl .btn { flex: 1 1 auto; }

/* Admin panel */
.apanel { background: var(--white); margin-top: 28px; }
.apanel > h2 { padding: 16px 12px 4px; color: var(--navy); }
.ahint { margin: 0; padding: 6px 12px 0; font-size: 14px; color: var(--ink-2); }
.agroup > h3 { display: flex; align-items: baseline; gap: 8px; padding: 18px 12px 6px; color: var(--blue); }
.agroup > h3 span { font: 600 12px/1 var(--f-body); font-style: normal; letter-spacing: 0.06em; color: var(--ink-2); }
.aform { display: flex; flex-direction: column; gap: 14px; padding: 12px; }
.aform .ahint { padding: 0; }
.aform .rfoot { margin-top: 0; }
.aform .checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.aform .asub { font-size: 20px; color: var(--navy); }
.aform.adiv { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 20px; }
.afine { margin: 0; font-size: 13px; color: var(--ink-2); }

@media (max-width: 380px) {
  .chead { gap: 12px; padding-right: 30px; }
  .cname { font-size: 30px; }
}

.age { margin-left: 6px; font-family: var(--f-body); font-size: 9px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.bz { font-family: var(--f-disp); font-style: italic; font-weight: 700; letter-spacing: 0.04em; color: var(--red); }
.bzchk { align-self: end; min-height: 44px; display: flex; align-items: center; }
.splitfld[hidden] { display: none; }

.par { font-family: var(--f-body); font-weight: 400; font-size: 0.8em; color: var(--ink-2); margin-left: 2px; font-variant-numeric: tabular-nums; }

/* secondary button (Close beside Save): white with a navy outline */
.btn.secondary { background: var(--white); color: var(--navy); border: 1px solid var(--navy);
  font-family: var(--f-disp); font-weight: 800; font-style: italic; font-size: 18px; text-transform: uppercase; letter-spacing: 0.08em; }
/* group standings: room between W-L and Best, and a hairline before Best */
.standings .wl { padding-right: 12px; }
.standings th.best, .standings td.best { padding-left: 12px; border-left: 1px solid var(--line); }
/* A6.4 rank column on the group page */
.standings td.rkc { font-size: 16px; padding-left: 8px; }
.standings th.rkc { padding-left: 8px; }
.standings .sdc { width: 1%; }
.standings .rkl { display: block; margin-top: 1px; font-size: 14px; line-height: 1; color: var(--navy); }

/* Best column: stopwatch-style digits in red (SPEC.md A4.4); the (obstacles) count stays small and grey */
.best .tm { font-family: "DSEG7", var(--f-disp); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; color: var(--red); }
.best .par { font-size: 11px; }
/* Best column of an overview or ranking row: same hairline and 12px spacing as the group page's Best column */
.rowlist li > .bcol { align-self: stretch; flex: none; display: flex; align-items: center; justify-content: flex-end; width: 94px; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; font-size: 18px; }

/* A5: advancing marker, wildcard tag, tie tag, legend */
.standings tr.adv td { background: #E7EDF4; }
.standings tbody tr.cut td { border-bottom: 1px solid var(--navy); }
.tag.wc { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tag.wc.prov { background: var(--white); color: var(--navy); }
.tag.tie { border-color: var(--ink-2); color: var(--ink-2); }
.legend { margin: 0; padding: 12px 12px 14px; font: 600 12px/1.4 var(--f-body); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }

/* A6 s1 / A6.1: provisional vs final. Final = the A5 look; provisional = lighter tint and a dashed cut line. */
.standings tr.adv.prov td { background: #F1F4F8; }
.standings tbody tr.cut.prov td { border-bottom-style: dashed; }
/* tint reaches 8px past the text on each side so the seed numeral does not touch the edge; the cut line is the cut row's own bottom border */
.rowlist li.adv { background: #E7EDF4; margin: 0 -8px; padding: 0 8px; }
.rowlist li.adv.prov { background: #F1F4F8; }
.rowlist li.cut { border-bottom: 1px solid var(--navy); }
.rowlist li.cut.prov { border-bottom-style: dashed; }
.rowlist li.cut + li { border-top-width: 0; }

/* Ranking tab (A6 s5, A6.2) */
.rkleg { margin: 0 0 12px; }
.rkcard { background: var(--white); padding: 0 14px; }
.rkfirst li:first-child { border-top: 0; }
.rkc2 { flex: none; width: 34px; }
.rkc2 > span { display: block; }
.rkn { font-size: 20px; line-height: 1.05; color: var(--navy); }
.rkcard li, .rkcard .cols { gap: 8px; }
.rkcard .cols .rkc2 { font: 600 11px/1.2 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.rkcard .cols { padding-top: 12px; }
.rkh { padding: 16px 0 8px; }
.rkh.sep { border-top: 1px solid var(--line); margin-top: 8px; }
.rowlist li.dna .nm { color: var(--ink-2); }
.ep-head .legend { padding: 0; margin-top: 12px; }
.ep-head.later .legend { margin-bottom: 14px; }

/* phones: a little less card padding so the longest real names keep their room */
@media (max-width: 400px) {
  .gcard, .rkcard { padding-left: 12px; padding-right: 12px; }
}
/* narrowest phones (320px): tighter group table so "Fredericksen" fits without sideways scroll */
@media (max-width: 340px) {
  .gcard, .rkcard { padding-left: 10px; padding-right: 10px; }
  .standings th { font-size: 11px; letter-spacing: 0.04em; }
  .standings th:first-child, .standings td:first-child { padding-left: 8px; padding-right: 6px; }
  .standings th:last-child, .standings td:last-child { padding-right: 8px; }
  .standings th.best, .standings td.best { padding-left: 8px; }
}

/* ---------- Bracket tab (A6 s5, stage 4) ---------- */
.tbd { color: var(--loss); font-weight: 400; }
.tag.proj { border-color: var(--navy); color: var(--navy); background: var(--white); }
.bkproj { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 14px; }
.bknote { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.bknote.err { color: var(--err); }
.phrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.twl { font: 600 9px/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
/* seed numeral before each name; the time line stays under the name */
.side.hs { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 4px; }
.bsd { padding-top: 1px; font-size: 18px; line-height: 22px; text-align: right; color: var(--ink-2); }
.sb { min-width: 0; }

@media (min-width: 900px) {
  main.bkv { max-width: 1400px; }
}
@media (max-width: 899px) {
}
@media (min-width: 900px) {
}

/* quiet text button (Clear result) */
.btn.quiet { background: none; border-color: transparent; color: var(--ink-2); text-decoration: underline; font-weight: 600; padding: 0 10px; }

/* A8: show / hide password icon, the HIDDEN header label, the site visibility switch */
.pwf { position: relative; width: 100%; }
.pwf input { padding-right: 48px; }
.pwf input::-ms-reveal { display: none; }
.eye {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 6px; color: var(--ink-2); cursor: pointer;
}
.eye svg { display: block; width: 22px; height: 22px; }
.eye:hover { color: var(--navy); }
.pwf .eye:focus-visible { outline: 3px solid var(--blue); outline-offset: -5px; }
.aform > .fld + .pwf { margin-top: -10px; }
.hdr-hidden {
  display: inline-flex; align-items: center; height: 28px; padding: 0 8px; border-radius: 3px;
  background: var(--gold); color: var(--ink); font: 700 11px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase;
}
.afine.lab { font-size: 12px; line-height: 1.4; }
label.chk.sw { align-items: center; gap: 12px; }
label.chk.sw input {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0;
  border-radius: 14px; background: var(--ink-2); cursor: pointer; transition: background 0.15s;
}
label.chk.sw input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: transform 0.15s;
}
label.chk.sw input:checked { background: var(--blue); }
label.chk.sw input:checked::after { transform: translateX(20px); }
label.chk.sw input:disabled { opacity: 0.5; cursor: default; }
label.chk.sw span { font-size: 16px; line-height: 1.25; }
@media (prefers-reduced-motion: reduce) { label.chk.sw input, label.chk.sw input::after { transition: none; } }
/* the HIDDEN label needs room on narrow phones: the word LIVE gives way (the red dot stays), and below 340px the gaps and tags tighten */
@media (max-width: 420px) { .top.hid .live span { display: none; } }
@media (max-width: 340px) { .top.hid { gap: 6px; } .top.hid .hdr-hidden { padding: 0 5px; font-size: 10px; letter-spacing: 0.04em; } .top.hid .hdr-tag { padding: 0 7px; } }
#visMsg:empty { display: none; }

/* shared label and list styles (the Season 19 run order page is removed, S20-A9; the roster import and the Season 20 run order still use these) */
.rnl { font: 600 12px/1.3 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.rlab { margin: 22px 0 6px; }
.rr { display: flex; align-items: stretch; border-top: 1px solid var(--line); }

/* ---------- Bracket page (A10.1): one bracket, one column per round ---------- */
:root { --wire: #AEBAC8; --bk-win: #E3F3E7; --bk-loss: #FBE8EA; --bk-gap: 22px; --bk-rh: 22px; }
.bkchips { position: sticky; top: 56px; z-index: 10; display: flex; gap: 5px; margin: 14px -16px 0; padding: 8px 16px; background: var(--paper); }
.bkchips button { min-height: 32px; padding: 8px 9px; border: 0; border-radius: 999px; background: var(--white); color: var(--ink-2); cursor: pointer; font: 600 13px/1 var(--f-disp); letter-spacing: 0.06em; text-transform: uppercase; }
.bkchips button.on { background: var(--navy); color: var(--paper); }
/* A13.1: phones: the wrap clips, the pager is a track the script translates; touch-action pan-y leaves vertical scrolling to the page, horizontal is ours */
.bkwrap { margin: 0 -16px; overflow: clip; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.bkpager { position: relative; display: flex; align-items: flex-start; gap: var(--bk-gap); margin: 12px 0 0; padding: 0 16px; min-height: calc(100dvh - var(--bk-top, 0px)); touch-action: pan-y; will-change: transform; }
.bcol { flex: 0 0 78%; min-width: 0; position: relative; }
.bkpager > .bcol { min-height: calc(100dvh - var(--bk-top, 0px)); }
.bch { display: block; height: 11px; margin-bottom: 8px; font: 600 11px/1 var(--f-disp); letter-spacing: 0.08em; color: var(--navy); }
.blist { display: flex; flex-direction: column; gap: 8px; }
.bm { position: relative; display: flex; flex-direction: column; gap: 2px; }
.bm.b1 { margin-top: 8px; }
.br { position: relative; display: flex; align-items: center; gap: 4px; height: var(--bk-rh); padding: 0 5px; min-width: 0; font-size: 12.5px; line-height: 1.2; background: var(--white); border-radius: 5px; color: var(--ink); will-change: transform; }
.br .bsd { flex: none; width: 16px; padding: 0; font: 600 12px/1 var(--f-disp); text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.br .bnm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.br a.bnm::after { content: ""; position: absolute; inset: 0; }
.bst { flex: none; position: relative; display: grid; }
.bst > span { grid-area: 1 / 1; display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.bst .tm { font: 700 11px/1 "DSEG7", var(--f-disp); letter-spacing: 0.02em; color: var(--red); }
.bst .ob { font: 700 11px/1 var(--f-disp); color: var(--ink-2); }
.br.w { background: var(--bk-win); }
.br.w .bnm { font-weight: 600; }
.br.l { background: var(--bk-loss); }
.br.l .bnm { color: var(--ink-2); }
.br.tbd { background: transparent; border: 1px dashed var(--wire); padding: 0 4px; color: var(--ink-2); }
.br.tbd .bnm { font-style: italic; color: var(--ink-2); }
.bpr { display: flex; flex-direction: column; gap: 2px; }
.bm::after { content: ""; position: absolute; right: -8px; top: var(--bt, calc(var(--bk-rh) / 2)); height: calc(var(--bh, calc(var(--bk-rh) + 2px)) - 4px); width: 8px; border: 2px solid var(--wire); border-left: 0; border-radius: 0 6px 6px 0; pointer-events: none; opacity: var(--wo, 1); }
.bm.last::after { display: none; }
.bm .brn { position: absolute; left: -13px; top: 0; height: calc(2 * var(--bk-rh) + 2px); display: flex; align-items: center; font: 600 10px/1 var(--f-disp); color: var(--ink-2); font-variant-numeric: tabular-nums; opacity: var(--nt, 1); pointer-events: none; }
.bm .bnote { padding: 3px 5px 4px; font-size: 12px; line-height: 1.3; color: var(--ink-2); background: var(--white); border-radius: 5px; white-space: pre-line; overflow-wrap: anywhere; opacity: var(--nt, 1); }
/* A12.2: a tower note sits inside the loser's row, under the name, on the row's own fill */
.br.hn { height: auto; min-height: var(--bk-rh); flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 0 4px; padding-bottom: 4px; }
.br.hn > .bsd, .br.hn > .bnm { height: var(--bk-rh); line-height: var(--bk-rh); }
.br.hn > .bst { height: var(--bk-rh); align-items: center; }
.br.hn > .bnr { flex: 0 0 100%; box-sizing: border-box; margin-top: 2px; padding-left: 20px; font-size: 12px; line-height: 1.3; color: var(--ink-2); font-weight: 400; white-space: pre-line; overflow-wrap: anywhere; opacity: var(--nt, 1); }
.bjoins { position: absolute; left: 0; top: 0; display: none; overflow: visible; pointer-events: none; }
.bjoins path { fill: none; stroke: var(--wire); stroke-width: 2; }
.bchamp { margin-top: 26px; text-align: center; }
.bchamp .cn { display: block; margin-top: 6px; font: 700 24px/1.1 var(--f-disp); color: var(--navy); }
@media (min-width: 900px) {
  .bkchips { display: none; }
  .bkwrap { margin: 0; overflow: visible; touch-action: auto; -webkit-user-select: auto; user-select: auto; }
  .bkpager { gap: 34px; margin: 16px 0 0; padding: 0; overflow-x: auto; overflow-y: hidden; min-height: 0; touch-action: auto; will-change: auto; transform: none !important; scrollbar-width: thin; }
  .bkpager::-webkit-scrollbar { display: block; height: 8px; }
  .bcol { flex: 0 0 236px; }
  .bkpager > .bcol { min-height: 0; }
  .bm::after { right: -10px; width: 10px; opacity: 1 !important; }
  .bm, .br { will-change: transform; }
  .bjoins { display: block; }
}
/* A14: viewer watermark: fixed, above the modals and the pager, never takes a tap */
.vwm { position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.07; background-repeat: repeat; }
.vwm[hidden] { display: none; }
.viewer-code { margin: 28px 0 0; font: 400 12px/1.4 var(--f-body); color: var(--ink-2); text-align: center; }
@media print { .vwm { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .br, .bm, .bchamp { transform: none !important; } .bm .brn, .bm .bnote, .br .bnr { opacity: 1 !important; } }

/* S20 drawer navigation (S20-SPEC section 5) */
.menubtn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -8px; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--white); cursor: pointer; }
.menubtn svg { display: block; width: 26px; height: 26px; }
.menubtn:focus-visible { outline-color: var(--white); outline-offset: -3px; }
body.dwr-open { overflow: hidden; }
.dscrim { position: fixed; inset: 0; z-index: 60; background: rgba(60, 53, 51, 0.5); opacity: 0; visibility: hidden; transition: opacity 300ms ease, visibility 0s linear 300ms; }
.dscrim.open { opacity: 1; visibility: visible; transition: opacity 300ms ease; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: min(320px, 86vw); display: block; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 max(16px, env(safe-area-inset-bottom)); background: var(--white); color: var(--ink); box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18); transform: translateX(-104%); visibility: hidden; transition: transform 300ms ease, visibility 0s linear 300ms; }
.drawer.open { transform: none; visibility: visible; transition: transform 300ms ease; }
@media (prefers-reduced-motion: reduce) { .dscrim, .dscrim.open, .drawer, .drawer.open { transition: none; } }
.drow { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 48px; margin: 0; padding: 0 20px 0 16px; border: 0; border-left: 4px solid transparent; border-radius: 0; background: none; color: var(--ink); font: 600 16px/1.2 var(--f-body); text-align: left; text-decoration: none; cursor: pointer; }
.drow svg { display: block; flex: none; width: 24px; height: 24px; color: var(--navy); }
.drow:hover { background: #F1F4F8; }
.drow[aria-current] { border-left-color: var(--red); background: #E7EDF4; color: var(--navy); }
.drow:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.drow.dseason { min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
.dseason .dt { display: flex; flex-direction: column; gap: 3px; }
.dseason b { font: 700 18px/1.1 var(--f-body); color: var(--navy); }
.dseason small { font: 600 12px/1.2 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.dsep { height: 1px; margin: 8px 16px; background: var(--line); }
.archive-strip { padding: 0 16px; background: var(--navy); color: var(--white); text-align: center; font: 600 12px/28px var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; }

/* S20 stub pages and the Rules page */
.s20leg { padding: 0; margin-top: 12px; }
.s20soon { margin-top: 28px; font-size: 18px; color: var(--ink-2); }
.rules { padding-bottom: 8px; }
.rflow { display: block; width: 100%; max-width: 420px; height: auto; margin: 22px 0 4px; }
.rflow .rf-n { font: 700 30px/1 var(--f-disp); fill: var(--navy); }
.rflow .rf-t { font: 700 15px/1 var(--f-body); fill: var(--ink); }
.rflow .rf-d { font: 400 12.5px/1 var(--f-body); fill: var(--ink-2); }
.rflow .rf-l { stroke: var(--navy); stroke-opacity: 0.35; stroke-width: 2; }
.rflow .rf-o { fill: var(--white); stroke: var(--navy); stroke-width: 2.5; }
.rflow .rf-c { fill: var(--red); stroke: var(--red); stroke-width: 2.5; }
.rcap { margin: 0 0 6px; max-width: 62ch; color: var(--ink-2); font-size: 15px; }
.rblock { margin-top: 30px; }
.rblock h2 { font-size: 24px; color: var(--navy); margin-bottom: 10px; }
.rblock p { max-width: 62ch; margin: 0 0 10px; font-size: 16px; line-height: 1.5; }
.rchg { margin: 0; padding-left: 20px; max-width: 62ch; }
.rchg li { margin: 0 0 6px; }
.rnone { color: var(--ink-2); }
.rfine { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 62ch; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.aform textarea.rtx { min-height: 110px; }
#rulesSettings { margin: 26px 12px 4px; font-size: 20px; color: var(--navy); }

/* S20 Qualifying page, heat editor, run order (W2b) */
.qtabs { padding: 0 8px; margin-left: -16px; margin-right: -16px; }
.qtabs button { min-height: 46px; padding: 0 2px; font-size: 12px; letter-spacing: 0.03em; white-space: nowrap; }
.qrsw { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 14px; border: 1px solid var(--navy); border-radius: 6px; overflow: hidden; background: var(--white); }
.qrsw button { min-height: 40px; padding: 0 6px; background: none; border: 0; cursor: pointer; font: 600 13px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.qrsw button + button { border-left: 1px solid var(--navy); }
.qrsw button.on { background: var(--navy); color: var(--white); }
.qrsw button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.qrsw button.on:focus-visible { outline-color: var(--white); }
.dname { margin: 6px 16px 8px; font: 700 12px/1.2 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.qdiv, .qdiv2 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 4px; }
.qdiv2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qsum { margin: 10px 0 12px; }
.qempty { margin: 18px 0; font-size: 16px; color: var(--ink-2); }
.qcard { padding-bottom: 4px; }
.rowlist li.pend .nm { color: var(--ink-2); font-weight: 400; }
.qlist li, .qro li { flex-wrap: wrap; }
.rowlist li > .bcol.qres { width: 104px; flex-direction: column; align-items: flex-end; justify-content: center; gap: 1px; padding-right: 0; }
.cols .bcol.qres { flex-direction: row; justify-content: flex-end; width: 104px; }
.qbz { font-size: 11px; line-height: 1; }
.qdq { font: 700 13px/1 var(--f-body); letter-spacing: 0.06em; color: var(--ink-2); }
button.qbtn { margin: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
button.qbtn:hover { background: #F1F4F8; }
button.qbtn[aria-expanded="true"] { background: #F1F4F8; }
.tag.mt.ok { border-color: var(--win); color: var(--win); }
.tag.mt.no { border-color: var(--loss); color: var(--loss); }
.tag.fast { background: var(--gold); border-color: var(--gold); color: #374C75; }
.qtools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 10px 0 4px; }
.qtools .msg { flex-basis: 100%; min-height: 0; }
#qAddWrap { background: var(--white); margin: 8px 0 6px; border: 1px solid var(--line); }
#qAddWrap .aform { padding: 12px; gap: 12px; }
.qeb { flex: 1 0 100%; order: 9; margin: 0 -4px 8px; padding: 10px 12px 12px; background: var(--paper); border: 1px solid var(--line); }
.qeb.page { margin: 14px 0 0; background: var(--white); padding: 14px 12px 16px; }
.heatf { display: flex; flex-direction: column; gap: 12px; }
.heatf.dirty { background: linear-gradient(var(--gold), var(--gold)) left / 3px 100% no-repeat; padding-left: 8px; }
.heatf .pairs { margin-top: 0; align-items: end; }
.heatf .wsel { margin: 0; }
.heatf .checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.heatf .rfoot { margin-top: 0; }
.hhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hfull { font: 600 13px/1 var(--f-body); color: var(--blue); }
.qpanel { margin-top: 26px; padding-bottom: 8px; }
.qpanel > .qempty { padding: 0 12px; }
.qro { padding: 0 12px; }
.qro li:first-child { border-top: 0; }
.qro .rkc2 { width: 30px; }
.qro .meta { margin-top: 0; }
.qmv { display: flex; flex: none; gap: 4px; }
.qmvb { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--navy); font-size: 15px; cursor: pointer; }
.qmvb[disabled] { opacity: 0.3; cursor: default; }

.qlist .who .nm { margin-right: 6px; }
.qlist .who .tags { margin-left: 0; }
.heatf .checks .chk, .heatf .wsel .chk { min-height: 40px; }
/* the roster import panel looks like an .apanel but is not one (older tests count the .apanel sections) */
.rpanel { background: var(--white); margin-top: 28px; }
.rpanel > h2 { padding: 16px 12px 4px; color: var(--navy); }

/* S20-A4 (W2d): run numbers, assign runs to rounds by range, Mega Tower cutoff and qualified line */
.rnl { flex: none; width: 62px; }
input.rnin { width: 62px; min-height: 44px; height: 44px; padding: 0 4px; text-align: center; font-size: 16px; border: 1px solid var(--ink-2); border-radius: 6px; background: var(--white); color: var(--ink); }
.rnin::placeholder { font-size: 11px; color: var(--ink-2); }
.qro li { align-items: center; gap: 0 6px; }
.qro li .who { flex: 1 1 0; min-width: 0; }
.qro li .rnl { margin-left: auto; }
.tag.mtq { border-color: var(--win); color: var(--win); }
.hrun { margin-bottom: 0; }
.hmtq { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.hmtn { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--navy); }
.hmtn[hidden] { display: none; }
#qMtWrap { background: var(--white); margin: 8px 0 6px; border: 1px solid var(--line); }
.qmt { padding: 12px; gap: 10px; }
.qmt .fld input[data-f="mtcut"] { max-width: 180px; }
.qmt .rfoot { flex-wrap: wrap; }
.qmt .ahint { font-size: 13px; }
.rngpanel > .ahint { padding-bottom: 6px; }
.rngrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; align-items: end; }
.rngrow .rngdel { grid-column: 1 / -1; justify-self: end; margin-top: -2px; }
.rngform .rfoot { flex-wrap: wrap; }
.rngpv { padding: 0 12px 12px; }
.rngpv .msg { margin: 0 0 8px; min-height: 0; }
.rngcnt { display: flex; gap: 8px; list-style: none; margin: 0 0 4px; padding: 0; }
.rngcnt li { flex: 1; border: 1px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.rngcnt .num { font: 600 20px/1.1 var(--f-disp); color: var(--navy); }
.rngsum .ahint { padding: 4px 0 0; }
.rngconf, .rngnote { margin-top: 12px; }
.rngconf ul, .rngnote ul { margin: 4px 0 0; padding-left: 18px; font-size: 15px; }
.rngconf { border-left: 3px solid var(--err); padding-left: 10px; }
.rngconf .lab { color: var(--err); }
.rngnote .lab { color: var(--ink-2); }

/* S20-A6 / S20-A7 (W2e): MT tag in the editor header, cutoff line, Mega Tower note, winning time field, locked runs in the range preview */
.qmtline { margin: 2px 0 10px; font-size: 12px; letter-spacing: 0.08em; color: var(--navy); }
.qmtline[hidden] { display: none; }
.qnote { flex: 0 0 100%; box-sizing: border-box; order: 1; margin: 0; padding: 0 0 8px 42px; font-size: 12px; line-height: 1.3; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.kv dd .qnote { display: block; padding: 2px 0 0; order: 0; }
.hhead .hmt { margin-right: auto; }
.hhead .lab + .hmt { margin-left: 8px; }
.hhead .hmt:empty { display: none; }
.hhead[hidden] { display: none; }
.heatf .hmtnote { margin-top: 8px; }
.heatf .hmtnote input { width: 100%; }
.qmt + .qmt { border-top: 1px solid var(--line); }
.qmt .fld input[data-f="mtwin"] { max-width: 180px; }
.rnglock { margin-top: 12px; border-left: 3px solid var(--navy); padding-left: 10px; }
.rnglock ul { margin: 4px 0 0; padding-left: 18px; font-size: 15px; }
.rngreset { margin-top: 10px; font-weight: 600; color: var(--navy); }
.kv dd .tag { margin-right: 6px; }

/* S20-A8 (W2f): Mega Tower time in the heat editor, finish time in the green tag */
.hmtt { margin-top: 8px; }
.hmtt[hidden] { display: none; }
.hmtt .fld input[data-f="mt_time"] { display: block; width: 100%; max-width: 180px; }
.hmtt .seg2 { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; border: 1px solid var(--navy); border-radius: 6px; overflow: hidden; background: var(--white); }
.tag .mtt, .mtc .mtt { font-size: 0.85em; font-weight: inherit; letter-spacing: inherit; }
.kv dd .mtc { font-weight: 600; color: var(--win); }

/* W2i: run number as the leading number of a run order row, hints, runner section of the heat editor */
.qro .rkc2 { width: 38px; }
.qro .rkn { font-size: 18px; }
.qro .rkn.none { color: var(--ink-2); }
.qtools .qchint { flex-basis: 100%; margin: 0; padding: 0; font-size: 13px; }
#qAddWrap .ahint { padding: 0; font-size: 13px; }
.rngpanel > .ahint + .ahint { padding-top: 0; }
.heatf .hrunner { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.heatf .hrunner .rfoot { flex-wrap: wrap; }
.crm { margin-top: 10px; }
.crm .msg { flex-basis: 100%; }
#mvDlg .sheet { padding: 20px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
#mvDlg .mvp { margin: 0; font-size: 17px; line-height: 1.4; color: var(--ink); }
#mvDlg .mvbtns { display: flex; flex-direction: column; gap: 8px; }
#mvDlg .mvbtns .btn { width: 100%; }
#mvDlg .msg { margin: 0; min-height: 0; }
#mvDlg .sheet { padding: 20px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
#mvDlg .mvp { margin: 0; font-size: 17px; line-height: 1.4; color: var(--ink); }
#mvDlg .mvbtns { display: flex; flex-direction: column; gap: 8px; }
#mvDlg .mvbtns .btn { width: 100%; }
#mvDlg .msg { margin: 0; min-height: 0; }

/* Phase 2: accounts. Login panels (sign in, create account, check your email, invite code, forgot and new password), the Account page,
   and the Admin Users panel. */
.login { align-items: flex-start; }
.login-box { margin: auto 0; }
.login-box.compact { gap: 12px; }
.login-box.compact .login-logo { width: 96px; }
.login-h { font: 800 italic 28px/1 var(--f-disp); letter-spacing: 0.02em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 1px #382C30, 0 0 3px #382C30; text-align: center; }
.login-p { width: 100%; font-size: 15px; line-height: 1.4; color: #fff; text-shadow: 0 1px 1px #382C30, 0 0 3px #382C30; text-align: center; overflow-wrap: anywhere; }
.login-p strong { font-weight: 700; }
.login-hint { width: 100%; min-height: 1.3em; margin-top: -6px; font-size: 13px; line-height: 1.3; color: #fff; text-shadow: 0 1px 1px #382C30, 0 0 3px #382C30; }
.login-fine { width: 100%; font-size: 12.5px; line-height: 1.4; color: #fff; text-shadow: 0 1px 1px #382C30, 0 0 3px #382C30; text-align: center; }
.login-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; width: 100%; }
.login input { width: 100%; background: var(--white); color: var(--ink); font: 400 16px/1.2 var(--f-body); }
.llink { min-height: 44px; padding: 0 10px; border: 0; background: none; color: #fff; font: 600 15px/1.2 var(--f-body); text-decoration: underline; text-underline-offset: 3px; text-shadow: 0 1px 1px #382C30, 0 0 3px #382C30; cursor: pointer; }
.llink:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 4px; }
.ivfields { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ivfields[hidden] { display: none; }
@media (max-height: 700px) { .login { padding-bottom: 60px; } }


.acct { margin: 0; padding: 4px 12px 8px; }
.acr { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acr:last-child { border-bottom: 0; }
.acr dt { font: 600 12px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.acr dd { margin: 0; font: 600 17px/1.3 var(--f-body); color: var(--ink); overflow-wrap: anywhere; }
.acct-note { color: var(--ink); font-size: 16px; }
#acctPanel .rfoot { display: flex; flex-wrap: wrap; gap: 10px; }
#acctPanel .ahint { padding: 0; }

#invitePanel > h2, #usersPanel > h2 { padding: 16px 12px 4px; color: var(--navy); }
#invitePanel, #usersPanel { background: var(--white); margin-top: 28px; }
.ulist { display: block; }
.ul { list-style: none; margin: 0; padding: 0; }
.ur { padding: 12px 0; border-top: 1px solid var(--line); }
.urt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.un { font: 700 17px/1.25 var(--f-body); overflow-wrap: anywhere; }
.ubadge { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 3px; background: var(--navy); color: #fff; font: 700 11px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; }
.ust { margin-left: auto; font: 700 12px/1 var(--f-body); letter-spacing: 0.05em; text-transform: uppercase; }
.ust.ok { color: var(--win); }
.ust.no { color: var(--err); }
.urm { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.urm .udn { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ura { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ucount { padding-bottom: 6px; }

/* S20-A11: episode tints (gold and blue from the palette, kept quiet), the ALL NIGHT key, three-way chips, the night run list */
:root { --ep-a: rgba(242, 177, 52, 0.17); --ep-b: rgba(55, 105, 160, 0.12); }
.qrsw.q3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rlf { margin: 4px 12px 10px; }
.rowlist li.ep-a { background: var(--ep-a); }
.rowlist li.ep-b { background: var(--ep-b); }
.qro li.ep-a, .qro li.ep-b { margin: 0 -12px; padding: 0 12px; }
.qkey { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 10px; }
.qkey .qk { display: inline-flex; align-items: center; gap: 6px; }
.qkey .sw { display: inline-block; width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 3px; }
.qkey .sw.ep-a { background: var(--ep-a); border-color: var(--gold); }
.qkey .sw.ep-b { background: var(--ep-b); border-color: var(--blue); }
.qkey .qkt { flex-basis: 100%; font-size: 14px; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.qeptools { display: contents; }
.qeplab { align-self: center; }
.eplab { white-space: nowrap; }
.hepnote { margin: 0; }
.qlist .rkn.none { color: var(--ink-2); }
.ivhave { font-size: 14px; color: var(--ink-2); margin-bottom: 0; }

/* Phase 2 login look (class v2 on #login, set only when accounts are on) */
.login.v2 .login-logo { width: min(240px, 80vw); height: auto; }
.login.v2 .login-box.compact .login-logo { width: min(154px, 50vw); }
.login.v2 .login-fan { font: 800 italic 60px/0.95 var(--f-disp); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 1px #382C30, 0 0 4px #382C30; padding: 0 0.04em 4px 0.12em; border-bottom: 3px solid var(--red); margin-top: -6px; }
.login.v2 .login-box.compact .login-fan { font-size: 44px; }
@media (min-width: 900px) {
  .login.v2 .login-box { max-width: 380px; }
  .login.v2 .login-logo { width: 340px; }
  .login.v2 .login-box.compact .login-logo { width: 220px; }
  .login.v2 .login-fan { font-size: 84px; }
  .login.v2 .login-box.compact .login-fan { font-size: 56px; }
}
/* wide and short screens: oversized shapes anchored at the top centre, so the red band stays near the top centre and every stripe runs edge to edge */
@media (min-aspect-ratio: 5/4) {
  .login.v2 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 1000' preserveAspectRatio='xMidYMin slice'%3E%3Cpolygon fill='%233D5482' points='-3000,-2000 4600,-2000 4600,4000 -3000,4000'/%3E%3Cpolygon fill='%235D7AA8' points='-3000,-2000 4600,-2000 4600,-340 -3000,1940'/%3E%3Cpolygon fill='%233769A0' points='-3000,-2000 4600,-2000 4600,-620 -3000,1660'/%3E%3Cpolygon fill='%23B72126' points='-3000,-2000 4600,-2000 4600,378 -3000,-78'/%3E%3Cg stroke='%23382C30' stroke-width='14' fill='none'%3E%3Cline x1='-3000' y1='-78' x2='4600' y2='378'/%3E%3Cline x1='-3000' y1='1660' x2='4600' y2='-620'/%3E%3Cline x1='-3000' y1='1940' x2='4600' y2='-340'/%3E%3C/g%3E%3C/svg%3E"); background-size: cover; background-position: center top; }
}

/* S20 accounts (live): users filter chips, sign-up alert, drawer badge */
.usf { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.usf button { min-height: 40px; padding: 0 12px; border: 1px solid var(--navy); border-radius: 20px; background: var(--white); color: var(--navy); font: 600 13px/1 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.usf button.on { background: var(--navy); color: var(--white); }
.usf button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.usf .usn { font-weight: 800; margin-left: 4px; }
.ura { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.uem, .ucf { overflow-wrap: anywhere; }
.pstrip { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--gold); color: #374C75; font-weight: 600; font-size: 15px; }
.pstrip a { color: #374C75; text-decoration: underline; font-weight: 700; }
.pstrip button { margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 24px; cursor: pointer; }
.dbadge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 700 12px/22px var(--f-body); text-align: center; }
/* phones and tablets in portrait: the Phase 2 login panels all start at the same height (the label under the wordmark stays on the blue panel whichever panel shows) */
@media (max-width: 899px) {
  .login.v2 { padding-top: 16px; }
  .login.v2 .login-box { margin: 0 auto auto; gap: 12px; }
  .login.v2 .login-fan { font-size: 54px; margin-top: -8px; }
  .login.v2 .login-box.compact .login-fan { font-size: 44px; }
}
.hdiv { margin: 4px 0 8px; }

.login-fine.lnotice { background: rgba(56, 44, 48, 0.55); padding: 10px 12px; border-radius: 8px; border: 0; }

.login-fine.lnotice p + p { margin-top: 8px; }
.login-fine.lnotice p { margin: 0; }
.lfine-conf { margin: 0; }
.lfine-conf .llink { display: inline; padding: 0; font-size: inherit; }
.urole { font: 700 12px/1 var(--f-body); letter-spacing: 0.06em; color: var(--navy); }

/* Admin page: collapsible sections */
.asec > h2.ahd { margin: 0; padding: 0; }
.ahd button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 16px; border: 0; background: none; color: var(--navy); font: 800 italic 22px/1 var(--f-disp); letter-spacing: 0.02em; text-transform: uppercase; text-align: left; cursor: pointer; }
.ahd button::after { content: ""; width: 10px; height: 10px; margin-left: 12px; border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(45deg); transition: transform 0.15s; }
.ahd button[aria-expanded="true"]::after { transform: rotate(-135deg); }
.ahd button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.abody[hidden] { display: none; }
.asec { margin-top: 14px; }

/* results editor: field order, greyed fields while Buzzer is checked, the centered dialog, the pending shortcuts */
.hres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
.hres .bzchk { grid-column: 1 / -1; }
.hres .hobs input { background: var(--paper); }
.hguard.greyed { opacity: 0.45; }
.hguard.greyed input { background: var(--paper); cursor: default; }
.cdlg { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cdlg .backdrop { position: absolute; inset: 0; background: rgba(56, 44, 48, 0.55); }
.cdlg .cbox { position: relative; width: 100%; max-width: 320px; background: var(--white); border-radius: 10px; padding: 18px 16px 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.cdlg .cbox p { margin: 0 0 14px; font-size: 17px; line-height: 1.35; color: var(--ink); }
.qq { min-height: 36px; min-width: 52px; margin: 0 0 0 6px; padding: 0 8px; border: 1px solid var(--navy); border-radius: 6px; background: var(--white); color: var(--navy); font: 700 12px/1 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.qpend { display: flex; flex-direction: row; justify-content: flex-end; align-items: center; }
.qq2 { display: inline-flex; margin-top: 4px; }
.qq2 .qq { margin: 0 6px 0 0; }
.rowlist li > .bcol.qres.qpend { width: auto; flex-direction: row; justify-content: flex-end; align-items: center; padding-right: 0; }
.rpanel.asec { margin-top: 14px; }
.rpanel.asec > h2.ahd { padding: 0; }
.asec > h2.ahd { padding: 0 !important; margin: 0 !important; }

/* S20-A14: the Format panel (super admin). Typography and space, hairlines instead of boxes; one column; 48px targets. */
#fmtPanel .ahint { padding: 6px 12px 10px; }
.fmtcard { padding: 22px 12px 8px; border-top: 1px solid var(--line); }
.fmtcard.locked .fmtbody { opacity: 0.6; }
.fmtct { font-size: 22px; color: var(--navy); margin: 0 0 6px; }
.fmtsub { font: 400 14px/1.3 var(--f-body); color: var(--ink-2); letter-spacing: 0; }
.fmtrow { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; }
.fmtq { font-size: 16px; line-height: 1.3; color: var(--ink); }
.fmtstep { display: flex; align-items: center; gap: 4px; }
.fmtb, .fmtv { min-height: 48px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font: 600 22px/1 var(--f-body); border-radius: 6px; cursor: pointer; }
.fmtb { width: 48px; }
.fmtv { min-width: 92px; padding: 0 12px; border-color: transparent; font-size: 22px; }
.fmtv.na { font-size: 15px; font-weight: 400; color: var(--ink-2); }
.fmtb:disabled, .fmtv:disabled, .fmtg:disabled { opacity: 0.45; cursor: default; }
.fmtv[tabindex="-1"] { cursor: default; }
.fmtclr { display: flex; gap: 6px; }
.fmtlink { min-height: 48px; padding: 0 10px; background: none; border: 0; color: var(--blue); font: 600 15px/1 var(--f-body); cursor: pointer; text-decoration: underline; }
.fmtlink:disabled { color: var(--ink-2); opacity: 0.6; cursor: default; }
.fmtsegs { display: flex; flex-wrap: wrap; gap: 6px; }
.fmtg { min-height: 48px; padding: 8px 14px; border: 1px solid var(--navy); background: var(--white); color: var(--navy); font: 600 15px/1.2 var(--f-body); border-radius: 6px; cursor: pointer; text-align: left; flex: 1 1 auto; }
.fmtg.on { background: var(--navy); color: var(--white); }
.fmtdiv { margin-top: 26px; padding-top: 4px; }
.fmtdh { font: 600 13px/1.3 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.fmtdh2 { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--ink); font-weight: 600; }
.fmtrnd { font: 600 16px/1.3 var(--f-body); color: var(--navy); margin: 22px 0 0; }
.fmtfix, .fmtfine { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.fmtfine { margin-top: 6px; }
.fmtta { min-height: 96px; }
.fmtmw { margin-top: 22px; }
.fmtread { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.fmtmeans { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.fmtml { font: 600 12px/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 6px; }
.fmtwarn { margin: 10px 0 0; font-weight: 600; color: var(--err); }
.fmtfoot { margin-top: 18px; padding-bottom: 14px; }
.fmtsw { min-height: 48px; margin-top: 12px; }
.fmtlock { margin-top: 6px; }
.fmtnote { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 14px; color: var(--ink-2); }
.fmtdirty { color: var(--navy); }
@media (max-width: 380px) { .fmtv { min-width: 80px; } }
.fmtsaved { display: block; flex-basis: 100%; line-height: 1.4; }

/* S20-A13 / A14 steps 3 and 4: the Regional Finals page (races as three-row cards, the pool table, Build races, the race editor) */
.tag.seed { background: var(--white); border-color: var(--gold); color: #374C75; }
.tag.man { background: var(--white); border-color: var(--ink-2); color: var(--ink-2); }
.regwrap { display: block; }
.regraces { display: block; min-width: 0; }
.regside { min-width: 0; margin-top: 30px; }
.regcard { margin: 0 0 14px; padding-bottom: 4px; }
.rch { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding-top: 8px; }
.rctl { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.rctl .btn.small { min-height: 40px; }
.rlane { display: block; margin-top: 1px; font: 600 11px/1.3 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.rowlist li.rtbd .rnone { font-size: 15px; font-style: italic; }
.regcard .rkn { font-size: 18px; }
.regcard .rkc2, .regpool .rkc2 { width: 38px; }
.regpool .rpt { margin: 0 0 2px; color: var(--navy); font-size: 14px; }
.regpool .rpn { margin: 0 0 4px; }
.regcard .rtl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.regcard .rnum2 { font-weight: 500; letter-spacing: 0.04em; color: var(--ink-2); opacity: 0.8; }
.regfine { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.regeb { margin: 4px -4px 10px; padding: 10px 12px 12px; background: var(--paper); border: 1px solid var(--line); }
.regf { display: flex; flex-direction: column; gap: 12px; }
.regf.dirty { background: linear-gradient(var(--gold), var(--gold)) left / 3px 100% no-repeat; padding-left: 8px; }
.regf .regent { margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.regtie { margin: 10px 0 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.regtieq { margin: 0 0 8px; font-weight: 600; }
.regtiebtns { display: flex; flex-wrap: wrap; gap: 8px; }
.regtieb { min-height: 48px; min-width: 48px; max-width: 100%; overflow-wrap: anywhere; }
.regtieord { margin: 8px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.regf .regent .pairs { margin-top: 6px; align-items: end; }
.regf .checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.regf .checks .chk { min-height: 40px; }
.regf select { width: 100%; min-height: 44px; }
.regf .ahint { padding: 0; font-size: 13px; }
.regf .rfoot .msg { flex-basis: 100%; }
.regobrow { display: flex; align-items: center; gap: 8px; }
.regobrow input { flex: none; width: 64px; }
.regobn { flex: 1; min-width: 0; font: 600 14px/1.2 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--navy); }
.regbuild .aform { padding: 12px; gap: 12px; }
.regpick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); background: var(--white); }
.rpick { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 46px; padding: 6px 12px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: 600 16px/1.2 var(--f-body); color: var(--ink); cursor: pointer; }
.rpick:first-child { border-top: 0; }
.rpick:hover, .rpick:focus-visible { background: #F1F4F8; }
.rpick.rnew { color: var(--blue); }
.rpg { padding: 8px 12px 2px; }
.rpe { padding: 12px; margin: 0; }
.rslots { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--white); }
.rs { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 0 0 12px; border-top: 1px solid var(--line); }
.rs:first-child { border-top: 0; }
.rsn { flex: none; width: 54px; font: 600 11px/1.2 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.rsname { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rsname.none { font-weight: 400; font-style: italic; color: var(--ink-2); }
.rsx { flex: none; width: 46px; height: 46px; border: 0; background: none; font-size: 24px; color: var(--ink-2); cursor: pointer; }
.rtarget { margin: 0; font-size: 15px; color: var(--navy); }
#regBuildWrap { margin: 8px 0 0; }
.regfmt { padding: 0; margin: 2px 0 6px; }
.regpaste .rtx { margin-top: 4px; }
@media (min-width: 900px) {
  .regwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 0 32px; align-items: start; }
  .regside { margin-top: 0; position: sticky; top: 112px; }
  .regwrap.regall { display: block; }
}

/* S20-A15: the home page card reuses the Format card styles; the not-built choices are greyed */
.fmtg.soon { opacity: 0.45; cursor: default; }
.fmtg small { font-weight: 400; font-size: 12px; margin-left: 4px; }

/* S20-A16: the pencil (admin only) and the in-place name box. The pencil is a 48px target drawn small. */
.nmw { display: inline-flex; flex-wrap: wrap; align-items: center; max-width: 100%; }
.nmw.rpw { display: flex; }
.nmw.rpw > .rpick { flex: 1 1 auto; min-width: 0; }
.pen { flex: none; width: 48px; height: 48px; margin: -12px -8px -12px 0; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pen:hover, .pen:focus-visible { color: var(--navy); }
.pen:focus-visible { outline: 2px solid var(--navy); outline-offset: -6px; border-radius: 6px; }
.nmw.rpw > .pen { margin: 0; }
.nmw.editing { display: block; width: 100%; }
.nmed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding: 4px 0; }
.nmin { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--navy); border-radius: 6px; font: 400 16px/1.2 var(--f-body); color: var(--ink); background: var(--white); }
.nmbtns { display: inline-flex; gap: 6px; }
.nmbtns .btn { min-height: 44px; }
.nmguess { flex-basis: 100%; min-height: 44px; font-size: 14px; }
.nmmsg { flex-basis: 100%; }
.tag.nameq { border-color: var(--ink-2); color: var(--ink-2); background: none; }

/* S20-A17: the "Already signed in elsewhere" notice (cannot be dismissed from outside; Escape is Cancel) and the Account device list */
.devnotice { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(244, 243, 241, 0.97); overflow-y: auto; }
.devbox { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; margin: auto; }
.devbox h2 { margin: 0; font: 700 26px/1.15 var(--f-disp); color: var(--navy); }
.devbox p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.devbox .btn { width: 100%; min-height: 48px; height: auto; padding: 12px 14px; text-align: center; line-height: 1.2; }
.devbox .btn.primary { font-size: 16px; letter-spacing: 0.04em; }
.devbox .llink { align-self: center; min-height: 48px; color: var(--ink-2); text-shadow: none; font-size: 14px; font-weight: 500; }
.devbox .devicon { font-size: 14px; color: var(--ink-2); }
.devrow dd { font-weight: 500; font-size: 15px; }
.devme { margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--paper); color: var(--navy); font: 600 11px/1.4 var(--f-body); letter-spacing: 0.04em; text-transform: none; }
.devline { padding: 4px 12px 14px; font-size: 13px; }

/* S20-A19: the athlete page (replaces the competitor card). Ported from design/athletes-mockup-approved.html; .sec became .asec and .res became .rres
   because those names already exist above. Everything is scoped under .athpage so nothing else changes. */
.athpage { max-width: 720px; }
.athcrumbs { margin-bottom: 4px; }
.athback { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px 0 0; background: none; border: 0; cursor: pointer; font: 600 14px/1 var(--f-body); color: var(--blue); }
.athback:hover { text-decoration: underline; }
.athback:focus-visible, .athpage .tabs button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ath { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding-top: 18px; }
.apho { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--navy); color: var(--white); display: grid; place-items: center; font: 800 italic 34px/1 var(--f-disp); letter-spacing: 0.02em; }
.apho img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.athinfo { min-width: 0; }
.athname { font-size: 30px; color: var(--navy); overflow-wrap: anywhere; }
.athnick { margin-top: 4px; font: 600 15px/1.3 var(--f-body); color: var(--ink-2); }
.athmeta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--ink-2); font-size: 14px; }
.athmeta .tags { margin-left: 0; }
.athlinks { margin-top: 4px; gap: 0 18px; font-size: 14px; }
.athlinks a { min-height: 48px; }
.athpage .tabs { display: flex; border-bottom: 2px solid var(--line); margin: 14px 0 16px; }
.athpage .tabs button { flex: 1; min-height: 48px; padding: 0 4px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; font: 700 16px/1 var(--f-disp); font-style: italic; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.athpage .tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--red); }
.athpage .asec { margin-bottom: 20px; }
.athpage .asec > .lab { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.athpage .asec > .lab a { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding-left: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13px; }
.athpage .card { background: var(--white); border-radius: 12px; overflow: hidden; }
.athpage .card.pad { padding: 12px 14px; }
.athpage .card.pad .eform { margin-top: 12px; }
.athpage .r { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.athpage .r:last-child { border-bottom: 0; }
.athpage .r.me { background: var(--tint); }
.athpage .r .pl { font-size: 18px; color: var(--navy); }
.athpage .r .pl.W { color: var(--win); }
.athpage .r .pl.L { color: var(--loss); }
.athpage .r .who { flex: none; padding: 0; font: 600 16px/1.25 var(--f-body); overflow-wrap: anywhere; }
.athpage .r .who .nm { padding: 0; }
.athpage .r a.nm::after { content: ""; position: absolute; inset: 0; }
.athpage .r .who small { display: block; margin-top: 2px; font: 400 12px/1.3 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.athpage .r .tags { margin-left: 6px; }
.athpage .arl { display: block; margin-bottom: 2px; font: 600 11px/1.2 var(--f-disp); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.athpage .rres { text-align: right; white-space: nowrap; }
.athpage .rres .qbz { display: block; }
.athpage .rres .best .tm { font-size: 17px; }
.athpage .rres small.oppl { display: block; margin-top: 2px; font: 400 12px/1.3 var(--f-body); color: var(--ink-2); white-space: normal; }
.athpage .sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.athpage .sum div { background: var(--white); border-radius: 10px; padding: 10px 12px; }
.athpage .sum .num { display: block; font-size: 22px; color: var(--navy); }
.athpage .sum .lab { font-size: 11px; }
.athpage .bio { background: var(--white); border-radius: 12px; padding: 14px; max-width: 62ch; margin-bottom: 20px; }
.athpage .bio p { white-space: pre-wrap; }
.athpage .hist { width: 100%; font-size: 14px; }
.athpage .hist th { text-align: left; padding: 8px 12px; font: 600 11px/1.3 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.athpage .hist td { padding: 9px 12px; vertical-align: top; border-bottom: 1px solid var(--line); }
.athpage .hist tr:last-child td { border-bottom: 0; }
.athpage .next { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.athpage .empty { padding: 22px 12px; text-align: center; color: var(--ink-2); }
.athpage .editbar { margin: 0 0 12px; }
.athpage .r .bknote { margin-top: 4px; font: 400 13px/1.35 var(--f-body); letter-spacing: 0; text-transform: none; white-space: pre-wrap; color: var(--ink-2); }
.athpage .next .qnote { display: block; padding: 2px 0 0; order: 0; }

/* S20-A20 step 1: the Seeding page (the finalists ranked by Regional result; the admin panel is the Season 19 Seeding panel, ported) */
.sdlist { margin: 0 0 26px; }
.sdlab { margin: 0 0 4px; color: var(--navy); }
.sdlist .rkc2 { width: 38px; }
.sdlist .rkn { font-size: 18px; }
.sdlist .who { min-width: 0; }
.sdv { display: block; margin-top: 1px; font: 600 11px/1.3 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.srs { display: block; margin-top: 1px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.sfall { display: block; margin-top: 1px; font-size: 12px; line-height: 1.3; color: var(--ink-2); white-space: normal; text-align: right; }
.sdlist .rowlist li { min-height: 64px; padding-top: 6px; padding-bottom: 6px; }
.sdlist .rowlist li.hand .rkn { color: var(--ink); }
.sdtools { align-items: center; }
.sdsw { margin-top: 0; }
.sdhand { padding: 0 0 8px; }
.sdpanel { margin: 8px 0 22px; padding-bottom: 14px; }
.sdpanel .ahint, .sdpanel .seedwhy, .sdpanel .seednote, .sdpanel .seedstat { padding-left: 12px; padding-right: 12px; }
.sdact { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 12px 0; }
.sdact .btn { flex: 1 1 220px; }
.seedlab { padding: 0 0 4px 0; }
.seedbank { margin: 0 0 12px; padding: 8px 0; border-radius: 4px; }
.seedempty { padding: 0 0 6px; font-weight: 600; color: var(--loss); }
.seedlist { list-style: none; margin: 0; padding: 0; background: var(--white); }
.seedrow { position: relative; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.seedrow:first-child { border-top: 0; }
.seedrow.pick { outline: 3px solid var(--gold); outline-offset: -3px; z-index: 1; }
.srow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 6px 0; background: none; border: 0; border-radius: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.srow:disabled { cursor: default; opacity: 0.7; }
.srow .bcol { align-self: stretch; flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; width: 104px; padding-left: 8px; border-left: 1px solid var(--line); font-size: 14px; }
.srow .nm { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: break-word; }
.srow .tags { margin-left: 6px; }
.seedrow.empty .nm { font: 600 13px/1.4 var(--f-body); letter-spacing: 0.06em; color: var(--loss); }
.tobank { flex: none; min-height: 48px; margin-right: 8px; padding: 0 12px; font-size: 15px; }
.seedbank.over { background: var(--paper); }
.seedrow.over { outline: 2px dashed var(--navy); outline-offset: -2px; background: var(--paper); }
.seedwhy { min-height: 20px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seednote, .seedstat { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seednote.err, .seedstat.err { color: var(--err); }
.seednote.ok, .seedstat.ok { color: var(--navy); }
.seedstat.ok { font-weight: 400; color: var(--ink-2); }
.linkb { padding: 0 8px; min-height: 48px; background: none; border: 0; color: var(--blue); font: 600 14px/1 var(--f-body); text-decoration: underline; cursor: pointer; }
@media (min-width: 900px) {
  .sdlists.sd2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .sdlist .rkcard { padding-left: 14px; padding-right: 14px; }
  .seedrow.pick { cursor: grab; }
}
.sdtools .btn, .sdpanel .btn { min-height: 48px; }
.sdtools .sw, .sdsw { min-height: 48px; }

/* S20-A19 step 3: the Athletes page (#/athletes). Ported from design/athletes-mockup-approved.html (.rows .row .av .az .seg .chips .chip .cnt became
   .alrows .alrow .alav .alaz .alseg .alchips .alchip .alcnt because .seg already names the sticky tab bar above). Everything is scoped under .athl. */
.athl { max-width: 720px; }
.athl .ph { margin-bottom: 14px; }
.alseg { display: flex; gap: 6px; margin: 0 0 8px; }
.alseg button { flex: 0 1 auto; min-height: 36px; padding: 0 9px; border: 1.5px solid var(--navy); border-radius: 8px; background: none; color: var(--navy); font: 600 13px/1 var(--f-body); cursor: pointer; }
.alseg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.alchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.alchips .lab { margin-right: 2px; }
.alchip { min-height: 32px; padding: 0 7px; border: 0; border-radius: 999px; background: var(--line); color: var(--ink); font: 600 12px/1 var(--f-body); cursor: pointer; }
.alchip[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.alseg button:focus-visible, .alchip:focus-visible, .alrow:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.alcnt { margin: 4px 0 10px; color: var(--ink-2); font-size: 13px; }
.alaz { margin: 18px 0 8px; }
.alaz h2 { font-size: 18px; color: var(--navy); }
.alrows { background: var(--white); border-radius: 12px; overflow: hidden; }
.alrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.alrow:last-child { border-bottom: 0; }
.alrow:hover { background: var(--tint); }
.alav { position: relative; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--navy); color: var(--white); display: grid; place-items: center; font: 700 18px/1 var(--f-disp); letter-spacing: 0.02em; }
.alav.w { background: var(--red); }
.alav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.alwho { min-width: 0; }
.alnm { display: block; font: 600 17px/1.3 var(--f-body); overflow-wrap: anywhere; }
.alnm .tags { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.alnm .vbadge { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.alsub { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--ink-2); overflow-wrap: anywhere; }
.alst { max-width: 7.5em; text-align: right; }
.alst .lab { display: block; font-size: 11px; }
.alst .num { display: block; font-size: 15px; line-height: 1.15; color: var(--navy); overflow-wrap: anywhere; }
.alempty { padding: 28px 12px; text-align: center; color: var(--ink-2); }
@media (max-width: 340px) { .alrow { gap: 8px; padding-left: 8px; padding-right: 8px; } .alst { max-width: 6.6em; } .alseg button { padding: 0 7px; } }
@media (min-width: 640px) { .alst { max-width: 14em; } }

/* S20-A19 step 3 / OPEN-QUESTIONS 24: the season tab's number cards hold runs, wins and one best time per course the person ran, so the row fits however many there are */
.athpage .sum { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
/* S20-A20 step 2: the group round page (the Regional race card with a group title, seed tags, a footer line) and the bracket seeds on the Seeding page */
.grpcard .rch { align-items: flex-start; }
.grpcard .rtl { flex: 1; }
.grpst { flex: none; align-self: center; margin-left: auto; text-align: right; }
.grpfoot { margin: 0; padding: 8px 0 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.tag.gseed { font-variant-numeric: tabular-nums; }
/* S20-A21 addendum: the small place-in-division tag (M7 / W3) beside the overall SEED tag */
.tag.gdiv { font-variant-numeric: tabular-nums; font-size: 10px; background: transparent; border-color: transparent; padding: 0 2px; color: var(--ink-2); }
.sdcourse:empty { display: none; }
.grpfs { min-width: 0; margin: 0; padding: 0; border: 0; }
.grpfs:disabled { opacity: 0.55; }
#grpChips.q3 { margin-top: 0; }
.sdbracket { margin-top: 28px; }
.sdbh { margin: 0 0 6px; color: var(--navy); font-size: 14px; }

/* ---------- S20-A20 step 3: the Season 20 bracket page (admin editor sheet, seeding panel, replace a racer), ported from the Season 19 build (release/site-final13) ---------- */
.mtog { margin: -4px 0 -6px 42px; }
.etoggle { min-height: 44px; padding: 0 4px; background: none; border: 0; cursor: pointer; font: 600 14px/1 var(--f-body); color: var(--blue); }
.ebody { display: none; margin: 4px 12px 0 0; padding: 14px 12px; background: var(--white); border: 1px solid var(--line); }
.race.open .ebody { display: block; }
.eside + .eside { margin-top: 14px; }
.ewho { font-weight: 600; margin-bottom: 2px; }
@media (min-width: 640px) {
  .esides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .eside + .eside { margin-top: 0; }
}
.ebody > .wsel:first-child { margin: 0 0 14px; }
.bkh2 { padding-right: 44px; color: var(--navy); }
.bkform { padding: 14px 0 0; }
.phact { display: flex; align-items: center; gap: 8px; flex: none; margin-top: -4px; }
.seedbtn { min-height: 44px; padding: 0 14px; font-size: 14px; letter-spacing: 0.08em; }
.seedp { margin-top: 18px; padding: 14px 0 6px; border-top: 1px solid var(--line); }
.seedh { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seedt { font-size: 24px; color: var(--navy); }
.seeddone { min-height: 44px; padding: 0 16px; font-size: 14px; }
.seedhint { margin: 6px 0 14px; }
.seedlab { padding: 0 0 4px 12px; }
.seedbank { margin-bottom: 20px; padding: 8px 0; border-radius: 4px; }
.seedempty { padding: 0 12px 6px; font-weight: 600; color: var(--loss); }
.seedhalf + .seedhalf { margin-top: 22px; }
.seedlist { list-style: none; margin: 0; padding: 0; background: var(--white); }
.seedrow { position: relative; display: flex; align-items: center; border-top: 1px solid var(--line); }
.seedrow:first-child { border-top: 0; }
.seedrow.pick { outline: 3px solid var(--gold); outline-offset: -3px; z-index: 1; }
.srow {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px;
  background: none; border: 0; border-radius: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer;
}
div.srow { cursor: default; }
.ssd { flex: none; width: 34px; font-size: 18px; color: var(--ink-2); }
.sbody { flex: 1; min-width: 0; }
.sname { display: block; font-weight: 600; overflow-wrap: break-word; }
.sname .tags { margin-left: 6px; }
.sstat { display: block; margin-top: 1px; font: 600 11px/1.3 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.seedrow.empty .sname { font: 600 13px/1.4 var(--f-body); letter-spacing: 0.06em; color: var(--loss); }
.tobank { flex: none; min-height: 44px; margin-right: 8px; padding: 0 12px; font-size: 15px; }
.seedbank.over, .seedrow.over { background: var(--paper); }
.seedrow.over { outline: 2px dashed var(--navy); outline-offset: -2px; }
.seedwarn { margin-top: 18px; }
.seedwarn p + p { margin-top: 4px; }
.seedlog { margin-top: 12px; padding: 0 12px; }
.seedlog p { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.seedlog .lab { font-size: 11px; }
.seedact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.seedact .btn { flex: 1 1 200px; }
.seedact .btn.secondary { font-size: 14px; letter-spacing: 0.06em; }
.seedwhy { min-height: 20px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seednote, .seedstat { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seednote.err, .seedstat.err { color: var(--err); }
.seednote.ok, .seedstat.ok { color: var(--navy); }
.seedstat.ok { font-weight: 400; color: var(--ink-2); }
.linkb { padding: 0 8px; min-height: 44px; background: none; border: 0; color: var(--blue); font: 600 14px/1 var(--f-body); text-decoration: underline; cursor: pointer; }
@media (max-width: 899px) {
  main.seeding .bkchips, main.seeding .bkwrap { display: none; }
}
@media (min-width: 900px) {
  .seedhalves { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .seedhalf + .seedhalf { margin-top: 0; }
  .seedrow.pick { cursor: grab; }
  .seedp { margin-bottom: 8px; }
  .seedbank { max-width: 50%; }
  .seedact .btn { flex: 0 1 auto; min-width: 220px; }
}
.seedlog .lab::after { content: " \00b7"; }
.bm.ed { cursor: pointer; touch-action: manipulation; }
.bm.ed:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 5px; }
.bksheet .race { padding: 0; border-top: 0; }
.bksheet .mtog { display: none; }
.bksheet .ebody { display: block; margin: 12px 0 0; padding: 0; border: 0; }
.bksheet .rnotes { margin-left: 0; }
.replset { margin: 0 0 14px; padding: 0; border: 0; }
.repl { padding: 2px 0; }
.replrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rwho { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rpick { margin: 2px 0 10px; }
.rpick select { width: 100%; min-height: 44px; font: inherit; }

/* ---- S20-A20 step 4: Fantasy (Chat B). Pick mode on the bracket drawing, the Fantasy page, the leaderboard, the Admin card. ---- */
:root { --pickbg: #FFF1C9; --pickink: #8A6400; }
.fanmode { display: inline-flex; margin-top: 12px; border: 1.5px solid var(--navy); border-radius: 10px; overflow: hidden; }
.fanmode button { font: 600 13px/1 var(--f-body); padding: 0 12px; min-height: 40px; color: var(--navy); background: none; border: 0; cursor: pointer; }
.fanmode button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.pickbar { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--pickbg); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; }
.pickbar b { font-weight: 600; }
.pickbar .btn { min-height: 40px; font-size: 15px; }
.fansave { font-weight: 600; color: var(--navy); }
.fansave.err { color: var(--err); }
.fannote { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.fannote.err { color: var(--err); }
.fanwho { margin: 12px 0 0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 16px; }
.fanscore { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.fanscore b { color: var(--navy); font-weight: 600; }
.br.can { cursor: pointer; }
.br.can:hover { box-shadow: 0 0 0 1.5px var(--navy) inset; }
.br.can .bnm { pointer-events: none; }
.br.p { background: var(--pickbg); }
.br.p .bnm { font-weight: 600; }
.br .pk { flex: none; font: 700 11px/1 var(--f-disp); letter-spacing: 0.04em; color: var(--ink-2); white-space: nowrap; }
.br.p .pk { color: var(--pickink); }
.br.pc .pk { color: var(--win); }
.br.px .pk { color: var(--red); }
.bchamp .cn.p { color: var(--pickink); }
.bchamp .lab.yc { display: block; margin-top: 10px; }
.fanstate { margin: 12px 0 0; font-size: 15px; }
.fancard { margin-top: 16px; padding: 14px 12px; background: var(--white); border-radius: 6px; }
.fancard p { margin: 0 0 8px; }
.fancard.aform { padding: 14px 12px; gap: 10px; }
.fancard .asub { margin: 0; }
.fanlinks { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; align-items: center; }
.fanrename { margin-top: 14px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.fannotice { background: var(--pickbg); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fannotice p { margin: 0; }
.fancount { margin-top: 12px; }
.fanlb { width: 100%; border-collapse: collapse; margin-top: 14px; background: var(--white); }
.fanlb th, .fanlb td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.fanlb th { font: 600 11px/1 var(--f-disp); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.fanlb .n { width: 44px; font-variant-numeric: tabular-nums; }
.fanlb .r { text-align: right; font-variant-numeric: tabular-nums; }
.fanlb tr.me td { background: var(--pickbg); font-weight: 600; }
.fanlb .cm { color: var(--gold); }
.fanlb a { color: var(--navy); font-weight: 600; text-decoration: none; }
.adminfan { padding: 0 12px; }
.fanadm { list-style: none; margin: 8px 0 0; padding: 0 12px 12px; display: block; }
.fanadm li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.fanadm .fn { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.fanadm .fc { font-size: 13px; color: var(--ink-2); }
.fanadm .fb { display: flex; gap: 6px; }
.fanrenform { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.fanrenform input { flex: 1 1 140px; min-height: 40px; font: inherit; }
#fanAdminPanel .afine { padding: 6px 12px 0; }

/* S20-A19 step 4: the header search. Ported from design/athletes-mockup-approved.html (.ico, .sbar). The icon sits at the right end of the header; the bar sticks under it. */
.srchbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 -10px 0 0; padding: 0; background: none; border: 0; border-radius: 10px; color: var(--white); cursor: pointer; }
.srchbtn svg { display: block; width: 26px; height: 26px; }
.srchbtn:hover, .srchbtn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); }
.srchbtn:focus-visible { outline-color: var(--white); outline-offset: -3px; }
.sbar { position: sticky; top: 56px; z-index: 19; background: var(--blue); color: var(--white); padding: 0 max(14px, calc((100% - 960px) / 2 + 16px)) 14px; }
.sbar[hidden] { display: none; }
.sbox { position: relative; }
.sbox input { display: block; width: 100%; height: 48px; margin: 0; padding: 0 48px 0 46px; border: 0; border-radius: 12px; background: var(--white); color: var(--ink); font: 400 17px/1 var(--f-body); -webkit-appearance: none; appearance: none; }
.sbox input::placeholder { color: #8C8580; opacity: 1; }
.sbox input::-webkit-search-cancel-button, .sbox input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.sbox input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sbox > svg { position: absolute; left: 13px; top: 13px; width: 22px; height: 22px; color: var(--blue); pointer-events: none; }
.sclear { position: absolute; right: 0; top: 0; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-radius: 12px; color: var(--ink-2); font: 400 26px/1 var(--f-body); cursor: pointer; }
.sclear[hidden] { display: none; }
.sclear:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.shint { margin: 8px 0 0; color: rgba(255, 255, 255, 0.85); font-size: 13px; line-height: 1.35; }
.alsub mark, .alname mark { background: var(--gold); color: var(--ink); padding: 0 2px; border-radius: 2px; }

/* S20-A19 step 4b: the search box on the Athletes page itself, between the title block and the division buttons. Reuses .sbox and .sclear; this adds the edge a white field needs on a white page. */
.alsearch { margin: 0 0 14px; }
.alsearch input { box-shadow: inset 0 0 0 1.5px var(--navy); }
.alsearch input:focus-visible { outline-offset: 0; }
.alsearch input { scroll-margin-top: 72px; }

/* The Regional Finals / Group round ALL tab: a quiet line where the Build button was, and no side pool */
.regallnote { margin: 8px 0 6px; padding: 0; text-align: left; }
.regwrap.regall .regside { display: none; }

/* The "Advancing to the Group round" list on the Regional Finals page: quiet, one row per runner */
.regadv { margin: 14px 0 22px; }
.regadv .radvt { margin: 0 0 4px; font-size: 14px; color: var(--navy); }
.regadv .radvh { margin: 12px 0 2px; color: var(--ink-2); }
.regadv .radvnone { margin: 4px 0 0; padding: 0; text-align: left; }
.regadv .rkcard { padding-top: 0; }
.regadv .rkc2 { width: 38px; }
.regadv .rkn { font-size: 18px; }
.tag.advw { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tag.advb { border-color: var(--ink-2); color: var(--ink-2); background: var(--white); }

/* S20-A22 addendum 3: NUMBERING MODE: a number field in place of each race label, and a sticky Save all / Cancel bar at the bottom */
input.numin { width: 84px; min-height: 48px; height: 48px; padding: 0 4px; box-sizing: border-box; text-align: center; font: 600 16px/1 var(--f-body); border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 0; }
input.numin:disabled { opacity: 0.5; }
.h2hsub .h2hno:has(.numin) { opacity: 1; }
.rtl:has(.numin) { align-items: center; gap: 10px; }
.numbar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 8px; margin: 12px -16px 0; padding: 8px 16px max(8px, env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); }
.numbar[hidden] { display: none; }
.numbar .msg { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.numbar .btn { flex: none; min-height: 48px; min-width: 96px; }
.sdcourse { text-transform: none; letter-spacing: 0; margin-top: 4px; margin-bottom: 14px; }

/* ---------- S20-A22: the head-to-head group round (group card with standings and three matchup rows, run order view, the matchup editor) ---------- */
.h2hcard .cols { padding-top: 4px; }
.rowlist li > .bcol.h2hwl, .cols .bcol.h2hwl { width: 54px; justify-content: center; font-size: 17px; color: var(--navy); }
.cols .bcol.h2hwl { font-size: inherit; }
.h2hml { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--navy); font-size: 13px; }
.h2hm { padding: 8px 0 10px; border-top: 1px solid var(--line); }
.h2hml + .h2hm { border-top: 0; }
.h2hv { align-self: center; font: 600 12px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.h2hnote { margin: 6px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.h2hrn { font-style: italic; }
.h2hro { margin: 0 0 14px; }
.h2hrowed { flex-basis: 100%; margin: 0 0 8px; }
.h2hrow[data-state="final"] .rkn { color: var(--navy); }
.h2hf { display: flex; flex-direction: column; gap: 12px; }
.h2hf.dirty { background: linear-gradient(var(--gold), var(--gold)) left / 3px 100% no-repeat; padding-left: 8px; }
.h2hf .grpfs { display: flex; flex-direction: column; gap: 12px; }
.h2hf .regent { margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.h2hf .regent .pairs { margin-top: 6px; align-items: end; }
.h2hf .checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.h2hf .checks .chk { min-height: 40px; }
.h2hf .ahint { padding: 0; font-size: 13px; }
.h2hf .rfoot .msg { flex-basis: 100%; }
.pl.W { color: var(--win); }
.pl.L { color: var(--loss); }
.h2hadv { display: flex; align-items: center; gap: 6px; flex-basis: 100%; margin-top: 4px; font: 600 12px/1.2 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.h2hadv select { min-height: 36px; max-width: 100%; font: 500 14px/1.2 var(--f-body); text-transform: none; letter-spacing: 0; }
.h2hadv select { flex: 1; min-width: 120px; max-width: 190px; width: auto; }
/* S20-A22 addendum 2: the head-to-head page tidy. One line per runner; one row per matchup; Advances hidden until needed. */
.h2hcard .rch { flex-wrap: nowrap; align-items: center; }
.h2hcard .rch .grpst { margin-left: auto; }
.h2hcard .rch .rctl { flex: none; }
.h2hcard .rowlist li, .h2hcard .cols { gap: 4px; }
.h2hcard .rkc2 { width: 20px; }
.h2hcard .rowlist li > .bcol.h2hwl, .h2hcard .cols .bcol.h2hwl { width: 34px; padding: 0; border-left: 0; justify-content: center; text-align: center; }
.h2hcard .rowlist li > .bcol.h2hwl { font-size: 15px; }
.h2hcard .cols .bcol.h2hwl { font-size: 11px; }
.h2hcard .rowlist li > .bcol.qres, .h2hcard .cols .bcol.qres { width: 68px; padding-left: 5px; white-space: nowrap; }
.h2hcard .rowlist li > .bcol.qres { font-size: 14px; }
.h2hcard .cols .bcol.qres { font-size: 11px; }
.h2hstand .who.h2hwho { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 0; overflow: hidden; }
.h2hstand .who.h2hwho .nm { flex: 0 1 auto; min-width: 0; margin-right: 0; padding: 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.h2hstand .who.h2hwho .tags { flex: none; flex-wrap: nowrap; margin-left: 0; gap: 2px; }
.h2hstand .who.h2hwho .tag { white-space: nowrap; font-size: 10px; padding: 0 3px; }
.h2hstand .who.h2hwho .tag.gdiv { padding: 0; }
.h2hadvlink { min-height: 40px; font-size: 13px; padding: 0 4px; }
.h2hm { padding: 8px 0; border-top: 1px solid var(--line); }
.h2hline { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.h2hmain { flex: 1; min-width: 0; }
.h2hpair { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; font: 600 14px/1.3 var(--f-body); }
.h2hn { display: inline-flex; align-items: baseline; gap: 3px; min-width: 0; flex: 0 1 auto; }
.h2hn .nm { padding: 4px 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2hn.lost .nm { font-weight: 400; color: var(--loss); }
.h2hn .wm, .h2hn .tag { flex: none; margin-left: 0; }
.h2hv { flex: none; font: 600 11px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.h2hsub { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; min-height: 20px; }
.h2hsub .rnum2 { white-space: nowrap; font-weight: 500; letter-spacing: 0.02em; color: var(--ink-2); opacity: 0.8; font-size: 12px; }
.h2hres { font-size: 14px; line-height: 1.2; }
.h2hres .qbz { display: none; }
.h2hund { font-size: 13px; color: var(--ink-2); }
.h2hline .h2hbtn { flex: none; min-height: 48px; padding: 0 10px; font-size: 14px; }
.h2hro { margin: 0 0 14px; }
.h2hrow { flex-wrap: wrap; align-items: center; }
.h2hrow .h2hline { flex: 1; min-width: 0; padding: 4px 0; }
.h2hstand li > .h2hadv { flex-basis: 100%; margin: 0 0 6px 24px; }
.h2hn .tag.man { font-size: 9px; padding: 0 3px; }

/* S20-A23 (OPTION B): the results editors. One block per runner (name band on a tint, two-column grid), the race-wide controls once, then the buttons.
   Shared by the head-to-head, three-lane, Regional and qualifying editors (resEditorHTML in app.js). 48 px targets; labels above fields; two columns at 375 px. */
.regf .resblk, .h2hf .resblk, .heatf .resblk { margin: 0; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); min-width: 0; }
.reslg { float: left; width: 100%; margin: 0; padding: 0; }
.resband { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; padding: 10px 12px; background: var(--tint); }
.resb1 { background: var(--tint-2); }
.resb2 { background: var(--tint-3); }
.resnm { min-width: 0; overflow-wrap: anywhere; font: 800 24px/1.05 var(--f-disp); font-style: italic; text-transform: uppercase; color: var(--navy); }
.resnm .nmw { vertical-align: middle; }
.resmeta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font: 600 12px/1.2 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.resmeta .tags { margin-left: 0; }
.resbody { clear: both; padding: 10px 12px 12px; }
.resbody > .wsel { margin-top: 12px; }
.resg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
.resg > * { min-width: 0; }
.fld.resf { display: grid; gap: 4px; align-content: end; font: 600 13px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.fld.resf > input, .fld.resf > select, .fld.resf .regobrow input { margin-top: 0; min-height: 48px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.regf .fld.resf select, .h2hf .fld.resf select { min-height: 48px; width: 100%; }
.resf .lab { margin: 0; }
.resg .hguard.greyed { opacity: 0.45; }
.fld.resf .regobrow { gap: 8px; text-transform: none; letter-spacing: 0; }
.fld.resf .regobn { font-size: 14px; }
.resbz { min-height: 48px; gap: 10px; }
.resbz span { font-size: 16px; font-weight: 600; color: var(--ink); }
.resbz input:not(:checked) ~ .swyes, .resbz input:checked ~ .swno { display: none; }
.reschipbox { display: flex; align-items: center; min-height: 48px; }
.reschip { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--tint); color: var(--navy); font: 700 16px/1 var(--f-body); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.resobs { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.resahint { grid-column: 1 / -1; margin: 0; }
.resbody > .resahint, .resbody > .regtieslot { margin: 0; }
.resbody .ahint { margin-top: 8px; padding: 0; font-size: 13px; }
.resbody .regtie { margin: 10px 0 0; }
.reslinks { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.resbody .reslinks { margin-top: 6px; }
.reslinks .btn { min-height: 48px; padding: 0 4px; }
.resvs { margin: 0; text-align: center; font: 700 13px/1 var(--f-disp); letter-spacing: 0.1em; color: var(--ink-2); }
.reswide { display: grid; gap: 12px; }
.reswide:empty { display: none; }
.reswide2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
.reswide2 > * { min-width: 0; }
.reswide .fld.resf > input, .reswide .fld.resf > select { min-height: 48px; }
.resadv > .lab { display: block; margin-bottom: 4px; }
.resadvg { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.resadvg select { padding: 8px 6px; font-size: 15px; text-overflow: ellipsis; }
.resw > .lab { display: block; margin-bottom: 4px; }
.h2hf .seg3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.h2hf .whint { margin: 6px 0 0; }
.resfoot { gap: 10px; margin-top: 0; }
.resfoot .btn { flex: 1 1 0; min-height: 48px; }
.resfoot .msg { flex: 1 0 100%; }
.regf .reslinks, .h2hf .reslinks, .heatf .reslinks { margin-top: 0; }
@media (max-width: 380px) { .resnm { font-size: 22px; } }
.regf input[type=text], .h2hf input[type=text], .heatf input[type=text], .heatf select { min-height: 48px; }
label.chk.sw.resbz { min-height: 48px; }
.regf .rtop, .h2hf .rtop { grid-template-columns: 1fr; }
.resadvg select { padding: 8px 2px 8px 6px; font-size: 14px; text-overflow: clip; }

/* S20-A25: the head-to-head matchup editor. Lane colours on the name bands (top block = lane 1 = red, bottom block = lane 2 = blue; the colour follows the
   LANE), one Swap lanes button between the blocks, and the name band is the tap-the-winner button. Only .h2hf uses these classes; the other editors are unchanged. */
:root { --tint-lane-blue: #E3ECF8; }
.h2hf .resband.resbR { background: var(--tint-2); box-shadow: inset 5px 0 0 var(--red); }
.h2hf .resband.resbB { background: var(--tint-lane-blue); box-shadow: inset 5px 0 0 var(--blue); }
.h2hf .resband[data-h2hwin] { min-height: 48px; box-sizing: border-box; align-items: center; padding-left: 17px; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.h2hf .resband[data-h2hwin][aria-disabled="true"] { cursor: default; }
.h2hf .resband[data-h2hwin]:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.h2hf .resblk.h2hwon { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.h2hf .h2hwon .resband { outline: 3px solid var(--navy); outline-offset: -3px; }
.h2hf .h2hwon .resband:focus-visible { outline-color: var(--blue); }
.h2hwtag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: var(--navy); color: var(--white); font: 700 12px/1 var(--f-body); letter-spacing: 0.08em; }
.h2hwtag[hidden] { display: none; }
.h2hswap { display: flex; justify-content: center; margin: 0; }
.h2hswap .btn { min-height: 48px; padding: 0 22px; touch-action: manipulation; }
.h2hsure { margin: 0 0 10px; padding: 12px; border: 1.5px solid var(--navy); border-radius: 12px; background: var(--warn-bg); }
.h2hsureq { margin: 0 0 10px; font: 600 16px/1.35 var(--f-body); color: var(--ink); }
.h2hsurebtns { display: flex; flex-wrap: wrap; gap: 10px; }
.h2hsurebtns .btn { flex: 1 1 120px; min-height: 48px; }
.h2hf .resfoot[hidden] { display: none; }
.h2hf .resband .nmed, .h2hf .resband .nmed * { -webkit-user-select: text; user-select: text; }   /* the name editor's text box must take the caret inside the tappable band */

/* S20-A25 addendum 2: the admin matchup row. Line 1: two outlined name buttons (48 px, ellipsis) with "v" between; the stored winner's button is filled navy with the W mark.
   Line 2: the label, the cue "Tap the winner" (until a winner is stored), the result, and a quiet "Enter results" link. Viewers get plain names in the same two columns (addendum 3). */
.h2hadm, .h2hplainrow { align-items: stretch; padding: 0; min-height: 0; }
/* S20-A25 addendum 3: two columns (name, then that runner's result) with "v" between, for admins and viewers alike */
.h2hpair2 { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; white-space: normal; }
.h2hcol { min-width: 0; text-align: center; }
.h2hrun { min-height: 18px; padding-top: 2px; font-size: 13px; line-height: 1.2; }
.h2hrun:empty { min-height: 0; padding-top: 0; }
.h2hrun .tm { font-size: 15px; }
.h2hrun .qbz { margin-left: 4px; }
.h2hplainrow .h2hpair2 { padding-top: 2px; }
.h2hplainrow .h2hv { line-height: 28px; }
.h2hadm .h2hv { line-height: 48px; }
.h2hcol .h2hn { display: flex; justify-content: center; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.h2hcol .h2hn .h2hplain { display: flex; justify-content: center; align-items: center; min-height: 28px; padding: 2px 0; overflow: visible; white-space: normal; text-overflow: clip; font-size: 15px; line-height: 1.15; }
.h2hcol .pkn { display: -webkit-box; min-width: 0; max-width: 100%; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; white-space: normal; overflow-wrap: anywhere; line-height: 1.1; }   /* a name: at most two lines, cut at the end with an ellipsis, centred */
.h2hplainrow .h2hsub2 { min-height: 22px; margin-top: 0; flex-wrap: wrap; }
.h2hadm .h2hn { position: relative; display: block; }
.h2hadm .h2hpick { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 4px 10px; font-size: 17px; letter-spacing: 0.04em; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
   /* the name: at most two lines, cut at the end with an ellipsis, centred; the right padding of the filled button keeps the W off the letters */
.h2hro .h2hpick { font-size: 15px; letter-spacing: 0.02em; }
.h2hadm .h2hpick:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.h2hadm .h2hn.won .h2hpick { background: var(--navy); border-color: var(--navy); color: var(--white); padding-right: 30px; }
.h2hadm .h2hn .wm { position: absolute; right: 10px; top: 50%; margin: 0; transform: translateY(-50%); color: var(--white); pointer-events: none; }
.h2hsub2 { display: flex; align-items: center; flex-wrap: nowrap; gap: 0 8px; min-height: 48px; margin-top: 2px; }
.h2hsub2 > :not(.h2hopen) { flex: 0 1 auto; min-width: 0; }
.h2hsub2 .h2hcue { font-size: 13px; font-weight: 600; color: var(--navy); }
.h2hsub2 .h2hopen { flex: none; margin-left: auto; min-height: 48px; padding: 0 4px; font-size: 14px; }
.h2hrowsure { margin: 4px 0 8px; }
.h2hrowmsg { margin: 4px 0 8px; }

/* S20-A26: the Seeding page order, the reseeding banner and its Fantasy marks, the group time on the Round of 32 cards. */
/* Rule 1: the Bracket seeds section leads when it exists; the 48 list follows under its own heading. */
.sdbracket.sdtop { margin-top: 12px; }
.sdregional { margin-top: 28px; }
/* Rule 2: the banner, full width under the header, above every page; the site's notice look (cream fill, ink text). */
.a26banner { padding: 12px max(16px, calc((100% - 960px) / 2 + 16px)); background: var(--warn-bg); color: var(--ink); border-bottom: 1px solid var(--gold); }
.a26banner[hidden] { display: none; }
.a26msg { margin: 0 0 10px; font-size: 15px; line-height: 1.35; font-weight: 600; }
.a26btns { display: flex; flex-wrap: wrap; gap: 10px; }
.a26btns .btn { min-height: 48px; padding: 0 18px; }
.a26note { margin: 12px 0 0; padding: 10px 12px; background: var(--warn-bg); border-left: 4px solid var(--gold); border-radius: 4px; font-size: 14px; line-height: 1.35; font-weight: 600; }
/* a broken pick on the drawing: the stale name struck through, then a small cue; the pair above it is tapped as before */
.bm .a26stale { display: flex; align-items: baseline; gap: 8px; padding: 3px 5px 4px; background: var(--warn-bg); border-radius: 5px; font-size: 12px; line-height: 1.3; color: var(--ink-2); }
.bm .a26stale s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration-thickness: 1.5px; }
.bm .a26stale .a26cue { flex: none; margin-left: auto; font: 700 11px/1.3 var(--f-disp); letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
/* Rule 3: the group round time beside the seed number on a first-round card: small stopwatch digits, quiet grey (the red digits at the right are race results). */
.br .bgt { flex: none; font: 700 11px/1 "DSEG7", var(--f-disp); letter-spacing: 0.02em; color: var(--ink-2); white-space: nowrap; }
.br.hn > .bgt { height: var(--bk-rh); line-height: var(--bk-rh); }
/* S20-A26 addendum: more space on the Round of 32 card: about 10 px after the seed number and about 14 px between the group time and the name (the row's 4 px gap plus these margins). */
.br .bgt { margin: 0 10px 0 6px; }
/* S20-A26 addendum 2: the Picks tab for everyone signed in; the join card pops out over the bracket (48 px targets). */
.fanjoin .sheet { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
.fanjoin .fancard { margin-top: 0; padding: 0; background: none; }
.fanjoin .fld input { min-height: 48px; }
.fanjoin .rfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fanjoin .rfoot .btn { min-height: 48px; }
.fanjoin .rfoot .msg { flex: 1 0 100%; }
#fanNotOpen { margin-top: 10px; padding: 10px 12px; background: var(--warn-bg); border-radius: 4px; font-size: 14px; color: var(--ink); }
#bkpager[tabindex="-1"]:focus { outline: none; }
/* S20-A26 addendum 3: no Save picks button; the status word sits where it was. Only a failed save shows a (48 px) retry button. */
.fanstatus { font-weight: 600; color: var(--navy); }
.fanstatus:empty { display: none; }
.pickbar .fanretry { min-height: 48px; padding: 0 14px; font-size: 15px; color: var(--err); border-color: var(--err); }
.fanerr { flex: 1 0 100%; font-size: 12px; color: var(--err); }
/* S20-A27: "RUN n" over the left edge of every Season 20 bracket pair (results mode only): small label type, no box; the pair's braces are measured from its rows, so the label does not move them. */
.bm .brun { margin: 0 0 1px 2px; font: 600 10px/12px var(--f-body); letter-spacing: 0.1em; opacity: var(--nt, 1); }
@media (prefers-reduced-motion: reduce) { .bm .brun { opacity: 1 !important; } }
