/*
 * THE SHARED CHROME — every page of the site wears it: the base, the top bar, the footer buttons and
 * the text-page column (`.doc`: about, privacy, terms, the 404). The homepage's own layout is `home.css`.
 * Colour, type families, the hairline and the soft tile tone come from tokens.css / theme.css; what is not a
 * token is a one-off measure of this site and is written here as a px value. Light only, like the product.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
}

/* ═══ THE SITE'S ONE COLUMN ═══ Every page's header, content and footer sit on it: `--px` is the inset from the page's edge to the
   column's edge, written once, here. 1248 wide at most (96px gutters at 1440; zoomed by the page scale below, so it grows with it and is constant once the scale caps), never closer than `--gx` to the
   edge. A page uses `var(--px)` as a margin or padding on a full-width block and never defines its own. The percent is of that block's
   width, so use it only where the block spans the page. `--px-flat` is the same inset for a block the page scale does NOT zoom (the
   homepage's hero), so it lands on the same pixel as the zoomed header. */
:root {
  --gx: 96px;
  --px: max(var(--gx), calc((100% - 1248px) / 2));
  --px-flat: max(calc(var(--gx) * var(--s)), calc((100% - 1248px * var(--s)) / 2));
}

@media (max-width: 759px) {
  :root {
    --gx: 16px;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--canvas);
  border-radius: var(--radius-control);
}

.skip-link:focus {
  left: 8px;
}

.site {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ═══ THE SITE'S ONE HEADER (home-sections.ts's siteHeader), the only place the lockup and the top bar are drawn ═══
   Every page wears it: the homepage (over the hero), /looks, /questions, /get, the text pages and the 404. A page may place it
   (the hero floats it) but never size or re-type it. The lockup is the maintainer's tuned one (2026-10-31): the van tile, the name in
   Plex Mono Medium 14 at 0.08em, a thin rule, the tagline in Archivo 13. On a phone it stacks, the name's tracking
   fixed at --lock-ls so its width equals the tagline's. ── */
.sh {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  margin: 24px var(--px) 0;
}

.sh .lock {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sh .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.sh .brand img {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: #f7efdd;
  flex: none;
}

.sh .txt {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sh .r1 {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.sh .wm {
  font: 500 14px / 18px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.sh .vr {
  width: 1px;
  height: 14px;
  background: var(--ink-faint);
  flex: none;
}

.sh .tag {
  font: 400 13px / 16px var(--font-sans);
  color: var(--ink-muted);
  white-space: nowrap;
}

.markact {
  display: flex;
  align-items: center;
  gap: 28px;
}

@media (max-width: 759px) {
  .sh .brand {
    gap: 12px;
  }

  .sh .txt {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .sh .wm {
    letter-spacing: var(--lock-ls);
    margin-right: calc(var(--lock-ls) * -1);
  }

  .sh .vr {
    display: none;
  }

  .markact {
    gap: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 30px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--ink-inverse);
  font: 600 14px / 1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.btn.sm {
  height: 38px;
  padding: 0 16px;
  font-size: 12px;
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
}

/* ── the footer: THE SITE'S ONE (home-sections.ts's siteFooter), body-sized, links 44px tall ── */
.sf {
  font: 400 16px / 24px var(--font-sans, system-ui, sans-serif);
  color: var(--ink);
}

.sf-plain {
  border-top: var(--rule-hairline, 1px) solid var(--canvas-border);
}

/* the homepage's: the green ground the van drives on; --ink on it is 7:1 (white would be 2.7:1) */
.sf-band {
  background: var(--ground);
  border-top: var(--rule-hairline, 1px) solid var(--ground); /* the plain footer's rule, in the ground's colour: both are the same height */
}

.sf-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 32px;
  margin: 0 var(--px);
  padding: 12px 0;
}

.sf a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.sf a:hover {
  text-decoration: underline;
}

.sf-name {
  font-weight: 700;
}

.sf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

@media (max-width: 759px) {
  .sf-in {
    flex-direction: column;
    align-items: flex-start;
  }

  .sf-links {
    flex-direction: column;
  }
}

/* an address that copies itself (chrome.js) */
.copy {
  all: unset;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.copied {
  margin-left: 8px;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.copied.on {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .copied {
    transition: none;
  }
}

/* ── a text page: about, privacy, terms, the 404 ── */
.doc {
  flex: 1 0 auto;
  margin: 0 var(--px);
  padding: var(--space-10) 0 var(--space-12);
}

/* the reading measure sits at the column's left edge; the 404 centres it in the column */
.doc > * {
  max-width: 640px;
}

.doc.center > * {
  margin-inline: auto;
}

.doc h1 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-headline-size);
  line-height: var(--text-headline-leading);
  letter-spacing: var(--text-headline-tracking);
}

.doc h2 {
  margin: var(--space-8) 0 var(--space-3);
  font-size: 17px;
  line-height: 24px;
}

.doc p,
.doc li {
  margin: 0 0 var(--space-5);
  font-size: 15px;
  line-height: 22px;
}

.doc ul {
  margin: 0 0 var(--space-5);
  padding-left: 1.2em;
}

.doc li {
  margin-bottom: var(--space-2);
}

.doc.center {
  text-align: center;
}

/* ── phone width ── */
@media (max-width: 759px) {
  .doc {
    padding-block: 28px 40px;
  }

  .doc h1 {
    font-size: 38px;
    line-height: 1.05;
  }
}

/* THE QUESTIONS (questions.ts): a list of <details>, shared by the homepage's section and the /questions page */
.qlist {
  border-top: 1px solid var(--canvas-border);
}

.qa {
  border-bottom: 1px solid var(--canvas-border);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font: 600 17px / 24px var(--font-sans);
  letter-spacing: -0.2px;
  color: var(--ink);
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.qchev {
  flex: none;
  color: var(--ink-muted);
  transition: transform 0.28s ease;
}

/* .shut: the answer is closing (chrome.js eases it), so the chevron already turns back */
.qa[open]:not(.shut) .qchev {
  transform: rotate(180deg);
}

.qa p {
  margin: 0;
  padding: 0 34px 18px 0;
  font: 400 16px / 24px var(--font-sans);
  color: var(--ink-secondary);
  max-width: 62ch;
}

@media (prefers-reduced-motion: reduce) {
  .qchev,
  .chev {
    transition: none;
  }
}

/* ── THE HEADER (maintainer, 2026-11-01): a computer reads "Explore · Questions · Sign in" at the top right; a phone shows a ☰ that opens a
   sheet with the same links and Get the app. Both lists are drawn from one table in home-sections.ts, and every page with the header (the homepage, /questions, /looks) shares this. ── */
.hnav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.hnav a {
  white-space: nowrap;
  font: 500 16px / 20px var(--font-sans); /* the token, not a page's --sans: the text pages define none */
  color: var(--ink);
  letter-spacing: -0.3px;
  text-decoration: none;
}
.hnav a:hover {
  text-decoration: underline;
}
/* Get the app: the last word of the header, an outlined green pill (the hero's Start a trip stays the only solid green button) */
.hnav a.getnav {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
}
.hnav a.getnav:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  text-decoration: none;
}
/* on the /get pages the pill is the current page: a 12% green tint, no underline */
.hnav a.getnav[aria-current] {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  text-decoration: none;
}
.hnav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}
.menubtn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menubtn:focus-visible,
.menu-sheet a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.menubtn {
  position: relative;
}
.menubtn svg {
  position: absolute;
  inset: 10px;
  transition: opacity 0.16s ease;
}
.menubtn .i-x,
.menubtn[aria-expanded="true"] .i-bars {
  opacity: 0;
}
.menubtn[aria-expanded="true"] .i-x {
  opacity: 1;
}
/* open: the header stays, on a white bar over the dim, and the panel hangs flush from its bottom edge (--sh-top / --sh-bottom are measured on open) */
.sh.open {
  z-index: 60;
}
.sh.open::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--sh-top, 24px));
  bottom: -12px;
  left: -16px;
  right: -16px;
  background: var(--white);
}
body.menu-open {
  overflow: hidden;
}
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.menu[hidden] {
  display: none;
}
.menu-back {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.4);
}
.menu-sheet {
  position: absolute;
  top: var(--sh-bottom, 80px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 0 20px 20px;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 16px 32px rgba(18, 18, 18, 0.12);
  animation: menu-drop 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes menu-drop {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-sheet {
    animation: none;
  }
  .menubtn svg {
    transition: none;
  }
}
.menu-sheet a[data-menu-close] {
  justify-content: center;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
}
.menu-sheet a[data-menu-close] span {
  display: none;
}
.menu-sheet a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  font: 500 17px var(--sans);
  letter-spacing: -0.3px;
  color: var(--ink);
  text-decoration: none;
}
.menu-sheet a span {
  color: var(--ink-muted);
  font-size: 22px;
}
.menu-sheet hr {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 1px solid var(--border);
}
@media (max-width: 759px) {
  .hnav {
    display: none;
  }
  .menubtn {
    display: flex;
  }
}
/* the longer header (`.hnav.long`, while Our story is on: four links and the Get the app button): on a narrow desk the lock-up
   drops its tag line so the links keep one line, and under 1024 the ☰ and its sheet carry them */
@media (max-width: 1199px) {
  .sh:has(.hnav.long) .lock .tag,
  .sh:has(.hnav.long) .lock .vr {
    display: none;
  }
}
@media (max-width: 1023px) {
  .hnav.long {
    display: none;
  }
  .sh:has(.hnav.long) .menubtn {
    display: flex;
  }
}

/* ═══ THE PAGE SCALE, one definition for every page of the site ═══
   The hero's `--u` is W / 1360 real px per composition px, capped at 1.6 (so it stops at W = 2176). Everything else was designed at 1440,
   so it grows by that same ratio over 1440: `--s` = W / 1440, 1 up to 1440 (no change there) and 2176 / 1440 at the cap. `zoom` is sizing,
   not a bitmap scale: type, tiles, gaps, max widths and the HTML/SVG pictures re-lay-out and stay sharp, and the centred block grows with
   them. `--s` itself is set on <html> by scale.js (W / 1440, clamped; CSS cannot divide lengths portably: `tan(atan2())` is wrong in WebKit). The homepage scales its sections (not the hero, which has its own factor); the
   /get, /looks and /questions pages and the text pages (privacy, terms, 404) scale their header, content and footer, each as a direct child of the body or `.site`, so nothing is scaled twice and every page's header and footer are the same size at every width. */
:root {
  --s: 1;
  --lock-ls: 0.11em; /* the phone lockup's name tracking */
}

@media (min-width: 1440px) {
  body:not(.get, .qp) main:not(.doc) > :not(.hero),
  .hero > .sh,
  body:is(.get, .qp) > :is(.sh, main, .sf),
  .site > :is(.sh, main.doc, .sf) {
    zoom: var(--s);
  }
}
