/* BikeSafe CPH design system - PRD §5, tokens from design/homepage.html
   Final scheme: Plum accent on bright white (do not copy the mockup's
   Fjord-green/cream :root defaults). */

:root {
  --paper: #ffffff;
  --paper-2: #f4f4f2;
  --paper-3: #ebebe8;
  --ink: #1a1813;
  --ink-soft: #494539;
  --muted: #8c8678;
  --line: #e7e7e2;
  --white: #fff;
  --accent: #97386a;
  --accent-deep: #321f2c;
  --accent-contrast: #ffffff;
  --tint: #f0e6ec;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --r: 10px;
  --r-lg: 20px;
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); background: var(--paper); color: var(--ink);
  font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* buttons - pill-shaped, ≥48px touch targets (PRD §4.3) */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 600; font-size: 16px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-contrast);
  cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease; min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--accent); color: var(--accent-contrast); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

section { padding: 72px 0; }
.divide { border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-direction: column; gap: 14px; }
.sec-head h1, .sec-head h2 { font-size: clamp(30px, 5vw, 46px); }
.sec-head .lede { color: var(--ink-soft); max-width: 54ch; font-size: clamp(16px, 2.4vw, 19px); }
.cap { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; font-size: 19px; white-space: nowrap; flex-shrink: 0; }
.brand .mark { width: 32px; height: 32px; display: block; flex: none; }
.brand .sub { color: var(--muted); font-weight: 500; margin-left: -4px; }
.nav nav { display: flex; gap: 30px; align-items: center; }
.nav nav a { font-size: 15.5px; color: var(--ink-soft); font-weight: 500; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--accent); }
/* the special "Fork & Spoke" guide link, set in the serif face */
.nav-serif { font-family: var(--serif); font-style: italic; font-size: 20px; letter-spacing: .01em; }
.nav .right { display: flex; align-items: center; gap: 14px; }
.nav-cta { font-size: 15px; padding: 10px 18px; min-height: 42px; white-space: nowrap; }
.burger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
.burger i { width: 18px; height: 1.6px; background: var(--ink); display: block; transition: .25s; }
.mobile-menu { display: none; flex-direction: column; gap: 2px; padding: 10px 24px 22px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mobile-menu a { padding: 13px 4px; font-size: 18px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 14px; justify-content: center; }
body.menu-open .mobile-menu { display: flex; }
body.menu-open .burger i:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
body.menu-open .burger i:nth-child(2) { opacity: 0; }
body.menu-open .burger i:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* offline indicator (PRD §3.6) */
.offline-banner {
  display: none; background: var(--ink); color: var(--paper); text-align: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; padding: 8px 16px;
}
body.is-offline .offline-banner { display: block; }

/* hero */
.hero { padding: 70px 0 26px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; font-size: clamp(46px, 7.2vw, 92px); line-height: .97; }
.hero h1 em { font-style: italic; }
.hero .sub { max-width: 46ch; margin-top: 24px; font-size: clamp(17px, 2.4vw, 21px); color: var(--ink-soft); }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* hero crossfade - cycles through 5 city photos */
.hero-fade { position: relative; height: clamp(360px, 52vw, 560px); border-radius: 20px; overflow: hidden; background: var(--paper-3); }
.hero-fade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-fade img.active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-fade img { transition: none; }
}

/* hero stepper - quiet dots, barely-there until you look for them */
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 8px; z-index: 5;
  display: flex; justify-content: center; gap: 2px;
  opacity: .55; transition: opacity .3s ease;
}
.hero-fade:hover .hero-dots, .hero-dots:focus-within { opacity: .9; }
.hero-dots button {
  width: 22px; height: 22px; padding: 0; border: 0; background: transparent;
  cursor: pointer; display: grid; place-items: center;
}
.hero-dots button::after {
  content: ''; width: 5px; height: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  transition: background .3s ease, transform .3s ease;
}
.hero-dots button:hover::after { background: rgba(255, 255, 255, .8); }
.hero-dots button.active::after { background: rgba(255, 255, 255, .95); transform: scale(1.3); }
.hero-dots button:focus-visible { outline: 1px solid rgba(255, 255, 255, .8); outline-offset: -6px; border-radius: 50%; }

/* photo bands + mosaic */
.band { display: block; width: 100%; height: clamp(280px, 42vw, 520px); object-fit: cover; border-radius: 20px; }
.band--page { height: clamp(220px, 32vw, 380px); margin-top: 34px; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 16px; margin-top: 40px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.mosaic .m1 { grid-column: span 2; grid-row: span 2; }
.mosaic .m2 { grid-column: span 2; }
.stats { display: flex; gap: 46px; flex-wrap: wrap; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.03em; }
.stat span { font-size: 14px; color: var(--muted); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 13px; }
a.card { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.card:hover { border-color: var(--accent); box-shadow: 0 6px 22px rgba(26, 24, 19, .08); transform: translateY(-2px); }
.card .num { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.card h3 { font-size: 22px; letter-spacing: -.01em; }
.card p { color: var(--ink-soft); font-size: 15.5px; }
.card.more-card { justify-content: center; align-items: flex-start; background: var(--tint); }
.card.more-card h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; }

/* dark feature panel (routes, CTA) */
.panel { background: var(--accent-deep); color: var(--paper); border-radius: 28px; padding: clamp(28px, 4vw, 56px); }
.panel .eyebrow { color: rgba(255, 255, 255, .6); }
.panel h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5.5vw, 58px); margin-top: 10px; }
.panel .lede { color: rgba(255, 255, 255, .8); max-width: 52ch; margin-top: 14px; font-size: 18px; }
.panel .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); margin-top: 30px; }

/* route cards */
.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.rcard { border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r-lg); overflow: hidden; background: rgba(255, 255, 255, .03); display: flex; flex-direction: column; }
.rcard .rimg { position: relative; height: 170px; background: var(--paper-3); }
.rcard .rimg img { width: 100%; height: 100%; object-fit: cover; }
.rcard .rtag { position: absolute; top: 12px; left: 12px; z-index: 3; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; background: var(--paper); color: var(--ink); padding: 4px 9px; border-radius: 6px; }
.rcard .rbody { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.rcard h3 { font-size: 21px; }
.rcard p { color: rgba(255, 255, 255, .78); font-size: 14.5px; }
.rcard .rmeta { display: flex; gap: 16px; font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: auto; padding-top: 6px; }

/* light list cards (directories, catalog on paper) */
.list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.lcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.lcard .limg { height: 170px; background: var(--paper-3); position: relative; }
.lcard .limg img { width: 100%; height: 100%; object-fit: cover; }
.lcard .ltag { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; background: var(--paper); color: var(--ink); padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line); }
.lcard .lbody { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.lcard h3 { font-size: 21px; }
.lcard p { color: var(--ink-soft); font-size: 15px; }
.lcard .lmeta { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.lcard .more { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; color: var(--accent); margin-top: 4px; }

/* partner disclosure label - mandatory for paid placements (PRD §1.4) */
.partner-badge {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  border: 1px solid currentColor; border-radius: 6px; padding: 2px 7px;
}

/* maps */
.map { width: 100%; height: clamp(320px, 50vw, 520px); border-radius: var(--r-lg); border: 1px solid var(--line); z-index: 1; }

.map--route { height: clamp(380px, 56vw, 580px); }

/* map markers - numbered ride-order pins; plum for food & drink, ink for sights */
.poi-pin {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(26, 24, 19, .4);
}
.poi-pin--food { background: var(--accent); }
.poi-pin--dot { width: 18px; height: 18px; }
.poi-pin { transition: transform .15s ease, box-shadow .15s ease; }
.poi-pin--hot { transform: scale(1.25); box-shadow: 0 5px 16px rgba(151, 56, 106, .5); }

/* map <-> card linking: highlighted card + clickable affordance */
[data-map-key], [data-poi] { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.lcard.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }

/* map legend */
.map-legend {
  display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(26, 24, 19, .3); }
.legend-dot--sight { background: var(--ink); }
.legend-dot--food { background: var(--accent); }
.legend-line { width: 26px; height: 4px; border-radius: 2px; background: var(--accent); }

/* ride-order number on the stop cards, matching the map pins */
.stop-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; font-weight: 500; vertical-align: 3px;
}

/* map popups - match the card design */
.leaflet-popup-content-wrapper {
  font-family: var(--sans); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(26, 24, 19, .18); border: 1px solid var(--line);
}
.leaflet-popup-content { margin: 14px 18px; font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.leaflet-popup-content b { font-size: 16px; letter-spacing: -.01em; }
.leaflet-popup-content .popup-type {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px;
}
.leaflet-popup-content .popup-addr {
  display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 2px;
}
.leaflet-popup-content .popup-desc { margin: 8px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.leaflet-popup-content .popup-meta {
  display: flex; gap: 14px; align-items: center; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--line); font-size: 13px;
}
.leaflet-popup-content .popup-meta a { color: var(--accent); font-weight: 600; text-decoration: none; }
.leaflet-popup-tip { box-shadow: 0 8px 24px rgba(26, 24, 19, .18); }

/* type tag + number on stop cards */
.stop-type {
  align-self: flex-start; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
}
.stop-type--food { color: var(--accent); background: var(--tint); border-color: var(--tint); }
.stop-num--food { background: var(--accent); }

/* prose (guide sections, pages) */
.prose { max-width: 68ch; color: var(--ink-soft); }
.prose h2, .prose h3 { color: var(--ink); margin: 1.6em 0 .5em; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.verified { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

/* faq */
.faq-item { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 18px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 48px; align-items: center; }
.faq-item summary::after { content: '+'; font-family: var(--mono); color: var(--muted); }
.faq-item[open] summary::after { content: '–'; }
.faq-item .answer { color: var(--ink-soft); padding-bottom: 18px; max-width: 68ch; }

/* bottom banners - cookie consent + PWA install (PRD §4.5, §3.6) */
.bottom-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 720px; margin-inline: auto;
  background: var(--ink); color: var(--paper); border-radius: 14px;
  padding: 16px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.bottom-banner[hidden] { display: none; }
.bottom-banner p { font-size: 14.5px; line-height: 1.45; flex: 1; min-width: 220px; }
.bottom-banner a { text-decoration: underline; }
.banner-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner-actions .btn { min-height: 42px; padding: 10px 18px; font-size: 15px; }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--outline { background: transparent; color: var(--paper); border-color: rgba(255, 255, 255, .4); }
.btn--outline:hover { background: rgba(255, 255, 255, .12); transform: none; }
#pwa-ios-hint { font-size: 13.5px; color: rgba(255, 255, 255, .8); max-width: 24ch; }

/* select - pill dropdown with a custom chevron (native arrow is off-design) */
.select {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center;
  font: inherit; font-weight: 600; font-size: 16px; color: var(--ink);
  background-color: var(--white); border: 1px solid var(--accent); border-radius: 999px;
  min-height: 48px; padding: 10px 46px 10px 22px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2397386a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 12px 8px;
  transition: background-color .2s ease;
}
.select:hover { background-color: var(--tint); }
.select:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* contact form */
.form { display: grid; gap: 16px; max-width: 560px; margin-top: 30px; }
.form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%; min-height: 48px; padding: 12px 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* newsletter form (footer) */
.fcol--news { max-width: 320px; }
.news-form { display: flex; gap: 8px; flex-wrap: wrap; }
.news-form input[type="email"] {
  flex: 1; min-width: 170px; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
}
.news-form input[type="email"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.news-form .btn { font-size: 15px; padding: 10px 18px; }
.news-note { font-size: 12.5px; color: var(--muted); }
.news-ok { font-size: 14.5px; color: var(--accent); font-weight: 600; }
.news-err { font-size: 13px; color: #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.foot .frow { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot .fcol { display: flex; flex-direction: column; gap: 10px; }
.foot .fcol b { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.foot .fcol a { color: var(--ink-soft); font-size: 15px; }
.foot .fcol a:hover { color: var(--accent); }
.foot .fbottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }

/* responsive - mobile-first breakpoints from the mockup */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .burger { display: flex; }
  .cards, .route-grid, .list-grid { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-fade { height: clamp(300px, 70vw, 460px); order: -1; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .mosaic .m1 { grid-column: span 2; grid-row: span 1; }
  .mosaic .m2 { grid-column: span 2; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav .wrap { padding-inline: 16px; }
  .nav .row { gap: 10px; }
  .nav .right { gap: 10px; }
  .nav-cta { font-size: 13.5px; padding: 8px 13px; min-height: 38px; }
  .nav-cta .arr { display: none; } /* keep the pill on one line at phone width */
  .brand { font-size: 17px; gap: 8px; }
  .brand .mark { width: 28px; height: 28px; }
}

/* turn-by-turn directions (street geometry from routes:fetch-geometry) */
.directions {
  list-style: none; margin: 30px 0 0; padding: 0;
  max-height: 440px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.directions li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 10px 18px; font-size: 14.5px; border-bottom: 1px solid var(--line);
}
.directions li:last-child { border-bottom: 0; }
.directions__dist { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.directions__stop { background: var(--tint); font-weight: 600; }
.directions__stop .stop-num { margin-right: 6px; }

/* device location: live "you are here" dot + locate-me control (all maps) */
.me-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #1c7ed6; border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(26, 24, 19, .45); position: relative;
}
.me-dot::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  background: rgba(28, 126, 214, .3); z-index: -1;
  animation: sbc-locate-pulse 2s ease-out infinite;
}
@keyframes sbc-locate-pulse {
  0% { transform: scale(.5); opacity: .8; }
  100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .me-dot::before { animation: none; } }

.leaflet-bar a.sbc-locate { display: grid; place-items: center; color: var(--ink); }
.leaflet-bar a.sbc-locate svg { width: 18px; height: 18px; fill: currentColor; }
.leaflet-bar a.sbc-locate:hover { color: var(--accent); }
.leaflet-bar a.sbc-locate.is-busy { color: var(--accent); animation: sbc-locate-spin 1s linear infinite; }
@keyframes sbc-locate-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .leaflet-bar a.sbc-locate.is-busy { animation: none; } }

/* rule motions: one symbolic traffic-sign badge per rule (partials/rule-motion).
   Ported from the "Rules in Motion - Symbols" set; sized in container-query
   units so each badge fills its own square card rather than the viewport. */
.rule-row { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; margin-top: 34px; scroll-margin-top: 88px; }
.rule-row .prose { margin-top: 0; }

.rule-motion {
  margin: 0; position: sticky; top: 90px;
  aspect-ratio: 1; container-type: size;
  display: grid; place-items: center;
  background: var(--paper-2, #f1efe8); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  --danger: #c0492f;
}
/* compact badge for the landing-page essentials cards */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rule-motion--chip { position: static; width: 74px; border-radius: 14px; }
/* section accents (legal / signals / intersections / etiquette) */
.rule-motion.legal { --accent: #336aad; --tint: #e7eef6; }
.rule-motion.signals { --accent: #2f6a52; --tint: #e6efe9; }
.rule-motion.intersections { --accent: #be4f34; --tint: #f6e8e2; }
.rule-motion.etiquette { --accent: #8f3d68; --tint: #f1e6ec; }

.rule-motion .scene { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.rule-motion .sign {
  position: relative; width: 72cqmin; height: 72cqmin; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent);
  animation: sym-breathe 5s ease-in-out infinite;
}
.rule-motion .sign svg { width: 58%; height: 58%; overflow: visible; display: block; }
.rule-motion .glyph { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.rule-motion .glyph-fill { fill: #fff; stroke: none; }
.rule-motion .bigchar { font-weight: 800; color: #fff; line-height: 1; font-size: 40cqmin; letter-spacing: -.02em; }

/* prohibition sign: white field, red ring, red slash, ink glyph */
.rule-motion .sign.no { background: var(--paper, #faf9f6); box-shadow: inset 0 0 0 6cqmin var(--danger); }
.rule-motion .sign.no .glyph { stroke: var(--ink); }
.rule-motion .sign.no .glyph-fill { fill: var(--ink); }
.rule-motion .sign.no .bigchar { color: var(--ink); }
.rule-motion .slash {
  position: absolute; left: 50%; top: 50%; width: 61cqmin; height: 6cqmin; border-radius: 3cqmin;
  background: var(--danger); transform: translate(-50%, -50%) rotate(-45deg); transform-origin: center;
}
/* advisory sign: soft tint field, slowly rotating dashed accent ring */
.rule-motion .sign.soft { background: var(--tint); }
.rule-motion .sign.soft .ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: sym-spin 24s linear infinite; }
.rule-motion .sign.soft .ring circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 6 6; }
.rule-motion .sign.soft .glyph { stroke: var(--accent); }
.rule-motion .sign.soft .glyph-fill { fill: var(--accent); }

/* gentle gestures - one per clip */
@keyframes sym-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes sym-nudge { 0%, 100% { transform: translateY(6%); } 50% { transform: translateY(-6%); } }
@keyframes sym-ring { 0%, 62%, 100% { transform: rotate(0deg); } 8% { transform: rotate(9deg); } 20% { transform: rotate(-8deg); } 32% { transform: rotate(5deg); } 44% { transform: rotate(-3deg); } 54% { transform: rotate(0deg); } }
@keyframes sym-glow { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes sym-arm { 0%, 16% { transform: rotate(0deg); } 40%, 60% { transform: rotate(-72deg); } 84%, 100% { transform: rotate(0deg); } }
@keyframes sym-slash { 0% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(0); } 26%, 100% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1); } }
@keyframes sym-draw { 0% { stroke-dashoffset: var(--len, 120); } 36%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: var(--len, 120); } }
@keyframes sym-flow { to { stroke-dashoffset: -30; } }
@keyframes sym-travelL { 0% { transform: translate(0, 30%); } 40% { transform: translate(0, -30%); } 60% { transform: translate(0, -30%); } 100% { transform: translate(-58%, -30%); } }
@keyframes sym-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes sym-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7%); } }
@keyframes sym-step { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5%) rotate(2deg); } }
@keyframes sym-blink { 0%, 42%, 52%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.08); } }
@keyframes sym-tip { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes sym-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.rule-motion .g-nudge { animation: sym-nudge 3.4s ease-in-out infinite; }
.rule-motion .g-ring { animation: sym-ring 3.4s ease-in-out infinite; }
.rule-motion .g-sweep { animation: sym-sweep 8s linear infinite; transform-box: view-box; }
.rule-motion .g-glow { animation: sym-glow 2.8s ease-in-out infinite; }
.rule-motion .g-arm { animation: sym-arm 5s ease-in-out infinite; }
.rule-motion .g-draw { stroke-dasharray: var(--len, 120); animation: sym-draw 5s ease-in-out infinite; }
.rule-motion .g-flow { stroke-dasharray: 9 9; animation: sym-flow 1.4s linear infinite; }
.rule-motion .g-travel { transform-box: fill-box; transform-origin: center; animation: sym-travelL 5.5s ease-in-out infinite; }
.rule-motion .g-bob { transform-box: fill-box; transform-origin: center; animation: sym-bob 2.6s ease-in-out infinite; }
.rule-motion .g-step { transform-box: fill-box; transform-origin: bottom center; animation: sym-step 1.8s ease-in-out infinite; }
.rule-motion .g-blink { transform-box: fill-box; transform-origin: center; animation: sym-blink 4s ease-in-out infinite; }
.rule-motion .g-tip { transform-box: fill-box; transform-origin: bottom center; animation: sym-tip 4.5s ease-in-out infinite; }
.rule-motion .g-roll { transform-box: fill-box; transform-origin: center; animation: sym-roll 4s ease-in-out infinite; }
.rule-motion .slash.g-slash { animation: sym-slash 4.5s ease-in-out infinite; }
@keyframes sym-roll { 0%, 100% { transform: translateX(-4%); } 50% { transform: translateX(4%); } }

@media (max-width: 760px) {
  .rule-row { grid-template-columns: 1fr; gap: 16px; }
  .rule-motion { position: static; max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .rule-motion *, .rule-motion *::before, .rule-motion *::after { animation: none !important; }
}

/* ===== Fork & Spoke - the curated dining guide, in dark mode =====
   Flipping the palette vars on body.theme-dark recolours the whole page
   (header, footer and content) to a warm near-black with a brass accent. */
body.theme-dark {
  --paper: #15120e; --paper-2: #1e1a15; --paper-3: #272118; --white: #1e1a15;
  --ink: #f5f1e8; --ink-soft: #cdc4b4; --muted: #968c7a; --line: #3a3327;
  --accent: #c8a44d; --accent-deep: #e6c878; --accent-contrast: #15120e; --tint: #2a2215;
  background: #15120e; color: #f5f1e8;
}

.fs-hero { position: relative; padding: 92px 0 60px; background-size: cover; background-position: center; }
.fs-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,18,14,.66), rgba(21,18,14,.93)); }
.fs-hero .wrap { position: relative; }
.fs-hero h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(56px, 9vw, 104px); line-height: .92; letter-spacing: -.01em; margin: .1em 0 0; }
.fs-lede { max-width: 48ch; margin-top: 18px; color: var(--ink-soft); font-size: 19px; }
.fs-meta { margin-top: 20px; display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: var(--muted); }

.fs-section { margin-top: 56px; }
.fs-section h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 33px; }
.fs-rule { height: 1px; background: var(--line); margin: 14px 0 26px; }

.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.fs-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, transform .15s ease; }
.fs-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.fs-img { height: 178px; background: var(--paper-3); }
.fs-img img { width: 100%; height: 100%; object-fit: cover; }
.fs-body { padding: 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.fs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fs-type { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.fs-card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.04; }
.fs-card p { color: var(--ink-soft); font-size: 15.5px; }
.fs-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.fs-bike { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 13px; }
.fs-bike svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.fs-link { color: var(--accent); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }

.fs-spokes { display: inline-flex; gap: 4px; color: var(--accent); }
.fs-spokes svg { width: 15px; height: 15px; display: block; }

.fs-empty { margin: 40px 0 20px; padding: 52px 28px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-soft); }
.fs-empty h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; color: var(--ink); margin-bottom: 8px; }

/* Tour de Table - "subscribe to new spots" block (dark theme) */
.fs-subscribe { margin: 64px 0 8px; }
.fs-sub { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px 34px; }
.fs-sub-copy { max-width: 46ch; }
.fs-sub-copy h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 32px; margin: .1em 0 8px; }
.fs-sub-copy p { color: var(--ink-soft); font-size: 16px; }
.fs-sub-action { flex: 1; min-width: 280px; }
.fs-sub-form { display: flex; gap: 8px; flex-wrap: wrap; }
.fs-sub-form input[type="email"] { flex: 1; min-width: 200px; min-height: 50px; padding: 12px 16px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; }
.fs-sub-form input[type="email"]::placeholder { color: var(--muted); }
.fs-sub-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fs-sub-ok { color: var(--accent); font-size: 16px; }
.fs-sub-err { color: #e2887a; font-size: 14px; margin-top: 8px; }

/* Tour de Table - filter controls + map toggle (dark theme) */
.fs-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.fs-select {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); cursor: pointer;
  padding: 9px 32px 9px 14px; border-radius: 999px; border: 1px solid var(--line); background-color: transparent;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23968c7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  transition: border-color .15s ease, color .15s ease;
}
.fs-select:hover { border-color: var(--accent); color: var(--ink); }
.fs-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fs-select option { background: var(--paper-2); color: var(--ink); }
.fs-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.fs-pill:hover { border-color: var(--accent); color: var(--ink); }
.fs-maptoggle { margin-left: auto; }
.fs-noresults { color: var(--ink-soft); margin-top: 34px; }
.fs-section[hidden], .fs-card[hidden] { display: none; }

/* Tour de Table teaser on the (light) landing page - dark/brass, no imagery */
.tdt-teaser { background: #15120e; color: #f5f1e8; border-radius: 28px; padding: clamp(28px, 4vw, 56px); }
.tdt-teaser .eyebrow { color: #c8a44d; }
.tdt-teaser h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5.5vw, 58px); margin-top: 10px; color: #f5f1e8; }
.tdt-teaser .lede { color: rgba(245, 241, 232, .8); max-width: 52ch; margin-top: 14px; font-size: 18px; }
.tdt-teaser .btn { background: #c8a44d; color: #15120e; border-color: #c8a44d; margin-top: 30px; }
.tdt-teaser .partner-badge { color: #c8a44d; }
.tdt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.tdt-card { border: 1px solid rgba(245, 241, 232, .16); border-radius: var(--r-lg); background: rgba(245, 241, 232, .03); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s ease, transform .15s ease; }
.tdt-card:hover { border-color: #c8a44d; transform: translateY(-2px); }
.tdt-card .tdt-type { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #c8a44d; }
.tdt-card h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.05; }
.tdt-card p { color: rgba(245, 241, 232, .72); font-size: 14.5px; }
.tdt-card .tdt-meta { display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 12px; color: rgba(245, 241, 232, .6); margin-top: auto; padding-top: 6px; }
.tdt-card .tdt-spokes { display: inline-flex; gap: 3px; color: #c8a44d; }
.tdt-card .tdt-spokes svg { width: 13px; height: 13px; display: block; }

/* Tour de Table map - card click slides it out, plus a clickable cursor */
.fs-card[data-key] { cursor: pointer; }
#tdt-map.tdt-map--slide { animation: tdt-map-slide .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes tdt-map-slide { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #tdt-map.tdt-map--slide { animation: none; } }

/* Dark map call-outs on the dark theme (Tour de Table) */
body.theme-dark .leaflet-popup-content-wrapper { background: var(--paper-2); border-color: var(--line); }
body.theme-dark .leaflet-popup-content { color: var(--ink); }
body.theme-dark .leaflet-popup-tip { background: var(--paper-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
body.theme-dark .leaflet-popup-close-button { color: var(--muted); }
body.theme-dark .leaflet-popup-close-button:hover { color: var(--ink); }

/* "Use my location" opt-in button, rendered beneath a map */
.map-locate-cta { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.map-locate-cta svg { width: 16px; height: 16px; fill: currentColor; }
.map-locate-cta.is-busy { opacity: .6; pointer-events: none; }

/* Stack the teaser cards on mobile. Must follow the .tdt-grid base rule above so
   it wins on source order (media queries carry no extra specificity). */
@media (max-width: 900px) {
  .tdt-grid { grid-template-columns: 1fr; }
}

/* Scrollbar cyclist - a small bike that rides down the scrollbar as you scroll.
   Hidden by default; only shown on pointer-fine, wide viewports that actually
   have a scrollbar track. JS drives its vertical position via translateY. */
#scroll-bike {
  display: block; position: fixed; top: 0; right: 0; z-index: 50;
  width: 30px; height: 20px; pointer-events: none; /* small by default (mobile) */
  transition: opacity .3s ease; will-change: transform;
}
#scroll-bike.is-hidden { opacity: 0; }
.sb-cycle { display: block; width: 100%; height: 100%; transform: rotate(-90deg) scaleX(-1); overflow: visible; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.sb-tire { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.sb-frame { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sb-spokes { fill: none; stroke: var(--accent); stroke-width: .7; opacity: .65; }
.sb-hub { fill: var(--accent); }
.sb-whl { transform-box: fill-box; transform-origin: center; animation: sb-roll 2s linear infinite; }
#scroll-bike.is-riding .sb-whl { animation-duration: .5s; } /* spin up while scrolling */
@keyframes sb-roll { to { transform: rotate(360deg); } }

@media (min-width: 1024px) {
  #scroll-bike { width: 45px; height: 30px; } /* larger on desktop */
}
@media (prefers-reduced-motion: reduce) {
  .sb-whl { animation: none; }
}
