/* Moto Tracker — presentation site.
 *
 * Rewritten for the second time, on the owner's verdict: "doesn't look premium, too much text,
 * old design". The first version was a dark SaaS template — twelve icon cards in a grid, three
 * lines of copy each. What replaced it is built on three decisions:
 *
 *   TYPE DOES THE WORK. One large, tightly tracked family, a real scale between the headline and
 *   everything else, and mono reserved for labels. Most of "premium" is scale contrast and
 *   restraint, not effects.
 *
 *   FEWER WORDS. Four statements of three syllables each where there were twelve paragraphs, and
 *   a list of capabilities that NAMES them instead of explaining them. Anything the reader has to
 *   be told twice was cut once.
 *
 *   SPACE IS THE LUXURY. Sections breathe; nothing is boxed unless the box carries data.
 */

:root {
  /* Lifted off black, and cooled. #08080a was a hole with a page printed on it — the owner's
     word was "too dark", and the fix is not only brightness: a neutral near-black has no colour
     for the eye to hold, so these carry a slight blue cast and each surface is a real step above
     the last rather than a rounding difference. */
  --bg:        #101318;
  --bg-2:      #171b21;
  --card:      #1d222a;
  --text:      #f2f4f7;
  --muted:     #aeb6c2;
  --dim:       #7d8797;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.17);
  --green:     #22c55e;
  --amber:     #f59e0b;
  --red:       #ef4444;
  --blue:      #3b82f6;
  --cyan:      #06b6d4;
  --violet:    #8b5cf6;
  --radius:    16px;
  --page:      72rem;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Headlines only. Inter reads well and headlines flat — Space Grotesk has the squared bowls and
     the cut terminals that make a 7rem word look engineered rather than defaulted. Inter stays
     behind it in the stack so body copy and any missing glyph land somewhere sensible. */
  --display: 'Space Grotesk', 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Panels and labels that float over the MAP, which changes with the theme underneath them.
     A dark chip over a pale basemap is not a light theme, and a dark halo around dark text is
     unreadable mush — both need a value that flips. */
  --overlay:      rgba(10,10,11,.85);
  --overlay-soft: rgba(10,10,11,.6);
  --halo:         rgba(9,13,20,.9);
  --on-overlay:   #f4f4f5;
  --viewer-bg:    #1c1c20;
  /* THE STAGE the 3D bike stands on. The application gets this look from one dark box
     (.model-container in public/css/layout.css), but the site has a light theme and a black
     rectangle inside a cream card reads as a hole, not as a lamp. So the LIGHT is ported and
     the box is not: a beam from above, a pool on the floor and a vignette, each themed.
     Night garage: the bike is the brightest thing in the frame. */
  --stage:       radial-gradient(ellipse 118% 88% at 50% 26%, #1e242e 0%, #161a21 58%, var(--bg-2) 100%);
  --stage-beam:  rgba(206,224,255,.10);
  --stage-floor: radial-gradient(closest-side, rgba(190,214,255,.16), rgba(190,214,255,0) 72%);
  /* `only`: this page draws both its themes itself. Without the keyword Samsung Internet's
     "dark mode for websites" (and Chrome's auto-dark) repainted the LIGHT theme algorithmically:
     the toggle looked dead, black buttons, dark headings on a dark ground (owner's screenshot,
     Android). `only` is the standard opt-out from that forced darkening. */
  color-scheme: only dark;
}

/* ── Light theme ────────────────────────────────────────────────────────────
 *
 * Three states, and the order below is what makes all three work:
 *   an explicit choice stamps data-theme on <html> and wins outright;
 *   with nothing stamped, the system preference decides;
 *   the toggle has to win in BOTH directions, so data-theme is declared last.
 *
 * Only the tokens are redefined. Every colour in this file resolves through one of them, which
 * is the only reason a second theme is forty lines rather than a second stylesheet. */

:root:not([data-theme="dark"]) { }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    /* Paper, not printer output. #fbfaf8 on #111113 is the default of every template ever
       generated; the owner's word was "boring" and he was right. These are warm and each surface
       is a real step, so the page has depth standing still. */
    --bg:     #f7f4ee;
    --bg-2:   #efeae1;
    --card:   #ffffff;
    --text:   #14171c;
    --muted:  #545c68;
    --dim:    #8a8477;
    --line:   rgba(20,23,28,.10);
    --line-2: rgba(20,23,28,.20);
    /* The green has to carry text and thin lines on a pale ground; #22c55e does neither. */
    --green:  #15803d;
    --overlay:      rgba(255,255,255,.88);
    --overlay-soft: rgba(255,255,255,.72);
    --halo:         rgba(255,255,255,.95);
    --on-overlay:   #111113;
    --viewer-bg:    #ffffff;
    /* Daylight studio rather than a garage: a bright sweep behind the bike, the vignette warm
       instead of black, and the floor pool is a SHADOW — on a pale stage a patch of light under
       the wheels would leave the bike floating. Same three parts, inverted. */
    --stage:       radial-gradient(ellipse 118% 88% at 50% 22%,
                 #ffffff 0%, #eae5da 46%, #d9d3c6 74%, var(--bg-2) 100%);
    --stage-beam:  rgba(255,250,236,.95);
    --stage-floor: radial-gradient(closest-side, rgba(46,41,33,.28), rgba(46,41,33,0) 74%);
    color-scheme: only light;
  }
}

:root[data-theme="light"] {
  /* Paper, not printer output. #fbfaf8 on #111113 is the default of every template ever
     generated; the owner's word was "boring" and he was right. These are warm and each surface
     is a real step, so the page has depth standing still. */
  --bg:   #f7f4ee;
  --bg-2:   #efeae1;
  --card:   #ffffff;
  --text:   #14171c;
  --muted:  #545c68;
  --dim:  #8a8477;
  --line:   rgba(20,23,28,.10);
  --line-2: rgba(20,23,28,.20);
  --green:  #15803d;
  --overlay:    rgba(255,255,255,.88);
  --overlay-soft: rgba(255,255,255,.72);
  --halo:     rgba(255,255,255,.95);
  --on-overlay:   #111113;
  --viewer-bg:  #ffffff;
  /* Daylight studio rather than a garage: a bright sweep behind the bike, the vignette warm
     instead of black, and the floor pool is a SHADOW — on a pale stage a patch of light under
     the wheels would leave the bike floating. Same three parts, inverted. */
  --stage:       radial-gradient(ellipse 118% 88% at 50% 22%,
                 #ffffff 0%, #eae5da 46%, #d9d3c6 74%, var(--bg-2) 100%);
  --stage-beam:  rgba(255,250,236,.95);
  --stage-floor: radial-gradient(closest-side, rgba(46,41,33,.28), rgba(46,41,33,0) 74%);
  color-scheme: only light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* The root paints the page colour too, not only <body>: the current iOS Safari takes the colour
   of the area round the notch from what is painted at the very top, and <html> is what is
   there before anything else is. */
html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding-inline: 1.5rem; }
.wrap.wide   { max-width: 84rem; }
.wrap.narrow { max-width: 44rem; }

section { padding-block: clamp(4.5rem, 11vw, 9rem); scroll-margin-top: 70px; }
.bleed  { padding-block: clamp(3rem, 7vw, 5.5rem); }

/* A label, never a heading. Mono, small, wide — it exists to let the headline be the only
   loud thing on the screen. */
.kicker {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--dim);
  margin: 0 0 1.6rem;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 50;
  /* A tinted sheet of the page's own background, so it follows the theme instead of being a
     dark pane over a light page. */
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-head.stuck { border-bottom-color: var(--line); }
/* On a touch device the header does not blur what is under it. The page scrolls the WebGL map
   beneath a sticky, blurred bar, and iOS recomputes that blur over the live canvas every frame —
   one of the two costs behind the scroll catching at the map. Nearly opaque instead, which on
   the page's flat background looks the same. Map overlays likewise, for the same reason. */
@media (pointer: coarse) {
  .map-beacon-overlay, .dm-scene { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
.head-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--text); }
.brand span { font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: -.03em; }
.brand b { font-weight: 600; color: var(--green); }

.head-nav { display: flex; align-items: center; gap: 1.8rem; }
.head-nav a:not(.btn) {
  position: relative; color: var(--muted); text-decoration: none;
  font-size: .88rem; font-weight: 500;
  transition: color .2s;
}
.head-nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 760px) { .head-nav .hide-sm { display: none; } .head-nav { gap: 0; } .head-nav .theme-btn { margin-right: .6rem; } }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.5rem; border-radius: 999px;
  font: inherit; font-size: .94rem; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s, transform .12s;
}
.btn-sm { padding: .55rem 1.05rem; font-size: .85rem; }
/* Inverted against the page in both themes: near-black type on white, white type on near-black.
   `--bg` rather than a literal, or the light theme gets black text on a black pill. */
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: .88; }
.btn-quiet { color: var(--muted); border-color: var(--line-2); }
.btn-quiet:hover { color: var(--text); border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid; align-items: center;
  padding-block: clamp(3rem, 10vw, 7rem) clamp(4rem, 12vw, 8rem);
  overflow: hidden;
}
/* On a phone the hero takes the WHOLE screen. At 92vh it stopped ~70 px short, and the current iOS
   Safari floats its bottom bar OVER the page, so that strip — with the demo map's red theft
   banner in it — showed through the bar before anyone had scrolled; the map's arrival then
   played for nobody. `lvh`, the height with the bars retracted, reaches the bottom edge; `svh`
   would stop above the bar and leave exactly that strip. It is a minimum: the header above it
   only makes the hero end further down, never higher. */
@media (max-width: 760px) {
  .hero { min-height: 100vh; min-height: 100lvh; }
  /* The copy sits low on a phone, not centred: the wheel lives in the top half, and centred text
     covered most of it (the owner's screenshot). Bottom padding keeps the buttons clear of
     Safari's floating bar, which sits over the last ~90 px of the screen. */
  .hero { align-items: end; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* One light, behind everything, doing the job a photograph would. */
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 90%;
  background:
    radial-gradient(48% 46% at 22% 34%, rgba(34,197,94,.13), transparent 70%),
    radial-gradient(42% 48% at 74% 22%, rgba(59,130,246,.09), transparent 72%);
  /* The same two lights are far too strong over a pale ground — they read as stains rather than
     as light. Halved, not removed: the hero still needs something behind the type. */
  opacity: 1;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

/* ── The wheel behind the headline ──────────────────────────────────────────
 * A motorcycle wheel in line-art that is also an instrument dial: tyre, split spokes and a
 * drilled disc turning slowly, a ring of ticks around it that does NOT turn, a radar sweep going
 * round, and the tracker on the rim pinging as it travels. The bike and the thing watching it.
 *
 * It sits right of the type and fades out towards it, so the headline never has lines under its
 * letters; under the route (DOM order) and under the copy (z-index). Everything that moves is a
 * transform or an opacity on its own layer.
 */
.hero-wheel {
  position: absolute; z-index: 0; pointer-events: none;
  width: min(580px, 46vw); aspect-ratio: 1;
  /* Clear of the section rail at the right edge: the dial's labels on top of the rail's read as
     one garbled line. */
  right: clamp(24px, 6vw, 110px); top: 50%;
  transform: translateY(-50%);
  color: var(--text);
  /* Fades out towards the headline and the bottom edge. */
  /* The round fade starts at 88%, outside the tyre. It started at 62% and the tyre, which sits at
     78–88% of the radius, was being faded out on top of its own low opacity — the owner could
     not see it in either theme. */
  -webkit-mask-image: radial-gradient(closest-side, #000 88%, transparent 100%),
                      linear-gradient(90deg, transparent 0%, #000 34%);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(closest-side, #000 88%, transparent 100%),
              linear-gradient(90deg, transparent 0%, #000 34%);
  mask-composite: intersect;
}
.hero-wheel svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-wheel svg * { vector-effect: non-scaling-stroke; }
.hero-wheel circle, .hero-wheel path {
  fill: none; stroke: currentColor; stroke-width: 1; stroke-opacity: .14;
}
.hero-wheel .hw-faint { stroke-opacity: .07; }
/* The countdown ring: one turn of the sweep, ending where the tracker is. */
/* The mark the sweep has to reach, on its own layer over the wheel: inside .hero-wheel it fell in
   the mask's fade at the rim and could barely be seen. */
.hw-meter { display: none; }
.hero[data-bike] .hw-meter {
  display: block; position: absolute; z-index: 1; pointer-events: none;
  width: var(--hw); aspect-ratio: 1; right: var(--hwr); top: calc(50% + var(--hw) * var(--hy));
  transform: translateY(-50%); color: var(--text);
}
.hw-meter svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hw-meter svg * { vector-effect: non-scaling-stroke; }
.hw-meter .hw-mark path { stroke: var(--green); stroke-width: 1.6; stroke-opacity: .45; fill: none; }
/* The mark answers the sweep: dim while it waits, lit for the moment of the fix, then back down. */
.hw-meter .hw-mark { opacity: .5; transition: opacity 1.2s ease; }
.hw-meter.is-fix .hw-mark { opacity: 1; transition: opacity .15s ease; }
.hw-meter .hw-mark-tip { fill: var(--green); fill-opacity: .5; stroke: none; }
.hero-wheel .hw-dial path { stroke-opacity: .18; }
.hero-wheel .hw-tyre { stroke-width: 30; stroke-opacity: .11; }
.hero-wheel .hw-tyre-edge { stroke-width: 1.2; stroke-opacity: .3; }
.hero-wheel .hw-tread { stroke-width: 3; stroke-opacity: .2; stroke-linecap: round; }
/* Cast blades, not wire spokes: closed shapes with a faint fill, so they read as solid metal
   turning rather than as lines. */
.hero-wheel .hw-blades { fill: currentColor; fill-opacity: .1; stroke-width: 1.4; stroke-opacity: .34; }
/* A thin line down each spoke and along both of its arms: the machined edge a cast wheel
   catches the light on, and what makes a flat shape read as a thick one. */
.hero-wheel .hw-blade-hi { stroke-width: 1; stroke-opacity: .3; stroke-linecap: round; }
/* The wave rotor and its floating-disc rivets. */
.hero-wheel .hw-petal { stroke-width: 1.2; stroke-opacity: .22; }
.hero-wheel .hw-rivets circle { fill: currentColor; fill-opacity: .2; stroke: none; }
.hero-wheel .hw-hub { fill: var(--bg); fill-opacity: .6; stroke-opacity: .22; }
/* The rim stripe, the one colour on the wheel — the demo bike wears one — and the part that
   makes the slow turn visible at a glance. */
.hero-wheel .hw-stripe { stroke: var(--green); stroke-width: 2; stroke-opacity: .28; stroke-linecap: round; }
/* The front rim's stripe matches it, in both themes: at the fairing's strength the two rims
   outshone the sweep, which is the thing that moves (the owner's call). */
/* !important: the light theme lifts every .hb-accent to .85 with a longer selector. */
.hero .hb-front .hb-accent { stroke-width: 2 !important; stroke-opacity: .28 !important; }
/* A phone draws the wheel at a quarter of the size, and there the stripes still read louder than
   the sweep: quieter stripes, a stronger sweep. */
@media (max-width: 760px) {
  .hero-wheel .hw-stripe, .hero .hb-front .hb-accent { stroke-opacity: .16 !important; }
  .hero[data-bike] .hw-sweep { opacity: .95; }
}
.hero-wheel .hw-holes circle { fill: currentColor; fill-opacity: .12; stroke: none; }
.hero-wheel text {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  fill: currentColor; fill-opacity: .32;
}

/* The tracker. RED and pulsing while it is out of the sweep; green, with one ring, for ~3.5 s
   after the sweep finds it. The states are classes site.js sets (it knows where the sweep and
   the dot actually are); what each state looks like is here. */
/* The two turning layers are plain boxes over the static dial, so the compositor can turn them
   without repainting anything (see the note in index.html). */
.hero-wheel .hw-spin { position: absolute; inset: 0; will-change: transform; }

/* The sweep: a conic wedge clipped to a ring, rotating on its own layer. */
.hw-sweep {
  position: absolute; inset: 1.5%; border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg 300deg,
    color-mix(in srgb, var(--green) 4%, transparent) 330deg,
    color-mix(in srgb, var(--green) 18%, transparent) 360deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 30%, #000 31%, #000 99%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 30%, #000 31%, #000 99%, transparent 100%);
  opacity: .6;
}

/* The ping: two rings leaving the wheel's axle and passing over the tracker, which sits about
   0.85 wheel-widths out. The box is 2.1 wheel widths across, centred on the axle, so a full ring
   (scale 1) reaches 1.05 wheel widths — just past the tracker, not across the whole hero. Outside
   the wheel's masked layer, or the rings would end at the rim. */
.hw-pulse { display: none; }
.hero[data-anim="pulse"] .hw-pulse {
  display: block; position: absolute; z-index: 0; pointer-events: none;
  width: calc(var(--hw) * 2.1); height: calc(var(--hw) * 2.1);
  right: calc(var(--hwr) - var(--hw) * .55);
  top: calc(50% + var(--hw) * var(--hy)); translate: 0 -50%;
}
/* Not a bare circle: a bright leading edge with the green fading away behind it, the wake the
   radar's wedge left — the owner's word for what made the sweep worth keeping. The gradient is
   part of the ring, so it grows with it. */
.hw-pulse i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--green) 65%, transparent);
  background: radial-gradient(closest-side,
    transparent 58%,
    color-mix(in srgb, var(--green) 3%, transparent) 86%,
    color-mix(in srgb, var(--green) 8%, transparent) 96%,
    color-mix(in srgb, var(--green) 16%, transparent) 100%);
  opacity: 0; transform: scale(.04);
}
.hero[data-anim="pulse"] .hw-sweep { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero[data-anim="pulse"] .hw-pulse i { animation: hw-ping-out 7.5s linear infinite; }
  .hero[data-anim="pulse"] .hw-pulse i:nth-child(2) { animation-delay: .9s; }
}
@media (max-width: 760px) {
  .hero[data-anim="pulse"] .hw-pulse { top: calc(var(--btop) + var(--hw) * 1.26667); }
}
/* Linear growth over the first 60% (4.5 s of 7.5 s) — the figure site.js reads to know where the
   ring's edge is; the rest of the cycle is the pause before the next ping. */
@keyframes hw-ping-out {
  0%   { transform: scale(.04); opacity: 0; }
  5%   { opacity: .9; }
  45%  { opacity: .6; }
  60%  { transform: scale(1); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-wheel .hw-spin { animation: hw-turn 48s linear infinite; }
  .hw-sweep { animation: hw-turn 5s linear infinite; will-change: transform; }
}
@keyframes hw-turn { to { transform: rotate(360deg); } }
/* The sweep on a phone: only the half of the dial that is on screen, then straight back to
   where that half starts. See the phone block below. */
@keyframes hw-turn-half { from { transform: rotate(180deg); } to { transform: rotate(360deg); } }
@keyframes hw-red-dot  { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes hw-red-halo {
  0%, 100% { opacity: .15; transform: scale(.7); }
  50%      { opacity: 1;   transform: scale(1.25); }
}
@keyframes hw-ping {
  0%   { opacity: .9; transform: scale(.35); }
  100% { opacity: 0;  transform: scale(1.6); }
}
/* Still: a steady green fix. */
@media (prefers-reduced-motion: reduce) {
}

/* On a phone the type takes the width, so the wheel goes up and to the side, larger and quieter:
   texture behind the copy rather than a picture beside it. */
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  /* The wheel's centre sits on the right edge here, so only its LEFT half — bottom, round the
     left, to the top — is on screen. The sweep spent half of every turn out of sight; now it
     covers that half and starts again at the bottom. site.js does the same for the tracker,
     which is what the owner asked for first.

     6 s for the half, not 3. At the desktop's 60°/s the sweep came back every 3 s, the tracker
     stays green for 3.5 s after a catch, and so on a phone it was never red at all — the owner
     saw it. At 30°/s a catch comes about every 6 s: green 3.5 s, then red, like the desktop. */
  .hw-sweep { animation: hw-turn-half 5s linear infinite; }
}
@media (max-width: 760px) {
  .hero-wheel {
    width: 118vw; right: -58vw; top: 4%; transform: none; opacity: .7;
    -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  }
}

/* ── Bike silhouette, TRIAL (branch bike-variants) ─────────────────────────────────────────
 * A sport bike whose rear wheel is the hero wheel. The bike is drawn in the wheel's own units:
 * its viewBox is -1380 -620 2000 1200 (160 units of headroom above the sport's -460, for the
 * enduro's mirror and the cruiser's screen, which the layer's mask clipped), the rear axle at (300,300), so the bike box is 3.333 wheel
 * widths wide and 1.7333 tall (widened from 1800 on the left, for the cruiser's long front end;
 * every position is taken from the RIGHT edge, which did not move), the wheel's centre 73.08% down.
 * --hw is the wheel's width, --hy how far below the hero's middle the wheel's centre sits (in
 * wheel widths); every position below is derived from those two, so the axle cannot drift.
 * Facing left (towards the copy), so it rolls left: both wheels turn anticlockwise, and the rim
 * is mirrored so its blades still trail the way they did clockwise. */
.hero-bike { display: none; }
.hero[data-bike] { --hwr: clamp(24px, 6vw, 110px); --hw0: min(330px, 23vw); --hy: .36; }
/* --hw, the wheel's width that every position is built from, is the base size times --bk, ONE
   scale for every kind of bike: the one at which the largest (the cruiser, whose front end and
   screen reach furthest) fits the footprint the sport alone used to have. A scale per kind fitted
   each one but made the wheel grow and shrink between them — the owner found that odd. */
.hero[data-bike] { --bk: .83; --hw: calc(var(--hw0) * var(--bk)); }
/* 5 — the same drawing much larger, behind the whole hero, the copy over it. */
.hero[data-bike="5"] { --hw0: min(440px, 31vw); --hy: .3; }
.hero[data-bike="5"] .hero-bike { opacity: .6; }
/* 6 — small and low on the right: the whole bike clear of the headline, the wheel a detail. */
.hero[data-bike="6"] { --hw0: min(240px, 16vw); --hy: .95; }
.hero[data-bike="3"] { --hw0: min(580px, 46vw); --hy: 0; }
.hero[data-bike] .hero-wheel {
  width: var(--hw); right: var(--hwr);
  top: calc(50% + var(--hw) * var(--hy));
}
.hero[data-bike]:not([data-bike="3"]) .hero-wheel {
  -webkit-mask-image: radial-gradient(closest-side, #000 90%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 90%, transparent 100%);
}
.hero[data-bike] .hero-bike {
  display: block; position: absolute; z-index: 0; pointer-events: none;
  width: calc(var(--hw) * 3.33333); aspect-ratio: 2000 / 1200;
  right: calc(var(--hwr) - var(--hw) * .03333);
  top: calc(50% + var(--hw) * var(--hy) - var(--hw) * 1.53333);
  color: var(--text);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
}
.hero[data-bike="3"] .hero-bike {
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 62%), linear-gradient(180deg, transparent 0%, #000 30%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 22%, #000 62%), linear-gradient(180deg, transparent 0%, #000 30%);
  mask-composite: intersect;
}
.hero-bike > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-bike svg * { vector-effect: non-scaling-stroke; }
.hero-bike path, .hero-bike circle, .hero-bike ellipse { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-opacity: .2; stroke-linejoin: round; }
.hero-bike .hb-body { fill: currentColor; fill-opacity: .035; stroke-width: 1.5; stroke-opacity: .36; }
.hero-bike .hb-swingarm, .hero-bike .hb-exhaust { fill: currentColor; fill-opacity: .05; stroke-opacity: .3; }
.hero-bike .hb-fork { stroke-opacity: .3; }
.hero-bike .hb-cut { fill: currentColor; fill-opacity: .14; stroke-opacity: .34; }
.hero-bike .hb-shock { stroke-width: 2; stroke-opacity: .26; }
.hero[data-bike="2"] .hb-cut { fill: var(--bg); fill-opacity: .7; stroke-opacity: .1; }
.hero-bike .hb-hugger { stroke-width: 2; stroke-opacity: .28; }
.hero-bike .hb-ground { stroke-opacity: .14; stroke-dasharray: 2 7; }
.hero-bike .hb-accent { stroke: var(--green); stroke-width: 2.5; stroke-opacity: .55; stroke-linecap: round; }
.hero-bike .hb-tyre { stroke-width: 22; stroke-opacity: .1; }
.hero-bike .hb-faint { stroke-opacity: .1; }
.hero-bike .hb-spoke { fill: currentColor; fill-opacity: .08; stroke-opacity: .3; }
.hero-bike .hb-shade-top { stop-color: currentColor; stop-opacity: .02; }
.hero-bike .hb-shade-low { stop-color: currentColor; stop-opacity: .14; }
.hero-bike .hb-shadow { stroke: none; opacity: .5; }
.hero-bike .hb-shadow-in { stop-color: #000; stop-opacity: .5; }
.hero-bike .hb-shadow-out { stop-color: #000; stop-opacity: 0; }
/* Light: on paper the flat grey read as a smudge — the owner: "parca lipseste ceva". Depth from
   the shaded fill and the shadow, a crisper edge, and the accents at full strength. */
:root[data-theme="light"] .hero[data-bike] .hb-body { fill: url(#hb-shade); fill-opacity: 1; stroke-opacity: .5; }
:root[data-theme="light"] .hero[data-bike] .hb-shadow { opacity: .28; }
:root[data-theme="light"] .hero[data-bike] .hb-shade-top { stop-opacity: .05; }
:root[data-theme="light"] .hero[data-bike] .hb-shade-low { stop-opacity: .24; }
:root[data-theme="light"] .hero[data-bike] .hero-bike .hb-line { stroke-opacity: .32; }
:root[data-theme="light"] .hero[data-bike] .hero-bike .hb-accent { stroke-opacity: .85; }
:root[data-theme="light"] .hero[data-bike] .hero-bike .hb-vent { fill: #fff; fill-opacity: .7; stroke-opacity: .45; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero[data-bike] .hb-body { fill: url(#hb-shade); fill-opacity: 1; stroke-opacity: .5; }
  :root:not([data-theme="dark"]) .hero[data-bike] .hb-shadow { opacity: .28; }
  :root:not([data-theme="dark"]) .hero[data-bike] .hb-shade-top { stop-opacity: .05; }
  :root:not([data-theme="dark"]) .hero[data-bike] .hb-shade-low { stop-opacity: .24; }
  :root:not([data-theme="dark"]) .hero[data-bike] .hero-bike .hb-line { stroke-opacity: .32; }
  :root:not([data-theme="dark"]) .hero[data-bike] .hero-bike .hb-accent { stroke-opacity: .85; }
  :root:not([data-theme="dark"]) .hero[data-bike] .hero-bike .hb-vent { fill: #fff; fill-opacity: .7; stroke-opacity: .45; }
}
.hero-bike .hb-vent { fill: var(--bg); fill-opacity: .55; stroke-opacity: .34; }
.hero-bike .hb-bolts { stroke-width: 5; stroke-linecap: round; stroke-opacity: .3; }
.hero-bike .hb-lamp { stroke-width: 2.5; stroke-opacity: .6; stroke-linecap: round; }
.hero-bike .hb-unit { fill: none; stroke: var(--green); stroke-width: 1.2; stroke-opacity: .5; vector-effect: non-scaling-stroke; }
.hero-bike .hb-led { stroke: none; }
@keyframes hb-led { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.hero-bike .hb-dims { display: none; }
.hero-bike .hb-dims text { font-family: var(--mono); font-size: 19px; letter-spacing: .14em; fill: currentColor; fill-opacity: .4; stroke: none; }
.hero-bike .hb-dims path { stroke-opacity: .3; }
.hero-bike .hb-dims .hb-dash { stroke-dasharray: 5 6; stroke-opacity: .22; }
.hb-front {
  position: absolute; left: 11.715%; top: 57.921%; width: 26.015%; height: 43.358%;
  will-change: transform;
}
.hb-front svg { width: 100%; height: 100%; overflow: visible; }

/* 2 — a filled shadow, not a drawing: the shape reads first, the details barely. */
.hero[data-bike="2"] .hb-body { fill-opacity: .1; stroke-opacity: .16; }
.hero[data-bike="2"] .hb-swingarm, .hero[data-bike="2"] .hb-exhaust { fill-opacity: .1; stroke-opacity: .12; }
.hero[data-bike="2"] .hero-bike .hb-line { stroke-opacity: .08; }
.hero[data-bike="2"] .hb-tyre { stroke-opacity: .16; }
/* 4 — a blueprint: construction lines and dimensions, the dial's HUD carried over the bike. */
.hero[data-bike="4"] .hb-dims { display: inline; }
.hero[data-bike="4"] .hb-body { fill-opacity: 0; stroke-opacity: .42; }
.hero[data-bike="4"] .hb-ground { stroke-dasharray: none; stroke-opacity: .22; }

@media (prefers-reduced-motion: no-preference) {
  .hero[data-bike] .hero-wheel .hw-spin { animation-name: hw-turn-ccw; }
  .hero[data-bike] .hb-front { animation: hw-turn-ccw 48s linear infinite; }
}
.hero[data-bike] .hero-wheel .hw-spin > svg { transform: scaleX(-1); }
@keyframes hw-turn-ccw { to { transform: rotate(-360deg); } }

/* Phone: the whole bike across the top of the screen (1, 2, 4), or the big wheel with the bike
   running off to the left of it (3). */
@media (max-width: 760px) {
  .hero[data-bike]:not([data-bike="3"]) .hw-meter { top: calc(var(--btop) + var(--hw) * 1.26667); }
  .hero[data-bike]:not([data-bike="3"]) {
    --hw0: 27vw; --btop: 40px;
    /* Centred on the screen, not pinned to the right edge: the bikes' drawings are centred, on
       average over the four, at unit -310 — 910 units left of the wheel's right edge — so the wheel
       stands that far right of the middle. At 4vw the bike sat visibly right of centre. */
    --hwr: calc(50vw - var(--hw) * 910 / 600);
  }
  /* Header, bike, its card, the copy — and the hero is a full screen, so the demo map below never
     shows in the first one (the owner: "nu vreau sa se vada sectiunea 2"). No single band of
     nothing either: site.js measures the spare height, grows the bike into it as far as the width
     allows, and splits the rest three ways — under the header (--btop), between the card and the
     copy (--gcopy) and under the copy (--gbot, where Safari's bar floats). */
  .hero[data-bike]:not([data-bike="3"]) {
    align-items: start;
    min-height: 100vh; min-height: 100lvh;
    padding-top: calc(var(--btop) + var(--hw) * 1.7333 + 14px + 52px + var(--gcopy, 26px));
    padding-bottom: var(--gbot, 96px);
  }
  .hero[data-bike]:not([data-bike="3"]) .hero-wheel {
    width: var(--hw); right: var(--hwr); top: calc(var(--btop) + var(--hw) * 1.26667);
    transform: translateY(-50%); opacity: 1;
  }
  .hero[data-bike]:not([data-bike="3"]) .hero-bike { top: calc(var(--btop) - var(--hw) * .26667); opacity: .9; -webkit-mask-image: none; mask-image: none; }
  .hero[data-bike]:not([data-bike="3"]) .hw-labels { display: none; }
  .hero[data-bike]:not([data-bike="3"]) .hero-toasts { top: calc(var(--btop) + var(--hw) * 1.7333 + 14px); }
  .hero[data-bike="3"] .hero-wheel { width: 118vw; right: -58vw; top: 4%; }
  .hero[data-bike="3"] .hero-bike {
    width: calc(118vw * 3.33333); right: calc(-58vw - 118vw * .03333);
    top: calc(4% + 118vw * .5 - 118vw * 1.53333); opacity: .7;
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .hero[data-bike]:not([data-bike="3"]) .hw-sweep { animation-name: hw-turn; }
}

/* The tracker hotspot on the silhouette. Its centre is the tracker unit's (-63.2, -65.8) in bike
   units (after the detail layer's transform) — 62.04% across and 37.90% down the bike box — carried through the same --hw/--hy/--hwr
   arithmetic as the bike, so it cannot come loose from the drawing. */
.hb-hot { display: none; }
.hero[data-bike]:not([data-bike="3"]) .hb-hot {
  display: block; position: absolute; z-index: 4; width: 0; height: 0;
  right: calc(var(--hwr) + var(--hw) * 1.1055 - var(--hw) * var(--tdx, 0) / 600);
  top: calc(50% + var(--hw) * var(--hy) - var(--hw) * .6097 + var(--hw) * var(--tdy, 0) / 600);
}
.hb-hot-btn {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px;
  border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
}
/* The same tracker as the one on the rim, and the same states: red and pulsing, green with a
   ring for ~3.5 s when the sweep passes over it (site.js sets .is-lit / .is-pinging). The dot
   that used to ride the rim is gone: it read as a tracker bolted to the tyre. */
.hb-hot-btn span, .hb-hot-btn::before, .hb-hot-btn::after {
  content: ''; position: absolute; inset: 0; margin: auto; border-radius: 50%;
}
.hb-hot-btn span { width: 10px; height: 10px; background: #ef4444; transition: background .3s ease; }
.hb-hot-btn::before { width: 20px; height: 20px; background: rgba(239,68,68,.18); border: 1px solid rgba(239,68,68,.5); opacity: 0; }
.hb-hot-btn::after { width: 28px; height: 28px; border: 1.5px solid var(--green); opacity: 0; }
.hb-hot.is-lit .hb-hot-btn span { background: var(--green); }
@media (prefers-reduced-motion: no-preference) {
  .hb-hot:not(.is-lit) .hb-hot-btn span { animation: hw-red-dot 1.3s ease-in-out infinite; }
  .hb-hot:not(.is-lit) .hb-hot-btn::before { animation: hw-red-halo 1.3s ease-in-out infinite; }
  .hb-hot.is-pinging .hb-hot-btn::after { animation: hw-ping 1.1s cubic-bezier(.2,.7,.3,1) 1 both; }
  .hero-bike:not(.is-lit) .hb-led { animation: hb-led 1.3s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) { .hb-hot-btn span { background: var(--green); } }
.hero-bike .hb-led { fill: #ef4444; transition: fill .3s ease; }
.hero-bike.is-lit .hb-led { fill: var(--green); }
.hb-hot-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* What makes it read as something to press: a callout in the blueprint's own hand, drawn in the
   bike's SVG (.hb-callout): a reticle on the unit, a leader straight up through the clear air over
   the seat, then across, with the name over the line and what is inside under it. The button
   reaches over the label with an invisible hit area, in the same units: 1 bike unit =
   --hw × .9636 / 600 px (detail group scale × box scale); the label spans units -70…160 across and
   -375…-295 up, i.e. 8…298 and -286…-206 from the unit's centre (-78, -89). */
.hb-hot-hit {
  position: absolute; left: 22px; top: 22px;
  width: calc(var(--hw) * .9636 / 600 * 300); height: calc(var(--hw) * .9636 / 600 * 90);
  translate: calc(var(--hw) * .9636 / 600 * 2) calc(var(--hw) * .9636 / 600 * -290);
}
.hero-bike .hb-callout text { stroke: none; transition: opacity .8s ease .3s, fill-opacity .2s ease; }
.hero-bike .hb-co-name { font-family: var(--mono); font-size: 27px; font-weight: 600; letter-spacing: .24em; fill: var(--green); }
/* A phone draws the bike at a quarter of the desktop's size, and the label with it: there the
   name is set larger and the line under it, unreadable at that size anyway, is left out. */
@media (max-width: 760px) {
  /* SVG text scales with the drawing, and at a phone's scale even twice the size stayed ~9 px. So
     the name is set as HTML in the hotspot's own hit area instead, at a fixed readable size, over
     the same leader; the SVG name and the line under it are left out. The hit area also grows to
     a size a thumb can find. */
  .hero-bike .hb-co-name, .hero-bike .hb-co-sub { display: none; }
  .hb-hot-hit { min-width: 96px; min-height: 30px; }
  .hb-hot-hit::after {
    content: 'TRACKER'; position: absolute; left: 2px;
    top: calc(var(--hw) * .9636 / 600 * 45 - 15px);   /* its foot 3 px over the leader */
    font: 600 12px/1 var(--mono); letter-spacing: .2em; color: var(--green);
  }
}
.hero-bike .hb-co-sub { font-family: var(--mono); font-size: 16px; letter-spacing: .16em; fill: currentColor; fill-opacity: .5; }
.hero-bike .hb-co-go { opacity: 0; transition: opacity .2s ease; }
.hero-bike .hb-co-lead { fill: none; stroke: var(--green); stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 4 5; transition: stroke-opacity .2s ease; }
.hero-bike .hb-co-tick { fill: none; stroke: var(--green); stroke-opacity: .75; stroke-width: 1.2; }
.hero-bike .hb-co-ring { fill: none; stroke: var(--green); stroke-opacity: .5; stroke-width: 1; }
.hero-bike .hb-co-end { fill: var(--green); stroke: none; }
.hero:has(.hb-hot-btn:hover) .hb-co-lead, .hero:has(.hb-hot-btn:focus-visible) .hb-co-lead { stroke-dasharray: none; stroke-opacity: 1; }
.hero:has(.hb-hot-btn:hover) .hb-co-go, .hero:has(.hb-hot-btn:focus-visible) .hb-co-go { opacity: 1; }
.hero:has(.hb-hot-btn:hover) .hb-co-sub { fill-opacity: .8; }
.hero-bike:is(.is-drawing, .is-morphing) :is(.hb-callout text, .hb-co-end) { opacity: 0; }
.hb-hot-btn:hover::after { width: 34px; height: 34px; }

.hb-card {
  /* Opens downwards: upwards it ran under the header on a short window. */
  position: absolute; right: -40px; top: 30px; width: 290px;
  border-radius: 16px; overflow: hidden;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: 85% 0;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s;
}
.hb-hot:hover .hb-card, .hb-hot:focus-within .hb-card, .hb-hot.is-open .hb-card {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s;
}
.hb-card-shot { margin: 0; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--text) 5%, transparent); }
.hb-card-shot img, .hb-card-shot svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.hb-card-shot .bx-top   { fill: color-mix(in srgb, var(--text) 22%, var(--bg)); }
.hb-card-shot .bx-left  { fill: color-mix(in srgb, var(--text) 38%, var(--bg)); }
.hb-card-shot .bx-right { fill: color-mix(in srgb, var(--text) 30%, var(--bg)); }
.hb-card-shot path { stroke: color-mix(in srgb, var(--text) 50%, transparent); stroke-width: 1; stroke-linejoin: round; }
.hb-card-shot .bx-seam { fill: none; stroke-opacity: .5; }
.hb-card-shot .bx-cable { fill: none; stroke-width: 3; stroke-linecap: round; }
.hb-card-shot .bx-led { fill: var(--green); }
.hb-card-shot .bx-label { font: 600 7px var(--mono); letter-spacing: .12em; fill: var(--bg); opacity: .7; }
.hb-card-body { padding: .85rem 1rem 1rem; display: grid; gap: .4rem; }
.hb-card-body b { font-family: var(--display); font-size: .95rem; color: var(--text); }
.hb-card-body p { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.hb-card-body a { font-size: .78rem; color: var(--green); text-decoration: none; }
.hb-card-body a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .hero[data-bike]:not([data-bike="3"]) .hb-hot { top: calc(var(--btop) + var(--hw) * .6569 + var(--hw) * var(--tdy, 0) / 600); }
  .hb-card { right: -110px; width: min(290px, 80vw); transform-origin: 60% 0; }
}

/* ── Bike types ─────────────────────────────────────────────────────────────────────────
   Sport is the page's own drawing, with its detail layer and its measured dims; the other types
   (assets/bike-types.json) are traced outlines and their larger inner shapes, with dims drawn by
   site.js from their axles. The hero wheel is every type's rear wheel and never changes. */
.hero-bike .hb-tdet { display: none; }
.hero-bike[data-type="cruiser"] .hb-tdet[data-for="cruiser"],
.hero-bike[data-type="enduro"] .hb-tdet[data-for="enduro"],
.hero-bike[data-type="naked"] .hb-tdet[data-for="naked"] { display: inline; }
.hero-bike:is(.is-drawing, .is-morphing) .hb-tdet :is(.hb-vent, .hb-exhaust) { fill-opacity: 0 !important; }
.hero-bike .hb-holes { fill: none; stroke: currentColor; stroke-opacity: .22; stroke-width: 1; }
.hero-bike[data-type]:not([data-type="sport"]) :is(.hb-detail, .hb-swingarm, .hb-dims) { display: none; }
.hero-bike .hb-dims-gen { display: none; }
.hero[data-bike="4"] .hero-bike[data-type]:not([data-type="sport"]) .hb-dims-gen { display: inline; }
.hero-bike .hb-dims-gen text { font-family: var(--mono); font-size: 19px; letter-spacing: .14em; fill: currentColor; fill-opacity: .4; stroke: none; }
.hero-bike .hb-dims-gen .hb-type { font-size: 24px; letter-spacing: .3em; fill: var(--green); fill-opacity: .85; }
.hero-bike .hb-dims-gen path { stroke-opacity: .3; }
.hero-bike .hb-dims-gen .hb-dash { stroke-dasharray: 5 6; stroke-opacity: .22; }

/* ── Draw-on ──────────────────────────────────────────────────────────────────────────── */
/* site.js sets the dash per path; this hides fills, dims and callouts meanwhile. */
.hero-bike:is(.is-drawing, .is-morphing) :is(.hb-body, .hb-swingarm, .hb-vent, .hb-spoke) { fill-opacity: 0 !important; }
.hero-bike:is(.is-drawing, .is-morphing) .hb-shadow { opacity: 0; }
.hero-bike .hb-body, .hero-bike .hb-swingarm, .hero-bike .hb-vent, .hero-bike .hb-shadow { transition: fill-opacity .9s ease, opacity .9s ease; }
.hero-bike:is(.is-drawing, .is-morphing) :is(.hb-dims, .hb-dims-gen, .hb-accent, .hb-unit, .hb-led) { opacity: 0; }
.hero-bike .hb-dims-gen { transition: opacity .8s ease .2s; }
.hero-bike .hb-dims, .hero-bike .hb-accent, .hero-bike .hb-unit, .hero-bike .hb-led { transition: opacity .8s ease .2s; }
/* .hero[data-bike] in front: the phone block sets the wheel's opacity with a stronger selector. */
.hero[data-bike] .hero-bike.is-drawing ~ :is(.hero-wheel, .hw-meter),
.hero[data-bike] .hero-bike:is(.is-drawing, .is-morphing) ~ .hb-hot { opacity: 0; }
/* While a type changes the hotspot moves: no hover card on a bike that is being redrawn. */
.hero[data-bike] .hero-bike.is-morphing ~ .hb-hot { pointer-events: none; }
.hb-hot { transition: opacity .8s ease .3s; }
.hero-wheel, .hero[data-bike] .hw-meter { transition: opacity 1s ease; }
/* Hidden from the first paint, not faded out after it: the markup starts as .is-drawing.is-pre and
   site.js drops .is-pre once every dash is set, so nothing is seen whole and then un-drawn. */
.hero[data-bike] .hero-bike.is-pre { opacity: 0; }
.hero[data-bike] .hero-bike.is-drawing ~ :is(.hero-wheel, .hw-meter, .hb-hot) { transition: none; }

.bike-pick { flex-wrap: wrap; max-width: calc(100vw - 24px); border-radius: 18px; }
.bike-pick .fx-row { display: flex; gap: 4px; flex-wrap: wrap; width: 100%; border-top: 1px solid var(--line); padding-top: 4px; }

/* The trial's switcher. */
.bike-pick {
  position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 500 .72rem var(--mono);
}
.bike-pick button {
  border: 0; border-radius: 999px; padding: .45rem .7rem; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit;
}
.bike-pick button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.bike-pick.is-min > :not(.bike-pick-fold) { display: none; }
.bike-pick-fold { font-size: .9rem !important; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 clamp(1.5rem, 4vw, 2.4rem);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

h1 {
  font-family: var(--display);
  margin: 0 0 clamp(1.2rem, 3vw, 1.8rem);
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  /* NOT below 1. Romanian sets Ș and Ț with a comma BELOW the baseline, and at .92 the next
     line's box overlapped exactly where that comma sits — "Știi" rendered as "Stii". The glyph
     was there and the font was loaded; the line box was eating it. Display type in this language
     cannot use the sub-1 leading that looks so good in English. */
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 800;
}
.muted-line { color: var(--dim); }

.lede {
  margin: 0 0 clamp(2rem, 5vw, 2.8rem);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--muted); max-width: 30ch; font-weight: 400;
}

/* No buttons in the hero: the header carries "Intră pe listă" (the owner's call, phone first,
   then everywhere). So the list is the last thing in the copy. */
.hero .lede-list { margin-bottom: 0; }

/* No artwork in the hero. It was a render of the bike bled off the right edge, and the owner's
   call was to drop it — the headline carries the section on its own, and a photograph competing
   with it was the thing making this read as a template. The still is still in assets/, unused by
   this page at all, so the file is deleted with it.
   .hero-inner keeps its measure so the line breaks stay deliberate at any width. */
@media (min-width: 1000px) {
  .hero-inner { max-width: 46rem; }
}

/* ── Chapters ───────────────────────────────────────────────────────────── */

.chapters .wrap {
  display: grid; gap: clamp(2.5rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.chapter { }
.chapter-n {
  display: block; font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .16em; color: var(--green); margin-bottom: 1.1rem;
}
.chapter h2 {
  font-family: var(--display);
  margin: 0 0 .55rem;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.1; letter-spacing: -.035em; font-weight: 700;
}
.chapter p { margin: 0; color: var(--muted); font-size: .96rem; max-width: 26ch; }

/* ── Numbers ────────────────────────────────────────────────────────────── */

.specs {
  display: grid; gap: clamp(1.8rem, 4vw, 3rem); margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4vw, 2.8rem);
}
.specs dt {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700;
  letter-spacing: -.045em; line-height: 1;
}
.specs dt span { font-size: .38em; font-weight: 500; color: var(--dim); margin-left: .12em; letter-spacing: -.01em; }
.specs dd { margin: .7rem 0 0; font-size: .87rem; color: var(--dim); max-width: 22ch; }
/* The 22ch measure is for the side-by-side columns; a phone stacks them one per row, and there it
   left the text in the left half of the screen (the owner's screenshot). */
@media (max-width: 760px) { .specs dd { max-width: 40ch; } }

/* ── Each figure acts out what it means ─────────────────────────────────────
 * A small loop above every number: the signal being acquired, the position going out, points
 * stored while there is no network and then sent, the contacts reached one by one. They start
 * when their figure arrives (the reveal's `.in`), and stay still under reduced motion, where each
 * one shows its finished state instead.
 *
 * Every animated part is an OPACITY or TRANSFORM on a pseudo-element or a ring — never a
 * background-color change. Four of these loop for as long as the page is open, and colour
 * animation repaints; these composite.
 */
.spec-ico {
  display: flex; align-items: flex-end; gap: 4px;
  height: 28px; margin-bottom: .95rem;
  color: var(--green);
}
.spec-ico i, .spec-ico b { position: relative; display: block; }
/* The lit layer every cell shares: off by default, faded in by each icon's own keyframes. */
.ico-signal i::after, .ico-buffer i::after, .ico-contacts i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: currentColor; opacity: 0;
}

/* 4G — four bars climbing, then a pause at full strength before it starts again. */
.ico-signal i { width: 6px; border-radius: 2px; background: var(--line-2); }
.ico-signal i:nth-child(1) { height: 25%; --n: 0; }
.ico-signal i:nth-child(2) { height: 50%; --n: 1; }
.ico-signal i:nth-child(3) { height: 75%; --n: 2; }
.ico-signal i:nth-child(4) { height: 100%; --n: 3; }
.specs > .in .ico-signal i::after {
  animation: spec-signal 3s calc(var(--n) * .22s) infinite both;
}
@keyframes spec-signal {
  0%, 6%   { opacity: 0; }
  14%, 72% { opacity: 1; }
  86%, 100% { opacity: 0; }
}

/* 5–30 s — a fix, and the position leaving it as a ring, twice per cycle. */
.ico-ping { width: 28px; align-items: center; justify-content: center; position: relative; }
.ico-ping b {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.ico-ping i {
  position: absolute; inset: 0; margin: auto;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: 0; transform: scale(.3);
}
.specs > .in .ico-ping i { animation: spec-ping 2.4s cubic-bezier(.2, .7, .3, 1) infinite; }
.specs > .in .ico-ping i:nth-child(2) { animation-delay: 1.2s; }
@keyframes spec-ping {
  0%   { opacity: .9; transform: scale(.3); }
  100% { opacity: 0;  transform: scale(1.15); }
}

/* ~50 min — memory filling while the network is gone, then emptying as it is sent. A wave: each
   cell lights in turn and goes out in the same order. */
.ico-buffer { align-items: stretch; height: 22px; margin-top: 6px; gap: 3px; }
.ico-buffer i { width: 7px; border-radius: 2px; background: var(--line-2); }
.ico-buffer i:nth-child(1) { --n: 0; } .ico-buffer i:nth-child(2) { --n: 1; }
.ico-buffer i:nth-child(3) { --n: 2; } .ico-buffer i:nth-child(4) { --n: 3; }
.ico-buffer i:nth-child(5) { --n: 4; } .ico-buffer i:nth-child(6) { --n: 5; }
.specs > .in .ico-buffer i::after {
  animation: spec-buffer 3.6s calc(var(--n) * .28s) infinite both;
}
@keyframes spec-buffer {
  0%, 4%   { opacity: 0; }
  10%, 58% { opacity: 1; }
  66%, 100% { opacity: 0; }
}

/* 5 contacts — reached one after another: each lights, sends a ring out, stays lit. */
.ico-contacts { align-items: center; gap: 5px; }
.ico-contacts i {
  width: 12px; height: 12px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.ico-contacts i::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: 0;
}
.ico-contacts i:nth-child(1) { --n: 0; } .ico-contacts i:nth-child(2) { --n: 1; }
.ico-contacts i:nth-child(3) { --n: 2; } .ico-contacts i:nth-child(4) { --n: 3; }
.ico-contacts i:nth-child(5) { --n: 4; }
.specs > .in .ico-contacts i::after { animation: spec-contact 4s calc(var(--n) * .32s) infinite both; }
.specs > .in .ico-contacts i::before { animation: spec-contact-ring 4s calc(var(--n) * .32s) infinite both; }
@keyframes spec-contact {
  0%, 4%   { opacity: 0; }
  10%, 70% { opacity: 1; }
  82%, 100% { opacity: 0; }
}
@keyframes spec-contact-ring {
  0%, 4% { opacity: 0; transform: scale(1); }
  8%     { opacity: .9; transform: scale(1); }
  24%    { opacity: 0; transform: scale(2.1); }
  100%   { opacity: 0; transform: scale(2.1); }
}

/* Still, and finished: full signal, a fix with its halo, a full buffer, everyone reached. */
@media (prefers-reduced-motion: reduce) {
  .spec-ico i, .spec-ico i::after, .spec-ico i::before { animation: none !important; }
  .ico-signal i::after, .ico-buffer i::after, .ico-contacts i::after { opacity: 1; }
  .ico-ping i { display: none; }
}

/* ── Capability list ────────────────────────────────────────────────────── */

/* Named, not explained. A reader scanning a list of twelve short lines learns more in four
   seconds than they would from twelve paragraphs they will not read. */
.caps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
}
.caps li {
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.02rem; font-weight: 500; letter-spacing: -.02em;
  color: var(--muted);
  transition: color .2s;
}
.caps li:hover { color: var(--text); }

/* ── Sign-up ────────────────────────────────────────────────────────────── */

.signup-sec { border-top: 1px solid var(--line); }
.signup h2 {
  font-family: var(--display);
  margin: 0 0 clamp(1.8rem, 4vw, 2.4rem);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05; letter-spacing: -.04em; font-weight: 800;   /* see h1: comma-below glyphs */
}
.signup-form { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 32rem; }
.signup-form input[type=email] {
  flex: 1 1 15rem; min-width: 0;
  padding: .85rem 1.1rem; border-radius: 999px;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2);
  font: inherit; font-size: 16px;   /* 16px or iOS zooms the page on focus */
  outline: none; transition: border-color .2s;
}
.signup-form input[type=email]:focus { border-color: var(--text); }
.signup-form input[type=email]::placeholder { color: var(--dim); }
/* A phone puts the button on its own line under the field: the full width of it, and the same
   height (the field's 16 px text, so the same padding gives the same box). */
@media (max-width: 760px) {
  .signup-form .btn { flex: 1 1 100%; font-size: 16px; }
}

/* The honeypot: out of sight and out of the tab order, but still in the DOM for the scripts that
   fill every field they find. The SERVER is what refuses it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg { margin: 1rem 0 0; font-size: .9rem; min-height: 1.4em; }
.form-msg.ok  { color: var(--green); }
.form-msg.err { color: var(--red); }
.consent { margin: 1.2rem 0 0; font-size: .82rem; color: var(--dim); }
.consent a { color: var(--muted); }

/* ── Questions ──────────────────────────────────────────────────────────── */

.faq { display: grid; }
/* SCOPED TO .faq. MapLibre's attribution control is a <details> with a <summary> too, and a bare
   selector here dressed it as a FAQ row in the corner of the map. */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq details summary {
  cursor: pointer; list-style: none;
  padding: 1.3rem 0;
  font-size: 1.02rem; font-weight: 500; letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.faq details summary::-webkit-details-marker { display: none; }
.faq details summary::after {
  content: ''; flex: 0 0 auto; width: 9px; height: 9px;
  border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .2s;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details summary:hover::after { border-color: var(--text); }
.faq details p {
  margin: -.3rem 0 1.4rem; color: var(--muted); font-size: .95rem; max-width: 52ch;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-foot { border-top: 1px solid var(--line); padding-block: 2.5rem 3.5rem; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-foot p { margin: 0; font-size: .82rem; color: var(--dim); }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.foot-links a { color: var(--dim); text-decoration: none; font-size: .82rem; transition: color .2s; }
.foot-links a:hover { color: var(--text); }

/* Visible keyboard focus everywhere, stated once. */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px;
}

.mapnote { margin: 1.1rem 0 0; font-size: .84rem; color: var(--dim); }

/* ── Motion ─────────────────────────────────────────────────────────────── */

/* THE HIDDEN STATE IS APPLIED BY JAVASCRIPT, NOT BY DEFAULT. `.js-reveal` goes on <html> from
   site.js; without it none of this applies and the page is simply visible. A site that hides its
   own content in CSS and needs JS to show it again is one failed request from a blank page. */
/* NOT the chapter cards. A finished animation with `both` keeps its last keyframe applied for
   ever, and a keyframe outranks every normal declaration — so `opacity` and `transform` from the
   sticky stack below stopped applying the moment a card revealed. The cards then stayed at full
   strength while covered: several of them overlapping, each readable through the one in front.
   Measured on the live page: --cover was 1.000 and the computed opacity was 1; cancelling the
   animation by hand dropped it to 0 at once.

   Leaving them out is safe, and is what the safety net further down already does: with no script
   at all, --cover stays at its declared 0 and the stack rule resolves to opacity 1. The card is
   visible by default; it is the SCRIPT that fades it. */
.js-reveal .reveal:not(.chapter) { opacity: 0; will-change: opacity, transform; }
/* An ANIMATION, not a transition. A transition needs the hidden state to have been painted first,
   and everything already on screen when site.js runs got `.in` in the same frame that hid it — so
   the hero's line and its four promises simply appeared (the owner saw nothing, twice). Keyframes
   carry their own starting point and play whenever the class lands. */
.js-reveal .reveal:not(.chapter).in {
  opacity: 1; transform: none; will-change: auto;
  animation: reveal-in .7s cubic-bezier(.16,.8,.3,1) calc(var(--i, 0) * 80ms) both;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .btn:active { transform: none; }
  .eyebrow .dot { animation: none; }
  .faq details summary::after { transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* ── 3D viewer ──────────────────────────────────────────────────────────── */

.viewer {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  /* No poster any more. It was a still of the OLD model at the OLD camera angle, so the moment
     the live one arrived it visibly jumped — a placeholder that lies about what it is standing in
     for is worse than an empty frame for the second it takes to load. */
  background: radial-gradient(70% 70% at 50% 40%, var(--viewer-bg), var(--bg-2));
  /* An explicit ratio, so the page does not jump when the model finally arrives. */
  /* Small on purpose. The model is 6% of its original geometry, which is invisible at this size
     and obvious at twice it — the simplification is what makes the page affordable, so the frame
     is sized to the model rather than the model stretched to fill a frame. */
  aspect-ratio: 16 / 10;
  max-width: 34rem;
  max-height: 340px;
  margin-inline: auto;
  overflow: hidden;
  display: grid; place-items: center;
}
/* aspect-ratio boxes need this or they can push the page wider than the screen */
.viewer, .viewer * { max-width: 100%; }

/* Anchored to the bottom, not centred: centred put it across the bike's tank, where a
   translucent panel over a dark model is unreadable and hides the thing it is advertising. */
.viewer-load {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .8rem 1.5rem; border-radius: 12px; cursor: pointer;
  font: inherit; color: var(--text); text-align: center;
  background: var(--overlay); color: var(--on-overlay);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  transition: border-color .15s, background .15s;
}
.viewer-load:hover { border-color: var(--green); }
.viewer-label { font-weight: 600; }

.viewer model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
/* Once the live model is up, the still behind it would show through its transparent edges. */
/* The poster is its own element rather than a background image, so it can carry the same
   saturate() the live model gets. It is an APPROXIMATION: the still was rendered before the
   owner's exposure 0.6 and metalness offset were applied, and re-rendering it needs a browser
   that is actually painting — which this session's did not have by the end. Close enough that
   the swap to the live model is not a jolt; exact only once it is re-shot. */


.viewer-status {
  position: absolute; inset: auto 0 .9rem; text-align: center;
  font-size: .85rem; color: var(--dim); pointer-events: none;
}
.viewer-hint {
  position: absolute; left: .9rem; bottom: .9rem;
  font-size: .78rem; color: var(--dim);
  background: var(--overlay-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: .25rem .7rem; pointer-events: none;
}


/* ── The live map ───────────────────────────────────────────────────────── */

.livemap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  /* The screenshot sits underneath as the placeholder, so the block never flashes empty and
     still shows the product if MapLibre or the tiles never arrive. */
  background: url('../assets/shots/map-city.webp?v=2') center/cover no-repeat, var(--bg-2);
}
.livemap.is-live { background-image: none; }
.livemap canvas { outline: none; }
.livemap-fallback {
  position: absolute; inset: auto 0 1rem; margin: 0; text-align: center;
  font-size: .85rem; color: var(--dim);
  text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.livemap .maplibregl-ctrl-attrib {
  font-size: 10px;
  background: var(--overlay-soft);
}
.livemap .maplibregl-ctrl-attrib a { color: var(--dim); }
.livemap-badge {
  position: absolute; left: .8rem; top: .8rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim);
  background: var(--overlay-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: .28rem .7rem;
  pointer-events: none;
}
.livemap-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}


/* ── Map markers ────────────────────────────────────────────────────────── */

/* These are HTML elements positioned over the WebGL canvas, not map layers, because MapLibre
   depth-tests circle and symbol layers against 3D buildings — a marker in a street with tall
   buildings around it is simply not drawn. The application makes the same choice for the same
   reason. Everything here is therefore ordinary CSS over the map. */

/* MapLibre gives every marker element its own positioning; these only lay out their contents.
   A column with the dot on top and the name under it, centred, and never catching a click —
   a marker that swallows the drag makes the map feel broken. */
.dm-park, .dm-wp, .dm-buddy, .dm-bike {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  pointer-events: none;
  font-family: var(--sans);
  line-height: 1;
  white-space: nowrap;
}
.dm-park { pointer-events: auto; cursor: default; }   /* it carries the hover tooltip */

.dm-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .55);
}

.dm-label {
  font-size: 11px; font-weight: 600;
  color: var(--text);
  text-shadow:
    0 0 3px var(--halo), 0 0 6px var(--halo), 0 1px 2px var(--halo);
}

/* Parking: the app's marker, down to the numbers — a 20px disc, white 2px ring, a bold white P,
   and a colour that ramps across the day's stops. See setParkingMarkers() there. */
.dm-park {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 11px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.dm-wp .dm-dot { background: var(--cyan); }
.dm-wp .dm-label { color: #67e8f9; }

/* The owner's bike, and the only marker that moves. On a map with three riders on it, the one
   that answers "where is MY bike" has to be findable without reading a single label.

   GREEN, not red. This is a status light: green is the colour this product uses for alive and
   reporting, and red is what it uses for an alarm. A parked, healthy bike drawn in alarm red
   tells the reader the wrong thing before they have read anything. */
.dm-bike { position: relative; }
.dm-bike .dm-dot {
  width: 15px; height: 15px; background: var(--green); border-width: 3px;
  box-shadow: 0 0 10px rgba(34, 197, 94, .55), 0 1px 5px rgba(0, 0, 0, .55);
}


/* A radar sweep: three rings on the same 3 s cycle, each starting a second after the last, so
   there is always one expanding rather than a single ring throbbing on and off. */
.dm-radar {
  position: absolute; top: 50%; left: 50%;
  width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, .8);
  animation: dm-radar 3s cubic-bezier(.15, .6, .4, 1) infinite;
  /* The dot and the label sit above the rings; the rings must never catch a pointer either. */
  pointer-events: none;
}
.dm-radar:nth-child(2) { animation-delay: 1s; }
.dm-radar:nth-child(3) { animation-delay: 2s; }
/* The dot has to clear the rings, which are absolutely positioned over it. */
.dm-bike .dm-dot { position: relative; z-index: 1; }

@keyframes dm-radar {
  0%   { transform: scale(1);   opacity: .9; }
  80%  { transform: scale(4.6); opacity: 0; }
  100% { transform: scale(4.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dm-radar { animation: none; transform: scale(2.2); opacity: .22; }
}


/* ── Beacon members panel ───────────────────────────────────────────────── */

/* Copied from the application's public/css/components.css, trimmed to the expanded state the
   demo shows. The app's `pulse` keyframes and its --font-mono / --text-* tokens live elsewhere
   in that repo, so the two it needs are restated here rather than left to resolve to nothing. */

.map-beacon-overlay {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .15s;
  max-width: 15rem;
}
.map-beacon-overlay:hover { border-color: rgba(139, 92, 246, .4); }

.map-beacon-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 8px; margin-bottom: 2px;
}
.map-beacon-title {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
}
.map-beacon-icon { width: 16px; height: 16px; flex-shrink: 0; }

.map-beacon-list { display: flex; flex-direction: column; gap: 2px; width: 100%; }

.map-beacon-row {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 4px; border-radius: 8px;
  transition: background .15s;
}
.map-beacon-row:hover { background: rgba(255, 255, 255, .08); }

.beacon-member {
  position: relative;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .6rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.beacon-member-status {
  position: absolute; bottom: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--overlay);
  background: var(--red);
  z-index: 2;
}
.beacon-member-status.online { background: var(--green); animation: beacon-pulse 2s infinite; }
.beacon-member-status.sleep  { background: #eab308; animation: beacon-pulse 3s infinite; }
.beacon-member-status.offline { background: var(--red); }

@keyframes beacon-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .beacon-member-status { animation: none !important; } }

.map-beacon-rowtext { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.map-beacon-name {
  font-family: var(--mono); font-size: .65rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-beacon-meta {
  font-family: var(--mono); font-size: .55rem; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-beacon-status-label {
  font-family: var(--mono); font-size: .65rem;
  margin-left: auto; padding-left: 6px; flex-shrink: 0;
}
.map-beacon-status-label.online  { color: var(--green); }
.map-beacon-status-label.sleep   { color: #eab308; }
.map-beacon-status-label.offline { color: var(--dim); }

@media (max-width: 560px) {
  .map-beacon-overlay { bottom: 10px; left: 10px; padding: 6px 8px; max-width: 12rem; }
  .map-beacon-meta { display: none; }
}

/* A row is a control, so it says so: pointer, focus ring, and a held state while its rider is
   the one the map is on. The ring colour and the pulse are the app's — beacon-follow-pulse in
   its components.css, restated here for the same reason the status pulse was. */
.map-beacon-row { cursor: pointer; }
.map-beacon-row:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.map-beacon-row.following { background: rgba(6, 182, 212, .12); }
.map-beacon-row.following .beacon-member {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
  animation: beacon-follow-pulse 1.4s ease-in-out infinite;
}
@keyframes beacon-follow-pulse {
  0%, 100% { outline-offset: 2px; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
  50%      { outline-offset: 4px; box-shadow: 0 0 8px 2px rgba(6, 182, 212, .7); }
}
@media (prefers-reduced-motion: reduce) {
  .map-beacon-row.following .beacon-member { animation: none; }
}

/* The attribution, collapsed to its (i) and dimmed until touched. Kept because OpenStreetMap's
   data is ODbL and the credit is a licence condition; made small because it is not the point of
   the picture. */
.livemap .maplibregl-ctrl-bottom-right { margin: 0 4px 4px 0; }
.livemap .maplibregl-ctrl-attrib.maplibregl-compact {
  min-height: 20px;
  background: var(--overlay-soft);
  border-radius: 10px;
  opacity: .45;
  transition: opacity .15s;
}
.livemap .maplibregl-ctrl-attrib.maplibregl-compact:hover,
.livemap .maplibregl-ctrl-attrib.maplibregl-compact-show { opacity: 1; }
.livemap .maplibregl-ctrl-attrib-button { width: 20px; height: 20px; }

/* Collapsed, the control must be the button and nothing else. MapLibre keeps the text in the
   DOM either way, so without this the credit still occupies its corner at zero opacity and
   still catches the pointer. */
.livemap .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) {
  padding: 0;
  margin: 0;
}
.livemap .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner {
  display: none;
}


/* ── Map + bike panel, side by side ─────────────────────────────────────── */

/* The application's dashboard layout: the map takes the room, the bike sits beside it. Below
   900px they stack, because a 3D model squeezed into a third of a phone screen is a thumbnail
   and the map is the thing worth the width. */
.maprow { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .maprow { grid-template-columns: minmax(0, 1fr) 15rem; align-items: stretch; }
  .livemap { aspect-ratio: auto; height: 100%; min-height: 460px; }
}

.bikepanel {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  /* Touch panning must not be swallowed vertically — a horizontal swipe changes bike, a
     vertical one still scrolls the page. */
  touch-action: pan-y;
}
.bikepanel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  padding: .6rem .8rem .2rem;
}
.bikepanel-name {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text);
}
.bikepanel-hint { font-size: .62rem; color: var(--dim); }

/* Inside the panel the viewer fills what is left; the standalone framing it had as its own
   section no longer applies. */
.bikepanel .viewer {
  flex: 1;
  border: 0; border-radius: 0; background-color: transparent;
  aspect-ratio: auto; max-width: none; max-height: none; margin: 0;
  min-height: 210px;

  /* The stage: a vignette that puts the darkest (or warmest) value at the edges and lifts the
     middle, so the bike sits IN something. The beam and the floor pool are the two pseudo-
     elements below. */
  background-image: var(--stage);
  /* NO hairline and NO inset box. Framing the stage made it a second rectangle inside the
     card, which is the thing the owner kept objecting to — the point is a lit area, not a
     screen mounted on a panel. The gradient's outer stop is the panel's own background, so
     the stage has nowhere to end: it just stops being lit. */
  position: relative;
  overflow: hidden;
}

/* The beam.
   Three attempts got here. A clipped polygon, blurred, showed its sides. The same polygon with
   a mask over the blur showed them too — the sides of that wedge are DIAGONALS, and a
   horizontal mask feathers an element's left and right extremes, not a diagonal crossing its
   middle. Stacked ellipses finally had no edge, but no cone either: light has to open out from
   somewhere, and three nested blobs only glow.

   A CONIC gradient is both at once. The shape is a real cone because the colour is a function
   of the angle around an apex placed just above the panel, and the edges are soft because that
   falloff is measured in DEGREES — so the softness widens with distance from the lamp, exactly
   as it does in air. The radial mask below is the other half: light also fades with distance,
   and without it the cone reaches the floor at full strength and reads as a painted triangle.

   The stops run 154deg to 206deg, centred on 180deg, which is straight down. */
.bikepanel .viewer::before {
  content: '';
  position: absolute; inset: 0;
  background: conic-gradient(from 154deg at 50% -6%,
    transparent 0deg,
    color-mix(in srgb, var(--stage-beam) 34%, transparent) 13deg,
    var(--stage-beam) 26deg,
    color-mix(in srgb, var(--stage-beam) 34%, transparent) 39deg,
    transparent 52deg);
  -webkit-mask-image: radial-gradient(125% 115% at 50% -6%,
    #000 0%, rgba(0,0,0,.5) 48%, transparent 88%);
  mask-image: radial-gradient(125% 115% at 50% -6%,
    #000 0%, rgba(0,0,0,.5) 48%, transparent 88%);
  /* Only enough to kill the banding a conic gradient shows on a near-flat dark field. The
     softness is the gradient's job, not this. */
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

/* The floor: light on a dark stage, shadow on a pale one, so the bike is standing on something
   in both. Sat at the height the models' wheels reach, not at the bottom of the box. */
.bikepanel .viewer::after {
  content: '';
  /* Under the WHEELS, which is about a third of the way up the stage — not at the bottom of
     the box, where it lit empty floor and left the bike hovering. Nudged left with the model,
     which the camera orbit does not centre. */
  position: absolute; left: 47%; bottom: 25%;
  width: 62%; height: 17%;
  transform: translateX(-50%);
  background: var(--stage-floor);
  filter: blur(16px);
  pointer-events: none;
  z-index: 0;
}

/* Above the light, and transparent so the stage shows through: model-viewer paints its own
   background otherwise. */
/* The model fades up into the light when it has rendered, and back out while the next one loads.
   Opacity and transform only: the bike's saturation is an inline `filter`, which an animated
   filter here would overwrite. */
.viewer model-viewer {
  opacity: 0;
  transform: translateY(14px) scale(.965);
  transition: opacity .8s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1);
}
.viewer model-viewer.is-shown { opacity: 1; transform: none; }
/* The carousel: out the way it is going, in from the other side. Leaving is quicker than
   arriving, so the step reads as a hand-off rather than two animations queued. */
.viewer model-viewer.leave-next,
.viewer model-viewer.leave-prev { opacity: 0; transition: opacity .3s ease, transform .4s ease-in; }
.viewer model-viewer.leave-next { transform: translateX(-14%) scale(.96); }
.viewer model-viewer.leave-prev { transform: translateX(14%) scale(.96); }
.viewer model-viewer.enter-next,
.viewer model-viewer.enter-prev { opacity: 0; transition: none; }
.viewer model-viewer.enter-next { transform: translateX(14%) scale(.96); }
.viewer model-viewer.enter-prev { transform: translateX(-14%) scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .viewer model-viewer { transition: none; transform: none; }
}

.bikepanel .viewer model-viewer,
.bikepanel .viewer .viewer-load {
  position: relative; z-index: 1; background: transparent;
}

.bikepanel-nav {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  padding: .5rem .6rem .7rem;
  /* The theft scene hides this row with `visibility` so its height stays reserved; the fade is
     what keeps the switch from reading as a flicker. */
  transition: opacity .22s ease;
}
.bikepanel-hint { transition: opacity .22s ease; }
.bikepanel-arrow {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font: inherit; font-size: 1.1rem; line-height: 1;
  color: var(--muted); background: var(--card);
  border: 1px solid var(--line); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.bikepanel-arrow:hover { color: var(--text); border-color: var(--dim); }
.bikepanel-dots { display: flex; gap: 6px; }
.bikepanel-dot {
  width: 6px; height: 6px; border-radius: 4px;
  background: var(--line); border: 0; padding: 0; cursor: pointer;
  transition: width .2s, background .2s;
}
.bikepanel-dot.active { width: 18px; background: var(--green); }


/* ── Narrow screens: give the map the height it needs ───────────────────── */

/* A 16:9 box is fine on a laptop and wrong on a phone: at 360px wide it is 200px tall, and the
   group panel sitting on top of it then covers a third of the map. On a tall narrow screen the
   height has to come from the VIEWPORT, not from the width. */
@media (max-width: 899px) {
  /* BOTH have to fit in one screen. The map used to take 68vh, which left the 3D panel below the
     fold — you arrived at the section and saw a map with a caption, and had to scroll again to
     find out there was a motorbike. The pair is sized against the height actually available:
     the viewport, less the sticky header, less the label above and the caption below. */
  /* A BUDGET, not two guesses. Fixed heights for the map and the panel meant adding up the
     header, the section padding, the label and the caption by hand — and being wrong by 19px on
     one phone and 76px on another. The row is given the height that is actually left, the panel
     takes what it needs, and the map absorbs the remainder. `dvh` rather than `vh` because the
     mobile browser's own chrome comes and goes and `vh` does not notice. */
  .maprow {
    display: flex;
    flex-direction: column;
    /* The fallback, used until site.js measures the real thing. A constant here can only ever be
       right for one version of the copy above — it was written when a one-line label sat above
       the map, and the intro paragraphs that replaced it are 129px, which put the panel back off
       the bottom by exactly that much. --maprow-h is measured from the page itself. */
    /* svh, not dvh: dvh follows Safari's toolbar as it collapses and expands during a scroll, and
       every change resized the map under the reader's finger. */
    height: var(--maprow-h, calc(100svh - 330px));
    min-height: 300px;
  }
  .livemap {
    aspect-ratio: auto;
    flex: 1 1 auto;
    height: auto;
    min-height: 170px;
    max-height: none;
  }
  .bikepanel { flex: 0 0 auto; }

  /* The bike is the supporting panel here, so it is capped — otherwise it takes as much room as
     the map and the section becomes two screens of scrolling.
     `flex: 0 0 auto` is load-bearing: the desktop rule makes this a flex item with basis 0, and
     in a column flex container that basis WINS over `height` on the main axis. With `flex: 1`
     left in place the height resolved to 0 and the whole panel collapsed to its header and
     arrows — 78px tall, measured. */
  .bikepanel .viewer { flex: 0 0 auto; min-height: 130px; height: 27vh; max-height: 280px; }
}

/* Short screens — an SE is 667 tall and the copy above the map takes 129 of it. Measured there,
   the map came out at 170px against a 216px panel, which is the wrong way round: the map is the
   thing the section is about. The panel gives back what it can. */
@media (max-width: 899px) and (max-height: 720px) {
  .bikepanel .viewer { height: 20vh; min-height: 110px; }
  .bikepanel-head { padding: .35rem .6rem .1rem; font-size: .9em; }
  .bikepanel-nav { padding: .25rem .5rem .4rem; }
  .bikepanel-arrow { width: 22px; height: 22px; font-size: .95rem; }

  /* The group panel shrinks with everything else rather than staying laptop-sized on a phone. */
  .map-beacon-overlay { padding: 5px 7px; max-width: 10.5rem; gap: 0; }
  .map-beacon-title { font-size: .52rem; }
  .map-beacon-row { gap: 6px; padding: 2px 3px; }
  .beacon-member { width: 20px; height: 20px; font-size: .52rem; }
  .beacon-member-status { width: 8px; height: 8px; border-width: 1.5px; }
  .map-beacon-name { font-size: .58rem; }
  .map-beacon-status-label { font-size: .56rem; padding-left: 4px; }
}

/* Landscape on a phone: there is no height to share, so the two stop trying to sit together and
   the map takes the screen — the 3D panel is one scroll away rather than squeezed into a strip. */
@media (max-width: 899px) and (orientation: landscape) {
  /* The budget above is switched OFF here. On a 390px-tall screen there is no height to share:
     forcing both into it gave a 240px map and a panel hanging 325px below the fold — worse than
     either alone. So the map takes the screen and the bike is one scroll away. */
  .maprow { display: grid; height: auto; min-height: 0; }
  .livemap { flex: none; height: 78vh; min-height: 240px; max-height: none; }
  .bikepanel .viewer { flex: 0 0 auto; height: 60vh; max-height: none; }
}

/* The label and the caption around the pair are trimmed on a phone, because every line they take
   is a line the map and the bike do not get. */
@media (max-width: 899px) {
  /* 142px of padding and label sat above the map, which is most of the reason the 3D panel fell
     off the bottom. Measured, not guessed: the pair overflowed by 19px on an iPhone 14 and 76px
     on an SE, and nearly all of it was up here. */
  /* THE INTRO MOVES BELOW THE DEMO on a phone. It is 129px of reading, and on a 667px screen
     that is the difference between a showcase and two thumbnails — both the map and the bike were
     technically visible and neither was worth looking at. The demo comes first and explains
     itself; the paragraphs are there for whoever wants them, one flick down.
     Order only: the DOM keeps the heading before the figure it introduces, so nothing changes for
     a screen reader or for the desktop layout. */
  #harta { display: flex; flex-direction: column; padding-block-start: .8rem; }
  #harta > .wrap:first-child { order: 2; margin-top: 1.6rem; }
  #harta > .wrap.wide { order: 1; }
  #harta .kicker { margin-bottom: .6rem; font-size: .6rem; }
  .mapnote { margin-top: .7rem; font-size: .78rem; }
  .maprow { gap: 8px; }
  .bikepanel-head { padding: .45rem .7rem .15rem; }
  .bikepanel-nav { padding: .35rem .5rem .5rem; }
}


/* Light-theme corrections for the few places a token cannot reach. */
:root[data-theme="light"] .hero-glow,
:root:not([data-theme="dark"]) .hero-glow { opacity: .55; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-glow { opacity: 1; }
}

/* The theme button: same size and shape as the nav links, never a jumping icon. */
.theme-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--text); }
.theme-btn svg { width: 15px; height: 15px; }
/* One icon is shown at a time, chosen by the theme, so the button always offers the OTHER one. */
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon { display: none; }
}


/* Text inside the map overlays follows the overlay, not the page. */
.map-beacon-name, .dm-label { color: var(--on-overlay); }
.map-beacon-title, .livemap-badge, .viewer-hint { color: var(--dim); }

/* ── No snapping on touch, deliberately ─────────────────────────────────────
 *
 * There WAS `scroll-snap-type: y proximity` here, as the fix for a JavaScript version that had
 * hijacked touchmove. It was still wrong on iOS, so it is gone rather than tuned: two attempts to
 * make the page decide where a finger stops both ended with a scroll that fought the reader.
 *
 * A phone scrolls the way the phone scrolls. What replaced the affordance is a pair of buttons —
 * see .stepper below — which move the page only when they are pressed, and cannot interfere with
 * a gesture because they are not listening for one.
 */

/* ── Section buttons, phones only ───────────────────────────────────────── */

.stepper {
  position: fixed;
  right: max(.9rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 45;
  display: none;
  flex-direction: column;
  gap: .4rem;
}
.stepper.is-ready { display: flex; }
@media (min-width: 900px) { .stepper { display: none !important; } }

.step-btn {
  width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  color: var(--on-overlay);
  background: var(--overlay);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border: 1px solid var(--line-2);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: opacity .2s, transform .12s;
}
.step-btn:active { transform: scale(.94); }
.step-btn svg { width: 17px; height: 17px; }
/* At the two ends there is nowhere to go; the button says so rather than disappearing, so the
   pair does not jump around under the thumb. */
.step-btn[disabled] { opacity: .3; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .step-btn { transition: none; }
}

/* ── Words that rise ────────────────────────────────────────────────────── */

/* A heading's words each sit in a clipping box and start below it, so they rise out of their own
   line instead of fading in place. Only headings: body copy split into words is a well-known way
   to make a paragraph unreadable while it moves.

   As with every other effect here, the hidden state comes from `.js-reveal` on <html>, which
   JavaScript adds. Without the script the words are simply words. */
.js-reveal .w {
  display: inline-block;
  overflow: hidden;
  /* The clip box has to clear ascenders and descenders — Romanian puts a comma UNDER Ș and Ț,
     and a tight box shears it off. Padding here, pulled back by the same amount in margin, so
     the line's metrics are unchanged. */
  padding: .12em .02em .18em;
  margin: -.12em -.02em -.18em;
  vertical-align: baseline;
}
.js-reveal .w > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(105%);
  opacity: 0;
  transition: transform .8s cubic-bezier(.16,.84,.3,1), opacity .5s ease;
  transition-delay: calc(var(--wi, 0) * 55ms);
}
.js-reveal .in .w > i,
.js-reveal h1.in .w > i { transform: none; opacity: 1; }

/* The hero is not waited for — it is the first thing on the screen. */
.js-reveal h1 .w > i { transition-delay: calc(var(--wi, 0) * 55ms + 120ms); }

/* The numbers hold their width while they count, so the row does not jitter from 0 to 50. */
.specs dt { font-variant-numeric: tabular-nums; }

/* The capability rows draw their own rule in from the left as they arrive. */
.caps li { position: relative; border-top-color: transparent; }
.caps li::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s cubic-bezier(.16,.84,.3,1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js-reveal .caps li.in::before,
html:not(.js-reveal) .caps li::before { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .w > i { transform: none; opacity: 1; transition: none; }
  .caps li::before { transform: scaleX(1); transition: none; }
}

/* The end of the safety net in site.js: once this is on <html>, every reveal is in its final
   state with no transition at all. It exists because adding the `.in` class only changes what a
   transition aims at — if the rendering loop never runs it, the text sits at opacity 0 wearing
   the right class, which is the worst of both. */
/* NOT the chapter cards. They are `.reveal` too, and this net's `!important` was overriding the
   sticky stack's own opacity and transform four seconds after every load — so the cards faded
   and scaled correctly at first and then, mid-scroll, silently stopped. What the owner saw was
   cards "showing empty": several full-strength cards overlapping, each blurred (the blur is on
   a different property and kept working) with no fade to tell them apart.

   Excluding them is safe, which is the whole reason the net exists: with no script running,
   --cover stays at its declared 0 and the stack rule resolves to opacity 1 and no transform.
   The card is visible by default; it is the SCRIPT that fades it. */
.js-reveal-done .reveal:not(.chapter),
.js-reveal-done .w > i {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}
/* The half of the net the cards do need: no transition, so their final state applies at once. */
.js-reveal-done .chapters .chapter { transition: none !important; }
.js-reveal-done .caps li::before { transform: scaleX(1) !important; transition: none !important; }

/* ── Section rail ───────────────────────────────────────────────────────── */

/* A dot per section down the right edge. Hidden until site.js has filled it, so an empty strip
   never sits there on a page whose script did not load. */
.rail {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.rail.is-ready { display: flex; }

.rail-dot {
  position: relative;
  display: flex; align-items: center; justify-content: flex-end; gap: .6rem;
  /* A generous hit area around a small mark: the target is 34px tall even though the line is 2. */
  padding: .55rem .25rem;
  background: none; border: 0; cursor: pointer;
  font: inherit; color: var(--dim);
}

/* The mark is a short rule, not a circle — it grows sideways when current, which reads as
   "you are here" without needing colour to carry the whole message. */
.rail-mark {
  display: block; width: 14px; height: 2px; border-radius: 2px;
  background: currentColor; opacity: .45;
  transition: width .3s cubic-bezier(.16,.84,.3,1), opacity .2s, background .2s;
}
.rail-dot:hover .rail-mark { opacity: 1; }
.rail-dot.is-current { color: var(--text); }
.rail-dot.is-current .rail-mark { width: 26px; opacity: 1; background: var(--green); }

/* The name appears on hover and on keyboard focus, so the rail is usable without guessing. */
.rail-label {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
  opacity: 0; transform: translateX(6px);
  transition: opacity .2s, transform .25s cubic-bezier(.16,.84,.3,1);
  pointer-events: none;
}
.rail-dot:hover .rail-label,
.rail-dot:focus-visible .rail-label,
.rail-dot.is-current .rail-label { opacity: 1; transform: none; }
.rail-dot.is-current .rail-label { color: var(--muted); }

/* No room beside the content on a phone, and the page already snaps section to section there. */
@media (max-width: 899px) { .rail { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .rail-mark, .rail-label { transition: none; }
}

/* ── Section titles and longer copy (rewrite of 17 sep) ─────────────────── */

.sec-title {
  font-family: var(--display);
  margin: 0 0 clamp(2rem, 4.5vw, 3rem);
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
  line-height: 1.08; letter-spacing: -.04em; font-weight: 800;
  max-width: 22ch;
}
.intro { max-width: 40rem; margin-bottom: clamp(2rem, 4.5vw, 3rem); }
.intro h2 {
  font-family: var(--display);
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
  line-height: 1.08; letter-spacing: -.04em; font-weight: 800;
}
.intro p { margin: 0 0 .7rem; color: var(--muted); font-size: 1.02rem; }

/* Two columns, not four: each chapter is a few sentences now, not one line. */
.chapters .wrap { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.chapter p { max-width: 42ch; }
.chapter p + p { margin-top: .7rem; }

.capgroups {
  display: grid; gap: clamp(2rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: start;
}
.capgroup h3 {
  font-family: var(--display);
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green);
  margin: 0 0 .9rem;
}
.capgroup .caps { grid-template-columns: 1fr; }
.capgroup .caps li { font-size: .96rem; padding: .8rem 0; }

/* ── A picture for each group ───────────────────────────────────────────────
 * One screenshot per group, not per row: most rows ("Alertă pentru baterie") have no picture
 * that shows that one thing, and inventing one per row would be decoration. On a phone the
 * picture sits above its group's list; with a mouse it is hidden there and follows the cursor
 * instead, while the pointer is over the group (js: capPreview). */
.cap-shot {
  margin: 0 0 1rem; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  box-shadow: 0 18px 36px -28px rgba(0,0,0,.6);
}
.cap-shot img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .cap-shot { display: none; }
  .capgroup { cursor: default; }
}

/* The floating preview. Fixed, never in the flow; moved by transform only. */
.cap-float {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: 300px; aspect-ratio: 3 / 2;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.55);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  will-change: transform, opacity;
}
.cap-float.is-on { opacity: 1; }
.cap-float img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
                 transition: opacity .2s ease; }
@media (prefers-reduced-motion: reduce) { .cap-float { transition: none; } }

.signup-lead { margin: 0 0 1.6rem; color: var(--muted); font-size: 1.02rem; max-width: 40ch; }
.faq details p + p { margin-top: 0; }
.faq details p:has(+ p) { margin-bottom: .7rem; }

/* The hero headline is a sentence now, not two words — at 7.5rem it ran to seven lines. */
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 5rem); }
@media (min-width: 1000px) { .hero-inner { max-width: 56rem; } }
.hero .lede { max-width: 44ch; }

/* model-viewer's own loading bar. It appears on EVERY src change, which is every time the
   carousel switches bike, and its default is rgba(0,0,0,.4) at 5% of the element's height — on
   the pale panel that is a thick black band across the top, which is what the owner saw.
   Kept, because a switch that shows nothing for a second looks broken, but as a hairline in the
   accent colour rather than a slab. */
.bikepanel model-viewer {
  --progress-bar-color: var(--green);
  --progress-bar-height: 2px;
}

/* ── Rhythm on the light theme ──────────────────────────────────────────── */

/* A light page that is one flat tone from top to bottom reads as a document, not as a product.
   These give it bands — and they are scoped to light on purpose: the dark theme already has
   depth, and doing the same there would only flatten it. */

/* The numbers sit on their own tinted band. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chapters { background: var(--bg-2); }
}
:root[data-theme="light"] .chapters { background: var(--bg-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chapters { background: none; }
}

/* THE CLOSING BLOCK INVERTS. The sign-up is the one thing on the page that asks for something, so
   on a pale page it stops being pale — the tokens are redefined inside it rather than the colours
   overridden one by one, which is why everything in there (the input border, the message, the
   link) follows without a single extra rule. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .signup-sec { --bg: #14171c; --bg-2: #1b1f26; --card: #232830;
    --text: #f5f3ee; --muted: #b9b3a7; --dim: #8d867a; --line: rgba(255,255,255,.10);
    --line-2: rgba(255,255,255,.20); --green: #34d27a;
    background: var(--bg); color: var(--text); }
}
:root[data-theme="light"] .signup-sec {
  --bg: #14171c; --bg-2: #1b1f26; --card: #232830;
  --text: #f5f3ee; --muted: #b9b3a7; --dim: #8d867a;
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.20);
  --green: #34d27a;
  background: var(--bg); color: var(--text);
}

/* The chapter numerals and the units carry the accent, so green appears as a considered mark
   rather than only on the one button. */
:root[data-theme="light"] .specs dt span { color: var(--green); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .specs dt span { color: var(--green); }
}

/* The rail is fixed, so it floats over whatever band happens to be under it. site.js measures the
   luminance of the current section and sets this when that band is dark — the light theme's
   inverted sign-up made the marks disappear entirely. */
.rail.on-dark .rail-dot { color: rgba(255,255,255,.72); }
.rail.on-dark .rail-dot.is-current { color: #fff; }
.rail.on-dark .rail-dot.is-current .rail-mark { background: #34d27a; }
.rail.on-dark .rail-dot.is-current .rail-label { color: rgba(255,255,255,.75); }

/* ── Rhythm on the dark theme ───────────────────────────────────────────── */

/* The same argument as the light theme, mirrored. A dark page that is one tone from top to bottom
 * is as flat as a white one — the surfaces exist in the palette and nothing was using them.
 *
 * Three bands, and the structure picks them rather than a label: `section.bleed:not(#harta)` is
 * the numbers block, which survives the rail's captions being rewritten (they have been, twice).
 *
 * The sign-up INVERTS TO PAPER here, mirroring the dark block the light theme gets. The rule is
 * the same in both: the one section that asks the reader for something never shares the page's
 * own tone. Tokens are redefined inside it, so the input, the button, the message and the link
 * all follow with no further rules.
 */

/* Only when dark is actually in force — explicit choice, or the system with no choice made. */
:root[data-theme="dark"] .chapters,
:root:not([data-theme="light"]) .chapters { background: var(--bg-2); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chapters { background: var(--bg-2); }
}

/* The numbers sit LOWER than the page, not higher: a recess under the lifted chapters above it,
   so the two bands read as different moves rather than one repeated. */
:root[data-theme="dark"] section.bleed:not(#harta),
:root:not([data-theme="light"]) section.bleed:not(#harta) { background: #0b0e12; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) section.bleed:not(#harta) { background: transparent; }
}

:root[data-theme="dark"] .signup-sec,
:root:not([data-theme="light"]) .signup-sec {
  --bg: #f7f4ee; --bg-2: #efeae1; --card: #ffffff;
  --text: #14171c; --muted: #545c68; --dim: #7d7466;
  --line: rgba(20,23,28,.12); --line-2: rgba(20,23,28,.24);
  --green: #15803d;
  background: var(--bg); color: var(--text);
}
/* And back out of it when light is in force, where the light theme's own inversion applies. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .signup-sec {
    --bg: #14171c; --bg-2: #1b1f26; --card: #232830;
    --text: #f5f3ee; --muted: #b9b3a7; --dim: #8d867a;
    --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.20);
    --green: #34d27a;
  }
}

/* A band three luminance points from the page reads as a printing error rather than a decision.
   The hairlines are what make it legible — the eye needs an edge more than it needs contrast, and
   more contrast here would have striped the page instead. */
.chapters,
section.bleed:not(#harta),
.signup-sec {
  border-block: 1px solid var(--line);
}
/* The inverted block draws its own edge from its own tokens, which are the other theme's — so it
   gets the line that belongs to what is INSIDE it, not to the page it sits on. */
.signup-sec { border-color: var(--line); }

/* ── Hero grid, stacked chapters ──────────────────────────
 *
 * Written here rather than pulled in: these effects came from looking at ObsidianUI
 * (MIT), which is React and Tailwind, and this page is neither. No code is copied, so there is
 * nothing to carry a notice for — only the ideas.
 */

/* A surveyor's grid behind the headline, fading out before it reaches the type. The two lights
   stay; this sits under them. */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 30% 40%, #000 0%, transparent 72%);
          mask-image: radial-gradient(70% 60% at 30% 40%, #000 0%, transparent 72%);
  opacity: .8;
  pointer-events: none;
}

/* Chapters stack under the header instead of sitting in a grid: each one pins, the next slides
   over it. Pointer-fine and wide screens only — on a phone the six are already one column, and
   sticky boxes there just eat the screen. */
@media (min-width: 900px) and (pointer: fine) {
  .chapters .wrap { display: block; }
  .chapters .chapter {
    position: sticky;
    top: 84px;
    min-height: 58vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3rem) clamp(1.6rem, 3vw, 2.6rem);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg);
    box-shadow: 0 -1px 0 var(--line), 0 24px 48px -32px rgba(0,0,0,.45);
  }
  .chapters .chapter + .chapter { margin-top: clamp(2rem, 5vw, 4rem); }
  .chapters .chapter p { max-width: 54ch; }
  .chapters .chapter h2 { font-size: clamp(2rem, 4vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  .chapters .chapter { position: static; min-height: 0; }
}

/* ── Four more effects ──────────────────────────────────────────────────────
 * Same rule as the three above: the ideas come from ObsidianUI (MIT), the code is written for
 * this page, which has no React and no build step.
 */

/* 1. A pointer-followed light on the pinned chapter cards. Two custom properties, written by
      the script; with no script the cards are exactly as they were. */
@media (min-width: 900px) and (pointer: fine) {
  .chapters .chapter::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
    background: radial-gradient(260px 260px at var(--mx, 50%) var(--my, 0%),
                color-mix(in srgb, var(--green) 12%, transparent), transparent 70%);
  }
  .chapters .chapter { position: sticky; overflow: hidden; }
  .chapters .chapter.lit::before { opacity: 1; }
}

/* 2. The header earns its line and a touch more tint once the page has moved. `.stuck` was
      already set by the script; this only gives it more to say. */
.site-head.stuck {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -24px rgba(0,0,0,.6);
}

/* 3. Links sweep an underline from the left instead of switching colour alone. */
.head-nav a:not(.btn)::after,
.foot-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.foot-links a { position: relative; }
.head-nav a:not(.btn):hover::after,
.foot-links a:hover::after { transform: scaleX(1); }

/* 4. The capability rows lift a hair and pull their green tick line with them. */
.caps li { transition: color .2s, transform .2s cubic-bezier(.2,.8,.2,1); }
@media (pointer: fine) {
  .caps li:hover { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .head-nav a:not(.btn)::after, .foot-links a::after { transition: none; }
  .caps li { transition: none; }
  .caps li:hover { transform: none; }
  .chapters .chapter::before { display: none; }
}

/* ── Headings that fill as you scroll ───────────────────────────────────────
 *
 * The heading is painted with a two-stop gradient clipped to the glyphs: solid text colour up to
 * --fill, the muted colour after it. The script moves --fill with the page.
 *
 * DEFAULT 100%. A page whose script does not run, or a browser without background-clip: text,
 * shows an ordinary solid heading rather than a grey one — the failure mode is "no effect", never
 * "unreadable".
 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fill-text {
    --fill: 100%;
    background-image: linear-gradient(90deg,
      var(--text) 0 var(--fill),
      color-mix(in srgb, var(--text) 26%, transparent) var(--fill) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    /* Safari repaints the clip on its own schedule unless the box is promoted. */
    will-change: background-image;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fill-text { --fill: 100% !important; }
}

/* ── Four more: hero aura, rail progress, answers that open, a shine on the CTA ───────── */

/* The aura sits above the grid and below the type. It only exists once the script gives it a
   position, so a page without script shows the hero exactly as before. */
.hero-aura {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0;
  transition: opacity .35s;
  background: radial-gradient(240px 240px at var(--ax, 50%) var(--ay, 50%),
              color-mix(in srgb, var(--green) 20%, transparent), transparent 70%);
}
.hero-aura.on { opacity: 1; }

/* The rail gains a thread that fills with the page. */
.rail { position: fixed; }
.rail::before {
  content: '';
  position: absolute; right: 3px; top: 0; bottom: 0; width: 1px;
  background: var(--line);
}
.rail::after {
  content: '';
  position: absolute; right: 3px; top: 0; width: 1px;
  height: var(--progress, 0%);
  background: var(--green);
  transition: height .12s linear;
}
@media (prefers-reduced-motion: reduce) { .rail::after { transition: none; } }

/* An answer slides open instead of appearing whole. The height is animated by the script; this
   only keeps the text from flickering while it does. */
.faq details > p { overflow: hidden; }

/* A single light crosses the primary button on hover. Masked to the button, so nothing spills. */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(0); opacity: 0;
  pointer-events: none;
}
@media (pointer: fine) {
  .btn-primary:hover::after { animation: cta-shine .75s cubic-bezier(.3,.7,.4,1) 1; }
}
@keyframes cta-shine {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(350%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover::after { animation: none; }
  .hero-aura { display: none; }
}

/* ── The remaining sections get their own arrivals ──────────────────────────
 * Map row, the numbers' rule, the group rules in the capability list, and the sign-up field.
 * All of them start in their finished state and are only moved once the script says so, so a
 * page without script is the page as it was.
 */

/* The demo frame lifts into place. Transform and opacity only — the map's canvas is inside it
   and must not be reflowed. */
.js-reveal .maprow.reveal:not(.in) { opacity: 0; transform: translateY(26px) scale(.985); }
.maprow { transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }

/* The rule above the numbers draws itself from the left. */
.specs { position: relative; border-top-color: transparent; }
.specs::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.specs.drawn::before { transform: scaleX(1); }

/* Same idea for each group heading's rule in the capability list: the first row's top border is
   the line, so it is that border which is drawn. */
.capgroup .caps li:first-child { position: relative; border-top-color: transparent; }
.capgroup .caps li:first-child::after {
  content: '';
  position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: var(--green);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.capgroup.drawn .caps li:first-child::after { transform: scaleX(1); }

/* The sign-up field answers the cursor: a ring in the page's green while it is focused. */
.signup-form input[type=email] {
  transition: border-color .2s, box-shadow .25s, background .2s;
}
.signup-form input[type=email]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent);
}
.signup-form button { transition: transform .12s cubic-bezier(.2,.8,.2,1); }
.signup-form button:active { transform: scale(.97); }

@media (prefers-reduced-motion: reduce) {
  .maprow { transition: none; }
  .js-reveal .maprow.reveal:not(.in) { opacity: 1; transform: none; }
  .specs::before, .capgroup .caps li:first-child::after { transform: scaleX(1); transition: none; }
  .signup-form input[type=email], .signup-form button { transition: none; }
}

/* The sign-up heading is word-split for the reveal, so its words are spans inside it. They
   inherit the transparent colour and paint nothing, which lets the heading's own clipped
   background show through them — the fill works on a split heading exactly as on a plain one. */
.fill-text .w, .fill-text .w > i { color: inherit; background: none; }

/* ── A screenshot beside a chapter ──────────────────────────────────────────
 * The real app, on the demo account's invented ride — never the owner's own rides, which start
 * and end at their home. See scripts/seed-demo.js in the application repo.
 */
.chapter-shot {
  margin: 1.6rem 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 24px 48px -34px rgba(0,0,0,.7);
}
.chapter-shot img { display: block; width: 100%; height: auto; }

@media (min-width: 900px) and (pointer: fine) {
  .chapters .chapter:has(.chapter-shot) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 34vw, 460px);
    align-items: center;
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }
  .chapters .chapter:has(.chapter-shot) > :not(.chapter-shot) { grid-column: 1; }
  .chapter-shot { grid-column: 2; grid-row: 1 / -1; margin-top: 0; }
}

/* The screenshot floated in the middle of a card whose text starts lower down: two columns, two
   different vertical centres, and the eye reads that as a mistake. Both columns now start and end
   together, and the picture crops rather than leaving a gap. */
@media (min-width: 900px) and (pointer: fine) {
  /* A FLOAT, not a grid column. The grid put the picture in a cell spanning every row, so the row
     heights grew to fit it and the label ended up marooned above the heading with a hole between
     them. Floated, the picture hangs at the top right and the text simply runs beside it. */
  .chapters .chapter:has(.chapter-shot) { display: block; }
  .chapter-shot {
    float: right;
    width: clamp(280px, 34vw, 440px);
    margin: .3rem 0 1.2rem clamp(2rem, 4vw, 3.5rem);
  }
  .chapters .chapter:has(.chapter-shot)::after { content: ''; display: block; clear: both; }
}

/* ── The stack behaves like a stack ─────────────────────────────────────────
 *
 * A pinned card that the next one is sliding over now recedes: it dims, softens and sits back a
 * little, while the card on top keeps its full contrast and a deeper shadow. Without it the two
 * are equally sharp and the eye cannot tell which is in front.
 *
 * --cover is written by the script, 0 (fully visible) to 1 (fully covered). With no script every
 * card stays at 0, which is the page as it was.
 */
@media (min-width: 900px) and (pointer: fine) {
  .chapters .chapter {
    --cover: 0;
    transform: scale(calc(1 - var(--cover) * 0.04)) translateY(calc(var(--cover) * -10px));
    /* A covered card has to reach ZERO, and before it is fully covered. The cards take their
       height from their content, so a shorter card pinned on top of a taller one leaves the
       taller one's lower half sticking out beneath it — and at the 12% this used to stop at
       (28% on a phone), that half was readable text showing through under the front card.
       The owner saw it on a phone first. Gone by 80% covered here and 71% on a phone.

       Fade and blur both go further than they did. A card at 45% opacity still shows enough of
       its eyebrow and heading to be read as a card, and a card you can half-read is a card
       that looks EMPTY — the owner's word. At 12% it is a dim edge under the front card, which
       is what a stack is supposed to look like. */
    /* No blur while covered. It re-rasterised every card on every scroll frame of the stack —
       the biggest single cost on the page — for a card that is fading out anyway. */
    opacity: max(0, 1 - var(--cover) * 1.25);
    transition: box-shadow .3s ease;
    will-change: transform, opacity;
  }
  /* The card currently on top earns the shadow; the ones underneath give theirs up. */
  .chapters .chapter { box-shadow: 0 -1px 0 var(--line), 0 24px 48px -32px rgba(0,0,0,.45); }
  .chapters .chapter.is-front { box-shadow: 0 -1px 0 var(--line), 0 36px 70px -34px rgba(0,0,0,.65); }
}

@media (prefers-reduced-motion: reduce) {
  .chapters .chapter { transform: none !important; filter: none !important; opacity: 1 !important; }
}

/* The reveal rule sets opacity and transform on `.reveal.in`, which outranks the stack rule
   above — the blur applied and the fade and the scale did not. Same declarations, said where
   they win. */
@media (min-width: 900px) and (pointer: fine) {
  .js-reveal .chapters .chapter.reveal.in {
    transform: scale(calc(1 - var(--cover) * 0.04)) translateY(calc(var(--cover) * -10px));
    opacity: max(0, 1 - var(--cover) * 1.25);
  }
}

/* ── A little gloss on the cards ────────────────────────────────────────────
 * A sheet of light across the top edge and a hairline highlight inside it, so a card reads as a
 * pane rather than a flat rectangle. No backdrop blur: the cards sit on the page's own
 * background, so there is nothing behind them to blur, and it costs a repaint per frame while
 * they are moving.
 */
.chapters .chapter {
  /* NO `position` here. It said `relative`, which replaced the `sticky` the stack is built on and
     the cards stopped stacking altogether — a decoration that quietly removed the section's whole
     behaviour. Sticky is already a positioned ancestor, so ::after has what it needs. */
  background:
    linear-gradient(170deg, color-mix(in srgb, var(--text) 5%, transparent) 0%, transparent 34%),
    var(--bg);
}
.chapters .chapter::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 12%, transparent),
              inset 0 0 0 1px color-mix(in srgb, var(--text) 4%, transparent);
}

/* ── The stack, on a phone too ──────────────────────────────────────────────
 *
 * Same sticky stack as the desktop one, with two differences the small screen asks for: the cards
 * take their height from their content rather than 58% of the screen — which on a phone is nearly
 * the whole of it — and a covered card recedes without blurring. Blur is a full-screen filter on
 * every frame the stack moves, and it is the first thing to cost frames on a cheap phone.
 */
@media (max-width: 899px), (pointer: coarse) {
  .chapters .wrap { display: block; }
  .chapters .chapter {
    --cover: 0;
    position: sticky;
    top: 68px;
    padding: clamp(1.4rem, 5vw, 2rem) clamp(1.1rem, 4vw, 1.6rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
      linear-gradient(170deg, color-mix(in srgb, var(--text) 5%, transparent) 0%, transparent 34%),
      var(--bg);
    box-shadow: 0 -1px 0 var(--line), 0 18px 36px -28px rgba(0,0,0,.5);
    transform: scale(calc(1 - var(--cover) * 0.03)) translateY(calc(var(--cover) * -6px));
    opacity: max(0, 1 - var(--cover) * 1.4);
  }
  .chapters .chapter + .chapter { margin-top: clamp(1.4rem, 5vw, 2.2rem); }
  .js-reveal .chapters .chapter.reveal.in {
    transform: scale(calc(1 - var(--cover) * 0.03)) translateY(calc(var(--cover) * -6px));
    opacity: max(0, 1 - var(--cover) * 1.4);
  }
  .chapter-shot { margin-top: 1.2rem; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chapters .chapter { transform: none !important; opacity: 1 !important; }
}

/* ── A screenshot opens ─────────────────────────────────────────────────────
 * The picture in a card is 440px wide on this page and 1384 in the file. Pressing it shows the
 * file. A button, not a div with a click handler: it is a control, and a keyboard has to reach it.
 */
.shot-open {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; color: inherit;
}
.shot-open:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, #000 78%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9);
  transform: scale(.98); transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: clamp(.8rem, 3vw, 1.6rem); right: clamp(.8rem, 3vw, 1.6rem);
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--overlay, rgba(20,20,22,.7)); color: #fff;
  border: 1px solid var(--line-2);
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox img { transition: none; }
}

/* ── The demo map's two scenes ──────────────────────────────────────────────
 * The anti-theft scene is what the page opens on: the alert banner, the home ring, and a status
 * box where the rider list sits in the group scene. The toggle borrows the look of the time
 * filters below it, so it reads as part of the same map.
 */
.dm-theft {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 6; display: flex; align-items: center; gap: .5rem;
  padding: .42rem .5rem .42rem .7rem; border-radius: 999px;
  background: #ef4444; color: #fff;
  font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  box-shadow: 0 10px 26px -12px rgba(239,68,68,.8);
  max-width: calc(100% - 24px);
  /* Its buttons work now (Acknowledge / Resolved), so it takes the pointer. */
  transition: opacity .35s ease, transform .35s ease, background .3s ease;
}
.dm-theft.is-acked { background: #b45309; box-shadow: 0 10px 26px -12px rgba(180,83,9,.7); }
.dm-theft.is-gone { opacity: 0; transform: translate(-50%, -14px); pointer-events: none; }
button.dm-theft-pill { border: 0; font: inherit; cursor: pointer; }
button.dm-theft-pill.ghost { border: 1px solid rgba(255,255,255,.7); }
button.dm-theft-pill:hover { filter: brightness(.95); }
button.dm-theft-pill:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* What a button did, the way the app answers: a toast, then gone. */
.dm-toast {
  position: absolute; z-index: 7; left: 50%; top: 14px;
  transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  display: grid; gap: .1rem; text-align: center;
  padding: .55rem .9rem; border-radius: 12px;
  background: var(--overlay, rgba(12,12,14,.8)); color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,.6);
  font-size: .78rem; max-width: calc(100% - 24px);
  transition: opacity .3s ease, transform .3s ease;
}
.dm-toast b { font-weight: 600; }
.dm-toast span { color: var(--muted); font-size: .72rem; }
.dm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.dm-theft:not(.is-gone) ~ .dm-toast { top: 58px; }
.dm-status.is-clear .dm-status-dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.dm-theft-dot { width: 7px; height: 7px; border-radius: 999px; background: #fff; opacity: .9; }
.dm-theft-title { white-space: nowrap; }
.dm-theft-pill {
  padding: .26rem .6rem; border-radius: 999px;
  background: #fff; color: #b91c1c; letter-spacing: .02em; white-space: nowrap;
}
.dm-theft-pill.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); }

.dm-home { position: relative; display: grid; place-items: center; }
.dm-home-ring {
  position: absolute; width: 74px; height: 74px; border-radius: 999px;
  border: 1.5px dashed #3b82f6; background: rgba(59,130,246,.12);
}
.dm-home-dot {
  position: relative; width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--bg); color: #3b82f6; border: 2px solid #3b82f6;
  font-size: 12px; line-height: 1;
}

.dm-status .map-beacon-title { color: var(--text); }
.dm-status-dot {
  width: 8px; height: 8px; border-radius: 999px; background: #ef4444;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 25%, transparent);
}
.dm-status-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.2rem;
  padding: .32rem 0; font-size: .76rem; color: var(--dim);
}
.dm-status-row b { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: .74rem; }

.dm-scene {
  position: absolute; left: 12px; top: 12px; z-index: 6;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--overlay, rgba(12,12,14,.72));
  border: 1px solid var(--line-2);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.dm-scene-btn {
  border: 0; cursor: pointer; border-radius: 999px;
  padding: .32rem .7rem; font-family: var(--mono); font-size: .68rem; font-weight: 600;
  background: transparent; color: var(--dim);
}
.dm-scene-btn.is-on { background: var(--green); color: #05140a; }
.dm-scene-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* On a phone: outside the map, above it — a control of the section, not one more thing in the
   map's crowded corners. */
.scene-slot { margin: 0 0 .7rem; }
.scene-slot:empty { display: none; }
.scene-slot .dm-scene {
  position: static; display: inline-flex; gap: 4px; padding: 4px;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.scene-slot .dm-scene-btn { padding: .5rem 1.05rem; font-size: .76rem; }
.scene-slot .dm-scene-btn:not(.is-on):hover { color: var(--text); }

/* On a phone the four things that float over this map — the demo badge, the alert banner, the
   scene toggle and the status box — do not fit in the two top corners and the bottom-left one.
   Centring the banner put it over the badge, and moving the toggle to the bottom put it over
   the status box, which is where the owner found it: the third row of the box ("Față de casă")
   was simply not reachable.

   So on a narrow screen they stack instead of sharing corners: banner across the top, toggle
   on the line below it, status box at the bottom. The badge comes off — the note directly
   under the map already says "Date de demonstrație", so nothing is lost but the duplicate. */
@media (max-width: 640px) {
  .dm-theft {
    font-size: .6rem; gap: .35rem;
    top: 10px; left: 10px; right: 10px;
    transform: none;
    max-width: none;
    justify-content: center;
    padding: .42rem .55rem;
  }
  .dm-theft-pill.ghost { display: none; }   /* two pills and a title do not fit a phone */
  .dm-theft.is-acked .dm-theft-pill.ghost { display: inline-block; }   /* the next step, once acked */
  .dm-theft.is-acked .dm-theft-title { font-size: .56rem; }
  /* 58px, not 50: the banner is 42px tall and sits at 10px, so anything below 52 touches it.
     Measured, not guessed — at 50 the two boxes overlapped by 1.75px. */
  .dm-scene { top: 58px; left: 10px; bottom: auto; }
  .livemap-badge { display: none; }
  /* Clear of the attribution (i) in the other corner, and narrow enough that the map is still
     the larger half of what is on screen. */
  .map-beacon-overlay { bottom: 12px; left: 10px; }
}

/* ── Liquid glass on the chapter cards ──────────────────────────────────────
 *
 * Glass needs something behind it. The earlier pass deliberately skipped backdrop blur because
 * the cards sat on the page's flat background and there was nothing to refract — so the first
 * half of this is a field of soft colour behind the stack, and only then the glass.
 *
 * What is NOT here: the SVG displacement map (feImage + feDisplacementMap as a backdrop-filter)
 * that gets closest to Apple's material. It is Chromium-only — Safari and Firefox ignore it and
 * fall back to plain blur — and it rebuilds the map whenever the element resizes, which on six
 * cards that scale as they stack is a repaint per frame. The CSS below reads as glass in every
 * browser and costs one blur.
 */
.chapters { position: relative; isolation: isolate; overflow: clip; }
.chapters::before {
  content: '';
  position: absolute; inset: -10% -5%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 18% 22%, color-mix(in srgb, var(--green) 26%, transparent), transparent 70%),
    radial-gradient(34% 30% at 82% 38%, color-mix(in srgb, #6366f1 24%, transparent), transparent 72%),
    radial-gradient(30% 28% at 60% 86%, color-mix(in srgb, var(--green) 18%, transparent), transparent 70%);
  filter: blur(18px);
  opacity: .55;
}

@media (min-width: 900px) and (pointer: fine) {
  .chapters .chapter {
    /* Translucent, not transparent: the text has to stay readable over whatever drifts behind. */
    background: color-mix(in srgb, var(--bg) 62%, transparent);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent),     /* the lit top edge */
      inset 0 -1px 0 color-mix(in srgb, #000 30%, transparent),    /* the shaded bottom edge */
      inset 0 0 22px color-mix(in srgb, #fff 6%, transparent),     /* the body of the pane */
      0 26px 50px -34px rgba(0,0,0,.65);
  }
  /* The specular sweep: a narrow band of light across the upper-left corner, the way a pane
     catches a window. It sits above the card's own background and below its text. */
  .chapters .chapter::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background:
      linear-gradient(135deg,
        color-mix(in srgb, #fff 16%, transparent) 0%,
        transparent 26%,
        transparent 74%,
        color-mix(in srgb, #fff 6%, transparent) 100%);
    opacity: 0;
    transition: opacity .3s;
  }
  .chapters .chapter.is-front::before { opacity: 1; }
  .chapters .chapter > * { position: relative; z-index: 1; }
  /* The picture one level above its siblings, or it cannot be clicked. The card is a BLOCK with
     the picture floated right, and a heading is a full-width block box that runs underneath a
     float — its text wraps around the picture, its box does not. With every child at z-index 1,
     the heading comes later in the source and paints over the picture, invisibly, so a click on
     the screenshot landed on the <h2> and the lightbox never opened. In both themes; the owner
     found it on the light one. */
  .chapters .chapter > .chapter-shot { z-index: 2; }
}

/* On a phone the stack has no blur by choice — a full-screen filter per frame is the first thing
   to cost frames there — so the glass is the light and the rim, without the refraction. */
@media (max-width: 899px), (pointer: coarse) {
  .chapters .chapter {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent),
      inset 0 -1px 0 color-mix(in srgb, #000 24%, transparent),
      0 18px 36px -28px rgba(0,0,0,.55);
  }
}

/* The cards were a screen tall each because `min-height: 58vh` said so, and most of them have
   four lines of text in them — so they read as mostly empty. The stack does not need tall cards:
   what it needs is scrolling distance between them, and a margin gives that without inflating a
   card past its content. */
@media (min-width: 900px) and (pointer: fine) {
  .chapters .chapter { min-height: 0; }
  .chapters .chapter + .chapter { margin-top: clamp(3rem, 14vh, 10rem); }
}


/* ── Back to the top, on a phone ────────────────────────────────────────────
 * A small round button bottom-right once the page is well past the first screen. Phone only: a
 * desktop has the header and the section rail for this. It sits above the home indicator and
 * clear of the current iOS Safari's floating bar, which covers the last ~70 px of the screen. */
.to-top {
  position: fixed; z-index: 45;
  right: 16px; bottom: calc(88px + env(safe-area-inset-bottom));
  width: 44px; height: 44px; border-radius: 999px;
  display: none; place-items: center;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 26px -12px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(10px) scale(.9);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media (max-width: 760px), (pointer: coarse) {
  .to-top:not([hidden]) { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }


/* ── Notifications beside the wheel ─────────────────────────────────────────
 * The app's own alerts, one at a time, in from the right and out upwards. Kept QUIET on purpose
 * (the owner's word was "mai discrete"): small, translucent, no heavy shadow, the text at the
 * page's muted values — a hint of what the phone receives, not a second headline competing with
 * the first. Only the tone dot carries colour. */
.hero-toasts {
  position: absolute; z-index: 2; pointer-events: none;
  width: 250px; height: 120px;
  right: calc(clamp(24px, 6vw, 110px) + min(580px, 46vw) * 0.36);
  bottom: 9%;
}
.ht {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .7rem .5rem .55rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: translateX(24px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.ht.is-in   { opacity: .9; transform: none; }
.ht.is-prev { opacity: .28; transform: translateY(-46px) scale(.97); }
.ht.is-gone { opacity: 0; transform: translateY(-80px) scale(.94); }
.ht div { display: grid; gap: 0; min-width: 0; flex: 1; }
.ht b { font-size: .76rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht span { font-size: .68rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht em { font-style: normal; font-family: var(--mono); font-size: .58rem; color: var(--dim); align-self: flex-start; margin-top: .1rem; opacity: .8; }
.ht-ico { flex: none; width: 22px; height: 22px; position: relative; }
.ht-ico::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent);
}
.ht[data-tone="red"]    { --tone: #ef4444; }
.ht[data-tone="amber"]  { --tone: #f59e0b; }
.ht[data-tone="violet"] { --tone: #8b5cf6; }
.ht[data-tone="green"]  { --tone: var(--green); }
.ht[data-tone="blue"]   { --tone: #3b82f6; }

/* A phone: one card, small, high on the empty top half, on the right over the wheel. */
@media (max-width: 760px) {
  .hero-toasts { left: auto; right: 16px; width: 220px; bottom: auto; top: 12%; height: 52px; }
  .ht.is-prev, .ht.is-gone { opacity: 0; transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .ht { transition: none; }
}


/* The hero's lede as a short line and four items under it, one per line, instead of a paragraph
   that ran across the wheel. Narrow on purpose: the column now stops well before the wheel. */
.hero .lede { margin-bottom: .55rem; }
.lede-list {
  list-style: none; margin: 0 0 1.9rem; padding: 0;
  display: grid; gap: .3rem;
  font-size: clamp(1rem, 1.35vw, 1.15rem); color: var(--muted);
}
.lede-list li { display: flex; align-items: center; gap: .6rem; }
/* Each card names the promise it belongs to, and that line is underlined while the card is up:
   the notification and the claim it proves, said at the same moment. */
/* The row is only as wide as its words (`fit-content`), so the underline stops where the text
   does instead of running on to the wheel; a hairline, not a rule. */
.lede-list li { position: relative; width: fit-content; transition: color .3s ease; }
.lede-list li::after {
  content: ''; position: absolute; left: calc(6px + .6rem); right: 0; bottom: -2px; height: 1px;
  background: color-mix(in srgb, var(--green) 65%, transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.lede-list li.is-hit { color: var(--text); }
.lede-list li.is-hit::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .lede-list li::after { transition: none; } }
.lede-list li::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
}


/* The demo map's caption: a small label, then one statement per line. */
.mapnote { display: grid; gap: .3rem; max-width: 62ch; }
.mapnote-tag {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); margin-bottom: .15rem;
}
.mapnote-line { color: var(--muted); }

/* The hero's lede and its four items in the headline's face, not the body's: they are part of the
   headline block, and in Geist they read as body copy dropped under a display title. */
.hero .lede, .lede-list {
  font-family: var(--display);
  letter-spacing: -.01em;
}
.hero .lede { font-weight: 500; color: var(--text); }
/* The four items as spec labels: capitals, tracked, a size down — the owner's pick over lower case,
   Title Case (forced in Romanian: "De Furt") and the mono face. */
.lede-list { font-weight: 500; text-transform: uppercase; letter-spacing: .09em; font-size: .86rem; gap: .55rem; }


/* ── The header as liquid glass, like the cards ─────────────────────────────
 * Translucent tint, a strong blur with extra saturation so what passes under it keeps its colour,
 * a lit top edge and a shaded bottom one. On phones too: the header blur had been switched off
 * there while hunting a scroll hitch, which turned out to be the map resizing on every Safari
 * toolbar change (fixed separately), not this. */
.site-head,
.site-head.stuck {
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--text) 10%, transparent),
    0 12px 32px -26px rgba(0,0,0,.6);
}

/* ── The light theme gets the same glass ────────────────────────────────────
 * Every highlight above is WHITE, and on a near-white page white does nothing: the cards' lit
 * edge, their inner glow and the specular band were all there in the light theme and invisible,
 * and the colour field behind them was too faint to show through. So in light: a stronger,
 * warmer field; a pane that is whiter than the page (the card colour, not the page colour);
 * edges drawn with a dark hairline plus a bright inner line; a shadow that lifts. */
:root[data-theme="light"] .chapters::before { opacity: .95; filter: blur(22px); }
:root[data-theme="light"] .site-head,
:root[data-theme="light"] .site-head.stuck {
  background: color-mix(in srgb, #fff 55%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(20,23,28,.08),
    0 12px 30px -24px rgba(20,23,28,.35);
}
@media (min-width: 900px) and (pointer: fine) {
  :root[data-theme="light"] .chapters .chapter {
    background: color-mix(in srgb, #fff 52%, transparent);
    border-color: rgba(20,23,28,.08);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.95),
      inset 0 -1px 0 rgba(20,23,28,.06),
      inset 0 0 26px rgba(255,255,255,.55),
      0 30px 60px -36px rgba(20,23,28,.35);
  }
  :root[data-theme="light"] .chapters .chapter::before {
    background: linear-gradient(135deg, rgba(255,255,255,.75) 0%, transparent 30%, transparent 72%, rgba(255,255,255,.35) 100%);
  }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chapters::before { opacity: .95; filter: blur(22px); }
  :root:not([data-theme="dark"]) .site-head,
  :root:not([data-theme="dark"]) .site-head.stuck {
    background: color-mix(in srgb, #fff 55%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(20,23,28,.08), 0 12px 30px -24px rgba(20,23,28,.35);
  }
}
@media (prefers-color-scheme: light) and (min-width: 900px) and (pointer: fine) {
  :root:not([data-theme="dark"]) .chapters .chapter {
    background: color-mix(in srgb, #fff 52%, transparent);
    border-color: rgba(20,23,28,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(20,23,28,.06), inset 0 0 26px rgba(255,255,255,.55), 0 30px 60px -36px rgba(20,23,28,.35);
  }
  :root:not([data-theme="dark"]) .chapters .chapter::before {
    background: linear-gradient(135deg, rgba(255,255,255,.75) 0%, transparent 30%, transparent 72%, rgba(255,255,255,.35) 100%);
  }
}


/* A covered card gives up its glass: its backdrop blur was re-computed every scroll frame under
   the card sliding over it, for a card that is fading out. Only uncovered cards blur. */
.chapters .chapter.is-covered { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
