/* Results division page /results/<event>/<division>: E / Course Profile with shell S3 (owner's choice, 21 Nov 2026).
   Ported from docs/design-references/results-designs-r3-2026-11-19/E/division.html and E/variation.css (the
   round-3 podium, the field profile and the gap table) and shared/identity.css (the ladder). Every class is
   namespaced (.dv-*) so the site's global .hero, .fine and h1/h2 rules never apply. The ladder, the type glyphs and
   the round-2 type scale (--t-*) come from results-identity.css, linked first; sizes come from that scale only.
   Dark theme by default; the light theme derives from site.css's light tokens. Text accents, rules and focus rings
   use --accent-text (terracotta in light); yellow (--accent) is a fill only: the winner's step (ink text on it),
   the winner's dot (ruled in ink on the light canvas), the name-filter mark (ink text) and the Filter button.
   Table ranks, gaps and finishes are list times in Whois Mono with the narrowed colon (.mt/.tc, as on the athlete,
   event and search pages); podium, stat and profile values stay in Metropolis.
   Everything is server-rendered: positions arrive as percentages, stack levels and label widths per layout
   (narrow ≤ 760 px, wide above) as custom properties. No script. */

.dv-page {
  --row: 60px;
  --dv-stn: #2b3335;
  /* row 2 to the ladder: 30 px on division (S3 README), whatever the page's top space */
  margin-top: calc(30px - var(--page-top-space, 32px));
  font-size: var(--t-body); line-height: 1.55;
}
@media (max-width: 760px) {
  .dv-page { --row: 56px; }
}
:root[data-theme="light"] .dv-page { --dv-stn: #cfd3cc; }

/* ---------- type roles ---------- */
.dv-page .dv-lbl { font: 400 var(--t-label)/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dv-page .dv-fine { font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
/* visually hidden, at a deliberate size (the type check counts it) */
.dv-page .dv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; font-size: var(--t-small); }
.dv-page .dv-h2 { font: 600 var(--t-h2)/1.1 var(--sans); letter-spacing: -.02em; color: var(--foreground); }
.dv-page .mt { font-family: var(--mono); white-space: nowrap; }
.dv-page .tc { display: inline-block; width: .3em; overflow: visible; }
.dv-sec { margin-top: 88px; }
.dv-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.dv-sec-h .dv-fine { max-width: 62ch; }
@media (min-width: 761px) { .dv-n-only { display: none !important; } }
@media (max-width: 760px) { .dv-w-only { display: none !important; } }

/* ---------- hero: kick, H1, podium (the signature), stats ---------- */
.dv-hero { margin-top: 14px; }
.dv-kick { font-size: var(--t-small); line-height: 1.4; color: var(--muted-strong); }
.dv-page h1.dv-h1 { margin-top: 10px; font: 600 var(--t-display)/1 var(--sans); letter-spacing: -.03em; color: var(--foreground); overflow-wrap: anywhere; }
.dv-page .dv-pod-h { margin-top: 18px; font: 400 var(--t-small)/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-strong); }
.dv-page .dv-pod-h.dv-sr { margin: 0; }
.dv-podium { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 0 8px; }
.dv-p3 { grid-row: 1; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.dv-p3--first { grid-column: 2; }
.dv-p3--second { grid-column: 1; }
.dv-p3--third { grid-column: 3; }
.dv-p3-lab { min-width: 0; padding: 0 6px 12px 2px; }
.dv-p3-lab a { font: 600 var(--t-h3)/1.15 var(--sans); color: var(--foreground); text-decoration: none; overflow-wrap: anywhere; }
.dv-p3-lab a:hover { text-decoration: underline; }
.dv-p3-lab a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.dv-p3-lab p { margin-top: 4px; font-size: var(--t-small); line-height: 1.35; color: var(--muted-strong); }
.dv-p3-lab .dv-p3-none { margin: 0; color: var(--muted); }
.dv-p3-step { display: flex; flex-direction: column; justify-content: space-between; padding: 16px 20px 18px; background: var(--panel-raised); border-top: 2px solid var(--foreground); }
/* light: 2nd and 3rd are ruled off the light canvas; the winner's yellow step and the dashed empty steps are not */
:root[data-theme="light"] .dv-p3--second:not(.dv-p3--empty) .dv-p3-step, :root[data-theme="light"] .dv-p3--third:not(.dv-p3--empty) .dv-p3-step { box-shadow: inset 0 0 0 1px var(--line); }
.dv-p3--first .dv-p3-step { height: 250px; background: var(--accent); border-top-color: var(--accent); box-shadow: none; }
.dv-p3--second .dv-p3-step { height: 195px; }
.dv-p3--third .dv-p3-step { height: 155px; }
.dv-p3-r { font: 600 var(--t-display)/.9 var(--sans); color: var(--muted-strong); }
.dv-p3-t { font: 600 var(--t-stat)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--foreground); white-space: nowrap; }
.dv-p3--first .dv-p3-r, .dv-p3--first .dv-p3-t { color: var(--ink); }
/* a place without a loaded finisher keeps its step, dashed and empty */
.dv-p3--empty .dv-p3-step, .dv-p3--first.dv-p3--empty .dv-p3-step { background: none; border: 1.5px dashed var(--line-strong); box-shadow: none; }
.dv-p3--first.dv-p3--empty .dv-p3-r, .dv-p3--empty .dv-p3-t { color: var(--muted); }

.dv-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.dv-stats > div { padding: 0 24px; border-left: 1px solid var(--line); }
.dv-stats > div:first-child { padding-left: 0; border-left: 0; }
.dv-stats dt { margin-bottom: 10px; }
.dv-stats dd { margin: 0; font: 600 var(--t-h3)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--foreground); white-space: nowrap; }
.dv-stats dd small { display: block; margin-top: 8px; font: 400 var(--t-small)/1.3 var(--sans); letter-spacing: 0; color: var(--muted-strong); white-space: normal; }

@media (max-width: 760px) {
  .dv-podium { margin-top: 16px; gap: 0 5px; }
  .dv-p3-lab { padding: 0 2px 8px 0; }
  .dv-p3-lab a { font-size: var(--t-body); }
  .dv-p3-step { padding: 10px 10px 12px; }
  .dv-p3--first .dv-p3-step { height: 200px; }
  .dv-p3--second .dv-p3-step { height: 156px; }
  .dv-p3--third .dv-p3-step { height: 124px; }
  .dv-p3-t { font-size: var(--t-h3); }
  .dv-stats { margin-top: 18px; padding-top: 14px; }
  .dv-stats > div { padding: 0 12px; }
  .dv-stats dt { margin-bottom: 8px; }
  .dv-stats dd { font-size: var(--t-body); font-weight: 600; }
}

/* ---------- the field profile ---------- */
.dv-fp {
  --r: 6px; --step: 13px; --rowh: 30px; --band: 104px; --ax: 34px; --mz: 0px; --mrow: 0px; --lv: var(--lvw);
  --base: calc(var(--ax) + var(--mrow));
  position: relative; height: calc(var(--band) + var(--lv) * var(--step) + 2px + var(--base));
}
.dv-fp--brk { --mz: 210px; }
.dv-fp--min { --mrow: 30px; }
.dv-fp.dv-fp--bare { --band: 36px; }
.dv-fp-in { position: absolute; left: 8px; right: calc(var(--mz) + 8px); top: 0; bottom: 0; }
.dv-fp-axis, .dv-fp-axis2 { position: absolute; bottom: var(--base); border-top: 1px solid var(--line-strong); }
.dv-fp-axis { left: 0; right: var(--mz); }
.dv-fp-axis2 { left: calc(100% - var(--mz) + 28px); right: 0; }
.dv-fp-brk { position: absolute; left: calc(100% - var(--mz) + 3px); bottom: calc(var(--base) - 8px); width: 22px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.dv-fp-tk { position: absolute; bottom: calc(var(--base) - 6px); width: 1px; height: 6px; margin-left: -.5px; background: var(--line-strong); }
.dv-fp-tl { position: absolute; bottom: calc(var(--base) - 25px); transform: translateX(-50%); font-size: var(--t-floor); line-height: 1; color: var(--muted); white-space: nowrap; }
.dv-fp-d { --l: var(--lw); position: absolute; bottom: calc(var(--base) + 2px + var(--l) * var(--step)); width: calc(2 * var(--r)); height: calc(2 * var(--r)); margin-left: calc(-1 * var(--r)); border-radius: 50%; background: var(--muted-strong); }
.dv-fp-d--pod { background: var(--foreground); }
.dv-fp-d--win { background: var(--accent); }
:root[data-theme="light"] .dv-fp-d--win { box-shadow: inset 0 0 0 1.5px var(--ink); }
.dv-fp-pl { --l: var(--lw); position: absolute; top: calc(var(--pr) * var(--rowh) + 22px); bottom: calc(var(--base) + 2px + var(--l) * var(--step) + 2 * var(--r)); width: 1.5px; margin-left: -.75px; background: var(--foreground); }
.dv-fp-pl--win { background: var(--accent-text); }
/* A pin label starts 1 px left of its own line, but at least 4 px right of every earlier pin's line (--xp, which
   crosses this label's row), and ends inside the plot; division-data.ts drops the wide surname when it cannot. When
   even then it cannot (the 2nd and 3rd seconds apart at the axis end, where the clamp would push it back over the 2nd
   line), it is flipped: its right edge 4 px left of an earlier line (--fw wide, --fn narrow; pinFlip). */
.dv-fp-pin { --w: var(--ww); position: absolute; left: clamp(0px, max(calc(var(--x) - 1px), calc(var(--xp, -100px) + 4px)), calc(100% - var(--w))); top: calc(var(--pr) * var(--rowh)); font-size: var(--t-body); line-height: 20px; color: var(--foreground); white-space: nowrap; }
.dv-fp-pin--fw { left: calc(var(--fw) - 4px - var(--w)); }
.dv-fp-pin b { font-weight: 600; }
.dv-fp-pin .v { color: var(--muted-strong); font-variant-numeric: tabular-nums; }
.dv-fp-pin--win, .dv-fp-pin--win .v { color: var(--accent-text); }
.dv-fp-50 { --t: var(--tw); position: absolute; left: clamp(var(--hw), var(--x), calc(100% - var(--hw))); bottom: calc(var(--base) + 8px + var(--t) * var(--step) + 2 * var(--r)); transform: translateX(-50%); text-align: center; font-size: var(--t-small); line-height: 1.1; color: var(--muted-strong); white-space: nowrap; }
.dv-fp-50 b { display: block; margin-top: 3px; font-size: var(--t-body); font-weight: 600; color: var(--foreground); font-variant-numeric: tabular-nums; }
/* the published median in scale: dashed from the band to the axis, labelled in its own row under the ticks */
.dv-fp-ml { position: absolute; top: calc(var(--band) - 20px); bottom: var(--base); width: 0; margin-left: -.75px; border-left: 1.5px dashed var(--foreground); }
.dv-fp-mlab { position: absolute; left: clamp(0px, calc(var(--x) - var(--w) / 2), calc(100% - var(--w))); bottom: 2px; font-size: var(--t-small); line-height: 1; color: var(--foreground); white-space: nowrap; }
.dv-fp-mlab .dv-lbl { color: var(--muted-strong); }
.dv-fp-mlab b { font-weight: 600; font-variant-numeric: tabular-nums; }
/* the published median past the axis break */
.dv-fp-mz { position: absolute; right: 20px; top: var(--rowh); bottom: var(--base); width: 0; border-left: 1.5px dashed var(--foreground); }
.dv-fp-med { position: absolute; right: 30px; top: var(--rowh); text-align: right; line-height: 1.2; }
.dv-fp-med .dv-lbl { display: block; }
.dv-fp-med b { display: block; margin-top: 4px; font: 600 var(--t-data)/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--foreground); }
.dv-fp-med small { display: block; margin-top: 4px; font-size: var(--t-small); color: var(--muted-strong); font-variant-numeric: tabular-nums; }
.dv-page .dv-fp-more2 { margin-top: 10px; text-align: right; }
@media (max-width: 760px) {
  .dv-fp { --r: 4.5px; --step: 10px; --rowh: 22px; --band: 80px; --ax: 30px; --lv: var(--lvn); }
  .dv-fp--brk { --mz: 96px; }
  .dv-fp.dv-fp--bare { --band: 30px; }
  .dv-fp-d, .dv-fp-pl { --l: var(--ln); }
  .dv-fp-pl { top: calc(var(--pr) * var(--rowh) + 19px); }
  .dv-fp-pin { --w: var(--wn); line-height: 18px; }
  .dv-fp-pin--fw { left: clamp(0px, max(calc(var(--x) - 1px), calc(var(--xp, -100px) + 4px)), calc(100% - var(--w))); }
  .dv-fp-pin--fn { left: calc(var(--fn) - 4px - var(--w)); }
  .dv-fp-pin .v, .dv-fp-pin .nm { display: none; }
  .dv-fp-50 { --t: var(--tn); }
  .dv-fp-mz { right: 6px; }
  .dv-fp-med { right: 14px; }
  .dv-fp-med b { font-size: var(--t-body); }
}

/* ---------- filters: age-group chips and the name filter ----------
   Two sibling GET forms, both form.results-filters (the analytics hook). results.css's generic .results-filters
   rules (a ruled flex row, yellow full-width buttons under 480 px) are reset for both; each is styled on its own
   class (.dv-chips, .dv-namef). */
.dv-filters { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.dv-page form.results-filters { margin: 0; padding: 0; border: 0; }
.dv-page form.dv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dv-page .dv-chips button { display: inline-flex; align-items: center; width: auto; height: auto; min-height: 44px; padding: 0 14px; background: none; border: 1px solid var(--line-strong); border-radius: 0; font: 500 var(--t-small)/1 var(--sans); color: var(--muted-strong); white-space: nowrap; cursor: pointer; }
.dv-page .dv-chips button span { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dv-page .dv-chips button:hover { border-color: var(--foreground); color: var(--foreground); }
.dv-page .dv-chips button[aria-current] { border-color: var(--foreground); color: var(--foreground); box-shadow: inset 0 -2px 0 var(--accent-text); }
.dv-page .dv-chips button[aria-current] span { color: var(--accent-text); }
.dv-page .dv-chips button:focus-visible, .dv-clear:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.dv-page form.dv-namef { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; }
.dv-namef-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.dv-page form.dv-namef label { display: block; min-width: 0; flex: none; }
.dv-namef-row { display: flex; }
.dv-page form.dv-namef input { width: 240px; max-width: 100%; height: 46px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 0; color: var(--foreground); font: 400 var(--t-body)/1 var(--sans); }
.dv-page form.dv-namef input::placeholder { color: var(--muted); }
.dv-page form.dv-namef input:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -1px; }
.dv-page form.dv-namef button { flex: none; width: auto; height: 46px; padding: 0 18px; border: 0; border-radius: 0; background: var(--accent); color: var(--ink); font: 600 var(--t-small)/1 var(--sans); cursor: pointer; }
.dv-page form.dv-namef button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.dv-clear { font-size: var(--t-small); line-height: 1.35; color: var(--muted-strong); }
/* a wrapped name filter stays on the right on every division (Men's ten chips fill the row) */
@media (min-width: 761px) { .dv-page form.dv-namef { margin-left: auto; } }
/* The coverage line and the shown count are the honesty markers of the table: body size, not fine print (at 15 px
   a one- or few-result division fell under the 17 px+ share: 13.5% at 390 for Izmir Adaptive Women). */
.dv-page .dv-cov, .dv-page .dv-shown { font-size: var(--t-body); line-height: 1.45; color: var(--muted-strong); }
.dv-page .dv-shown { margin-top: 18px; }
@media (max-width: 760px) {
  .dv-page form.dv-namef { flex: 1 1 100%; }
  .dv-page form.dv-namef input { flex: 1; width: auto; min-width: 0; }
}

/* ---------- the table: gap to the winner and the race line ---------- */
.dv-rt { margin-top: 12px; }
.dv-rt-h, .dv-rt-r { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 6.5em 280px; gap: 18px; align-items: center; }
.dv-rt-h { padding: 0 0 10px; border-bottom: 1px solid var(--line-strong); }
.dv-rt-h span:nth-child(3) { text-align: right; }
.dv-rt-r { min-height: var(--row); padding: 8px 0; border-bottom: 1px solid var(--line); }
.dv-rk { font-size: var(--t-data); line-height: 1; color: var(--muted-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-ath { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.dv-ath a { color: var(--foreground); text-decoration: none; font-size: var(--t-body); line-height: 1.3; overflow-wrap: anywhere; }
.dv-ath a:hover { text-decoration: underline; }
.dv-ath a:focus-visible, .dv-rl-on:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.dv-ath small { font-size: var(--t-small); line-height: 1.35; color: var(--muted); }
.dv-gp { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.dv-gp b { font: 400 var(--t-data)/1.1 var(--sans); font-variant-numeric: tabular-nums; color: var(--foreground); white-space: nowrap; }
.dv-gp b.dv-st { font-size: var(--t-body); color: var(--muted-strong); }
.dv-gp small { font-size: var(--t-small); line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-win .dv-rk, .dv-win .dv-gp b { color: var(--accent-text); }
.dv-q { background: var(--accent); color: var(--ink); padding: 0 .08em; }
.dv-rl { position: relative; display: flex; align-items: center; min-height: 40px; text-decoration: none; }
.dv-rl svg { display: block; width: 100%; height: 40px; overflow: visible; }
.dv-rl-dash { flex: 1; border-top: 1.5px dashed var(--line-strong); }
.dv-rl-t { position: absolute; left: 0; top: 50%; transform: translateY(-50%); padding-right: 10px; background: var(--canvas); font-size: var(--t-small); line-height: 1.3; color: var(--muted-strong); }
.dv-bx { vector-effect: non-scaling-stroke; }
.dv-bx--stn { fill: var(--dv-stn); stroke: var(--dv-stn); }
.dv-bx--run, .dv-bx--rx { fill: none; stroke: var(--line-strong); }
.dv-bx--rx { stroke-dasharray: 3 2; }
.dv-rl .dv-ln { fill: none; stroke: var(--foreground); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dv-rl-on:hover .dv-ln { stroke: var(--accent-text); }
@media (max-width: 760px) {
  .dv-rt-h, .dv-rt-r { grid-template-columns: 2.4em minmax(0, 1fr) 5.2em; gap: 10px; }
  .dv-rt-h .dv-rt-lh { display: none; }
  .dv-rt-r:not(.dv-has-line) .dv-ln { display: none; }
  .dv-rt-r.dv-has-line .dv-ln { grid-column: 1 / -1; }
}

/* ---------- paging, states and the freshness note (results.css's 12 px mono roles, resized to the scale) ---------- */
.dv-page .results-pagination { margin: 28px 0 0; font: 400 var(--t-small)/1.2 var(--sans); color: var(--muted-strong); }
.dv-page .results-pagination a { padding: 12px 0; color: var(--accent-text); }
.dv-page .results-pagination a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.dv-page .results-empty { margin-top: 24px; padding: 32px 0; }
.dv-page .results-empty h2 { font: 600 var(--t-h3)/1.15 var(--sans); color: var(--foreground); }
.dv-page .results-empty p { font-size: var(--t-body); }
.dv-page .results-source { margin: 48px 0 0; font: 400 var(--t-small)/1.5 var(--sans); color: var(--muted); }
