/* ───────────────────────────────────────────────────────────────────────
   Day Haul — site styles.

   The palette and the type pairing are the app's own (PHASE1 §20.3–20.5,
   "Daylight Ledger"): money first, ledger rules instead of cards. The
   accent colours are semantic inside the app — driving blue, walking
   green, waiting sand, expense rust — so they are used here only where
   they mean the same thing, never as decoration.
   ─────────────────────────────────────────────────────────────────────── */

/* The two families, served from here rather than Google Fonts: no request to
   a third party, no visitor IP handed over, and no render-blocking stylesheet
   from another origin. Latin subset only, which covers the page; licence in
   assets/fonts/OFL.txt. */
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/assets/fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/assets/fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/assets/fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url('/assets/fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 500; font-display: swap; src: url('/assets/fonts/barlow-semi-condensed-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url('/assets/fonts/barlow-semi-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-display: swap; src: url('/assets/fonts/barlow-semi-condensed-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 800; font-display: swap; src: url('/assets/fonts/barlow-semi-condensed-800.woff2') format('woff2'); }

:root {
  --paper:   #f9f6f1;
  --surface: #fefcf9;
  --rule:    #ddd9d0;
  --ink:     #231f19;
  --muted:   #68625a;
  --on-ink:  #f9f6f1;

  --drive:   #395f8f;
  --walk:    #5d9d6b;
  --wait:    #d5ba82;
  --expense: #9d5035;
  --live:    #397852;

  /* The mark's own field and ink (§36). */
  --field:     #161310;
  --field-ink: #d5ba82;

  --ui: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fig: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;

  --gutter: 20px;
  --measure: 1120px;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #161310;
    --surface: #211e19;
    --rule:    #383530;
    --ink:     #ebe7df;
    --muted:   #aaa49a;
    --on-ink:  #161310;

    --drive:   #78a1d6;
    --walk:    #7cbd89;
    --wait:    #d5ba82;
    --expense: #d88767;
    --live:    #6ebf8c;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }

.figure { font-family: var(--fig); font-variant-numeric: tabular-nums; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--on-ink);
  padding: 12px 16px; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

/* ── Mark ──────────────────────────────────────────────────────────── */

.mark {
  display: grid;
  place-content: center start;
  width: 46px; height: 46px;
  padding: 5px 6px;
  background: var(--field);
  color: var(--field-ink);
  font-family: var(--fig);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: none;
}
.mark-small { width: 38px; height: 38px; font-size: 14px; padding: 4px 5px; }

@media (prefers-color-scheme: dark) {
  /* The field and the page are the same near-black, so give the mark its edge back. */
  .mark { outline: 1px solid #3a352d; outline-offset: 0; }
}

/* ── Masthead ──────────────────────────────────────────────────────── */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 20px;
  max-width: var(--measure); margin-inline: auto;
  padding: 18px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font-family: var(--fig); font-weight: 700; font-size: 25px; letter-spacing: -0.01em; }

.masthead nav { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; }
.masthead nav a { font-size: 16px; font-weight: 500; color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }
.masthead nav a.btn { color: var(--on-ink); }

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px;
  background: var(--ink); color: var(--on-ink);
  border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: var(--ui); font-size: 17px; font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease;
}
.btn:hover { opacity: 0.86; }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-big { min-height: 64px; padding: 0 34px; font-size: 19px; }

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

/* ── Type scale ────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow-light { color: var(--field-ink); }

h1 {
  margin: 0 0 22px;
  font-family: var(--fig); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 0.98; letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--expense); }

h2 {
  margin: 0 0 20px;
  font-family: var(--fig); font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.h2-light { color: #f3efe7; }

h3 {
  margin: 0 0 6px;
  font-family: var(--ui); font-weight: 600;
  font-size: 19px; line-height: 1.3;
}

.lede { margin: 0 0 28px; max-width: 62ch; font-size: 19px; color: var(--muted); }
.lede strong { color: var(--ink); font-weight: 600; }
.lede-narrow { max-width: 58ch; }
.body { margin: 0 0 18px; max-width: 56ch; color: var(--muted); }
.body-muted { font-size: 16px; }
.dash { font-family: var(--fig); color: var(--ink); }

/* ── Hero ──────────────────────────────────────────────────────────── */

.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 0 0 clamp(40px, 7vw, 78px); }
.hero-note { font-size: 15px; color: var(--muted); }

/* Above 1000px the claim takes the left and everything that supports it takes
   the right, bottom-aligned to the headline's last line. Below that they stack
   in reading order, which is the order they are written in. */
@media (min-width: 1000px) {
  .hero > .wrap:first-child {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-areas: 'eyebrow eyebrow' 'head side';
    column-gap: clamp(40px, 5vw, 76px);
    align-items: end;
    /* The space before the ledger moves here: it used to hang off the action
       row, and zeroing that margin put the headline straight onto the table. */
    margin-bottom: clamp(56px, 7vw, 92px);
  }
  .hero .eyebrow { grid-area: eyebrow; }
  .hero h1 { grid-area: head; margin-bottom: 0; }
  .hero-side { grid-area: side; }
  .hero .lede { margin-bottom: 26px; }
  .hero-actions { margin-bottom: 0; }
}

/* ── The ranking ledger ────────────────────────────────────────────── */

.ledger-figure { margin: 0; }

.ledger-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px 24px;
  padding-bottom: 14px;
}
.ledger-title { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.ledger-sub { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.toggle { display: flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.toggle-btn {
  appearance: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 18px;
  background: transparent; color: var(--muted);
  font-family: var(--ui); font-size: 15px; font-weight: 600;
}
.toggle-btn + .toggle-btn { border-left: 1px solid var(--rule); }
.toggle-btn:hover { color: var(--ink); }
.toggle-btn.is-on { background: var(--ink); color: var(--on-ink); }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }

.ledger-row { border-bottom: 1px solid var(--rule); padding: 13px 0 11px; }
.ledger-line { display: flex; align-items: baseline; gap: 14px; }
.ledger-rank { font-family: var(--fig); font-weight: 600; font-size: 18px; color: var(--muted); min-width: 1.4em; }
.ledger-day { font-weight: 600; font-size: 18px; flex: 1; }
.ledger-rate { font-family: var(--fig); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 23px; white-space: nowrap; }
.ledger-rate .unit { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.ledger-note { margin: 2px 0 0 calc(1.4em + 14px); font-size: 14px; color: var(--muted); }
.ledger-note .figure { color: var(--ink); }

.ledger-track { height: 6px; border-radius: 3px; background: var(--rule); margin: 9px 0 0; overflow: hidden; }
.ledger-fill { display: block; height: 6px; border-radius: 3px; background: var(--ink); transition: width 420ms cubic-bezier(.2,.7,.2,1); }

.ledger-row.is-lead .ledger-day { font-weight: 700; }
.ledger-row.is-lead .ledger-fill { background: var(--live); }

.ledger-foot { margin: 16px 0 0; font-size: 15px; color: var(--muted); max-width: 64ch; }
.ledger-foot strong { color: var(--ink); font-weight: 600; }
.figure-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

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

/* ── Bands ─────────────────────────────────────────────────────────── */

.band { padding: clamp(52px, 8vw, 104px) 0; border-top: 1px solid var(--rule); }
.band-alt { background: var(--surface); }
.band-dark { background: var(--field); color: #ebe7df; border-top: 0; }
.band-dark .body, .band-dark p { color: #cdc6ba; }

@media (prefers-color-scheme: dark) {
  /* Same reason as the mark: the band's field is now the page behind it, so the
     rules are what keep it reading as a band of its own. */
  .band-dark { border-top: 1px solid #3a352d; border-bottom: 1px solid #3a352d; }
}
.band-get { border-top: 0; }

.wrap-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 840px) { .wrap-split { grid-template-columns: 1fr; } }

.video { margin-top: 28px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--field); }
.video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ── Day strip ─────────────────────────────────────────────────────── */

.day-strip { margin: 34px 0 44px; }
.strip-rail { display: flex; height: 44px; border-radius: 3px; overflow: hidden; }
.seg { width: var(--w); display: block; }
.seg-drive { background: var(--drive); }
.seg-walk  { background: var(--walk); }
.seg-wait  { background: var(--wait); }
.strip-scale { display: flex; justify-content: space-between; margin-top: 7px; font-family: var(--fig); font-size: 14px; color: var(--muted); }

.split { margin: 26px 0 0; border-top: 1px solid var(--ink); }
.split-row { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.split-row dt { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 9.5em; }
.split-row dd { margin: 0; }
.split-row .figure { font-weight: 700; font-size: 22px; min-width: 2.8em; }
.split-note { font-size: 15px; color: var(--muted); flex: 1; }
.dot { width: 11px; height: 11px; border-radius: 2px; display: inline-block; flex: none; }
.dot-drive { background: var(--drive); }
.dot-walk  { background: var(--walk); }
.dot-wait  { background: var(--wait); }

@media (max-width: 620px) {
  .split-row { flex-wrap: wrap; gap: 4px 12px; }
  .split-row dt { min-width: 0; width: 100%; }
}

/* ── Ledger-style row lists ────────────────────────────────────────── */

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.row { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.row p { margin: 0; max-width: 68ch; color: var(--muted); }

@media (min-width: 900px) {
  .row { display: grid; grid-template-columns: 30ch 1fr; gap: 0 clamp(32px, 4vw, 56px); align-items: start; }
  .row h3 { margin: 0; }
  .row p { max-width: none; }
}

/* ── Money panel ───────────────────────────────────────────────────── */

.money { border-top: 1px solid var(--ink); padding-top: 14px; }
.money-label { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--muted); }
.money-rows { margin: 0; }
.money-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; min-height: 42px; border-bottom: 1px solid var(--rule); }
.money-rows dt { color: var(--muted); }
.money-rows dd { margin: 0; font-family: var(--fig); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 21px; }
.money-total dt { color: var(--ink); font-weight: 600; }
.money-cost dd { color: var(--expense); }

/* RN has no double border, and neither does the app: two rules, 1px apart.
   In the app it means "a total follows". It means the same here. */
.double-rule { height: 4px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-top: -1px; }

.money-net { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0 4px; }
.money-net span:first-child { font-weight: 700; font-size: 19px; }
.money-net .figure { font-weight: 700; font-size: 30px; }
.money-rates { display: flex; gap: 26px; margin-top: 2px; }
.money-rates p { margin: 0; font-family: var(--fig); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 25px; }
.money-rates .unit { font-size: 16px; color: var(--muted); }

/* ── Tips ──────────────────────────────────────────────────────────── */

.tips { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.tip { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.tip p { margin: 0; max-width: 68ch; color: var(--muted); }
.tip-where { margin-top: 8px !important; font-size: 14px; color: var(--muted); }
.tip-where strong { color: var(--ink); font-weight: 600; }

@media (min-width: 880px) {
  .tip { display: grid; grid-template-columns: 1fr 26ch; gap: 8px clamp(32px, 4vw, 56px); align-items: start; }
  .tip h3 { grid-column: 1; }
  .tip p:not(.tip-where) { grid-column: 1; max-width: none; }
  .tip-where { grid-column: 2; grid-row: 1 / span 2; margin-top: 4px !important; text-align: right; text-wrap: balance; }
}

/* ── What it does not do ───────────────────────────────────────────── */

.nots { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid #3a352d; }
.nots li { padding: 18px 0; border-bottom: 1px solid #3a352d; color: #cdc6ba; }
.nots li > span { display: block; max-width: 72ch; }
.nots strong { color: var(--field-ink); font-weight: 600; }

/* ── Early access ─────────────────────────────────────────────────── */

.specs { margin: 46px 0 0; border-top: 1px solid var(--ink); }
.specs > div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.specs dt { font-weight: 600; margin-bottom: 4px; }
.specs dd { margin: 0; color: var(--muted); max-width: 68ch; }

@media (min-width: 880px) {
  .specs > div { display: grid; grid-template-columns: 22ch 1fr; gap: 24px; }
  .specs dt { margin-bottom: 0; }
}

/* ── Early access ──────────────────────────────────────────────────── */

.get-actions { margin: 0 0 12px; }
.get-fine { max-width: 34rem; }

/* ── Legal pages ───────────────────────────────────────────────────── */

/* One column of prose at a readable measure, using the page's own devices: the
   h2s rule the sections, and `.specs` does the permission and storage tables
   exactly as it does on the download section. */

.legal { padding: clamp(28px, 5vw, 56px) 0 clamp(52px, 8vw, 96px); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.legal h2 { margin-top: clamp(40px, 5vw, 60px); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.legal .body, .legal .lede { max-width: none; }
.legal .specs { margin-top: 22px; }
.legal-date { margin: 0 0 8px; font-size: 15px; color: var(--muted); }

.nots-plain { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.nots-plain li { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.nots-plain strong { color: var(--ink); font-weight: 600; }

/* ── Footer ────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--rule); padding: 40px 0 56px; }
.foot .wrap { display: flex; flex-direction: column; gap: 10px; }
.foot p { margin: 0; }
.foot-muted { font-size: 15px; color: var(--muted); }
