/* KOERS website: the app's own look (docs/brand.md). Built pages come from web/build.mjs. */
@font-face { font-family: "Archivo Expanded"; src: url(/fonts/archivo-expanded-black-italic.woff2) format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url(/fonts/archivo-expanded-extrabold.woff2) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted-grotesk-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted-grotesk-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url(/fonts/martian-mono-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --polder: #0f7a4a;
  --koersgeel: #ffc629;
  --asfalt: #17191c;
  --krijt: #f1f3ee;
  --dijkblauw: #8ec9e8;
  --z-herstel: #c3c8c0; --z-duur: #8ec9e8; --z-tempo: #34b276; --z-sweetspot: #ffc629;
  --z-omslagpunt: #f28a1e; --z-vo2max: #e2462b; --z-sprint: #17191c;

  --surface: #f1f3ee;
  --raised: #ffffff;
  --ink: #17191c;
  --ink-muted: #4c5258;
  --border: #17191c;
  --shadow: #17191c;
  --accent: #0f7a4a;

  --display: "Archivo Expanded", "Arial Black", system-ui, sans-serif;
  --text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --data: "Martian Mono", ui-monospace, "SF Mono", monospace;
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #121417; --raised: #1c1f23; --ink: #f1f3ee; --ink-muted: #a9afb5;
    --border: rgba(241, 243, 238, 0.24); --shadow: rgba(0, 0, 0, 0.7); --accent: #34b276; --z-sprint: #f1f3ee;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #121417; --raised: #1c1f23; --ink: #f1f3ee; --ink-muted: #a9afb5;
  --border: rgba(241, 243, 238, 0.24); --shadow: rgba(0, 0, 0, 0.7); --accent: #34b276; --z-sprint: #f1f3ee;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--surface); color: var(--ink); font: 17px/1.6 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--koersgeel); outline-offset: 3px; border-radius: 6px; }
p { max-width: 62ch; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.display { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.92; text-wrap: balance; margin: 0; }
h1.display { font-size: clamp(46px, 8.4vw, 108px); }
h2 { font-family: var(--display); font-weight: 900; font-style: italic; font-size: clamp(28px, 4vw, 46px); line-height: 0.98; letter-spacing: -0.015em; margin: 0 0 14px; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.15; margin: 0 0 8px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-muted); max-width: 44ch; margin: 22px 0 0; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.data { font-family: var(--data); font-weight: 700; }
.muted { color: var(--ink-muted); }

/* Koersstrepen */
.strepen { display: inline-flex; gap: 5px; height: 22px; transform: skewX(-12deg); vertical-align: middle; }
.strepen i { width: 7px; display: block; }
.strepen i:nth-child(1) { background: var(--polder); }
.strepen i:nth-child(2) { background: var(--koersgeel); }
.strepen i:nth-child(3) { background: var(--ink); }
.kicker { display: flex; align-items: center; gap: 10px; }

/* Stickers: raised fill, ink border, hard shadow */
.sticker { background: var(--raised); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 0 var(--shadow); }
.sticker.geel { background: var(--koersgeel); color: var(--asfalt); }
.sticker.polder { background: var(--polder); color: #fff; }
.sticker.asfalt { background: var(--asfalt); color: var(--krijt); border-color: var(--asfalt); }

/* Buttons that press in */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px;
  font-family: var(--display); font-weight: 900; font-style: italic; font-size: 15px; text-transform: uppercase; letter-spacing: 0.01em;
  border: 2px solid var(--border); border-radius: 14px; box-shadow: 0 4px 0 var(--shadow); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn.primary { background: var(--polder); color: #fff; }
.btn.geel { background: var(--koersgeel); color: var(--asfalt); }
.btn.secondary { background: var(--raised); color: var(--ink); }
.btn small { font-family: var(--text); font-style: normal; font-weight: 600; text-transform: none; font-size: 13px; opacity: .75; }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; box-shadow: 0 4px 0 var(--shadow); }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.logo { display: block; flex: none; width: 176px; height: 32px; background: url(/img/koers-lockup-light.svg) left center / contain no-repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { background-image: url(/img/koers-lockup-on-ink.svg); } }
:root[data-theme="dark"] .logo { background-image: url(/img/koers-lockup-on-ink.svg); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1;
  border-radius: 12px; border: 2px solid transparent; }
.nav a:hover { border-color: var(--border); background: var(--raised); }
.nav a[aria-current="page"] { background: var(--koersgeel); color: var(--asfalt); border-color: var(--border); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px;
  font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 14px;
  border: 2px solid var(--border); border-radius: 12px; background: var(--raised); box-shadow: 0 3px 0 var(--shadow); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { display: grid; gap: 3px; } .menu summary i b { display: block; width: 14px; height: 2px; background: var(--ink); }
.menu[open] summary { background: var(--koersgeel); color: var(--asfalt); }
.menu .panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 220px; padding: 8px; display: grid; gap: 2px; }
.menu .panel a { padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu .panel a:hover, .menu .panel a[aria-current="page"] { background: var(--koersgeel); color: var(--asfalt); }
@media (max-width: 760px) { .nav { display: none; } .menu { display: block; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding-block: 24px 64px; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--ink-muted); }
.phone-stage { position: relative; justify-self: center; width: min(340px, 100%); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .phone-stage { margin-top: 12px; } }

/* Phone frame around a real app screen */
.phone { position: relative; border: 9px solid var(--asfalt); border-radius: 46px; overflow: hidden; background: var(--asfalt);
  box-shadow: 0 8px 0 var(--shadow); aspect-ratio: 1320 / 2868; }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone.tilt { transform: rotate(-3deg); }
.float { position: absolute; z-index: 2; }
.score-disc { width: 92px; height: 92px; border-radius: 50%; background: var(--koersgeel); color: var(--asfalt); border: 2px solid var(--asfalt);
  box-shadow: 0 5px 0 var(--asfalt); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-style: italic; font-size: 34px; }
.kp-badge { min-width: 64px; height: 48px; padding: 0 12px; border-radius: 10px; background: var(--polder); color: #fff; border: 2px solid var(--asfalt);
  box-shadow: 0 5px 0 var(--asfalt); display: grid; place-items: center; font-family: var(--data); font-weight: 700; font-size: 22px; }

/* Bike-computer strip */
.computer { background: var(--asfalt); color: var(--krijt); border-block: 2px solid var(--asfalt); }
.computer .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.computer .field { padding: 18px 16px; border-left: 1px solid rgba(241, 243, 238, .14); }
.computer .field:first-child { border-left: 0; }
.computer .field span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 243, 238, .6); font-weight: 600; }
.computer .field b { display: block; font-family: var(--data); font-weight: 700; font-size: clamp(20px, 2.6vw, 30px); color: var(--koersgeel); margin-top: 2px; }
@media (max-width: 720px) { .computer .wrap { grid-template-columns: 1fr 1fr; } .computer .field:nth-child(3) { border-left: 0; } }

/* Sections */
section.block { padding-block: 80px; }
.section-head { display: grid; gap: 10px; margin-bottom: 34px; }
.section-head p { margin: 0; color: var(--ink-muted); }

/* Three steps (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 22px; display: grid; gap: 14px; align-content: start; }
.step .num { font-family: var(--data); font-weight: 700; font-size: 13px; color: var(--ink-muted); }
.step .num::before { counter-increment: step; content: "STAP 0" counter(step); }
:lang(en) .step .num::before { content: "STEP 0" counter(step); }
.step .shot { border-radius: 14px; overflow: hidden; border: 2px solid var(--border); aspect-ratio: 4 / 3; background: var(--asfalt); }
.step .shot img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.step p { margin: 0; color: var(--ink-muted); font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split ul { padding-left: 0; list-style: none; margin: 18px 0 0; display: grid; gap: 10px; }
.split li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-muted); }
.split li::before { content: ""; width: 14px; height: 14px; margin-top: 6px; border: 2px solid var(--border); border-radius: 3px; background: var(--polder); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.flip > :first-child { order: 0; } }

/* Workout bar in the zone ramp */
.workout { padding: 20px; }
.zonebar { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 120px; border-bottom: 3px solid var(--ink); }
.zonebar i { display: block; border-radius: 2px 2px 0 0; }
.zonebar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 80%; border-top: 1.5px dashed var(--ink-muted); }
.zonebar .ftp { position: absolute; right: 0; bottom: calc(80% + 4px); font-family: var(--data); font-size: 10px; color: var(--ink-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: var(--ink-muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 12px; height: 12px; border: 1.5px solid var(--border); border-radius: 3px; background: var(--c); }
.workout .meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-family: var(--data); font-size: 13px; }

/* Devices */
.devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.device { padding: 22px; }
.device p { margin: 6px 0 0; color: var(--ink-muted); font-size: 16px; }
@media (max-width: 860px) { .devices { grid-template-columns: 1fr; } }

/* Big picture */
.picture { overflow: hidden; padding: 0; }
.picture img { width: 100%; }
.picture figcaption { padding: 14px 20px; font-size: 15px; color: var(--ink-muted); border-top: 2px solid var(--border); }

/* Privacy band */
.band { padding: 34px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band h2 { color: #fff; margin: 0; }
.band p { margin: 8px 0 0; color: rgba(255, 255, 255, .88); }
.band .btn.secondary { color: var(--asfalt); background: #fff; }

/* FAQ */
.faq { display: grid; gap: 14px; }
.faq details { padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center;
  border: 2px solid var(--border); border-radius: 8px; font-family: var(--data); font-weight: 700; }
.faq details[open] summary::after { content: "–"; background: var(--koersgeel); color: var(--asfalt); }
.faq .answer { padding: 0 22px 20px; color: var(--ink-muted); }
.faq .answer p { margin: 0 0 10px; }
.faq .answer ul { margin: 0 0 10px; padding-left: 1.2em; }

/* Text pages */
.page-head { max-width: 760px; padding-block: 32px 28px; }
.page-head h1 { font-size: clamp(42px, 7vw, 76px); }
.page-head p { margin: 16px 0 0; }
.prose { max-width: 760px; padding-bottom: 72px; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 44px; }
.prose p, .prose li { color: var(--ink-muted); }
.prose li { margin-block: 6px; }
.prose .card { padding: 22px 24px; margin-top: 18px; }
.prose .card p:last-child { margin-bottom: 0; }
.copy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.copy code { font-family: var(--data); font-size: 16px; padding: 12px 16px; border: 2px solid var(--border); border-radius: 12px; background: var(--raised); user-select: all; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.facts .sticker { padding: 16px; }
.facts b { display: block; font-family: var(--data); font-size: 22px; color: var(--ink); }
.facts span { font-size: 14px; color: var(--ink-muted); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* Footer */
footer.site { margin-top: 40px; background: var(--asfalt); color: var(--krijt); }
footer.site .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-block: 44px 28px; }
footer.site .logo { background-image: url(/img/koers-lockup-on-ink.svg); }
footer.site p { color: rgba(241, 243, 238, .7); font-size: 14px; }
footer.site h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--koersgeel); }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer.site a { color: var(--krijt); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .legal { grid-column: 1 / -1; border-top: 1px solid rgba(241, 243, 238, .14); padding-top: 18px; font-size: 13px; color: rgba(241, 243, 238, .6); }
footer.site .legal a { color: rgba(241, 243, 238, .8); text-decoration: underline; }
@media (max-width: 860px) { footer.site .wrap { grid-template-columns: 1fr 1fr; } footer.site .wrap > :first-child { grid-column: 1 / -1; } }

/* Phones: keep the stickers on the hero phone inside the screen. */
body { overflow-x: clip; }
@media (max-width: 520px) {
  .float.kp-badge { left: -6px !important; }
  .float.score-disc { right: -6px !important; width: 76px; height: 76px; font-size: 28px; }
  .btn { padding: 0 16px; font-size: 14px; }
}


/* ---------- iPhone frame (size with --w; everything inside scales with it) ---------- */
.iphone { --w: 300px; width: min(var(--w), 100%); aspect-ratio: 9 / 19.5; font-size: calc(min(var(--w), 100vw - 40px) / 30); position: relative;
  padding: .42em; border-radius: 3.7em; background: linear-gradient(145deg, #3a3e45, #17191c 40%, #2a2d33);
  box-shadow: 0 .6em 0 var(--shadow), inset 0 0 0 .14em #4a4f57; flex: none; }
.iphone::before { content: ""; position: absolute; right: -.28em; top: 22%; width: .3em; height: 11%; border-radius: 0 .2em .2em 0; background: #2a2d33; }
.iphone::after { content: ""; position: absolute; left: -.28em; top: 18%; width: .3em; height: 7%; border-radius: .2em 0 0 .2em; background: #2a2d33;
  box-shadow: 0 2.6em 0 #2a2d33; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 3.28em; overflow: hidden; background: #e9efe4; color: #17191c;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif; isolation: isolate; }
.island { position: absolute; z-index: 9; top: .62em; left: 50%; transform: translateX(-50%); width: 6.6em; height: 1.95em; border-radius: 1em; background: #000; }
.statusbar { position: absolute; z-index: 8; top: .78em; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 2.3em 0 2.6em;
  font-size: .95em; font-weight: 600; letter-spacing: -.01em; }
.statusbar .sys { display: flex; gap: .35em; align-items: center; }
.statusbar .sig { display: flex; gap: .12em; align-items: flex-end; height: .7em; } .statusbar .sig b { width: .17em; background: currentColor; border-radius: .05em; display: block; }
.statusbar .bat { width: 1.55em; height: .72em; border: .1em solid currentColor; border-radius: .22em; position: relative; opacity: .9; }
.statusbar .bat::after { content: ""; position: absolute; inset: .08em; right: .3em; background: currentColor; border-radius: .1em; }
.screen .mapsvg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* App pieces inside a screen or on their own (font-size sets the scale) */
.ui-sticker { background: #fff; border: .14em solid #17191c; border-radius: 1.5em; box-shadow: 0 .35em 0 #17191c; }
.ui-chip { position: absolute; z-index: 4; top: 3.5em; left: 1em; display: flex; align-items: center; gap: .4em; padding: .55em .9em; font-size: .95em; font-weight: 700;
  background: #fff; border: .14em solid #17191c; border-radius: 1.2em; box-shadow: 0 .2em 0 #17191c; }
.ui-chip svg { width: 1em; height: 1em; }
.ui-mapbtns { position: absolute; z-index: 4; top: 3.5em; right: 1em; display: grid; gap: .55em; }
.ui-mapbtns span { width: 2.6em; height: 2.6em; display: grid; place-items: center; background: #fff; border: .14em solid #17191c; border-radius: .85em; box-shadow: 0 .18em 0 #17191c; }
.ui-mapbtns svg { width: 1.1em; height: 1.1em; }
.ui-card { position: absolute; z-index: 4; left: .75em; right: .75em; bottom: 5.9em; padding: 1em; display: grid; gap: .75em;
  background: #fff; border: .14em solid #17191c; border-radius: 1.6em; box-shadow: 0 .38em 0 #17191c; }
.ui-title { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 1.12em; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
.ui-stats { font-family: var(--data); font-weight: 700; font-size: .78em; color: #4c5258; margin-top: .25em; white-space: nowrap; }
.ui-strip { display: flex; align-items: center; gap: .3em; overflow: hidden; white-space: nowrap; }
.ui-strip i { font-style: normal; color: #4c5258; font-size: .8em; }
.kp { display: inline-grid; place-items: center; min-width: 2.15em; height: 1.75em; padding: 0 .3em; border-radius: .38em; background: #0f7a4a; color: #fff;
  font-family: var(--data); font-weight: 700; font-size: .82em; }
.ui-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
.ui-tiles span { display: grid; justify-items: center; gap: .2em; padding: .55em .2em; font-size: .78em; font-weight: 700; background: #fff;
  border: .14em solid #17191c; border-radius: .9em; box-shadow: 0 .2em 0 #17191c; white-space: nowrap; }
.ui-tiles svg { width: 1.3em; height: 1.3em; }
.ui-btn { display: flex; align-items: center; justify-content: center; gap: .5em; height: 3.1em; border: .14em solid #17191c; border-radius: .95em; box-shadow: 0 .25em 0 #17191c;
  font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: .92em; background: #0f7a4a; color: #fff; }
.ui-btn svg { width: 1.2em; height: 1.2em; flex: none; }
.ui-btn.geel { background: #ffc629; color: #17191c; }
.ui-btn.white { background: #fff; color: #17191c; }
.ui-tabbar { position: absolute; z-index: 5; left: 1.1em; right: 1.1em; bottom: .9em; height: 4.2em; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
  background: #17191c; border-radius: 1.6em; color: rgba(241,243,238,.78); }
.ui-tabbar span { display: grid; justify-items: center; gap: .2em; font-size: .62em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ui-tabbar span i { width: 3.4em; height: 3.4em; display: grid; place-items: center; border-radius: 50%; }
.ui-tabbar span.on { color: #ffc629; } .ui-tabbar span.on i { background: #ffc629; color: #17191c; }
.ui-tabbar svg { width: 2.2em; height: 2.2em; }
.ui-label { font-size: .7em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #4c5258; }
.ui-big { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 2.9em; line-height: 1; letter-spacing: -.02em; }
.ui-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: .28em; border: .14em solid #17191c; border-radius: 2em; background: #fff; }
.ui-seg span { position: relative; z-index: 1; text-align: center; padding: .55em 0; font-size: .74em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: color .3s; }
.ui-seg::before { content: ""; position: absolute; top: .28em; bottom: .28em; left: calc(50% + 0em); width: calc(50% - .28em); border-radius: 2em; background: #17191c; transition: left .45s cubic-bezier(.3,1.3,.5,1); }
.ui-seg span.on { color: #f1f3ee; }
.ui-row { display: flex; align-items: center; gap: .7em; }
.ui-row .ico { width: 1.9em; height: 1.9em; color: #0f7a4a; }
.ui-row small { display: block; } .ui-row b { display: block; font-size: .95em; }
.ui-slider { position: relative; height: .4em; border-radius: .2em; background: #d9ddd6; }
.ui-slider::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 40%); background: #0f7a4a; border-radius: .2em; transition: width 1.4s ease; }
.ui-slider b { position: absolute; top: 50%; left: var(--v, 40%); width: 1.7em; height: 1.7em; margin: -.85em 0 0 -.85em; border-radius: 50%; background: #fff;
  border: .14em solid #17191c; box-shadow: 0 .15em 0 #17191c; transition: left 1.4s ease; }
.ui-hint { font-size: .78em; color: #4c5258; }
.ui-wbar { display: flex; align-items: flex-end; gap: .14em; height: 2.6em; border-bottom: .18em solid #17191c; }
.ui-wbar i { display: block; border-radius: .1em .1em 0 0; transform-origin: bottom; transition: transform .5s cubic-bezier(.3,1.4,.5,1); transition-delay: var(--d, 0s); }
.ui-list { display: grid; gap: .55em; }
.ui-list span { display: flex; align-items: center; gap: .7em; padding: .75em .85em; font-weight: 700; font-size: .92em; background: #fff; border: .14em solid #17191c; border-radius: 1em; box-shadow: 0 .2em 0 #17191c; }
.ui-list span em { font-style: normal; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; color: #fff; font-size: .8em; flex: none; }
.ui-list span small { display: block; font-weight: 400; color: #4c5258; font-size: .82em; }
.ui-list span.on { background: #ffc629; }
.ui-done { display: inline-flex; align-items: center; gap: .45em; justify-self: start; padding: .5em .85em; border-radius: 1em; background: #0f7a4a; color: #fff; font-weight: 700; font-size: .85em;
  border: .14em solid #17191c; transition: opacity .4s, transform .4s cubic-bezier(.3,1.5,.5,1); }
.ui-score { display: flex; align-items: center; gap: 1em; }
.ui-score b { width: 2.5em; height: 2.5em; flex: none; border-radius: 50%; background: #ffc629; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 1.6em; }
.ui-score .verdict { font-weight: 700; font-size: 1.05em; }
.ui-stattiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; }
.ui-stattiles span { padding: .65em .85em; background: #fff; border: .14em solid #17191c; border-radius: .9em; box-shadow: 0 .2em 0 #17191c; }
.ui-stattiles small { display: block; font-size: .68em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #4c5258; }
.ui-stattiles b { font-family: var(--data); font-size: 1.1em; }
.ui-step { display: grid; gap: .4em; padding: .8em 0; border-bottom: .07em solid #d9ddd6; }
.ui-step .head { display: flex; align-items: baseline; gap: .5em; font-weight: 700; }
.ui-step .head i { width: .75em; height: .75em; border: .1em solid #17191c; border-radius: .15em; align-self: center; }
.ui-step .head em { font-style: normal; font-weight: 400; font-size: .82em; color: #4c5258; }
.ui-step .head span { margin-left: auto; font-family: var(--data); }
.ui-step small { color: #4c5258; font-size: .82em; }
.ui-target { position: relative; height: .6em; border-radius: .12em; background: rgba(23,25,28,.08); }
.ui-target i { position: absolute; top: 0; bottom: 0; border-radius: .12em; }
.ui-target b { position: absolute; top: -.25em; bottom: -.25em; width: .2em; margin-left: -.1em; background: #17191c; transition: left 1.2s cubic-bezier(.3,1.2,.5,1); transition-delay: var(--d, 0s); }
/* An app sheet on its own at reading size, with its grabber and nav bar (the score after a ride) */
.ui-sheet { width: min(100%, 470px); font-size: 16px; position: relative; padding-top: 10px; background: #f1f3ee; color: #17191c; overflow: hidden;
  border: 2px solid #17191c; border-radius: 28px; box-shadow: 0 8px 0 var(--shadow); font-family: -apple-system, BlinkMacSystemFont, var(--text); }
.ui-sheet::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: #c3c8c0; }
.ui-navbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6em; padding: .6em 1.2em .75em; border-bottom: .07em solid #d9ddd6; font-size: .95em; }
.ui-navbar span:last-child { justify-self: end; font-weight: 700; color: #0f7a4a; }
.ui-sheet-body { display: grid; gap: 1.15em; padding: 1.2em 1.25em 1.3em; }
.ui-sheet .ui-title { font-size: 1.4em; }
.ui-sheet .ui-hint { font-size: .86em; margin-top: .2em; }
.ui-sheet .ui-step:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 440px) { .ui-sheet { font-size: 15px; } .ui-sheet-body { padding-inline: 1em; } }
.route-line { transition: stroke-dashoffset 2.4s ease-in-out; }
.pop { transition: opacity .35s ease, transform .45s cubic-bezier(.3,1.6,.5,1); transition-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }

/* Animations start from a visible resting state; the script only rewinds what's not yet on screen. */
.anim .play:not(.in) .route-line { stroke-dashoffset: 1; }
.anim .play:not(.in) .pop { opacity: 0; transform: scale(.3); }
.anim .play:not(.in) .ui-wbar i { transform: scaleY(0); }
.anim .play:not(.in) .ui-target b { left: 4% !important; }
.anim .play:not(.in) .ui-slider { --v: 12% !important; }
.anim .play:not(.in) .ui-seg::before { left: .28em; }
.anim .play:not(.in) .ui-seg span.on { color: #17191c; }
.anim .play:not(.in) .ui-seg span.off { color: #f1f3ee; }
.anim .play:not(.in) .ui-done { opacity: 0; transform: translateY(.6em) scale(.9); }
.anim .play:not(.in) .ui-list span.on { background: #fff; }
.anim .play.in .ui-list span.on { transition: background .3s .6s; }
.anim .play.in .ui-done { transition-delay: 1.4s; }
@media (prefers-reduced-motion: reduce) { .route-line, .pop, .ui-wbar i, .ui-target b, .ui-slider::before, .ui-slider b, .ui-seg::before, .ui-done { transition: none !important; } }

/* Step cards now hold a piece of the app instead of a screenshot */
.step { grid-template-rows: auto auto auto 1fr; }
.step .demo { font-size: 13px; border: 2px solid var(--border); border-radius: 16px; background: #e7eee1; padding: 16px; overflow: hidden; color: #17191c;
  display: grid; align-content: center; min-width: 0; }
.step .demo > * { min-width: 0; }
.step .demo.map { padding: 0; position: relative; min-height: 260px; }
.step .ui-title { font-size: 1em; }
.step .ui-stats { white-space: normal; }
.step .ui-btn { font-size: .82em; height: auto; min-height: 3.1em; padding: .5em .9em; text-align: center; line-height: 1.1; }
@media (max-width: 440px) { .step { padding: 18px; } .step .demo { padding: 12px; } .step .demo.map { padding: 0; } .step .ui-btn { font-size: .76em; } }
.step .demo.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage { display: flex; justify-content: center; }

/* Contact form */
.form { display: grid; gap: 16px; padding: 24px; margin-top: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form textarea, .form select { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.form textarea { min-height: 150px; resize: vertical; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .status { margin: 0; font-weight: 600; }
.form .status.ok { color: var(--accent); } .form .status.err { color: #c2410c; }
@media (max-width: 620px) { .form .row2 { grid-template-columns: 1fr; } }
