/* Driver Library - every style. Colours are tokens on :root; the light look redefines them.
   The palette (Michael, 11 Oct 2026: "just clean modern colors", to go with the logo): plain
   greys; the buttons, what is picked, the track lines and the bars are black on the light look -
   like the logo's black outlines - and white on the dark one (Michael: "black tracks", no blue).
   The logo's shelf of books is the only colour; the start/finish line is its red.
   Violet stays only for the fastest lap, as on every timing screen (lap analysis, now off);
   green is the other lap and "done"; orange is time lost. System fonts only - nothing is
   downloaded.

   The look (1 Oct 2026, at Michael's request): nothing is boxed or outlined. Words are plain
   words; the tab, choice or filter you are on is the bold one. Cards are a quiet fill, not a
   frame. (A keyboard user still gets a focus ring - it never shows for a tap or a click.) */

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #161618;
  --surface-2: #1c1c1f;
  --surface-3: #2a2a2e;
  --line: #242427;
  --line-2: #3a3a3f;
  --ink: #f5f5f7;
  --dim: #c7c7cc;
  --muted: #9b9ba1;
  --brand: #f5f5f7;
  --brand-2: #f5f5f7;
  --on-brand: #0b0b0c;
  --fast: #a78bfa;
  --tps: #a78bfa;                      /* The Purple Sector's violet - only its name, in "by The Purple Sector" */
  --ref: #34c759;
  --lost: #ff9f0a;
  --danger: #ff6961;
  --a: var(--fast);
  --b: var(--ref);
  --field: #1c1c1f;
  --field-on: #26262a;
  --ghost: #1f1f22;
  --ghost-on: #2a2a2e;
  --shade: rgba(0, 0, 0, 0.72);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --grid-line: rgba(255, 255, 255, 0.02);
  --radius: 14px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* headings use Outfit, The Purple Sector's typeface, where the device already has it - it is
     never downloaded (TPS's rule) - and the system font everywhere else */
  --font-display: 'Outfit', var(--font);
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;
  --tap: 48px;
  --tabs-h: 64px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --surface-3: #e8e8ec;
  --line: #e5e5ea;
  --line-2: #c7c7cc;
  --ink: #111113;
  --dim: #3a3a3c;
  --muted: #6e6e73;
  --brand: #111113;
  --brand-2: #111113;
  --on-brand: #ffffff;
  --fast: #6a49e6;
  --tps: #6a49e6;
  --ref: #1f9d55;
  --lost: #c2700c;
  --danger: #d70015;
  --field: #f2f2f4;
  --field-on: #e8e8ec;
  --ghost: #ececf0;
  --ghost-on: #e2e2e7;
  --shade: rgba(17, 17, 19, 0.42);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --grid-line: rgba(0, 0, 0, 0.03);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
body.bare { padding-bottom: 0; }
a { color: var(--brand-2); }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.label { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.label.brand { color: var(--brand-2); font-weight: 700; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.noscript { padding: 24px; }
.icon { display: inline-flex; flex: none; }
.icon svg { display: block; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.row.wrap { flex-wrap: wrap; }

/* Bold without a jump: a hidden bold copy of the words holds the width, so the row of choices
   doesn't shift when another one is picked. */
.seg button::after, .nav a::after, .tab span::after, .tl::after {
  content: attr(data-text); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: 800; pointer-events: none; user-select: none;
}
.tl { display: inline-block; text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 0;
  font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.08); color: var(--on-brand); }
.btn.ghost { background: var(--ghost); color: var(--ink); }
.btn.ghost:hover { background: var(--ghost-on); color: var(--ink); }
.btn.ghost .icon { color: var(--brand-2); }
.btn.danger { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 19%, transparent); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 20px; font-weight: 700;
}
.icon-btn:hover { background: var(--ghost); color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.link { border: 0; background: none; padding: 0; color: var(--brand-2); cursor: pointer; text-decoration: none; font-weight: 700; }
.link:hover { color: var(--ink); }

/* ---------- fields: a quiet fill, no frame ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.field > span { font-size: 14px; color: var(--dim); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="datetime-local"], input[type="date"], select, textarea, .link-text {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 0;
  background: var(--field); color: var(--ink); caret-color: var(--brand);
}
textarea { resize: vertical; min-height: 80px; }
/* (not a slider: a focused slider painted its own grey over the video bar's black fill, so after
   any drag the bar looked grey the whole way - Michael, 12 Oct 2026) */
input:not([type="range"]):focus, select:focus, textarea:focus { outline: none; background: var(--field-on); }
/* the sign-in boxes are white with a thin edge, like the Google button above them (Michael, 14
   Oct 2026: "make the email box white"); typing in one, its edge turns black */
.signin-email input { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--line); }
.signin-email input:focus { background: var(--surface); box-shadow: 0 0 0 1.5px var(--ink); }
.link-text { font: 13px var(--mono); margin: 6px 0; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }

/* a choice of a few: plain words, the chosen one bold */
.seg { display: inline-flex; flex-wrap: wrap; column-gap: 22px; row-gap: 2px; }
.seg button { display: inline-block; min-height: 40px; padding: 8px 0; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 15px; text-align: center; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { color: var(--ink); font-weight: 800; }

/* small words that say what something is - or, as a button, one more choice */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.on { color: var(--ink); font-weight: 800; }
.chip.warn { color: var(--lost); }
button.chip { cursor: pointer; min-height: 40px; font-size: 14px; }
button.chip:hover { color: var(--ink); }
.chips, .chip-row { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 2px; }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); margin: 0 0 14px; }
.banner.warn { background: color-mix(in srgb, var(--lost) 12%, var(--surface)); }
.banner.danger { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.banner .icon { color: var(--brand-2); margin-top: 1px; }
.banner.warn .icon { color: var(--lost); }
.banner.danger .icon { color: var(--danger); }

/* lap times: digits line up; the fastest is violet */
.laptime { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 0.01em; }
.laptime.best { color: var(--fast); }
.laptime.big { font-size: 34px; line-height: 1.1; }

/* ---------- top bar and tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  min-height: 58px; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; letter-spacing: -0.01em; font-size: 17px; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-by { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.brand-by b { font-family: var(--font-display); font-weight: 750; color: var(--tps); }
/* the brand mark: the bookshelf picture in a rounded square */
.logo { display: inline-flex; flex: none; }
.logo img { display: block; border-radius: 22%; }
.nav { display: none; gap: 28px; margin-left: 26px; }
.nav a { display: inline-block; padding: 8px 0; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; text-align: center; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 800; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.who { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; max-width: 46vw; padding: 5px 8px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-decoration: none; text-align: right; line-height: 1.2; cursor: pointer; }
.who:hover { background: var(--ghost); color: var(--ink); }
.who-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.who-role { font-size: 12px; font-weight: 600; color: var(--brand-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500; }
.tab .icon { height: 30px; align-items: center; }
.tab span { display: inline-block; text-align: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active span { font-weight: 800; }
.tab.active .icon { color: var(--brand-2); }

.foot { display: none; }

/* ---------- pages ---------- */
main { display: block; outline: none; }
.page { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; }
.page-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head p { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: var(--muted); text-decoration: none; font-weight: 600; margin: -6px 0 4px -4px; }
.back:hover { color: var(--ink); }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h2 { color: var(--ink); font-size: 20px; }
.empty p { max-width: 42ch; }
/* only the big picture at the top: an icon inside the button keeps the button's own colour (it
   was painted black on the black button - invisible, and it pushed the words off centre) */
.empty > .icon { color: var(--brand-2); }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 220px; color: var(--muted); background: var(--surface); border-radius: var(--radius); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brand); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.hide-phone { display: none; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }

/* lists: rows on one quiet card, a hairline between them */
.list { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 10px 10px 16px; color: var(--ink); text-decoration: none; }
.item + .item { border-top: 1px solid var(--line); }
.item:hover { background: var(--surface-2); color: var(--ink); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-main b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-end { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.item-end .laptime { font-size: 17px; }
.item-end small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.item-end small.fast { color: var(--fast); font-weight: 700; }
.item > .icon { color: var(--muted); }
.track-item .tr-map { width: 60px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* a session in a list: a file-type mark, what it is, what's in it, and its size */
.session-item { padding-left: 12px; }
.kind { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand-2); }
.kind.pic { width: 56px; height: 40px; }
.kind img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-main b .at { margin-left: 8px; font-weight: 500; font-size: 13px; color: var(--muted); }
.item-end .size { font-size: 14px; font-weight: 650; color: var(--dim); font-variant-numeric: tabular-nums; }
/* the whole row (or video tile) opens the session: its link is stretched over it, and Send sits
   on top - shown when the row is pointed at, as Dropbox does; a phone has it on the session's
   page instead */
.session-item, .video-tile, .sent-row { position: relative; }
.row-open { display: block; min-width: 0; color: inherit; text-decoration: none; }
.row-open:hover { color: inherit; }
.row-open b { display: block; }
.row-open::after { content: ''; position: absolute; inset: 0; }
.row-open:focus-visible { outline: none; }
.row-open:focus-visible::after { outline: 2px solid var(--brand-2); outline-offset: -2px; border-radius: 10px; }
.row-link { position: relative; z-index: 1; flex: none; width: 40px; height: 40px; display: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.row-link:hover { background: var(--ghost-on); color: var(--brand-2); }
.vt-link { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; background: rgba(10, 10, 15, 0.72); color: #fff; }
.vt-link:hover { background: rgba(10, 10, 15, 0.92); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .row-link { display: inline-flex; }
  .session-item:hover .row-link, .video-tile:hover .row-link, .row-link:focus-visible { opacity: 1; }
}

/* ---------- welcome ---------- */
.welcome { max-width: 760px; padding-top: 36px; }
.welcome-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 14px; }
.welcome-brand h1 { font-size: 34px; font-weight: 850; letter-spacing: -0.03em; }
.tagline { font-size: 19px; color: var(--brand-2); font-weight: 650; margin: 0; }
/* "by The Purple Sector", small under the name, the maker's name in The Purple Sector's violet */
.by-line { margin: -8px 0 2px; color: var(--muted); font-size: 13px; }
.by-line b { font-family: var(--font-display); font-weight: 750; color: var(--tps); }
.lede { text-align: center; color: var(--dim); max-width: 56ch; margin: 0 auto 24px; }
.welcome-choices { display: grid; gap: 12px; margin-bottom: 18px; }
.welcome-choices.busy { opacity: 0.55; pointer-events: none; }
.welcome-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 18px; border-radius: var(--radius); border: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.welcome-card:hover { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.welcome-card .icon { color: var(--brand-2); }
.welcome-card b { font-size: 18px; }
.welcome-card span { color: var(--muted); }
.welcome-card.own { cursor: default; }
.welcome-card.own:hover { background: var(--surface); }
.welcome-card.own input { margin-top: 8px; }
.welcome-card.own .btn { margin-top: 6px; }

/* signing in (the live site, Michael 5 Oct 2026): Google first and big, an email link under it,
   the demo one tap away - one column in the middle, plain words, no boxes around them */
.signin { max-width: 440px; padding-top: 40px; }

/* the front page (live, signed out - Michael, 14 Oct 2026): the promise and the buttons beside a
   picture of the app, then the three steps, who it is for and what it costs. Plain and short */
.landing { max-width: 1160px; padding-top: 28px; display: grid; gap: 56px; padding-bottom: 56px; }
.landing h1 { font-family: var(--font-display); font-size: clamp(36px, 7vw, 58px); font-weight: 850; letter-spacing: -0.03em; line-height: 1.05; margin: 0; text-wrap: balance; }
.landing h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; align-items: center; }
.landing-words { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.landing-lede { margin: 0; font-size: 19px; line-height: 1.5; color: var(--dim); max-width: 44ch; }
.landing-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.landing-demo { margin: 0; color: var(--muted); }
.landing-demo a { color: var(--ink); font-weight: 700; }
/* the app on a computer and a phone, overlapping (option 3) - the pictures are the real app */
.landing-duo { position: relative; padding: 0 15% 9% 0; min-width: 0; }
.ld-window { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22); }
.ld-bar { height: 30px; background: #ececf0; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.ld-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c7c7cc; display: block; flex: none; }
.ld-bar span { margin-left: 12px; background: #fff; border-radius: 6px; padding: 1px 12px; font-size: 12px; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-window img, .ld-screen img { display: block; width: 100%; height: auto; }
/* a phone as it really looks: a thin metal rim, a black bezel, the screen with its status bar
   (time, camera island, signal, wifi, battery) and home bar, buttons on both sides. Sizes are
   shares of the phone's width (cqw), so it looks the same at any size */
.ld-phone { position: absolute; right: 0; bottom: 0; width: 34%; container-type: inline-size; padding: 1.1%; border-radius: 17% / 8.2%;
  background: linear-gradient(140deg, #8e8e93 0%, #2c2c2e 12%, #1c1c1e 45%, #3a3a3c 80%, #8e8e93 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), 0 26px 50px -8px rgba(0, 0, 0, 0.42), 0 10px 18px -6px rgba(0, 0, 0, 0.25); }
.ld-key { position: absolute; width: 1.6%; background: linear-gradient(90deg, #3a3a3c, #8e8e93); }
.ld-key.k1 { left: -1.1%; top: 15%; height: 4.5%; border-radius: 2px 0 0 2px; }
.ld-key.k2 { left: -1.1%; top: 23%; height: 8.5%; border-radius: 2px 0 0 2px; }
.ld-key.k3 { left: -1.1%; top: 33.5%; height: 8.5%; border-radius: 2px 0 0 2px; }
.ld-key.k4 { right: -1.1%; top: 26%; height: 13%; border-radius: 0 2px 2px 0; background: linear-gradient(90deg, #8e8e93, #3a3a3c); }
.ld-bezel { background: #000; padding: 3.2%; border-radius: 15.5% / 7.4%; }
.ld-screen { position: relative; background: #fff; border-radius: 12.5% / 6%; overflow: hidden; padding-bottom: 6.5cqw; }
.ld-status { display: flex; align-items: center; justify-content: space-between; height: 13cqw; padding: 0 7.5cqw 0 9cqw; color: #000; }
.ld-time { font: 600 5.2cqw/1 -apple-system, 'SF Pro Text', system-ui, sans-serif; letter-spacing: -0.01em; }
.ld-island { position: absolute; left: 50%; top: 3cqw; width: 30cqw; height: 8.8cqw; transform: translateX(-50%); background: #000; border-radius: 99px; }
.ld-icons { display: block; width: 19cqw; height: 3.6cqw; }
.ld-icons svg { display: block; }
.ld-home { position: absolute; left: 50%; bottom: 2cqw; width: 36cqw; height: 1.5cqw; transform: translateX(-50%); background: #000; border-radius: 99px; opacity: 0.85; }
.landing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-step { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.landing-step b { font-size: 18px; }
.landing-step p { margin: 0; color: var(--dim); }
.landing-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink); }
.landing-for p, .landing-price > p { margin: 0 0 16px; font-size: 18px; color: var(--dim); max-width: 60ch; }
/* the plans, side by side (one under another on a phone) */
.landing-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; margin: 6px 0 16px; }
.landing-plan { background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lp-head b { font-size: 18px; }
.lp-soon { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lp-price { margin-top: 6px; color: var(--dim); }
.lp-price strong { font-family: var(--font-display); font-size: 28px; font-weight: 850; color: var(--ink); letter-spacing: -0.02em; }
.lp-year { color: var(--muted); font-size: 13px; }
.lp-space { margin-top: 10px; font-weight: 800; font-size: 17px; }
.landing-plan p { margin: 0; color: var(--dim); font-size: 14px; }
.landing-plan.later { opacity: 0.85; }
.landing-addon { font-size: 15px !important; color: var(--muted) !important; margin-bottom: 0 !important; }
.landing-price .landing-cta { margin: 0 0 22px; }
.head-signin { margin-right: 4px; }
@media (max-width: 760px) {
  .landing { gap: 40px; padding-top: 12px; }
  .landing-hero { grid-template-columns: 1fr; gap: 28px; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-cta .btn { flex: 1 1 200px; }
}
.signin-card { display: flex; flex-direction: column; gap: 14px; }
.signin-card .welcome-brand { margin-bottom: 10px; }
.signin-for { margin: 0; text-align: center; font-weight: 650; }
.signin-for:empty, .signin-note:empty { display: none; }
.signin-note .banner { margin: 0; }
.signin-body { display: flex; flex-direction: column; gap: 14px; }
.btn.wide { width: 100%; }
.btn.google { gap: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--line); }
.btn.google:hover { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); color: var(--ink); }
.btn.google .g-logo { display: inline-flex; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.signin-email { display: flex; flex-direction: column; gap: 10px; }
.signin-email .field { margin: 0; }
.signin-email input { font-size: 17px; min-height: 52px; }
.signin-what { margin: 0; text-align: center; color: var(--dim); font-size: 15px; }
/* the two ways on: create an account, or a password email - plain words, the fewer the better */
.signin-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.signin-links .link { min-height: 44px; font-weight: 650; }
.signin-sent { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 0; }
.signin-sent .icon { color: var(--brand-2); }
.signin-sent h2 { margin: 4px 0 0; font-size: 22px; }
.signin-sent p { margin: 0; }
.demo-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--brand-2); font-weight: 650; }
.page.opening { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 60vh; }
.who-role.save-state { color: var(--muted); font-weight: 600; }
.who-role.save-state.warn { color: var(--lost); }

/* ---------- home ---------- */
.search { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; margin: 4px 0 10px; border-radius: var(--radius); background: var(--field); color: var(--muted); cursor: text; }
.home .search { background: var(--surface); }
.search:focus-within { color: var(--brand-2); }
.search .search-box { flex: 1; min-width: 0; min-height: 50px; padding: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); }
.search .search-box:focus { outline: none; background: transparent; }
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin: 2px 0 4px; }
.view-bar .seg button { font-size: 17px; }
.view-bar .section-title { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; justify-content: flex-end; min-width: 0; margin-left: auto; }
.filter { display: inline-flex; align-items: center; gap: 3px; max-width: 46vw; min-height: 40px; padding: 6px 0; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 15px; cursor: pointer; }
.filter span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter .icon { transform: rotate(90deg); }
.filter:hover { color: var(--ink); }
.filter.on { color: var(--ink); font-weight: 800; }
.summary { margin: 0; }
/* the room used, as a thin bar under the title */
.home-sum { min-width: 0; }
.home-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.home-meter { display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.home-meter:hover { color: var(--ink); }
.hm-bar { width: 72px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: none; }
.hm-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand-2); }
.home-meter.lvl1 .hm-bar i, .home-meter.lvl2 .hm-bar i { background: var(--lost); }
.home-meter.lvl3 .hm-bar i { background: var(--danger); }
.home-meter small { font-size: 13px; font-variant-numeric: tabular-nums; }

/* the order of what is listed */
.sort-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0 14px; margin: -2px 0 10px; }
.sort-row .label { font-size: 11px; }
.sort-row .seg { column-gap: 16px; }
.sort-row .seg button { min-height: 36px; padding: 6px 0; font-size: 14px; }

/* tracks as cards: the shape (just the line - nothing lit up around it), what is kept from
   there, its share of the library */
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.track-card { display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; overflow: hidden; transition: background 0.15s, transform 0.15s; }
.track-card:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); transform: translateY(-1px); }
.tc-map { position: relative; height: 124px; display: flex; align-items: center; justify-content: center; padding: 22px 28px 4px; color: var(--muted); }
.tc-map .map.mini .map-track { stroke: var(--brand-2); stroke-width: 3; }
.tc-tag { position: absolute; left: 14px; top: 11px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-2); }
.tc-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.tc-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.tc-title b { min-width: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-size { flex: none; font-weight: 750; color: var(--dim); font-variant-numeric: tabular-nums; }
.tc-where { margin-top: -10px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tc-stats div { display: flex; flex-direction: column; min-width: 0; }
.tc-stats b { font-size: 19px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tc-stats span { font-size: 10.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-who { display: flex; align-items: center; gap: 6px; margin-top: -2px; color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-who .icon { color: var(--brand-2); }
.tc-share { display: flex; flex-direction: column; gap: 6px; }
.tc-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.tc-bar i { display: block; height: 100%; border-radius: 2px; background: var(--brand-2); }
.tc-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }

/* a test day: the track's shape, when and where, and its size */
/* a test day that folds: tap its date; the arrow turns down when it is open */
.fold { margin-top: 12px; }
.fold-head { display: flex; align-items: center; gap: 6px; }
.fold-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 2px 10px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.fh-caret { flex: none; display: inline-flex; color: var(--muted); transition: transform 0.15s; }
.fold.open .fh-caret { transform: rotate(90deg); }
.fold-toggle:hover .gh-text b, .fold-toggle:hover .fd-text b { color: var(--brand-2); }
.fh-open { flex: none; padding: 6px 2px 10px 8px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.fh-open:hover { color: var(--brand-2); }
.fb-right { display: flex; align-items: center; gap: 0 18px; margin-left: auto; }
.fold-all { color: var(--dim); font-weight: 600; min-height: 36px; }
.fold-all:hover { color: var(--ink); }
@media (max-width: 440px) { .fold-toggle .gh-map { display: none; } }
.fd-text { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.fd-text b { font-size: 16px; font-weight: 750; }
.fd-text small { color: var(--muted); font-size: 13px; }
.group { margin-top: 14px; }
.gh-map { width: 50px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; }
.gh-icon { width: 40px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--brand-2); }
.gh-map .map.mini .map-track { stroke: var(--brand-2); stroke-width: 2; }
.gh-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gh-text b { font-size: 17px; font-weight: 750; }
.gh-text small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group.latest .gh-text b { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.gh-size { flex: none; align-self: flex-end; font-weight: 750; color: var(--dim); font-variant-numeric: tabular-nums; }
.results .list { margin-bottom: 8px; }
.no-results { padding: 24px 4px; }
.more { width: 100%; margin-top: 16px; }

/* test days as cards (Michael, 3 Oct 2026): tap one to open the day. Two across on a phone,
   more on a wide screen, under a heading for each year; a quiet fill, never a frame */
/* a year folds like the last day (Michael, 5 Oct 2026): tap its heading */
.year { margin-top: 14px; }
.year > .fold-head { margin: 0; font-size: inherit; font-weight: inherit; }
.year-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.year-head small { font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.fold-toggle:hover .year-head { color: var(--brand-2); }
.day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.day-card { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; text-decoration: none;
  overflow: hidden; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.day-card:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); transform: translateY(-1px); }
.dc-pic { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 26%, var(--surface-2)), var(--surface-2) 70%); }
.dc-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* on Home the picture is the track's own shape (or, for a car, a car) */
.dc-pic.shape { aspect-ratio: 16 / 10; padding: 16px 20px 2px; background: none; color: var(--brand-2); }
.dc-pic.shape .map.mini .map-track { stroke: var(--brand-2); stroke-width: 2.6; }
.dc-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 12px 12px; }
.dc-body b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-body small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-body .dc-track { color: var(--dim); font-weight: 600; }
.dc-body .dc-size { color: var(--dim); font-weight: 650; font-variant-numeric: tabular-nums; }
/* the newest day, open above the cards: tap its heading to fold it; "Open" opens the day's own
   page - on one line with its size, at the foot of the heading */
.open-day > .fold-head { align-items: flex-end; }
/* folded, its "Open" goes: beside "Open all" it read as "unfold this", and went to another page */
.open-day:not(.open) > .fold-head .fh-open { display: none; }
.open-day .files-view .kind-tabs { margin-top: 0; }
@media (min-width: 600px) { .day-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
/* tracks as small cards on Home (Michael, 7 Oct 2026), under the big last-visited one */
.track-grid + .track-tiles { margin-top: 12px; }
.track-tiles .dc-pic.shape { aspect-ratio: 16 / 9; }
/* a new library's example: the real cards, faded, not tappable (Michael, 14 Oct 2026) */
.example-library .section-title { margin: 8px 0 2px; }
.ex-note { margin: 0 0 12px; font-size: 14px; }
.example { opacity: 0.62; pointer-events: none; }
/* a new library's popular tracks: one row of six on a computer (none left alone on a second row) */
.starter-tracks .section-title { margin-top: 26px; }
@media (min-width: 960px) { .starter-tracks .track-tiles, .landing-tracks .track-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* the front page's tracks, and every track (Michael, 14 Oct 2026) */
.landing-tracks > p { margin: 0 0 16px; font-size: 18px; color: var(--dim); max-width: 60ch; }
.landing-tracks .btn { margin-top: 14px; }
.tracks-country .section-title { margin-top: 22px; }
.track-info .item[aria-current="page"] b { font-weight: 850; }
.track-start { margin-top: 26px; padding: 22px; border-radius: var(--radius); background: var(--surface); }
.track-start h2 { font-size: 20px; margin: 0 0 6px; }
.track-start p { margin: 0 0 14px; }

/* ---------- maps ---------- */
.map { display: block; width: 100%; height: auto; }
.map.mini { width: 100%; height: 100%; }
.map-track { fill: none; stroke: var(--line-2); stroke-width: 14; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map.mini .map-track { stroke: var(--dim); stroke-width: 2.4; }
.map-trace polyline { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-sf { stroke: var(--danger); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map.mini .map-sf { stroke-width: 3; }
.map-sf-back { stroke: #fff; stroke-width: 8; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.85; }
.map-sector { stroke: var(--lost); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-dot { stroke: var(--surface); stroke-width: 4; vector-effect: non-scaling-stroke; }
.map-dot.a { fill: var(--a); }
.map-dot.b { fill: var(--b); }
.map.pickable { cursor: crosshair; }
.pick-map { background: var(--surface-2); border-radius: 12px; margin-bottom: 10px; }

/* ---------- track and test day: the shape, the numbers, then Videos | Data ---------- */
.track-hero { display: flex; align-items: center; gap: 16px; margin: 2px 0 14px; }
.th-outline { width: 112px; height: 84px; flex: none; display: flex; align-items: center; justify-content: center; }
.th-outline .map.mini .map-track { stroke: var(--brand-2); stroke-width: 3; }
.track-hero.small .th-outline { width: 76px; height: 56px; }
.track-hero.small .th-outline .map.mini .map-track { stroke-width: 2.4; }
.th-text { min-width: 0; }
.th-text p { margin: 0; }
.th-text p + p { margin-top: 2px; }
.track-stats { margin-bottom: 6px; padding: 12px 16px; border: 0; border-radius: var(--radius); background: var(--surface); }
/* the championships that race here, as small soft tags; what is kept from here, on one line */
.th-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.th-tag { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--dim); font-size: 12px; font-weight: 650; }
.track-line { margin: 0 0 8px; color: var(--dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.attribution { margin-top: 24px; }

/* the two kinds of file, as tabs; the open one bold */
.kind-tabs { margin: 16px 0 8px; }
.kind-tabs .tab-btn { gap: 8px; font-size: 17px; min-height: 50px; }
.kind-tabs .tab-btn .icon { color: var(--muted); }
.kind-tabs .tab-btn.on .icon { color: var(--brand-2); }
.files-bar { margin: 0 0 4px; }
.files-bar .sort-row { margin: 0; }
/* a track's sessions by kind (Michael, 5 Oct 2026): All · Practice · Qualifying · Race, the one in use bold */
.kind-row { margin: 14px 0 6px; }
.kind-row .seg button { font-size: 17px; }
.item-main small.row-note { color: var(--dim); font-weight: 600; }
.kind-event { margin-top: 16px; }
.ke-head { display: flex; flex-direction: column; gap: 1px; padding: 6px 2px 8px; color: var(--ink); text-decoration: none; min-height: 48px; justify-content: center; }
.ke-head b { font-size: 17px; font-weight: 750; }
.ke-head:hover b { color: var(--brand-2); }
.file-day { margin-top: 10px; }

/* ---------- folders ---------- */
.folders-view .add-row { margin: 4px 0 12px; }
.folder-icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: color-mix(in srgb, var(--lost) 16%, var(--surface)); color: var(--lost); }
.folder-icon.small { width: 30px; height: 30px; border-radius: 8px; }
.folder-badge { width: 76px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: color-mix(in srgb, var(--lost) 16%, var(--surface)); color: var(--lost); }
.folder-page .action { flex: 1 1 0; }
.sf-name { color: var(--ink); font-weight: 650; text-decoration: none; }
.sf-name:hover { color: var(--brand-2); }
/* the box under a page's buttons (Michael, 5 Oct 2026): the folders a session is in, and whether
   it was sent - a row each, its tap target on the right. A row with nothing to say isn't shown,
   nor the box when no row is. */
.status-box { display: flex; flex-direction: column; max-width: 620px; margin: 0 0 16px; padding: 2px 4px 2px 14px; border-radius: var(--radius); background: var(--surface); }
.status-box:not(:has(.status-row:not(:empty))) { display: none; }
.status-row { display: flex; align-items: center; gap: 12px; min-height: 52px; font-size: 15px; }
.status-row:empty { display: none; }
.status-row:not(:empty) ~ .status-row:not(:empty) { border-top: 1px solid var(--line); }
.st-icon { flex: none; display: inline-flex; color: var(--brand-2); }
.st-text { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.st-act { flex: none; min-height: 44px; min-width: 64px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--brand-2); font: inherit; font-weight: 750; cursor: pointer; }
.st-act:hover { background: var(--ghost); }
.st-act.stop { color: var(--danger); }
.folder-pick .list-row small { font-size: 12px; }
.new-folder { display: flex; gap: 8px; margin-top: 12px; }
.new-folder input { flex: 1; min-width: 0; }
.new-folder .btn { flex: none; }
.tick.some { background: color-mix(in srgb, var(--brand) 55%, var(--surface-3)); color: var(--on-brand); }
/* the Share sheet: a tick for each person on the team, then links */
.share h3 { margin: 18px 0 4px; }
.share h3:first-child { margin-top: 2px; }
.share-person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.share-person + .share-person { border-top: 1px solid var(--line); }
.sp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-text b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-person.on .sp-text b { font-weight: 800; }
.sp-text small { color: var(--muted); font-size: 12px; }
.sp-always { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: color-mix(in srgb, var(--brand) 38%, var(--surface-3)); color: var(--ink); }

/* adding a car: a name, a class to tap, more details if wanted */
.class-pick { margin: 0 0 2px; }
.class-pick + input { margin-top: 6px; }
.more-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin: -4px 0 6px; color: var(--dim); font-weight: 600; }
.more-toggle .icon { transition: transform 0.15s; }
.more-toggle.open .icon { transform: rotate(90deg); }
.more-details { margin-top: 2px; }

/* videos: a picture for each, the length on it */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.video-tile { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.video-tile:hover { color: var(--ink); }
.vt-pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 26%, var(--surface-2)), var(--surface-2) 70%); }
.vt-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.video-tile:hover .vt-pic img { transform: scale(1.04); }
.vt-play { position: relative; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; padding-left: 2px; border-radius: 50%; background: rgba(10, 10, 15, 0.55); color: #fff; }
.vt-pic.has-pic .vt-play { opacity: 0; transition: opacity 0.2s; }
.video-tile:hover .vt-pic.has-pic .vt-play { opacity: 1; }
.vt-dur, .vt-parts { position: absolute; bottom: 7px; padding: 1px 7px; border-radius: 6px; background: rgba(10, 10, 15, 0.72); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vt-dur { right: 7px; }
.vt-parts { left: 7px; }
.vt-body { display: flex; flex-direction: column; padding: 8px 2px 0; min-width: 0; }
.vt-body b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-body b .at { margin-left: 6px; font-weight: 500; font-size: 13px; color: var(--muted); }
.vt-body small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* a day's photos (Michael, 6 Oct 2026): a grid of small pictures, then one whole in a sheet */
.photos-tab .add-row { margin: 0 0 10px; }
.photos-tab .add-row .btn { flex: 0 1 auto; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 104px), 1fr)); gap: 6px; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } }
.photo-tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; color: var(--muted);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, var(--surface-2)), var(--surface-2) 70%); }
.photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.pt-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.sheet.photo-sheet { max-width: 920px; }
.photo-viewer { display: flex; flex-direction: column; gap: 10px; }
.ph-pic { display: flex; align-items: center; justify-content: center; min-height: 200px; border-radius: 12px; overflow: hidden; background: var(--surface-2); color: var(--muted); text-align: center; padding: 0; }
.ph-pic img { display: block; max-width: 100%; max-height: 62vh; object-fit: contain; }
.ph-pic p { padding: 24px; }
.ph-bar { display: flex; align-items: center; justify-content: center; gap: 18px; }
.ph-bar .icon-btn { min-width: 48px; min-height: 48px; }
.ph-bar .icon-btn:disabled { opacity: 0.3; }
.ph-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.ph-info { margin: 0; text-align: center; overflow-wrap: anywhere; }
.photo-viewer .row { justify-content: center; }
.btn.danger-text, .btn.ghost.danger-text .icon { color: var(--danger); }
/* Upload: the photos picked, each group on its day */
.photo-groups { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 18px; }
.photo-group { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); }
.pg-icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  background: color-mix(in srgb, var(--lost) 16%, var(--surface)); color: var(--lost); }
.photo-group.ok .pg-icon { background: color-mix(in srgb, var(--ref) 14%, var(--surface)); color: var(--ref); }
.pg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pg-text small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.photo-group .btn.small { min-height: 44px; }
/* which day the photos are from: rows like the track picker's, by year */
.day-pick .dp-hint { margin: 0 0 4px; }
.dp-year { margin: 14px 0 4px; font-size: 13px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.dp-list { display: flex; flex-direction: column; }
.day-row { font: inherit; min-height: 58px; }
.day-row .lr-map { width: 48px; height: 34px; }
.day-row .lr-map .map.mini .map-track { stroke: var(--brand-2); stroke-width: 3; }
.day-row .lr-text b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-row .lr-text small { color: var(--muted); font-size: 13px; }
.day-row > .icon { color: var(--muted); flex: none; }
.day-row.on { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.day-row.on > .icon { color: var(--brand-2); }

/* data: a row for each file - what it is and what it holds - and its download */
.data-list { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.data-item { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.data-item + .data-item { border-top: 1px solid var(--line); }
.di-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px 12px 14px; color: var(--ink); text-decoration: none; }
.di-main:hover { color: var(--ink); }
.di-main:hover b { color: var(--brand-2); }
.di-icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: color-mix(in srgb, var(--ref) 14%, var(--surface)); color: var(--ref); }
.di-text { min-width: 0; display: flex; flex-direction: column; }
.di-text b { font-weight: 650; overflow-wrap: anywhere; }
.di-text small { color: var(--muted); font-size: 13px; }
.di-text .di-facts { color: var(--dim); font-size: 12px; }
.di-text .di-facts:empty { display: none; }

/* ---------- session ---------- */
/* what a session holds, as soft chips (Michael, 5 Oct 2026) */
.sess-head .sess-when, .sess-head .sess-who { margin: 2px 0 0; }
.sess-why { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: var(--dim); font-size: 14px; }
.sess-why .icon { flex: none; margin-top: 2px; color: var(--brand-2); }
.sess-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ss { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--ink); font-size: 14px; font-weight: 650; }
.ss .icon { color: var(--brand-2); }
.action-bar { display: flex; gap: 8px; margin: -2px 0 14px; }
.action { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 6px; border: 0; border-radius: 12px; background: var(--ghost); color: var(--ink); font-size: 15px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.action:hover { background: var(--ghost-on); }
.action:disabled { opacity: 0.45; cursor: default; }
.action .icon { color: var(--brand-2); }
/* Send: the one big violet button, first (Michael, 5 Oct 2026); for a moment after a tap it
   says "Copied", in green */
.action.send { background: var(--brand); color: var(--on-brand); }
.action.send .icon { color: var(--on-brand); }
.action.send:hover { background: color-mix(in srgb, var(--brand) 86%, #000); color: var(--on-brand); }
.action.send.done, .btn.done { background: var(--ref); color: #0b1a10; }
.action.send.done .icon, .btn.done .icon { color: #0b1a10; }
.row-link.done { opacity: 1; color: var(--ref); }
.session-grid { display: grid; gap: 16px; }
.session-main { min-width: 0; }
/* the video comes first (Michael, 7 Oct 2026); the name and the buttons sit under it */
.session-main .sess-head { margin-top: 14px; }
.session-main .sess-head .page-title { font-size: 22px; }
.view-switch { display: flex; justify-content: flex-start; margin: -6px 0 4px; }

.tabs-bar { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tab-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 16px; font-weight: 500; cursor: pointer; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.on { color: var(--ink); }
.tab-btn.on .tl { font-weight: 800; }
.tab-btn .count { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; }
.empty-laps { padding: 6px 2px; }

.lap-list { background: var(--surface); border-radius: var(--radius); padding: 6px; }
.lap-list.flat { margin-top: 14px; }
.lap-row {
  display: grid; grid-template-columns: 56px 34px 1fr auto; grid-template-areas: "thumb n t gap" "thumb n sec sec";
  align-items: center; column-gap: 10px; width: 100%; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); text-align: left; cursor: pointer;
}
.lap-list.flat .lap-row { grid-template-columns: 40px 1fr; grid-template-areas: "n t"; cursor: default; }
.no-thumbs .lap-row { grid-template-columns: 40px 1fr auto; grid-template-areas: "n t gap" "n sec sec"; }
.no-thumbs .lap-thumb { display: none; }
.lap-row:hover { background: var(--surface-2); }
.lap-row.playing { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.lap-row.playing .lap-n { color: var(--ink); font-weight: 850; }
.lap-row.playing .lap-t .laptime { font-weight: 850; }
.lap-row.part { color: var(--muted); }
.lap-thumb { grid-area: thumb; width: 56px; height: 34px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.lap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lap-n { grid-area: n; font-weight: 600; color: var(--muted); text-align: center; }
.lap-t { grid-area: t; font-size: 17px; }
.lap-gap { grid-area: gap; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.lap-row.is-best .lap-gap { color: var(--fast); font-weight: 700; }
.lap-sec { grid-area: sec; display: flex; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lap-sec i { font-style: normal; }
.lap-sec i.best { color: var(--fast); font-weight: 700; }
/* the storage view: each lap is a number and a time, like a chapter */
.lap-list.simple .lap-row { grid-template-columns: 56px 40px 1fr; grid-template-areas: "thumb n t"; min-height: 50px; }
.lap-list.simple.no-thumbs .lap-row { grid-template-columns: 44px 1fr; grid-template-areas: "n t"; }
.lap-list.simple .lap-t { font-size: 16px; }
.lap-list.simple .lap-t .laptime { font-weight: 600; }
div.lap-row, .lap-row:disabled { cursor: default; }
.lap-row:disabled { color: var(--ink); }
.lap-row.part:disabled { color: var(--muted); }
div.lap-row:hover, .lap-row:disabled:hover { background: transparent; }

.notes { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; }
.note { padding: 10px 0; border-top: 1px solid var(--line); }
.note:first-child, .notes > p + .note { border-top: 0; }
.note-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.note-head .link { margin-left: auto; }
.note p { white-space: pre-wrap; margin: 0; }
.role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-2); }
.note-add { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.note-add .btn { align-self: flex-end; }

.files-card { background: var(--surface); border-radius: var(--radius); margin: 0 0 14px; }
.file-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; }
.file-row + .file-row { border-top: 1px solid var(--line); }
.fr-kind { display: inline-flex; align-items: center; gap: 7px; padding-top: 1px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fr-kind .icon { color: var(--brand-2); }
.fr-file { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fr-file + .fr-file { margin-top: 10px; }
.fr-file b { overflow-wrap: anywhere; font-weight: 600; }
.fr-file.dl { flex-direction: row; align-items: center; gap: 8px; }
.fr-file.dl > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
/* no data file yet: say so, and "+ Add data file" beside it */
.fr-none { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.fr-none .add-data { min-height: 40px; color: var(--brand-2); }
.fr-none .add-data .icon { color: var(--brand-2); }
/* under the data files there are: one more can be added */
.fr-none.more { justify-content: flex-start; margin-top: 4px; }
.fr-none.more .add-data { padding-left: 0; }
.session-files { margin: 0; }
.files-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
/* no video to play: a picture of what the data holds */
.data-pic { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.data-map { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; padding: 6% 10%; background: var(--surface-2); }
.data-map .map { max-height: 100%; width: auto; max-width: 100%; }
.data-map .map-track { stroke: var(--brand-2); stroke-width: 2.5; opacity: 0.85; }
.data-facts { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; }
.data-facts .icon { color: var(--brand-2); margin-top: 2px; }
.data-facts > div { display: flex; flex-direction: column; min-width: 0; }
.data-pic.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; color: var(--muted); }
.data-pic.empty .icon { color: var(--brand-2); }
.sync-box { margin-top: 12px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); }
.sync-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.sync-head .icon { color: var(--brand-2); }
.sync-head b:first-of-type { margin-right: 4px; }
.sync-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.edit-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.edit-group h3 { margin-bottom: 4px; }
.edit-group .btn { margin-top: 4px; }

/* ---------- the player ---------- */
.player { background: #000; border-radius: var(--radius); overflow: hidden; outline: none; }
.player:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.player:fullscreen .pv-stage { flex: 1; aspect-ratio: auto; }
.pv-stage { position: relative; aspect-ratio: 16 / 9; background: #07070c; cursor: pointer; }
.pv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pv-dataview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 6% 10%; }
.pv-dataview .map { max-height: 100%; width: auto; max-width: 100%; }
.pv-dataview .map-track { stroke: #3a3650; }
.pv-dataview.empty { color: #b9b7c6; text-align: center; font-size: 14px; }
.has-video .pv-dataview.empty { display: none; }
.has-video .pv-dataview { inset: auto auto 12px 12px; width: 26%; max-width: 190px; padding: 6px; background: rgba(10, 10, 15, 0.62); border-radius: 10px; }
.has-video .pv-dataview .map-track { stroke-width: 6; }
/* the numbers sit on a soft shade at the top and bottom of the picture, not on outlined text */
.pv-hud { position: absolute; inset: 0; pointer-events: none; color: #fff; font-variant-numeric: tabular-nums; }
.has-video .pv-hud { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, 0.45)); }
.player.plain .has-video .pv-hud { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0) 22%); }
.player.plain .pv-lap { font-size: 12px; }
.pv-tl { position: absolute; left: 12px; top: 10px; display: flex; flex-direction: column; }
.pv-lap { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.pv-clock { font-size: 26px; font-weight: 800; }
.on-best .pv-clock { color: #ddd3ff; }
.pv-tr { position: absolute; right: 12px; top: 12px; }
.pv-gap { display: inline-block; padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 20px; }
.pv-gap:empty { display: none; }
.pv-gap.slower { background: rgba(212, 118, 28, 0.94); color: #fff; }
.pv-gap.faster { background: rgba(46, 229, 90, 0.92); color: #00170a; }
.pv-gap.best { background: rgba(139, 108, 255, 0.94); color: #fff; font-size: 15px; }
.pv-bl { position: absolute; right: 12px; bottom: 10px; display: flex; flex-direction: column; align-items: flex-end; }
.pv-speed-n { font-size: 34px; font-weight: 850; line-height: 1; }
.pv-speed-u { font-size: 13px; margin-left: 4px; opacity: 0.8; }
.pv-gear { font-size: 13px; opacity: 0.85; }
.pv-pedals { position: absolute; right: 12px; top: 54px; display: flex; gap: 5px; height: 64px; }
.pv-bar { width: 9px; height: 100%; background: rgba(255, 255, 255, 0.16); border-radius: 4px; position: relative; overflow: hidden; }
.pv-bar i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-radius: 4px; }
.pv-bar.thr i { background: #2ee55a; }
.pv-bar.brk i { background: #ff6b6b; }
.pv-notice { padding: 8px 12px; background: var(--surface-2); color: var(--dim); font-size: 13px; }
.pv-bigplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.94); color: #0b0b0c; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.pv-bigplay .icon { margin-left: 4px; }
/* the video bar (Michael, 6 Oct 2026: better, not more complicated): the bar on its own line -
   thick, filling in violet as it plays, a big dot to drag, the laps as blocks - then the buttons */
.pv-controls { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px; background: var(--surface); }
.pv-buttons { display: flex; align-items: center; gap: 6px; }
.pv-gap-fill { flex: 1; }
.pv-controls .icon-btn { color: var(--ink); width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 50%; }
.pv-play { background: var(--brand); color: var(--on-brand) !important; width: 48px !important; height: 48px !important; }
.pv-play:hover { background: var(--brand-2); }
.pv-track { position: relative; width: 100%; height: 34px; display: flex; align-items: center; --at: 0; }
.pv-marks, .pv-fill { position: absolute; left: 10px; right: 10px; top: 50%; height: 10px; margin-top: -5px; border-radius: 5px; pointer-events: none; }
.pv-marks { background: var(--surface-3); overflow: hidden; }
.pv-marks span { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--surface); background: color-mix(in srgb, var(--ink) 14%, transparent); }
.pv-marks span.part { background: transparent; }
.pv-marks span.best { background: var(--fast); }
.pv-fill { right: auto; width: calc((100% - 20px) * var(--at)); background: color-mix(in srgb, var(--brand) 82%, transparent); }
.pv-scrub { position: relative; width: 100%; margin: 0; height: 34px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.pv-scrub::-webkit-slider-runnable-track { height: 10px; background: transparent; }
.pv-scrub::-moz-range-track { height: 10px; background: transparent; }
.pv-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -6px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.pv-scrub::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); }
.pv-scrub:focus-visible { outline: none; }
.pv-scrub:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 45%, transparent); }
.pv-time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap; }
.pv-time b { color: var(--ink); font-weight: 700; }
.pv-rate { min-width: 48px; min-height: 40px; border-radius: 20px; border: 0; background: var(--ghost); color: var(--ink); font-weight: 750; font-size: 14px; cursor: pointer; }
.pv-rate:hover { background: var(--ghost-on); }

/* ---------- laps from the picture ---------- */
.marker { margin-bottom: 12px; padding: 16px; background: var(--surface); border-radius: var(--radius); }
.marker h2 { margin-bottom: 8px; }
.how { margin: 0 0 4px; padding-left: 20px; color: var(--dim); font-size: 14px; }
.how li { margin: 3px 0; }
.how b { color: var(--ink); }
.marker-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.marker-line { grid-column: 1 / -1; order: -1; min-height: 56px; font-size: 18px; }
.marks { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.marks li { display: grid; grid-template-columns: 64px 1fr auto auto 40px; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 10px; background: var(--surface-2); }
.marks li.found { background: color-mix(in srgb, var(--brand) 9%, var(--surface-2)); }
.marks img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; display: block; }
.mark-dot { width: 64px; display: flex; justify-content: center; color: var(--danger); }
.marker-busy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; color: var(--dim); }
.marker-busy .progress { flex: 1 1 140px; }

/* ---------- compare ---------- */
.cmp-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 14px; }
.cmp-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); }
.cc-key { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 850; color: #06080b; flex: none; }
.cmp-card.a .cc-key { background: var(--a); }
.cmp-card.b .cc-key { background: var(--b); }
.cc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-body .laptime { font-size: 22px; }
.cc-body small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare { display: grid; gap: 14px; }
.cmp-sides { display: grid; gap: 10px; }
.cmp-side { background: #000; border-radius: var(--radius); overflow: hidden; }
.cmp-stage { position: relative; aspect-ratio: 16 / 9; background: #07070c; }
.cmp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cmp-dataview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8%; color: #8b8b99; }
.cmp-dataview .map-track { stroke: #3a3650; }
.cmp-tag { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 850; color: #06080b; }
.cmp-side.a .cmp-tag { background: var(--a); }
.cmp-side.b .cmp-tag { background: var(--b); }
.cmp-hud { position: absolute; right: 10px; bottom: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(10, 10, 15, 0.62); color: #fff; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.cmp-label { padding: 8px 12px; background: var(--surface); color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-panel { display: grid; gap: 12px; background: var(--surface); border-radius: var(--radius); padding: 14px; }
.cmp-gap { display: flex; align-items: baseline; gap: 12px; }
.cmp-gap-n { font-size: 44px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; }
.cmp-gap-n.slower { color: var(--lost); }
.cmp-gap-n.faster { color: var(--ref); }
.cmp-gap-who { color: var(--muted); font-weight: 600; }
.cmp-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-controls .pv-track::before { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--surface-3); }
.cmp-play { min-width: 112px; }
.cmp-charts { display: grid; gap: 4px; }
.cmp-chart-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); font-weight: 600; margin-top: 6px; }
.cmp-chart { width: 100%; height: 110px; display: block; background: var(--surface-2); border-radius: 10px; cursor: pointer; }
.cmp-chart polyline { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cmp-chart .la { stroke: var(--a); }
.cmp-chart .lb { stroke: var(--b); }
.cmp-chart.gap .la { stroke: var(--ink); }
.cmp-chart .area { stroke: none; }
.cmp-chart .area.lost { fill: color-mix(in srgb, var(--lost) 26%, transparent); }
.cmp-chart .area.gained { fill: color-mix(in srgb, var(--ref) 24%, transparent); }
.cmp-chart .zero { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 4; }
.cmp-chart .cursor { stroke: var(--brand-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; }
.key .ka { background: var(--a); }
.key .kb { background: var(--b); }
.cmp-map { background: var(--surface-2); border-radius: 12px; padding: 6px; max-height: 360px; }

/* ---------- upload ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 18px; border-radius: 18px; cursor: pointer; margin: 10px 0 8px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface)); transition: background 0.2s; }
.dropzone .icon { color: var(--brand-2); }
.dropzone p { color: var(--dim); max-width: 36ch; }
.dropzone.over, .dropzone:hover { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); }
/* what you can add: Video and Data as two plain columns in the middle of the page - words only,
   no boxes or icon squares (Michael, 5 Oct 2026) */
.can-add { max-width: 640px; margin: 30px auto 26px; text-align: center; }
.can-add .section-title { margin: 0 0 14px; }
.ca-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 22px; margin-bottom: 16px; }
@media (max-width: 440px) { .ca-cols { gap: 0 12px; } .ca-col b { font-size: 17px; } .ca-col span { font-size: 14px; } }
.ca-col { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.ca-col b { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.ca-col span { font-size: 15px; }
.ca-col small { font-size: 13px; max-width: 22ch; }
/* the way to the archive import, on Upload and on the Team page */
.import-link { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; margin: 0 0 16px; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.import-link > .icon:first-child { color: var(--brand-2); }
.import-link > span:not(.icon) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.import-link small { font-size: 13px; }
.import-link > .icon:last-child { color: var(--muted); }
.import-link:hover { background: var(--surface-2); color: var(--ink); }
.team-page .import-link { margin: 10px 0 6px; }

/* ---------- importing an archive ---------- */
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 34px 18px; border-radius: 18px; margin: 4px 0 8px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface)); transition: background 0.2s; }
.imp-drop > .icon { color: var(--brand-2); }
.imp-drop > b { font-size: 19px; }
.imp-drop > span { max-width: 44ch; }
.imp-drop.over { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.imp-drop.walking { opacity: 0.75; pointer-events: none; }
.imp-drop .row { justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.imp-how { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; margin-bottom: 14px; }
.imp-how-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); }
.imp-how-row > .icon { color: var(--brand-2); margin-top: 2px; }
.imp-how-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imp-how-row small { font-size: 13px; }
.imp-box { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.imp-box > b { font-size: 17px; }
.imp-box p { margin: 0; }
.imp-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.imp-bar i { display: block; height: 100%; background: var(--brand-2); transition: width 0.3s; }
.imp-now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-box .imp-results { margin: 6px -18px -18px; border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--line); }
.imp-results .item-main b, .imp-results .item-main small { white-space: normal; overflow-wrap: anywhere; }
.imp-mark { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.imp-mark.saved { color: var(--ref); }
.imp-mark.duplicate { color: var(--muted); }
.imp-mark.failed { color: var(--lost); }
.imp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.imp-sum > div { display: flex; flex-direction: column; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); }
.imp-sum b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.imp-sum span { color: var(--muted); font-size: 13px; }
.imp-defaults { padding: 14px 16px 2px; border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.imp-defaults .link { min-height: 40px; align-self: flex-start; }
.imp-line { margin: 0 2px 10px; }
.imp-line .link { font-size: 13px; min-height: 0; }
.imp-broken { margin: 0 0 14px; }
.imp-broken li { white-space: normal; }
.imp-group { margin-top: 22px; }
.imp-group-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 4px; }
.imp-group-head .gh-map { color: var(--muted); }
.imp-group-head .link { flex: none; min-height: 40px; }
.imp-group.none .gh-text b { color: var(--lost); }
.imp-group .gh-text small { white-space: normal; }
.imp-acts { padding: 2px 2px 6px; }
/* a day of a track's sessions, as the library will file them */
.imp-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 4px 4px; }
.imp-day > div { display: flex; flex-direction: column; min-width: 0; }
.imp-day b { font-size: 14px; font-weight: 750; }
.imp-day small { color: var(--muted); font-size: 12px; }
.imp-day .link { flex: none; min-height: 40px; }
.imp-day .btn { flex: none; }
.imp-day.none b, .imp-day.check small { color: var(--lost); }
.imp-note { color: var(--lost) !important; white-space: normal !important; }
.imp-eta { font-variant-numeric: tabular-nums; }
.not-listed { align-self: flex-start; margin: 0 0 12px; }
.imp-row { align-items: flex-start; }
.imp-row .tick { margin-top: 4px; }
.imp-row .item-main b { white-space: normal; }
.imp-row .link { flex: none; min-height: 40px; padding: 0 4px; }
.imp-row.off .item-main { opacity: 0.5; }
.imp-row .item-main small { white-space: normal; overflow-wrap: anywhere; }
.imp-chips { color: var(--dim) !important; white-space: normal !important; }
.imp-why { color: var(--brand-2) !important; white-space: normal !important; }
.imp-err { color: var(--lost) !important; white-space: normal !important; }
.imp-path { font-size: 12px !important; white-space: normal !important; overflow-wrap: anywhere; }
.imp-foot { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; margin-top: 10px; background: var(--bg); }
.imp-foot .link { flex: none; min-height: 48px; color: var(--dim); }
.imp-foot .btn.big { flex: 1 1 auto; max-width: 420px; padding-left: 16px; padding-right: 16px; }

/* demo: the kind of account in one tap, and on a team who you are */
.demo-bar { background: var(--surface); }
.db-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 0 14px; padding: 2px 16px; }
.db-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-2); }
.db-in .seg { column-gap: 16px; }
.db-in .seg button { min-height: 38px; padding: 6px 0; font-size: 14px; }
.db-who { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; min-height: 38px; padding: 0; border: 0; background: none; color: var(--dim); font-size: 14px; font-weight: 600; cursor: pointer; }
.db-who .icon { transform: rotate(90deg); }
.db-who:hover { color: var(--ink); }
.meter-wrap { margin-top: 10px; }
.reading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
.upl-head { margin-bottom: 10px; }
/* where you are in the upload: the step you're on is bold, the ones done have a tick */
.tracker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 4px 0 12px; padding: 0; }
.tracker li { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 500; font-size: 15px; }
.tracker .tn { display: inline-flex; align-items: center; justify-content: center; width: 20px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tracker li.done { color: var(--dim); }
.tracker li.done .icon { color: var(--ref); }
.tracker li.now { color: var(--ink); }
.tracker li.now .tl { font-weight: 800; }
.tracker li.now .tn { color: var(--brand-2); }
.when-box { margin-bottom: 14px; }
.warnings { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.warnings summary { cursor: pointer; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px; }
.step h2 { margin: 2px 0 12px; }
/* the tracker above numbers the steps; a step done keeps its tick */
.step > .step-n { display: none; }
.step.done { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 58px; }
.step.done > .step-n { position: absolute; left: 16px; top: 50%; margin-top: -15px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ref) 20%, var(--surface)); color: var(--ref); }
.step-sum { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.step-sum b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; width: 100%; padding: 12px; border-radius: 12px; border: 0; background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: var(--ink); text-align: left; cursor: pointer; margin-bottom: 12px; }
.suggest:hover { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.suggest-map { height: 84px; display: flex; align-items: center; }
.suggest-text { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
@media (max-width: 440px) {
  .suggest { grid-template-columns: 1fr; }
  .suggest-map { height: 96px; justify-content: center; }
  .suggest-map .map { width: auto; max-width: 70%; height: 100%; }
}
.suggest-text b { font-size: 17px; }
.suggest-text .btn { margin-top: 6px; pointer-events: none; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 76px; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; }
.choice:hover { background: var(--surface-3); }
.choice b { font-weight: 650; }
.choice.last b { font-weight: 800; }
.choice.last small { color: var(--brand-2); font-weight: 700; }
.choice .icon { color: var(--brand-2); }
.choice small { color: var(--muted); }
.choice.add { background: none; color: var(--dim); }
.choice.add:hover { background: var(--surface-2); color: var(--ink); }
.choice-grid.types { grid-template-columns: 1fr 1fr; }
.choice-grid.types .choice { min-height: 70px; justify-content: center; font-size: 17px; }
.choice-grid.types .choice small { font-size: 13px; }
.when { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.when > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.when .icon { color: var(--brand-2); margin-top: 2px; }
.track-groups { margin: -2px 0 0; }
.track-groups .seg { column-gap: 20px; }
.track-list { display: flex; flex-direction: column; max-height: 48vh; overflow-y: auto; margin-top: 8px; }
.list-row { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.list-row + .list-row { margin-top: 2px; }
.list-row:hover { background: var(--surface-2); color: var(--ink); }
.list-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.list-row b { font-weight: 500; }
.list-row.on b { font-weight: 800; }
.list-row.on .icon { color: var(--brand-2); }
.list-row .lr-map { width: 44px; height: 32px; flex: none; display: flex; flex-direction: row; align-items: center; justify-content: center; color: var(--muted); }
.list-row .lr-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.list-row .lr-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-country { flex: none; padding: 14px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lr-country:first-child { padding-top: 4px; }
.venue-row > .icon { transition: transform 0.15s; }
.venue-row.on > .icon { transform: rotate(90deg); color: var(--brand-2); }
.venue-row.on b { font-weight: 800; }
.list-row.in-venue { padding-left: 26px; }
.list-row.in-venue .lr-map { width: 36px; height: 28px; }
.lp-end { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.step.saving { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 16px; }
.saving-step { color: var(--dim); }
.progress { width: 100%; max-width: 360px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width 0.2s; }
.step.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 16px; }
.step.result .icon { color: var(--brand-2); }
.step.result.ok .icon { color: var(--ref); }
.step.result .row { justify-content: center; margin-top: 8px; }

/* ---------- account ---------- */
.account-page .acct { margin-bottom: 12px; }
.acct h2 { margin-bottom: 12px; }
.acct h3 { margin: 4px 0 2px; }
.plan-now { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.plan-now .right { text-align: right; }
.big { font-size: 20px; }
.meter { margin: 6px 0 10px; }
.meter-bar { height: 12px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; background: var(--brand-2); border-radius: 6px; }
.meter.lvl1 .meter-fill, .meter.lvl2 .meter-fill { background: var(--lost); }
.meter.lvl3 .meter-fill { background: var(--danger); }
.meter-text { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 14px 0 6px; }
.plans-open { margin-top: 14px; }
.acct .row + .muted.small { margin-top: 10px; }
.plan { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.plan.current { background: color-mix(in srgb, var(--brand) 12%, var(--surface-2)); }
.plan.current > b { font-weight: 850; }
.plan b { font-size: 17px; }
.plan-price { font-weight: 700; }
.plan-space { color: var(--dim); font-size: 14px; }
.plan .btn, .plan .chip { margin-top: 6px; }
.plan .chip.on { color: var(--brand-2); }
.addon { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.addon > div:first-child { display: flex; flex-direction: column; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper b { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper .icon-btn { background: var(--ghost); }
.stepper .icon-btn:hover { background: var(--ghost-on); }
.car-row, .trash-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.car-row:first-of-type, .trash-row:first-of-type { border-top: 0; }
.car-row > div, .trash-row > div:first-child { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.car-row .icon { color: var(--brand-2); }

/* ---------- the team ---------- */
.add-row { display: flex; gap: 8px; margin: 0 0 6px; }
.add-row .btn { flex: 1 1 0; }
.team-group { margin-top: 14px; }
.team-group .view-bar { margin: 0; }
.team-group .section-title { margin: 12px 0 2px; }
.group-blurb { margin: 0 2px 8px; }
.team-note { margin-top: 18px; }
.person .item-main small { white-space: normal; }
/* a face for each person: initials on a soft colour for their role */
.avatar { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--brand) 22%, var(--surface)); color: var(--brand-2); }
.avatar.engineer { background: color-mix(in srgb, var(--ref) 18%, var(--surface)); color: var(--ref); }
.avatar.manager { background: color-mix(in srgb, var(--lost) 20%, var(--surface)); color: var(--lost); }
.avatar.big { width: 56px; height: 56px; font-size: 19px; }
.you-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); margin-bottom: 4px; }
.you-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team-settings { margin-top: 18px; }
.team-settings h2 { margin-bottom: 12px; }

/* one person: their role, what they can see, which files */
.person-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.person-head p { margin: 0; }
.person-sec { margin-bottom: 10px; }
.person-sec h2 { margin-bottom: 6px; }
.person-sec .seg { margin-bottom: 2px; }
.person-sec p.muted.small { margin: 4px 0 0; }
.person-sec h3.sub { margin: 18px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sees { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.sees .icon { color: var(--brand-2); }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* the picker: tracks > test days > sessions, a tick on each (a fill, not a frame) */
.access-tree { display: flex; flex-direction: column; margin: 12px -6px 0; }
.at-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px; border-radius: 10px; }
.at-row + .at-row { border-top: 1px solid var(--line); }
.at-row.day { padding-left: 32px; }
.at-row.session { padding-left: 58px; min-height: 46px; }
.tick { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; background: var(--surface-3); color: transparent; cursor: pointer; }
.tick:hover { background: var(--ghost-on); }
.tick.on { background: var(--brand); color: var(--on-brand); }
.tick.implied, .tick.implied:hover { background: color-mix(in srgb, var(--brand) 38%, var(--surface-3)); color: var(--ink); cursor: default; }
.at-label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none; color: var(--ink); text-align: left; }
button.at-label { cursor: pointer; }
.at-map { width: 40px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; }
.at-map .map.mini .map-track { stroke: var(--brand-2); stroke-width: 2; }
.at-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.at-text b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-row.on .at-text b { font-weight: 800; }
.at-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-open { flex: none; display: inline-flex; color: var(--muted); transition: transform 0.15s; }
.at-open.open { transform: rotate(90deg); }

/* ---------- sending: the Shared tab, compare picker, join ---------- */
/* a link you sent: what it opens, when, whether it was opened - Copy and Stop sharing */
.sent-row { align-items: flex-start; flex-wrap: wrap; padding-left: 12px; }
.sent-row .kind { margin-top: 2px; }
.kind.shape { background: none; color: var(--brand-2); }
.kind.shape .map.mini { width: 40px; height: 32px; }
.kind.shape .map-track { stroke: var(--brand-2); stroke-width: 2.4; }
.sent-row .item-main small { white-space: normal; }
.sent-row .sent-state { color: var(--dim); }
.sent-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
/* on a phone the buttons go under the words, so the name has the whole width */
@media (max-width: 600px) { .sent-acts { flex: 1 0 100%; margin-left: 0; padding-left: 52px; } }
.sent-acts .btn.small { min-height: 40px; }
.sent-acts .stop { color: var(--danger); }
.sent-page .demo-note { margin-top: 14px; }
.share .status-box { margin-top: 10px; background: var(--surface-2); }
.lap-picker h3 { margin: 16px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lap-picker h3:first-child { margin-top: 4px; }
.join-page { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 40px; }
.shared-page .cta { margin-top: 20px; padding: 18px; border-radius: var(--radius); background: var(--surface); text-align: center; }
/* what someone sent you: who sent it, the video, a big Download, the laps to tap */
.sent-by { margin: 0 0 4px; color: var(--brand-2); font-weight: 800; font-size: 15px; }
.shared-dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.shared-dl .btn.big { flex: 1 1 260px; max-width: 460px; }
.shared-laps { margin-top: 8px; }
.lap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lap-chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 52px; min-width: 96px; padding: 6px 14px;
  border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; }
.lap-chip:hover { background: var(--surface-2); }
.lap-chip:disabled { cursor: default; }
.lap-chip:disabled:hover { background: var(--surface); }
.lap-chip .lc-n { font-size: 12px; color: var(--muted); font-weight: 650; }
.lap-chip .laptime { font-size: 16px; font-weight: 650; }

/* ---------- sheets and toasts ---------- */
.shade { position: fixed; inset: 0; z-index: 40; background: var(--shade); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity 0.18s; }
.shade.in { opacity: 1; }
.shade.out { opacity: 0; }
.sheet { width: 100%; max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform 0.18s; box-shadow: var(--shadow); }
.shade.in .sheet { transform: none; }
.sheet:focus, .sheet:focus-visible { outline: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; position: sticky; top: -6px; background: var(--surface); z-index: 1; }
.sheet-text { color: var(--dim); }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
body.bare .toasts { bottom: 20px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow); pointer-events: auto; transition: opacity 0.35s, transform 0.35s; }
.toast.warn { background: color-mix(in srgb, var(--lost) 24%, var(--surface-3)); }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast span { flex: 1; }
.toast-action { border: 0; background: none; color: var(--brand-2); font-weight: 800; cursor: pointer; }

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .welcome-choices { grid-template-columns: 1fr 1fr; }
  .welcome-card.own { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
  .welcome-card.own .icon { grid-row: 1 / 3; }
  .welcome-card.own input { grid-column: 3; grid-row: 1; margin: 0; width: 220px; }
  .welcome-card.own .btn { grid-column: 3; grid-row: 2; margin-top: 8px; }
  .cmp-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp-sides { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .action { flex: 0 0 auto; padding: 8px 18px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
  .action-row .btn { flex: 0 0 auto; }
  .track-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .sheet { max-width: 560px; border-radius: 18px; margin-bottom: 8vh; align-self: center; }
  .shade { align-items: center; }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabs { display: none; }
  .toasts { bottom: 24px; }
  .imp-foot { bottom: 0; }
  .nav { display: flex; }
  .hide-phone { display: inline-flex; }
  .page { padding: 26px 24px 48px; }
  .db-in { padding: 2px 24px; }
  .page-title { font-size: 30px; }
  .session-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .session-side { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow-y: auto; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .cmp-panel { grid-template-columns: 1fr 300px; grid-template-areas: "gap map" "controls map" "charts map"; align-items: start; }
  .cmp-gap { grid-area: gap; }
  .cmp-controls { grid-area: controls; }
  .cmp-charts { grid-area: charts; }
  .cmp-map { grid-area: map; }
  .foot { display: flex; justify-content: center; gap: 18px; padding: 18px; color: var(--muted); font-size: 12px; }
  body.bare .foot { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
