/* Shared by every page of the site: the app's design tokens (iOS_client/Trafficz/Views/Components/TrafficzTheme.swift),
   light and dark, and the parts every page has (nav, buttons, App Store badge, footer). */
:root{
  --canvas:#ffffff; --grouped:#f1f4f3; --surface:#f1f4f3; --raised:#ffffff; --inset:#e6ebe9;
  --line:#e3e6e5; --track:#dfe4e2;
  --ink:#111c18; --secondary:#565f5b; --tertiary:#9da3a1;
  --brand:#22ad5c; --accent:#198044; --accent-soft:#e4f0e7; --action:#22ad5c;
  --streak:#fb8948; --streak-soft:#fceadf;
  --blue:#297eff; --blue-soft:#e6efff; --purple:#8b5cf6; --purple-soft:#efe9fe; --pink:#e8457f; --teal:#0b9e9c;
  --yellow:#e0a100; --danger:#dc2e3c; --danger-soft:#fdecee; --warning:#b45309; --warning-soft:#fdf0e3;
  --shadow:16,28,24;
  --badge:#000000; --badge-rim:#a6a6a6;

  --display:"Figtree",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --body:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",system-ui,sans-serif;

  --card-r:22px; --control-r:16px; --tile-r:10px;
  --ease-out:cubic-bezier(.16,1,.3,1);
  --nav-h:64px;
  --gutter:clamp(16px,4vw,40px);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --canvas:#0f1012; --grouped:#0f1012; --surface:#1c1d21; --raised:#1c1d21; --inset:#2a2b30;
    --line:#303238; --track:#2a2b30;
    --ink:#f3f4f6; --secondary:#9ca0aa; --tertiary:#5f636d;
    --brand:#2fc46d; --accent:#4fd58a; --accent-soft:#123322; --action:#1e9e53;
    --streak:#ff9f5a; --streak-soft:#3a2414;
    --blue:#5c9dff; --blue-soft:#14223a; --purple:#a78bfa; --purple-soft:#241d3a; --pink:#f472b6; --teal:#2dd4bf;
    --yellow:#facc15; --danger:#ff6b6b; --danger-soft:#3a1c20; --warning:#ffb340; --warning-soft:#3a2a14;
    --shadow:0,0,0;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --canvas:#0f1012; --grouped:#0f1012; --surface:#1c1d21; --raised:#1c1d21; --inset:#2a2b30;
  --line:#303238; --track:#2a2b30;
  --ink:#f3f4f6; --secondary:#9ca0aa; --tertiary:#5f636d;
  --brand:#2fc46d; --accent:#4fd58a; --accent-soft:#123322; --action:#1e9e53;
  --streak:#ff9f5a; --streak-soft:#3a2414;
  --blue:#5c9dff; --blue-soft:#14223a; --purple:#a78bfa; --purple-soft:#241d3a; --pink:#f472b6; --teal:#2dd4bf;
  --yellow:#facc15; --danger:#ff6b6b; --danger-soft:#3a1c20; --warning:#ffb340; --warning-soft:#3a2a14;
  --shadow:0,0,0;
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--ink);font-family:var(--body);font-size:17px;line-height:1.55;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:clip}
img,video,svg{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:10px}
::selection{background:var(--brand);color:#fff}
.wrap{width:100%;max-width:1200px;margin-inline:auto;padding-inline:var(--gutter)}
h1,h2,h3{font-family:var(--display);margin:0;text-wrap:balance;color:var(--ink)}
p{margin:0}
.lead{font-size:clamp(17px,1.4vw,19px);color:var(--secondary)}
.eyebrow{display:inline-flex;align-items:center;gap:8px;margin-bottom:16px;padding:6px 12px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:600;letter-spacing:.01em}
.green{color:var(--brand)}

/* ---------- nav ---------- */
.nav{position:fixed;top:0;left:0;right:0;z-index:50;padding-top:env(safe-area-inset-top,0px);
  border-bottom:1px solid transparent;transition:background-color .4s,border-color .4s}
.theme-switching .nav{transition:none}
.nav.scrolled,.nav.solid{background:color-mix(in srgb,var(--canvas) 80%,transparent);border-bottom-color:var(--line);
  -webkit-backdrop-filter:blur(20px) saturate(1.6);backdrop-filter:blur(20px) saturate(1.6)}
/* (2026-11-13) iPhone and iPad Safari colour their top (the time and battery) after the nav only while it is solid:
   behind glass they keep the colour they took at the page's top, the old look's after a switch. Touch screens. */
@media (hover:none) and (pointer:coarse){
  .nav.scrolled,.nav.solid{background:var(--canvas);-webkit-backdrop-filter:none;backdrop-filter:none}
}
.nav-inner{height:var(--nav-h);display:flex;align-items:center;gap:32px}
.brand{display:flex;align-items:center;gap:6px;font-family:var(--display);font-weight:700;font-size:21px;letter-spacing:-.02em}
/* the wheel logo on its own (the file has some air round the wheel, hence the size and the pull to the left) */
.brand img{width:38px;height:38px;margin-left:-5px}
/* in the nav and the footer the wheel sits in the app icon's shape (its rounded square), outlined (the owner, 2026-11-12) */
.nav .brand,.foot .brand{gap:10px}
.nav .brand img,.foot .brand img{width:36px;height:36px;margin-left:0;padding:3px;border-radius:23%;background:var(--raised);
  box-shadow:inset 0 0 0 1.5px var(--line)}
.nav-links{display:flex;gap:28px;margin-left:auto;font-size:15px;font-weight:500;color:var(--secondary)}
.nav-links a{transition:color .25s}
.nav-links a:hover,.nav-links a[aria-current]{color:var(--ink)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;font-weight:600;
  transition:transform .3s var(--ease-out),filter .25s}
.btn:hover{transform:translateY(-1px);filter:brightness(1.05)}
.btn:active{transform:scale(.98)}
.btn-green{background:var(--action);color:#fff}
.nav-cta{padding:9px 18px;font-size:14px;
  /* the links and the button sit a little outside the page's column, towards the window's edge, where there is room */
  margin-right:calc(-1 * clamp(0px, calc((100vw - min(100vw, 1200px)) / 2 + var(--gutter) - 28px), 72px))}

/* ---------- App Store badge ---------- */
.appstore{display:inline-flex;align-items:center;gap:12px;height:58px;padding:0 22px 0 18px;border-radius:14px;
  background:var(--badge);border:1.5px solid var(--badge-rim);color:#fff;
  transition:transform .4s var(--ease-out),box-shadow .4s var(--ease-out)}
.appstore svg{width:26px;height:32px;fill:currentColor;flex:none}
.appstore small{display:block;font-size:12px;font-weight:500;line-height:1.1}
.appstore b{display:block;font-size:24px;font-weight:600;line-height:1.05;letter-spacing:-.02em}
.appstore:hover{transform:translateY(-1px);box-shadow:0 16px 40px -16px color-mix(in srgb,var(--brand) 70%,transparent)}
/* not on the App Store yet: "Kommer snart", nothing to press */
.soon{cursor:default}
.nav-cta.soon:hover,.appstore.soon:hover{transform:none;filter:none;box-shadow:none}

/* ---------- footer ---------- */
.foot{border-top:1px solid var(--line);padding-block:40px 48px;font-size:14px;color:var(--tertiary)}
.foot-grid{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 40px}
.foot .brand{color:var(--ink);font-size:18px}
.foot .brand img{width:32px;height:32px}
.foot-notes{display:flex;flex-direction:column;gap:4px;text-align:right}
.foot a.u{color:var(--secondary);text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:3px}
.foot a.u:hover{color:var(--ink)}
.foot-links{display:flex;gap:20px;justify-content:flex-end;margin-top:6px}

@media (max-width:760px){
  /* (2026-11-13) the section links in a menu under the nav, opened by its menu button (assets/theme.js) */
  .nav .nav-links{position:absolute;top:100%;left:0;right:0;flex-direction:column;gap:0;margin:0;
    padding:0 var(--gutter) 10px;background:var(--canvas);border-bottom:1px solid var(--line);font-size:17px;
    visibility:hidden;opacity:0;transform:translateY(-6px);
    transition:opacity .2s,transform .25s var(--ease-out),visibility 0s .25s}
  .nav.open .nav-links{visibility:visible;opacity:1;transform:none;transition:opacity .2s,transform .25s var(--ease-out)}
  .nav .nav-links a{padding:14px 0;color:var(--ink)}
  .nav .nav-links a + a{border-top:1px solid var(--line)}
  .nav.open{background:var(--canvas);border-bottom-color:var(--line);-webkit-backdrop-filter:none;backdrop-filter:none}
  .nav-cta{margin-left:auto}
  .foot-notes{text-align:left}
  .foot-links{justify-content:flex-start}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.01ms!important}
}

/* Light or dark (assets/theme.js): the nav's button, a moon in the light, a sun in the dark. */
.theme-toggle{display:grid;place-items:center;flex:none;width:38px;height:38px;margin:0 -16px 0 -14px;border:0;border-radius:50%;
  background:transparent;color:var(--secondary);cursor:pointer;transition:color .25s,background .25s}
.theme-toggle:hover{color:var(--ink);background:var(--inset)}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun{display:none}
:root[data-theme="dark"] .theme-toggle .sun{display:block}
:root[data-theme="dark"] .theme-toggle .moon{display:none}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .theme-toggle .sun{display:block}
  :root:not([data-theme="light"]) .theme-toggle .moon{display:none}
}
@media (max-width:760px){
  .nav .theme-toggle{margin-left:auto}
  .nav .theme-toggle + .nav-cta{margin-left:0}
}

/* Phones: the nav's menu button, two lines turning into a cross while its menu is open. */
.menu-toggle{display:none}
@media (max-width:760px){
  .nav .nav-cta{flex:none;white-space:nowrap}
  .menu-toggle{display:grid;place-items:center;flex:none;width:38px;height:38px;margin:0 -9px 0 -22px;padding:0;border:0;
    border-radius:50%;background:transparent;color:var(--ink);cursor:pointer;-webkit-tap-highlight-color:transparent}
  .menu-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  .menu-toggle path{transform-origin:12px 12px;transition:transform .3s var(--ease-out)}
  .nav.open .menu-toggle path:first-child{transform:translateY(3.5px) rotate(45deg)}
  .nav.open .menu-toggle path:last-child{transform:translateY(-3.5px) rotate(-45deg)}
}
