/* Shared styles for every page: color tokens, base type, links, footer, and the scroll truck. */
:root {
  --bg: #FCFCFA;
  --ink: #1C2321;
  --soft: #4A5450;
  --muted: #858F8A;
  --rule: #E5E8E3;
  --card: #FFFFFF;
  --scarlet: #B3261E;
  --truck-cab: #F4F5F2;
  --truck-glass: #DCE3E6;
  --truck-tire: #2A302D;
  --lane: #E3A90F;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141817; --ink: #ECEFEB; --soft: #B9C1BC; --muted: #7F8984; --rule: #262D2A; --card: #1A1F1D; --scarlet: #F0776D;
    --truck-cab: #2A312E; --truck-glass: #3D4A4F; --truck-tire: #0B0D0C; --lane: #F2C94C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141817; --ink: #ECEFEB; --soft: #B9C1BC; --muted: #7F8984; --rule: #262D2A; --card: #1A1F1D; --scarlet: #F0776D;
  --truck-cab: #2A312E; --truck-glass: #3D4A4F; --truck-tire: #0B0D0C; --lane: #F2C94C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; padding-bottom: 44px; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; }
a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--scarlet); text-decoration-color: var(--scarlet); }
a:focus-visible, button:focus-visible { outline: 1.5px solid var(--scarlet); outline-offset: 3px; border-radius: 2px; }
.mark { font-family: var(--display); font-weight: 500; font-size: 1.1rem; text-decoration: none; }
.mark span { color: var(--scarlet); }

/* footer */
.fb-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.fb-note { margin: 0; max-width: 60ch; }

/* scroll truck (injected by site.js) */
.road { position: fixed; left: 0; right: 0; bottom: 0; height: calc(44px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--bg); border-top: 1px solid var(--rule); z-index: 20; pointer-events: none; }
.road::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); height: 3px; background: repeating-linear-gradient(90deg, var(--lane) 0 18px, transparent 18px 30px); border-radius: 2px; }
.truck { position: absolute; left: 0; bottom: calc(9px + env(safe-area-inset-bottom, 0px)); width: 92px; height: 34px; will-change: transform; }
.truck svg { width: 100%; height: 100%; display: block; transition: transform .25s ease; }
.truck.back svg { transform: scaleX(-1); }
.wheel { transform-box: fill-box; transform-origin: center; }

/* light/dark toggle (button injected by site.js) */
.theme-slot { display: inline-flex; align-items: center; }
.tg-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--soft); cursor: pointer; padding: 0; }
.tg-icon:hover { color: var(--ink); border-color: var(--ink); }
.tg-icon svg { display: block; }
.tg-icon .i-moon { display: none; }
.is-dark .tg-icon .i-sun { display: none; }
.is-dark .tg-icon .i-moon { display: block; }
