/* RouteRide shared styles: tokens, type, header, footer, legal pages, contact and login.
   The landing page and results view add their own styles in index.html on top of these. */
@font-face {
  font-family: "Archivo"; src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 300 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* night: the hero, header, footer and results app */
  --night: #0B1424; --night-2: #121E33; --night-3: #1B2A45; --night-line: rgba(233, 238, 245, .12);
  --moon: #E9EEF5; --moon-mute: #9AA8BC; --moon-faint: #7D8CA5;
  --sodium: #FFB547; --sodium-hi: #FFC872; --sodium-deep: #E8931A;
  /* day: reading pages */
  --day: #F3F5F8; --paper: #FFFFFF; --ink: #0B1424; --slate: #4A5668; --line: #DDE2EA;
  /* detour tiers on light surfaces */
  --quick: #0B8457; --mid: #A15C00; --long: #C0362C; --quick-tint: #E2F3EB;
  /* detour tiers on dark surfaces */
  --quick-d: #5FD3A0; --mid-d: #FFB547; --long-d: #FF8A7A;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --pad: clamp(16px, 4vw, 40px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16.5px; line-height: 1.6; font-stretch: 100%; color: var(--ink); background: var(--day); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--sodium); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.container, .wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--pad); }
.wrap.narrow { max-width: 880px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-stretch: 125%; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 32px; height: 32px; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--sodium); color: var(--night); font-stretch: 112%; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .15s; }
.btn:hover { background: var(--sodium-hi); color: var(--night); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.big { min-height: 58px; padding: 0 30px; font-size: 18px; border-radius: 16px; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- header (site.js) ---------- */
.site-header { position: relative; z-index: 30; background: var(--night); color: var(--moon); }
.site-header .bar { display: flex; align-items: center; gap: 12px 28px; min-height: 80px; }
.site-header .brand { margin-right: auto; }
.site-nav { display: flex; align-items: center; gap: 4px 28px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--moon-mute); font-weight: 500; text-decoration: none; transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--moon); }
.site-nav a.pill { white-space: nowrap; padding: 0 20px; border-radius: 999px; color: var(--moon); box-shadow: inset 0 0 0 1px rgba(233, 238, 245, .28); transition: box-shadow .2s, background-color .2s; }
.site-nav a.pill:hover, .site-nav a.pill[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--moon); background: rgba(233, 238, 245, .06); }

/* ---------- footer (site.js) ---------- */
.site-footer { background: var(--night); color: var(--moon); font-size: 15px; }
.site-footer .foot { padding: 40px 0 36px; border-top: 1px solid var(--night-line); }
.site-footer .foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.site-footer .tag { margin: 12px 0 0; max-width: 24em; color: var(--moon-mute); }
.foot-links { display: flex; flex-wrap: wrap; align-content: start; gap: 0 26px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--moon); text-decoration: none; font-weight: 500; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-links a[aria-current="page"] { color: var(--sodium); }
.site-footer .fine { margin: 28px 0 0; max-width: 64em; font-size: 13.5px; color: var(--moon-faint); }
.site-footer .fine a { color: var(--moon-mute); }

/* ---------- reading pages: a paper sheet laid over the night band ---------- */
body.page { min-height: 100vh; display: flex; flex-direction: column; }
body.page main { flex: 1; padding: clamp(28px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); background: linear-gradient(var(--night) 0 260px, var(--day) 260px); }
.eyebrow { display: none; }

.doc { position: relative; background: var(--paper); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px) clamp(20px, 6vw, 72px) clamp(36px, 6vw, 64px); box-shadow: 0 40px 80px -48px rgba(11, 20, 36, .45); }
.doc ul.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(28px, 4vw, 44px); padding: 0; list-style: none; }
.doc ul.doc-nav li { margin: 0; }
.doc ul.doc-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; color: var(--slate); font-size: 14.5px; font-weight: 600; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, background-color .2s, color .2s; }
.doc ul.doc-nav a:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.doc ul.doc-nav a[aria-current="page"] { background: var(--ink); color: #fff; box-shadow: none; }
.doc h1 { margin: 0 0 8px; font-stretch: 125%; font-weight: 800; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.02; letter-spacing: -.03em; }
.doc .updated { margin: 0 0 32px; color: var(--slate); font-size: 14.5px; }
.doc h2 { margin: 48px 0 10px; padding-top: 28px; border-top: 1px solid var(--line); font-stretch: 112%; font-size: 23px; line-height: 1.2; letter-spacing: -.015em; }
.doc h3 { margin: 24px 0 4px; font-size: 17px; }
.doc p, .doc li { color: #2A3445; max-width: 42em; }
.doc ul:not(.doc-nav) { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--sodium-deep); }
.doc a, .faq a, .check a, .form-note a { color: var(--ink); font-weight: 600; text-decoration-color: var(--sodium-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc a:hover, .faq a:hover, .check a:hover, .form-note a:hover { text-decoration-color: var(--ink); }
.doc .callout { margin: 24px 0; padding: 18px 22px; border-radius: var(--r-md); background: #FFF5E4; box-shadow: inset 4px 0 0 var(--sodium-deep); }
.doc .callout p { margin: 0; color: var(--ink); }
.doc table { display: block; overflow-x: auto; width: 100%; margin: 16px 0 8px; border-collapse: collapse; font-size: 15px; }
.doc thead th { position: sticky; top: 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 18px 12px 0; border-bottom: 1px solid var(--line); min-width: 11em; }
.doc th { font-size: 13.5px; font-weight: 600; color: var(--slate); }
.doc td:first-child { font-weight: 600; color: var(--ink); }

/* ---------- page heads on the band (contact) ---------- */
.page-head { margin: 0 0 clamp(28px, 4vw, 40px); color: var(--moon); }
.page-head h1 { margin: 0 0 10px; font-stretch: 125%; font-weight: 800; font-size: clamp(34px, 4.6vw, 56px); line-height: 1; letter-spacing: -.03em; }
.page-head p { margin: 0; max-width: 34em; color: var(--moon-mute); font-size: 17.5px; }

/* ---------- forms on paper ---------- */
.form-grid { display: grid; gap: 16px; }
.f-field { display: grid; gap: 6px; }
.f-field label { font-size: 14px; font-weight: 600; }
.f-field .hint { font-weight: 400; color: var(--slate); }
.f-field input, .f-field select, .f-field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--day); color: var(--ink); font: inherit; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.f-field select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; background: var(--day) 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='%230B1424' stroke-width='1.8'/%3E%3C/svg%3E") right 16px center / 12px auto no-repeat; }
.f-field textarea { min-height: 150px; resize: vertical; }
.f-field input::placeholder, .f-field textarea::placeholder { color: #6B7788; }
.f-field input:hover, .f-field select:hover, .f-field textarea:hover { border-color: #B9C2CF; }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus { outline: none; border-color: var(--ink); background-color: #fff; box-shadow: 0 0 0 4px rgba(255, 181, 71, .35); }
.f-field input:disabled { color: #8A94A3; background: #EDF0F4; border-style: dashed; cursor: not-allowed; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: #2A3445; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0; font-size: 14px; color: var(--slate); }
.notice { border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.notice.ok { background: var(--quick-tint); color: #065F3E; box-shadow: inset 4px 0 0 var(--quick); }
.notice.err { background: #FDECEA; color: #8E2419; box-shadow: inset 4px 0 0 var(--long); }
.notice.info { background: #FFF5E4; color: #5B3A00; box-shadow: inset 4px 0 0 var(--sodium-deep); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .bar { min-height: 68px; }
  .site-nav { gap: 4px 16px; }
  .site-nav a.hide-sm { display: none; }
  .site-nav a.pill { padding: 0 16px; }
  .brand { font-size: 17px; }
  body.page main { background: linear-gradient(var(--night) 0 200px, var(--day) 200px); }
  .doc { border-radius: var(--r-lg); }
  .doc h2 { margin-top: 36px; padding-top: 22px; font-size: 20px; }
}
@media (max-width: 420px) { .site-nav a.hide-xs { display: none; } }
