/* Production copy of design/mobile-refresh/final/pages.css, the owner-approved mockup (TABL Navy + ambient motion,
   2026-09-28), written by design/mobile-refresh/export.cjs. Per-page order: onlocation.styles.css, calculator.css (index,
   pricing), home.css (index) | pages.css (download, 404, privacy, eula), ambient.css (not on legal pages), tabl-navy.css last. */
/* TABL Mobile "On Location": utility pages (/download, /404, legal chrome sample on privacy).
   Loads after onlocation.css and reads its tokens only. Spec: research/direction-final.md §7.
   Icons: Lucide (ISC). */

/* ---------- Shared: utility hero band + portrait device ---------- */

.utility-hero { position: relative; background: var(--paper); padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 104px); }
.utility-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.utility-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 32px; }
/* Stacks at 720, not 960: a 260px phone still fits beside the copy at 721-960, and stacking there left the right half empty. */
@media (max-width: 720px) {
  .utility-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

/* Phone in a bezel. 240 CSS px screen (2x masters are 736 wide: 3 device px per CSS px at DPR2).
   Shadow is e2: e3 belongs to the home hero phone only. */
.pg-device {
  --screen: 240px; --bz: 10px;
  position: relative; flex: none; width: calc(var(--screen) + 2 * var(--bz)); padding: var(--bz);
  border-radius: var(--r-xl); background: var(--bezel);
  box-shadow: inset 0 0 0 1px rgba(232, 237, 239, 0.08), var(--e2);
}
.pg-device__screen {
  position: relative; overflow: hidden; aspect-ratio: 368 / 800;
  border-radius: calc(var(--r-xl) - var(--bz)); background: var(--paper);
}
.pg-device__screen picture, .pg-device__screen img { width: 100%; height: 100%; }
@media (max-width: 400px) {
  .pg-device { --bz: 8px; border-radius: var(--r-phone-sm); }
  .pg-device__screen { border-radius: calc(var(--r-phone-sm) - var(--bz)); }
}

/* Small print (production class kept: p.input-hint). */
.input-hint { max-width: 62ch; margin-top: 20px; font-size: 0.875rem; line-height: 1.55; color: var(--ink-3); }
.input-hint strong { font: 600 0.9375rem/1 var(--font-display); color: var(--ink); }

/* ---------- /download (Food Truck download structure, re-skinned) ---------- */

.download-shell .lede { max-width: 44ch; }
/* 52px store buttons: the pinned badges are this page's primary action (the only pair on the page). */
.dl-actions { --badge-h: 52px; }
.dl-actions .store-badge, .dl-actions .store-badge__image { height: var(--badge-h); }
.dl-actions .google-play-badge .store-badge__image { height: calc(var(--badge-h) * 250 / 168); margin: calc(var(--badge-h) * -41 / 168); }
@media (max-width: 400px) { .dl-actions { --badge-h: 48px; } }
@media (max-width: 359px) { .dl-actions { --badge-h: 44px; } } /* 44px touch floor (the shared badge height): at 320 the pair wraps to two rows */

/* Ruled proof list: icon tile, title, one fact. */
.dl-proof { max-width: 560px; margin-top: 40px; border-top: 1px solid var(--ink); }
.dl-proof li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-strong);
}
.dl-proof b { display: block; font: 600 1.125rem/1.25 var(--font-display); color: var(--ink); }
.dl-proof small { display: block; margin-top: 2px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-3); }

/* Media: the phone sits right in its column on static signal rings; chip and QR hang off its left edge. */
.dl-media { position: relative; isolation: isolate; display: grid; justify-items: end; padding: 24px clamp(0px, 3vw, 40px) 24px 0; }
.dl-rings {
  position: absolute; z-index: -1; top: 50%; right: calc(clamp(0px, 3vw, 40px) + 130px);
  width: 800px; max-width: none; height: auto; transform: translate(50%, -50%); pointer-events: none;
  fill: none; stroke: var(--line-strong); stroke-width: 1;
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%);
          mask: radial-gradient(closest-side, #000 30%, transparent 100%);
}
.dl-chip {
  position: absolute; z-index: 2; bottom: -16px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; box-shadow: var(--e2);
} /* straddles the bezel's bottom edge, centred on the device (device media only), at every width */
.dl-qr {
  position: absolute; z-index: 2; right: calc(100% + 32px); bottom: 72px;
  display: grid; gap: 12px; width: 176px; padding: 12px 12px 16px;
  background: var(--night); border-radius: var(--r-plate); box-shadow: var(--e2);
}
.dl-qr svg { display: block; width: 100%; height: auto; border-radius: var(--r-sm); background: var(--frost); fill: var(--night); }
.dl-qr figcaption { display: grid; gap: 2px; padding-inline: 2px; font-size: 0.875rem; line-height: 1.4; color: var(--frost-2); }
.dl-qr figcaption b { font: 600 1rem/1.25 var(--font-display); color: var(--frost); }
@media (max-width: 1100px) {
  .dl-media { padding-right: 0; }
  .dl-rings { right: 130px; }
  .dl-qr { right: calc(100% + 20px); width: 148px; }
}
@media (max-width: 960px) {
  .dl-qr { display: none; } /* desktop only (owner question 16) */
}
@media (hover: none), (pointer: coarse) { .dl-qr { display: none; } } /* no QR on touch devices */
@media (max-width: 720px) {
  .dl-media { justify-items: center; padding: 8px 0 32px; }
  .dl-rings { right: 50%; width: 680px; }
}

/* Mini run-of-show: three stops on one road (echoes the home strip; stop copy is existing site copy). */
.dl-route { background: var(--sunk); padding-block: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.dl-route__title { font-size: clamp(1.375rem, 1.1rem + 0.6vw, 1.625rem); font-weight: 600; line-height: 1.2; }
.dl-route__stops { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 32px; }
/* The road: one hairline with hour-style ticks; each stop is a ring on it. */
.dl-route__stops::before {
  content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 7px;
  background:
    linear-gradient(var(--ink-3), var(--ink-3)) 0 3px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 24px) 0 0 / 100% 7px no-repeat;
}
.dl-route__stops li { position: relative; padding-top: 36px; }
.dl-route__stops li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 17px; height: 17px;
  border: 2px solid var(--accent); border-radius: var(--r-dot); background: var(--sunk);
}
.dl-route__stops li:first-child::before { background: var(--accent); }
.dl-route__stops h3 { display: flex; align-items: baseline; gap: 10px; font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.dl-route__stops h3 .fig { flex: none; font-weight: 700; color: var(--accent); }
.dl-route__stops p { max-width: 40ch; margin-top: 8px; padding-left: 20px; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 720px) {
  /* Rows: the road turns vertical, rings on its left. */
  .dl-route__stops { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
  .dl-route__stops::before { display: none; }
  .dl-route__stops li { padding: 0 0 24px 36px; }
  .dl-route__stops li::before { top: 4px; }
  /* Each stop draws the road down to the next ring, so it ends on the last stop. */
  .dl-route__stops li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 21px; bottom: 4px; width: 1px; background: var(--ink-3); }
  .dl-route__stops li:last-child { padding-bottom: 0; }
}

/* ---------- /404: two-part panel; the phone's screen is an app-style empty state ---------- */

.not-found-code {
  margin-bottom: 28px;
  font: 700 clamp(4.5rem, 2.5rem + 5.5vw, 7.5rem)/0.8 var(--font-display); letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; color: var(--ink-3);
}
.not-found-shell .lede { max-width: 42ch; }
/* Stage: the phone rises from it and is cropped by its bottom edge, like the #product stages. */
.nf-stage {
  position: relative; display: flex; justify-content: center; overflow: hidden;
  height: clamp(440px, 36vw, 520px); padding-top: 40px;
  background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-lg);
}
/* One lane marking crosses the stage behind the phone (the route-dash motif; no illustration). */
.nf-stage::before {
  content: ""; position: absolute; left: 0; right: 0; top: 68%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 24px, transparent 24px 40px);
}
.nf-stage .pg-device { align-self: flex-start; box-shadow: inset 0 0 0 1px rgba(232, 237, 239, 0.08), var(--e2); }
@media (max-width: 480px) {
  .nf-stage { height: 440px; padding-top: 28px; }
  .nf-stage::before { display: none; } /* too short a run to read as a lane beside a phone this wide */
}

/* The app screen, authored at the app's own 368 x 800 point size and scaled into the 240px screen
   (--k = 240 / 368), so every proportion matches the real Orders tab. Decorative: aria-hidden. */
.app {
  --k: 0.6522;
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; width: 368px; height: 800px;
  transform: scale(var(--k)); transform-origin: 0 0;
  background: var(--paper); color: var(--ink); font-family: var(--font-body);
}
.app svg[viewBox="0 0 24 24"] { width: 22px; height: 22px; stroke-width: 1.75; }
.app-status { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 6px 30px 0 40px; }
.app-status .fig { font-size: 18px; font-weight: 700; }
.app-status__icons { display: flex; align-items: center; gap: 6px; }
.app-status__icons svg[viewBox="0 0 24 24"] { width: 18px; height: 18px; stroke-width: 2.25; }
.app-head { display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.app-head b { font: 600 26px/1 var(--font-display); }
.app-head span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 600 17px/1 var(--font-display); color: var(--accent); }
.app-search {
  display: flex; align-items: center; gap: 10px; height: 40px; margin: 14px 14px 0; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 17px; color: var(--ink-3);
}
.app-search svg[viewBox="0 0 24 24"] { width: 19px; height: 19px; color: var(--ink-2); }
.app-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 14px 0; }
.app-tile {
  display: grid; justify-items: center; align-content: center; gap: 2px; height: 70px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2);
}
.app-tile::before { content: ""; width: 38px; height: 4px; margin-bottom: 4px; border-radius: 2px; background: var(--ink-3); }
.app-tile b { font: 700 26px/1 var(--font-display); color: var(--ink); }
.app-tile span { font-size: 14px; line-height: 1.2; }
.app-tile.is-active { background: var(--accent-wash); border: 2px solid var(--accent); color: var(--accent); }
.app-tile.is-active::before { background: var(--accent); }
.app-tile.is-active b { color: var(--accent); }
.app-section { display: flex; align-items: center; gap: 10px; margin: 22px 16px 0; font: 600 20px/1 var(--font-display); }
.app-section .fig { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-dot); background: var(--sunk); font-size: 15px; color: var(--ink-2); }
.app-empty {
  flex: 1; display: grid; justify-items: center; align-content: center; gap: 14px; margin: 16px 14px 112px; padding: 24px 20px 40px;
  border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; /* an in-app empty state, inside the device */
}
.app-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-dot); background: var(--accent-wash); color: var(--accent); }
.app-empty__icon svg[viewBox="0 0 24 24"] { width: 30px; height: 30px; stroke-width: 1.75; }
.app-empty b { font: 600 21px/1.2 var(--font-display); }
@media (max-width: 480px) { .app-empty { margin-bottom: 196px; } } /* the shorter stage crops higher: keep the box's bottom edge in view */
.app-empty small { font-size: 15px; line-height: 1.4; color: var(--ink-3); }
.app-tabs {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 84px; padding-top: 12px; border-top: 1px solid var(--line); background: var(--surface);
}
.app-tabs span { display: grid; justify-items: center; align-content: start; gap: 4px; font-size: 13px; color: var(--ink-3); }
.app-tabs span.is-active { color: var(--accent); }

/* ---------- Legal chrome (privacy / eula): text untouched, long-form reading styles ---------- */

.page-hero { padding-block: clamp(48px, 6vw, 88px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero .lede { max-width: 56ch; }
.page-hero .input-hint { margin-top: 24px; font-size: 0.9375rem; }
.legal-body { padding-block: clamp(40px, 5vw, 72px) var(--section-pad); }
.privacy-content, .legal-content {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(32px, 5vw, 72px); align-items: start;
}
/* Sticky TOC in the left rail. It spans every row the cards create (empty rows collapse to 0: no row-gap). */
.privacy-content > .toc, .legal-content > .toc {
  grid-column: 1; grid-row: 1 / span 99; position: sticky; top: calc(var(--header-h) + 24px);
  display: grid; border-top: 1px solid var(--ink);
}
.toc a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0;
  border-bottom: 1px solid var(--line-strong);
  font: 500 1.0625rem/1.25 var(--font-display); color: var(--ink-2); text-decoration: none;
  transition: color 120ms var(--ease);
}
.toc a::before { content: ""; flex: none; width: 8px; height: 8px; border: 2px solid var(--line-strong); border-radius: var(--r-dot); transition: border-color 120ms var(--ease), background-color 120ms var(--ease); }
.toc a:hover { color: var(--ink); }
.toc a:hover::before { border-color: var(--accent); background: var(--accent); }
:is(.privacy-content, .legal-content) > :is(.policy-card, .legal-card) { grid-column: 2; }
:is(.policy-card, .legal-card) + :is(.policy-card, .legal-card) { margin-top: 16px; }

.policy-card, .legal-card {
  padding: clamp(24px, 3vw, 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1);
}
:is(.policy-card, .legal-card) h2 { font-size: clamp(1.625rem, 1.3rem + 0.9vw, 2.125rem); line-height: 1.05; }
:is(.policy-card, .legal-card) :is(p, li, address) { max-width: 64ch; }
:is(.policy-card, .legal-card) p { margin-top: 16px; font-size: 1.0625rem; line-height: 1.7; }
:is(.policy-card, .legal-card) strong { color: var(--ink); }
.policy-grid { margin-top: 24px; border-top: 1px solid var(--line-strong); }
.policy-grid article { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.policy-grid h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.policy-grid p { margin-top: 6px; }
.policy-grid + p { margin-top: 24px; }
.policy-list { display: grid; gap: 12px; margin-top: 18px; }
.policy-list li { position: relative; padding-left: 26px; font-size: 1.0625rem; line-height: 1.65; }
/* Bullet = the route node's stop ring. */
.policy-list li::before {
  content: ""; position: absolute; left: 2px; top: calc(0.825em - 4px); width: 8px; height: 8px;
  border: 2px solid var(--accent); border-radius: var(--r-dot);
}
:is(.policy-card, .legal-card) address { margin-top: 16px; font-style: normal; font-size: 1.0625rem; line-height: 1.8; }
:is(.policy-card, .legal-card) address a { display: inline-block; min-height: 24px; }

@media (max-width: 1100px) {
  .privacy-content, .legal-content { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
  .privacy-content > .toc, .legal-content > .toc {
    grid-column: 1; grid-row: auto; position: static;
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; border: 0;
  }
  .toc a { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 1rem; }
  .toc a::before { display: none; }
  .toc a:hover { border-color: var(--ink-3); }
  :is(.privacy-content, .legal-content) > :is(.policy-card, .legal-card) { grid-column: 1; }
}
@media (max-width: 480px) {
  .toc a { padding: 0 12px; font-size: 0.9375rem; } /* keeps the 44px chip height from the 1100 rule */
  :is(.policy-card, .legal-card) p, .policy-list li, :is(.policy-card, .legal-card) address { font-size: 1rem; }
}

/* ---------- Forced colours / increased contrast ---------- */

@media (forced-colors: active), (prefers-contrast: more) {
  .dl-route__stops li::before, .policy-list li::before, .toc a::before { forced-color-adjust: none; border-color: CanvasText; }
  .dl-route__stops li:first-child::before { background: CanvasText; }
  .dl-route__stops::before { forced-color-adjust: none; background: CanvasText; }
  .dl-rings { display: none; }
  .nf-stage, .dl-qr, .dl-proof { border: 1px solid CanvasText; }
  .app-tile.is-active { outline: 2px solid Highlight; }
}
