/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 0.1.0                 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2026 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/

/*
 * ROUNDS: the list, the round page, the comparison, and the card on an
 * activity page. Built from shared/web_mockups/rounds/, class for class:
 * the mockup's rm-* is tl-rd-* here, and nothing else was renamed.
 *
 * FASTER AND SLOWER ARE BLUE AND RED. The theme's success green against its
 * danger red fails deuteranopia (dE 5.9); blue against red passes every
 * check on both faces (dE 20.7 day, 17+ night). Both always travel with a
 * sign or a word, never colour alone. Ochre stays ascent-only and orange
 * stays live and buttons only, as the theme demands.
 *
 * NO <small> WHERE THE SIZE MATTERS. style.css sets small { font-size:
 * 0.875em !important }, which no class can beat; a caption under a big
 * number is a span with its own class.
 */

:root,
[data-bs-theme="light"] {
  --tl-rd-fast: #1D6BB0;
  --tl-rd-slow: #B8322A;
  --tl-rd-ground: #E7E4D6;
}

[data-bs-theme="dark"] {
  --tl-rd-fast: #4C94D6;
  --tl-rd-slow: #E06A58;
  --tl-rd-ground: #26261D;
}

/* ------------------------------------------------------------- the page */

.tl-rd-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.75rem var(--tl-page-gutter, 1.25rem) 5rem;
}

.tl-rd-crumb {
  font-family: var(--tl-font-mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--tl-dim); margin-bottom: 1rem;
}
.tl-rd-crumb a { color: var(--tl-muted); text-decoration: none; }
.tl-rd-crumb a:hover { color: var(--tl-accent); }

.tl-rd-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.tl-rd-sportchip {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 24px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--tl-hairline); background: var(--tl-panel);
  font-size: .75rem; font-weight: 600; color: var(--tl-ink);
}
.tl-rd-sportchip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--tl-rd-sport, var(--tl-sport-running, #D4674A));
}

/* Sections: a kicker, a question as the title, one sentence of answer. */
.tl-rd-sec { margin-top: 2.75rem; }
.tl-rd-sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: .75rem 1.5rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.tl-rd-kicker {
  font-family: var(--tl-font-mono); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--tl-dim);
}
.tl-rd-h2 {
  margin: .3rem 0 0;
  font-family: var(--tl-font-display); font-weight: 800;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -.02em; line-height: 1.1;
  color: var(--tl-ink);
}
.tl-rd-answer {
  margin: .45rem 0 0; max-width: 68ch;
  font-size: 1rem; line-height: 1.5; color: var(--tl-muted);
}
.tl-rd-answer strong { color: var(--tl-ink); font-weight: 650; }

.tl-rd-card {
  background: var(--tl-panel); border: 1px solid var(--tl-hairline);
  border-radius: 10px; padding: 1.25rem 1.35rem;
  min-width: 0;
}
.tl-rd-card-title {
  font-weight: 700; font-size: 1rem; color: var(--tl-ink); margin: 0;
}
.tl-rd-card-sub { font-size: .86rem; color: var(--tl-muted); margin: .25rem 0 0; line-height: 1.45; }

.tl-rd-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tl-rd-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) {
  .tl-rd-grid-2, .tl-rd-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------- the hero */

.tl-rd-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1rem; margin-top: 1.5rem;
}
@media (max-width: 980px) { .tl-rd-hero { grid-template-columns: minmax(0, 1fr); } }

.tl-rd-map {
  position: relative; overflow: hidden;
  background: var(--tl-rd-ground);
  border: 1px solid var(--tl-hairline); border-radius: 10px;
  min-height: 360px;
}
.tl-rd-map-legend {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
  padding: 7px 10px; border-radius: 8px;
  background: color-mix(in srgb, var(--tl-panel) 92%, transparent);
  border: 1px solid var(--tl-hairline);
  font-family: var(--tl-font-mono); font-size: .66rem; letter-spacing: .06em; color: var(--tl-muted);
}
.tl-rd-map-cap {
  position: absolute; left: 12px; bottom: 12px;
  padding: 5px 9px; border-radius: 6px;
  background: color-mix(in srgb, var(--tl-panel) 92%, transparent);
  border: 1px solid var(--tl-hairline);
  font-family: var(--tl-font-mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--tl-muted);
}


/* The headline card beside the map. */
.tl-rd-verdict { display: flex; flex-direction: column; gap: 1.1rem; }
.tl-rd-big-label { font-family: var(--tl-font-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tl-dim); }
.tl-rd-big {
  font-family: var(--tl-font-display); font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 3.6rem); letter-spacing: -.035em; line-height: .95;
  color: var(--tl-ink); margin-top: .35rem;
}
.tl-rd-big-unit { font-size: 1.1rem; font-weight: 700; letter-spacing: 0; margin-left: .5rem; color: var(--tl-muted); }
.tl-rd-when { font-size: .88rem; color: var(--tl-muted); margin-top: .35rem; }

.tl-rd-facts { display: grid; gap: 0; border-top: 1px solid var(--tl-hairline); }
.tl-rd-fact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--tl-hairline);
}
.tl-rd-fact-k { font-weight: 650; font-size: .92rem; color: var(--tl-ink); }
.tl-rd-fact-v { font-family: var(--tl-font-mono); font-weight: 600; font-size: 1.05rem; color: var(--tl-ink); text-align: right; font-variant-numeric: tabular-nums; }
.tl-rd-fact-note { grid-column: 1 / -1; font-size: .8rem; color: var(--tl-muted); line-height: 1.4; }

.tl-rd-target {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .85rem 1rem; border-radius: 8px;
  background: var(--tl-paper-deep, #EFEDE2); border: 1px solid var(--tl-hairline);
  font-size: .88rem; color: var(--tl-muted); line-height: 1.45;
}
.tl-rd-target i { color: var(--tl-accent); margin-top: .15rem; }
.tl-rd-target strong { color: var(--tl-ink); }

/* ---------------------------------------------------- faster and slower */

.tl-rd-fast { color: var(--tl-rd-fast); }
.tl-rd-slow { color: var(--tl-rd-slow); }
.tl-rd-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 650; white-space: nowrap;
  border: 1px solid var(--tl-hairline); background: var(--tl-panel); color: var(--tl-ink);
}
.tl-rd-pill.is-fast { color: var(--tl-rd-fast); border-color: color-mix(in srgb, var(--tl-rd-fast) 35%, var(--tl-hairline)); background: color-mix(in srgb, var(--tl-rd-fast) 8%, var(--tl-panel)); }
.tl-rd-pill.is-slow { color: var(--tl-rd-slow); border-color: color-mix(in srgb, var(--tl-rd-slow) 35%, var(--tl-hairline)); background: color-mix(in srgb, var(--tl-rd-slow) 8%, var(--tl-panel)); }
.tl-rd-pill.is-best { color: var(--tl-accent-ink, #F3F2EC); background: var(--tl-accent); border-color: var(--tl-accent); }

/* Diverging steps: three each way and a neutral middle. */
.tl-rd-d-f3 { background: color-mix(in oklab, var(--tl-rd-fast) 46%, var(--tl-panel)); }
.tl-rd-d-f2 { background: color-mix(in oklab, var(--tl-rd-fast) 28%, var(--tl-panel)); }
.tl-rd-d-f1 { background: color-mix(in oklab, var(--tl-rd-fast) 13%, var(--tl-panel)); }
.tl-rd-d-0  { background: var(--tl-panel); }
.tl-rd-d-s1 { background: color-mix(in oklab, var(--tl-rd-slow) 13%, var(--tl-panel)); }
.tl-rd-d-s2 { background: color-mix(in oklab, var(--tl-rd-slow) 28%, var(--tl-panel)); }
.tl-rd-d-s3 { background: color-mix(in oklab, var(--tl-rd-slow) 46%, var(--tl-panel)); }

.tl-rd-scale { display: inline-flex; align-items: center; gap: 2px; font-family: var(--tl-font-mono); font-size: .66rem; color: var(--tl-muted); }
.tl-rd-scale span.sw { width: 22px; height: 12px; border-radius: 2px; border: 1px solid var(--tl-hairline); }
.tl-rd-scale em { font-style: normal; margin: 0 .45rem; }

/* ------------------------------------------------------------ the charts */

.tl-rd-chart { position: relative; width: 100%; }
.tl-rd-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tl-rd-grid line { stroke: var(--tl-hairline); stroke-width: 1; }
.tl-rd-axis text, .tl-rd-tick { font-family: var(--tl-font-mono); font-size: 10.5px; fill: var(--tl-dim); font-variant-numeric: tabular-nums; }
.tl-rd-axis-title { font-family: var(--tl-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; fill: var(--tl-dim); }
.tl-rd-zero { stroke: var(--tl-muted); stroke-width: 1; }
.tl-rd-band { fill: var(--tl-ink); opacity: .06; }
.tl-rd-band-line { stroke: var(--tl-muted); stroke-width: 1.5; }
.tl-rd-band-lbl { font-family: var(--tl-font-mono); font-size: 10.5px; fill: var(--tl-muted); }
.tl-rd-best-step { fill: none; stroke: var(--tl-accent); stroke-width: 2; }
.tl-rd-trend { fill: none; stroke: var(--tl-ink); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
.tl-rd-dot { fill: var(--tl-ink); stroke: var(--tl-panel); stroke-width: 2; }
.tl-rd-dot.is-best { fill: var(--tl-accent); }
.tl-rd-dot.is-here { fill: var(--tl-panel); stroke: var(--tl-ink); stroke-width: 2.5; }
.tl-rd-dot-halo { fill: none; stroke: var(--tl-ink); stroke-width: 1; opacity: .35; }
.tl-rd-lbl { font-family: var(--tl-font-mono); font-size: 10.5px; font-weight: 600; fill: var(--tl-ink); paint-order: stroke; stroke: var(--tl-panel); stroke-width: 3px; }
.tl-rd-lbl.is-muted { fill: var(--tl-muted); font-weight: 500; }
.tl-rd-line { fill: none; stroke: var(--tl-ink); stroke-width: 2; stroke-linejoin: round; }
.tl-rd-area-fast { fill: var(--tl-rd-fast); opacity: .22; }
.tl-rd-area-slow { fill: var(--tl-rd-slow); opacity: .22; }
.tl-rd-line-fast { fill: none; stroke: var(--tl-rd-fast); stroke-width: 2; }
.tl-rd-line-slow { fill: none; stroke: var(--tl-rd-slow); stroke-width: 2; }
.tl-rd-profile { fill: var(--tl-muted); opacity: .16; }
.tl-rd-profile-line { fill: none; stroke: var(--tl-muted); stroke-width: 1.5; opacity: .7; }
.tl-rd-bar { fill: var(--tl-muted); }
.tl-rd-bar.is-here { fill: var(--tl-ink); }
.tl-rd-cross { stroke: var(--tl-ink); stroke-width: 1; opacity: .5; }
.tl-rd-hit { fill: transparent; cursor: crosshair; }
.tl-rd-kmline { stroke: var(--tl-hairline); stroke-width: 1; }

.tl-rd-legend {
  display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center;
  margin-top: .75rem; font-size: .8rem; color: var(--tl-muted);
}
.tl-rd-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.tl-rd-key { display: inline-block; flex: none; }
.tl-rd-key.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tl-ink); }
.tl-rd-key.dot.best { background: var(--tl-accent); }
.tl-rd-key.ring { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--tl-ink); }
.tl-rd-key.step { width: 18px; height: 2px; background: var(--tl-accent); }
.tl-rd-key.band { width: 18px; height: 10px; background: var(--tl-ink); opacity: .1; border-top: 1.5px solid var(--tl-muted); }
.tl-rd-key.trend { width: 18px; border-top: 1.5px dashed var(--tl-ink); opacity: .7; }
.tl-rd-key.fast { width: 14px; height: 10px; background: var(--tl-rd-fast); opacity: .5; border-radius: 2px; }
.tl-rd-key.slow { width: 14px; height: 10px; background: var(--tl-rd-slow); opacity: .5; border-radius: 2px; }
.tl-rd-key.profile { width: 14px; height: 10px; background: var(--tl-muted); opacity: .3; border-radius: 2px; }

.tl-rd-tip {
  position: fixed; z-index: 3000; pointer-events: none;
  min-width: 170px; max-width: 260px;
  padding: .6rem .75rem; border-radius: 8px;
  background: var(--tl-ink); color: var(--tl-paper);
  font-size: .8rem; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tl-rd-tip.is-on { opacity: 1; transform: none; }
.tl-rd-tip b { display: block; font-weight: 700; margin-bottom: .15rem; }
.tl-rd-tip .m { font-family: var(--tl-font-mono); font-variant-numeric: tabular-nums; }
.tl-rd-tip .tl-rd-fast, .tl-rd-tip .tl-rd-slow { filter: brightness(1.55) saturate(.9); }
[data-bs-theme="dark"] .tl-rd-tip .tl-rd-fast, [data-bs-theme="dark"] .tl-rd-tip .tl-rd-slow { filter: brightness(.7); }

.tl-rd-note-muted { font-size: .8rem; color: var(--tl-dim); margin-top: .6rem; line-height: 1.45; }

/* ---------------------------------------------------------- the heatmap */

.tl-rd-heat-wrap { overflow-x: auto; }
.tl-rd-heat { width: 100%; border-collapse: separate; border-spacing: 2px; min-width: 720px; }
.tl-rd-heat th, .tl-rd-heat td { font-family: var(--tl-font-mono); font-variant-numeric: tabular-nums; }
.tl-rd-heat thead th { vertical-align: bottom; padding: 0 0 .4rem; font-weight: 500; text-align: center; }
.tl-rd-heat thead th:first-child, .tl-rd-heat tbody th, .tl-rd-heat tfoot th { text-align: left; }
.tl-rd-heat-km { display: block; font-size: .78rem; font-weight: 700; color: var(--tl-ink); }
.tl-rd-heat-terrain { display: block; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tl-dim); margin-top: .1rem; }
.tl-rd-heat-up { display: block; font-size: .7rem; margin-top: .1rem; }
.tl-rd-heat-prof { display: block; margin: .35rem auto 0; width: 100%; height: 38px; }
.tl-rd-heat tbody th, .tl-rd-heat tfoot th {
  padding: 0 .75rem 0 0; font-size: .78rem; font-weight: 500; color: var(--tl-muted); white-space: nowrap;
}
.tl-rd-heat tbody th a { color: var(--tl-ink); text-decoration: none; font-weight: 600; }
.tl-rd-heat tbody th a:hover { color: var(--tl-accent); }
.tl-rd-heat td {
  height: 38px; padding: 0 .5rem; border-radius: 3px;
  text-align: center; font-size: .82rem; color: var(--tl-ink);
  border: 1px solid transparent;
}
.tl-rd-heat td.tl-rd-d-0 { border-color: var(--tl-hairline); }
.tl-rd-heat td.tl-rd-heat-total { background: none; border: 0; text-align: right; font-weight: 700; padding-left: 1rem; }
.tl-rd-heat-tag { margin-left: .45rem; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tl-dim); font-weight: 500; }
.tl-rd-heat-len { font-weight: 500; color: var(--tl-dim); font-size: .72rem; }
/* Past HEAT_ROWS the older runs fold away until asked for. */
.tl-rd-heat tr.is-folded { display: none; }
.tl-rd-heat.is-open tr.is-folded { display: table-row; }
.tl-rd-heat tfoot th, .tl-rd-heat tfoot td { padding-top: .35rem; }
.tl-rd-heat tfoot tr:first-child th, .tl-rd-heat tfoot tr:first-child td { border-top: 0; }
.tl-rd-heat tfoot td { background: var(--tl-paper-deep, #EFEDE2); color: var(--tl-muted); font-weight: 600; }
.tl-rd-heat tfoot tr.is-bestrow td { color: var(--tl-accent); }
.tl-rd-heat tfoot td.tl-rd-heat-total { background: none; color: var(--tl-ink); }

/* -------------------------------------------------------------- records */

.tl-rd-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--tl-hairline); border: 1px solid var(--tl-hairline); border-radius: 10px; overflow: hidden; }
.tl-rd-record { background: var(--tl-panel); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.tl-rd-record-k { font-family: var(--tl-font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-dim); }
.tl-rd-record-v { font-family: var(--tl-font-display); font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; line-height: 1; color: var(--tl-ink); }
.tl-rd-record-v.tl-ascent { color: var(--tl-terra); }
.tl-rd-record-n { font-size: .8rem; color: var(--tl-muted); }

/* ------------------------------------------------------------ the table */

.tl-rd-table-wrap { overflow-x: auto; border: 1px solid var(--tl-hairline); border-radius: 10px; background: var(--tl-panel); }
.tl-rd-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.tl-rd-table th {
  padding: .7rem .9rem; text-align: left; white-space: nowrap;
  font-family: var(--tl-font-mono); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tl-dim); border-bottom: 1px solid var(--tl-hairline); background: var(--tl-paper-deep, #EFEDE2);
}
.tl-rd-table th .tl-rd-th-help { display: block; font-family: var(--bs-body-font-family); text-transform: none; letter-spacing: 0; font-size: .7rem; font-weight: 400; color: var(--tl-dim); margin-top: .1rem; }
.tl-rd-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--tl-hairline); font-size: .88rem; vertical-align: middle; }
.tl-rd-table tr:last-child td { border-bottom: 0; }
.tl-rd-table td.m { font-family: var(--tl-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-rd-table td.num, .tl-rd-table th.num { text-align: right; }
.tl-rd-table tr.is-picked td { background: color-mix(in srgb, var(--tl-accent) 7%, var(--tl-panel)); }
.tl-rd-table a { color: var(--tl-ink); font-weight: 650; text-decoration: none; }
.tl-rd-table a:hover { color: var(--tl-accent); }
.tl-rd-table .tl-rd-sub { display: block; font-size: .76rem; color: var(--tl-dim); font-weight: 400; margin-top: .1rem; }
.tl-rd-approx { color: var(--tl-dim); margin-right: .1rem; }
.tl-rd-flag { display: inline-block; font-size: .72rem; color: var(--tl-muted); background: var(--tl-paper-deep, #EFEDE2); border-radius: 4px; padding: .05rem .4rem; margin-top: .2rem; }
.tl-rd-pick { width: 18px; height: 18px; accent-color: var(--tl-accent); cursor: pointer; }

.tl-rd-comparebar {
  position: sticky; bottom: 1rem; z-index: 50;
  display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between;
  margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px;
  background: var(--tl-ink); color: var(--tl-paper);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  font-size: .9rem;
}
.tl-rd-comparebar .tl-btn-accent { background: var(--tl-paper); color: var(--tl-ink); border-color: var(--tl-paper); }

/* -------------------------------------------------------------- compare */

.tl-rd-picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem;
  padding: .85rem 1rem; border: 1px solid var(--tl-hairline); border-radius: 10px; background: var(--tl-panel);
}
.tl-rd-picker select {
  height: 38px; padding: 0 2.2rem 0 .8rem; border-radius: 8px;
  border: 1px solid var(--tl-hairline-strong, #C9C5B2); background-color: var(--tl-paper);
  color: var(--tl-ink); font-size: .9rem; font-weight: 600;
}
.tl-rd-picker-vs { font-family: var(--tl-font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-dim); }
.tl-rd-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: .35rem; }
.tl-rd-swatch.run { background: var(--tl-ink); }
.tl-rd-swatch.ref { background: var(--tl-panel); border: 2.5px solid var(--tl-ink); }

.tl-rd-duel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--tl-hairline); border-radius: 10px; overflow: hidden; background: var(--tl-hairline); gap: 1px; }
.tl-rd-duel > div { background: var(--tl-panel); padding: .7rem 1rem; display: flex; align-items: center; min-width: 0; }
.tl-rd-duel .h { background: var(--tl-paper-deep, #EFEDE2); font-family: var(--tl-font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-dim); }
.tl-rd-duel .k { font-size: .88rem; color: var(--tl-muted); flex-direction: column; align-items: flex-start; justify-content: center; }
.tl-rd-duel-sub { display: block; font-size: .74rem; color: var(--tl-dim); }
.tl-rd-duel .v { font-family: var(--tl-font-mono); font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; gap: .5rem; flex-wrap: wrap; }
.tl-rd-duel .v .d { font-size: .78rem; font-weight: 600; }

.tl-rd-scrub { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-top: 1px solid var(--tl-hairline); background: var(--tl-panel); }
.tl-rd-scrub input[type=range] { flex: 1; accent-color: var(--tl-ink); }
.tl-rd-scrub output { font-family: var(--tl-font-mono); font-size: .85rem; font-weight: 600; min-width: 5ch; }
.tl-rd-scrub-say { font-size: .84rem; color: var(--tl-muted); padding: .55rem .9rem .8rem; background: var(--tl-panel); }

.tl-rd-splits td .tl-rd-dbar { position: relative; height: 14px; min-width: 160px; }
.tl-rd-dbar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--tl-muted); opacity: .6; }
.tl-rd-dbar i { position: absolute; top: 0; height: 14px; border-radius: 2px; }
.tl-rd-dbar i.f { background: var(--tl-rd-fast); right: 50%; }
.tl-rd-dbar i.s { background: var(--tl-rd-slow); left: 50%; }

/* -------------------------------------------- the card on an activity */

.tl-rd-roundcard { border: 1px solid var(--tl-hairline); border-radius: 12px; background: var(--tl-panel); overflow: hidden; margin-bottom: .75rem; }
.tl-rd-roundcard-head { display: flex; gap: .75rem; align-items: center; padding: .9rem 1rem .8rem; text-decoration: none; border-bottom: 1px solid var(--tl-hairline); }
.tl-rd-roundcard-head:hover .tl-rd-roundcard-name { color: var(--tl-accent); }
.tl-rd-roundcard-icon { width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--tl-rd-sport, #D4674A) 14%, var(--tl-panel)); color: var(--tl-rd-sport, #D4674A); }
.tl-rd-roundcard-icon svg { width: 18px; height: 18px; }
.tl-rd-roundcard-name { display: block; font-weight: 750; color: var(--tl-ink); font-size: .98rem; line-height: 1.2; }
.tl-rd-roundcard-meta { display: block; font-family: var(--tl-font-mono); font-size: .7rem; color: var(--tl-dim); margin-top: .15rem; }
.tl-rd-roundcard-go { margin-left: auto; color: var(--tl-dim); }
.tl-rd-roundcard-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .9rem; }
.tl-rd-roundcard-lead { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.tl-rd-roundcard-time { font-family: var(--tl-font-display); font-weight: 800; font-size: 2.3rem; letter-spacing: -.03em; line-height: .95; color: var(--tl-ink); }
.tl-rd-roundcard-sub { display: block; font-family: var(--tl-font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-dim); font-weight: 500; margin-top: .35rem; }
.tl-rd-roundcard-say { font-size: .88rem; line-height: 1.5; color: var(--tl-muted); margin: 0; }
.tl-rd-roundcard-say strong { color: var(--tl-ink); }
.tl-rd-roundcard-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tl-rd-roundcard-actions .tl-btn { flex: 1 1 auto; justify-content: center; }
.tl-rd-roundcard-explain { font-size: .76rem; color: var(--tl-dim); line-height: 1.45; padding: .7rem 1rem; border-top: 1px solid var(--tl-hairline); background: var(--tl-paper-deep, #EFEDE2); }
.tl-rd-roundcard-explain i { margin-right: .3rem; }

.tl-rd-kmstrip { display: flex; gap: 2px; }
.tl-rd-kmstrip > div { flex: 1 1 0; min-width: 0; border-radius: 4px; padding: .4rem .2rem .35rem; text-align: center; border: 1px solid transparent; }
.tl-rd-kmstrip > div.tl-rd-d-0 { border-color: var(--tl-hairline); }
.tl-rd-kmstrip b { display: block; font-family: var(--tl-font-mono); font-size: .62rem; letter-spacing: .08em; color: var(--tl-muted); font-weight: 600; }
.tl-rd-kmstrip span { display: block; font-family: var(--tl-font-mono); font-size: .78rem; font-weight: 700; color: var(--tl-ink); margin-top: .1rem; }
.tl-rd-mini-k { font-family: var(--tl-font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-dim); margin-bottom: .4rem; display: flex; justify-content: space-between; gap: .5rem; }

.tl-rd-confetti { display: flex; gap: .6rem; align-items: center; padding: .7rem .8rem; border-radius: 8px; background: color-mix(in srgb, var(--tl-accent) 10%, var(--tl-panel)); border: 1px solid color-mix(in srgb, var(--tl-accent) 30%, var(--tl-hairline)); color: var(--tl-ink); font-size: .88rem; }
.tl-rd-confetti i { color: var(--tl-accent); font-size: 1.1rem; }

/* ------------------------------------------------- what only the site has */

/* The site's own map, MapLibre, filling the box the mockup drew in SVG. */
.tl-rd-map-canvas { position: absolute; inset: 0; }
.tl-rd-map-cap, .tl-rd-map-legend { z-index: 2; }
.tl-rd-race { border: 1px solid var(--tl-hairline); border-radius: 10px; overflow: hidden; }
.tl-rd-map.is-race { border: 0; border-radius: 0; min-height: 460px; }

.tl-rd-picker { margin-top: 1.25rem; }
.tl-rd-hero.is-compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
@media (max-width: 980px) { .tl-rd-hero.is-compare { grid-template-columns: minmax(0, 1fr); } }

.tl-rd-h2.is-small { font-size: 1.25rem; }
.tl-rd-answer.is-small { font-size: .9rem; }
.tl-rd-hr-empty { margin: .75rem 0 0; }
.tl-rd-hr-empty i { color: var(--tl-dim); margin-right: .2rem; }
.tl-rd-hr-empty strong { color: var(--tl-ink); }
.tl-rd-unit { font-size: .75em; color: var(--tl-dim); }
.tl-rd-dbar-row { display: flex; align-items: center; gap: .7rem; }
.tl-rd-dbar-row .tl-rd-dbar { flex: 1; }
.tl-rd-dbar-row .tl-mono { min-width: 4.5ch; text-align: right; font-weight: 600; }
.tl-rd-comparebar a:not(.tl-btn) { color: inherit; }

/* Rename, in place of the title. */
.tl-rd-rename { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .35rem; }
.tl-rd-rename input {
  flex: 1 1 18rem; min-width: 0; height: 44px; padding: 0 .8rem;
  border: 1px solid var(--tl-hairline-strong, #C9C5B2); border-radius: 8px;
  background: var(--tl-panel); color: var(--tl-ink);
  font-family: var(--tl-font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em;
}
.tl-rd-rename input:focus { outline: 2px solid var(--tl-accent); outline-offset: 1px; }

/* The share link, opened from the head's Share button. Two states, drawn
   together and switched by data-state: a link, or none yet. */
.tl-rd-share {
  margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--tl-hairline); background: var(--tl-panel);
  display: flex; flex-direction: column; gap: .7rem;
}
.tl-rd-share[hidden] { display: none; }
.tl-rd-share-head { font-weight: 700; color: var(--tl-ink); }
.tl-rd-share-head i { color: var(--tl-accent); margin-right: .2rem; }
.tl-rd-share[data-state="on"] .tl-rd-share-off,
.tl-rd-share[data-state="off"] .tl-rd-share-on { display: none; }
.tl-rd-share-link { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tl-rd-share-link code {
  flex: 1 1 22rem; min-width: 0; overflow-wrap: anywhere;
  padding: .5rem .7rem; border-radius: 8px;
  background: var(--tl-paper); border: 1px solid var(--tl-hairline);
  font-family: var(--tl-font-mono); font-size: .8rem; color: var(--tl-ink);
}
.tl-rd-share-off { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.tl-rd-share-off .tl-rd-card-sub { margin: 0; }
.tl-rd-share-note { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--tl-muted); max-width: 80ch; }

/* The card sits in the Track stats drawer, which is narrower than a page. */
.tl-rounds-panel .tl-rd-roundcard + .tl-rd-roundcard { margin-top: .75rem; }
.tl-rounds-panel .tl-rd-roundcard { margin-bottom: 0; }

/* The list's head uses the kit, and its cards the round card's words. */
.tl-roundcard .tl-rd-roundcard-icon { width: 34px; height: 34px; }

@media (max-width: 640px) {
  .tl-rd-duel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); font-size: .9em; }
}

/* ------------------------------------------------------------- the list */

.tl-roundlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 1px;
  background: var(--tl-hairline);
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius);
  overflow: hidden;
}

.tl-roundcard {
  background: var(--tl-panel);
}

.tl-roundcard a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}

.tl-roundcard a:hover {
  background: var(--tl-white);
}

.tl-roundcard a:hover b {
  color: var(--tl-accent);
}

.tl-roundcard-tx {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.tl-roundcard-figs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
  flex: 0 0 auto;
}

.tl-roundcard-figs span {
  font-size: 0.9375rem;
}

.tl-roundcard-figs small {
  font-size: 0.625rem;
  color: var(--tl-dim);
}

.tl-round-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.tl-round-filter a {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--tl-hairline);
  border-radius: 999px;
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--tl-muted);
}

.tl-round-filter a.is-on {
  background: var(--tl-accent);
  border-color: var(--tl-accent);
  color: var(--tl-accent-ink);
}
