@charset "utf-8";
/* C&D Recycling Exchange, restyled to the PI's design system (Step 11b). Rationale: docs/team/Design.md.
   Every value comes from docs/design_system/navid_nickdoost/tokens.json, copied into the two token blocks below:
   night is the default, paper is chosen with the header toggle (data-theme="paper" on <html>).
   No colour literal lives outside the token blocks. Geist is served from site/vendor/fonts/ (SIL Open Font License). */

/* ---------- tokens: night (default) ---------- */
:root {
  --canvas: #0b0d14;
  --surface: #12151e;
  --surface-raised: #1a1e2a;
  --glass: #bad7f70d;
  --grid: #bad7f70f;
  --line: #c7d3ea24;
  --line-strong: #6a7389;
  --ink: #eceef4;
  --ink-muted: #aab1c2;
  --ink-faint: #868ea1;
  --accent: #8f9dff;
  --accent-fill: #5266eb;
  --on-accent: #ffffff;
  --focus: #a9b4ff;
  --data-water: #56b4e9;
  --data-power: #e69f00;
  --data-transport: #35c49a;
  --data-people: #cc79a7;
  --data-material: #e3d45a;
  --data-muted: #3a4152;
  --hazard: #ff8a5b;
  --atmos-deep: #0f2a4a;
  --atmos-mid: #5266eb;
  --atmos-warm: #ffac2e;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-18: 72px;
  --space-30: 120px;
  --measure: 680px;
  --page-max: 1200px;
  --radius-none: 0px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-panel: inset 0 1px 0 0 rgba(216, 236, 248, 0.10), 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  --font-sans: "Geist", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --type-display-xl-size: 112px;
  --type-display-xl-line: 0.95;
  --type-display-xl-weight: 300;
  --type-display-xl-tracking: -0.03em;
  --type-display-size: 72px;
  --type-display-line: 1;
  --type-display-weight: 300;
  --type-display-tracking: -0.02em;
  --type-metric-size: 56px;
  --type-metric-line: 1;
  --type-metric-weight: 300;
  --type-metric-tracking: -0.02em;
  --type-heading-lg-size: 44px;
  --type-heading-lg-line: 1.1;
  --type-heading-lg-weight: 480;
  --type-heading-lg-tracking: -0.01em;
  --type-heading-size: 32px;
  --type-heading-line: 1.15;
  --type-heading-weight: 480;
  --type-heading-tracking: -0.005em;
  --type-heading-sm-size: 22px;
  --type-heading-sm-line: 1.25;
  --type-heading-sm-weight: 480;
  --type-body-lg-size: 19px;
  --type-body-lg-line: 1.55;
  --type-body-lg-weight: 400;
  --type-body-size: 16px;
  --type-body-line: 1.6;
  --type-body-weight: 400;
  --type-body-sm-size: 14px;
  --type-body-sm-line: 1.5;
  --type-body-sm-weight: 400;
  --type-label-size: 14px;
  --type-label-line: 1.2;
  --type-label-weight: 480;
  --type-eyebrow-size: 12px;
  --type-eyebrow-line: 1.2;
  --type-eyebrow-weight: 500;
  --type-eyebrow-tracking: 0.14em;
  --type-data-size: 13px;
  --type-data-line: 1.45;
  --type-data-weight: 400;
  --type-reading-size: 20px;
  --type-reading-line: 1.65;
  --type-reading-weight: 400;
  --type-pull-quote-size: 30px;
  --type-pull-quote-line: 1.3;
  --type-pull-quote-weight: 400;
  --type-pull-quote-style: italic;
  --nn-ease: cubic-bezier(.19,1,.22,1);
  --nn-dur-ui: 180ms;
  --nn-dur-reveal: 800ms;
}

/* ---------- tokens: paper ---------- */
:root[data-theme="paper"] {
  --canvas: #f8f7f3;
  --surface: #ffffff;
  --surface-raised: #efeee8;
  --glass: #ffffffcc;
  --grid: #1112160d;
  --line: #11121621;
  --line-strong: #7e8088;
  --ink: #111216;
  --ink-muted: #4f525a;
  --ink-faint: #686b73;
  --accent: #3346c8;
  --accent-fill: #3d50d6;
  --on-accent: #ffffff;
  --focus: #2536b8;
  --data-water: #0072b2;
  --data-power: #b86e00;
  --data-transport: #00805d;
  --data-people: #a3528a;
  --data-material: #857600;
  --data-muted: #c9cac4;
  --hazard: #c2410c;
  --atmos-deep: #0f2a4a;
  --atmos-mid: #5266eb;
  --atmos-warm: #ffac2e;
  --shadow-panel: 0 1px 0 0 rgba(17, 18, 22, 0.06), 0 16px 40px -16px rgba(17, 18, 22, 0.22);
}

/* ---------- motion: off when the reader asks for less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- font ---------- */
@font-face {
  font-family: "Geist";
  src: url(../vendor/fonts/Geist-Variable.woff2) format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- one stacking scale (Step 14): every z-index uses it ---------- */
html { --z-map: 0; --z-panel: 10; --z-nav: 20; --z-skip: 30; --z-tour: 40 }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { background: var(--canvas); color: var(--ink); font-family: var(--font-sans); color-scheme: dark; }
html[data-theme="paper"] { color-scheme: light; }
body {
  margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-sans);
  font-size: var(--type-body-size); line-height: var(--type-body-line); font-weight: var(--type-body-weight);
  overflow-wrap: anywhere;
}
button, input, select, textarea { font-family: var(--font-sans); font-size: inherit; line-height: inherit; color: inherit; }
a, button, select, summary, label[for] { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-6); }
h1, h2, h3 { font-family: var(--font-sans); margin: 0 0 var(--space-3); text-wrap: balance; }
h1 { font-size: var(--type-heading-lg-size); line-height: var(--type-heading-lg-line); font-weight: var(--type-heading-lg-weight); letter-spacing: var(--type-heading-lg-tracking); }
h2 { font-size: var(--type-heading-size); line-height: var(--type-heading-line); font-weight: var(--type-heading-weight); letter-spacing: var(--type-heading-tracking); }
h3 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); font-weight: var(--type-heading-sm-weight); }
p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0; padding: 0; }
strong, b { font-weight: 600; }
th { font-weight: 500; }
[hidden] { display: none !important; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus {
  position: fixed; top: var(--space-2); left: var(--space-2); z-index: var(--z-skip);
  background: var(--surface); color: var(--ink); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
}
.nowrap { white-space: nowrap; }

/* ---------- the design system's parts (the access-code page uses them) ---------- */
.nn-eyebrow {
  font-family: var(--font-sans); font-size: var(--type-eyebrow-size); line-height: var(--type-eyebrow-line);
  font-weight: var(--type-eyebrow-weight); letter-spacing: var(--type-eyebrow-tracking); text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 var(--space-3);
}
.nn-eyebrow [data-index] { color: var(--accent); font-weight: var(--type-eyebrow-weight); }
.nn-card { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-6); box-shadow: none; }
.nn-card p:last-child { margin-bottom: 0; }
.section-lead { color: var(--ink-muted); max-width: var(--measure); font-size: var(--type-body-lg-size); line-height: var(--type-body-lg-line); }
.unit { color: var(--ink-muted); font-weight: 400; }

/* buttons: pills; one primary per view, the rest are outlined. Only transform moves (Step 14 motion rule). */
.button-primary, .find-btn, .quote-btn, .source-toggle, .theme-toggle, .ghost-btn, .demo-notice-btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500;
  border-radius: var(--radius-pill); border: 1px solid transparent; padding: 11px 20px; min-height: 44px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--nn-dur-ui) var(--nn-ease);
}
.button-primary:active, .find-btn:active, .quote-btn:active, .ghost-btn:active, .theme-toggle:active, .icon-btn:active { transform: scale(0.96); }
.button-primary, .find-btn { background: var(--accent-fill); color: var(--on-accent); }
.button-primary:hover, .find-btn:hover { color: var(--on-accent); border-color: var(--focus); }
.quote-btn, .source-toggle, .theme-toggle, .ghost-btn, .icon-btn { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.quote-btn:hover, .source-toggle:hover, .theme-toggle:hover, .ghost-btn:hover, .icon-btn:hover { background: var(--surface-raised); border-color: var(--ink-muted); }
.icon-btn, .theme-toggle { padding: 0; width: 40px; min-height: 40px; height: 40px; flex: none; }
.icon-btn svg, .theme-toggle svg { display: block; transition: transform var(--nn-dur-ui) var(--nn-ease); }
.theme-toggle:hover svg { transform: rotate(20deg); }
.link-btn {
  font-family: var(--font-sans); font-size: var(--type-body-sm-size); font-weight: 500; color: var(--accent); background: transparent;
  border: 0; padding: var(--space-1) 0; margin-top: var(--space-2); text-decoration: underline; cursor: pointer;
}

/* ---------- shell: the slim bar ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-nav); height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-nav {
  display: flex; align-items: center; gap: var(--space-1); height: 100%;
  padding: 0 max(var(--space-3), env(safe-area-inset-right)) 0 max(var(--space-4), env(safe-area-inset-left));
}
.nav-mark { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; color: var(--ink); text-decoration: none; }
.nav-mark:hover { color: var(--ink); }
.site-name { font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 600; color: var(--ink); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: var(--space-1); }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-pill);
  color: var(--ink-muted); text-decoration: none; font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-raised); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-raised); }
.header-notice { margin-top: var(--space-4); }
.site-footer { border-top: 1px solid var(--line); margin-top: var(--space-12); padding: var(--space-8) 0 var(--space-12); color: var(--ink-muted); font-size: var(--type-body-sm-size); }
.site-footer p { margin: 0; max-width: var(--measure); }
.load-error { color: var(--hazard); font-size: var(--type-heading-sm-size); font-weight: 500; padding: var(--space-12) 0; margin: 0; }

/* ---------- rule 9 as amended: one notice, an asterisk after each demo price ---------- */
.demo-notice { background: var(--surface); padding: var(--space-2); }
.demo-notice-btn {
  width: 100%; justify-content: flex-start; white-space: normal; text-align: left;
  background: var(--surface); color: var(--ink); padding: var(--space-2) var(--space-3); font-size: var(--type-body-size);
}
.demo-notice-btn:hover { background: var(--surface-raised); }
.demo-notice-btn > span { color: var(--accent); font-weight: 600; }
.demo-explanation { background: var(--surface); color: var(--ink); padding: 0 var(--space-4) var(--space-3); }
.demo-explanation p { margin: 0; }
.ast { color: var(--accent); font-weight: 600; margin-left: 1px; }
.price { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* ---------- the finder (Step 14): the map fills the screen; one floating column on the left ---------- */
body[data-page="search"] { overflow: hidden; }
.finder { position: fixed; top: 56px; right: 0; bottom: 0; left: 0; }
.finder-map { position: absolute; inset: 0; z-index: var(--z-map); background: var(--surface-raised); }
.finder-col {
  position: absolute; z-index: var(--z-panel);
  top: var(--space-3); left: max(var(--space-3), env(safe-area-inset-left));
  width: min(400px, calc(100% - 2 * var(--space-3)));
  max-height: calc(100% - 2 * var(--space-3) - env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-panel);
  font-size: var(--type-body-sm-size); line-height: var(--type-body-sm-line);
}
.panel { background: var(--surface); padding: var(--space-4); border-top: 1px solid var(--line); }
.finder-col > .panel:first-child, .finder-col > .demo-notice:first-child { border-top: 0; }

/* controls */
.controls label, .cost-settings summary { display: block; font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.controls input, .controls select {
  width: 100%; min-height: 44px; font-size: var(--type-body-size); color: var(--ink); background: var(--canvas);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
}
.controls input:focus-visible, .controls select:focus-visible { border-color: var(--focus); }
.controls input::placeholder { color: var(--ink-faint); }
.controls input[aria-invalid="true"] { border-color: var(--hazard); }
.address-line { display: flex; gap: var(--space-2); }
.address-line input { flex: 1 1 auto; min-width: 0; }
.find-btn { flex: none; padding: 0 var(--space-4); }
.loc-message:empty { display: none; }
.loc-message { margin: var(--space-2) 0 0; color: var(--hazard); font-weight: 500; }
.field-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-3); margin-top: var(--space-3); }
.field { min-width: 0; }
.field-error { color: var(--hazard); font-weight: 500; margin: var(--space-1) 0 0; }
.caveat { color: var(--ink-muted); margin: var(--space-2) 0 0; }
.cost-settings { margin-top: var(--space-2); }
.cost-settings summary { display: flex; align-items: center; min-height: 44px; margin: 0; color: var(--ink); list-style-position: inside; }
.cost-settings summary:hover { color: var(--accent); }
.cost-settings .field-row { margin-top: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* results: one list of rows, no card in a card */
.results { padding: 0; }
.results-status { margin: 0; padding: var(--space-3) var(--space-4); color: var(--ink-muted); }
.results-status:empty { display: none; }
.cards { list-style: none; }
.card { border-top: 1px solid var(--line); }
.card-select {
  display: grid; gap: 2px; width: 100%; text-align: left; background: var(--surface); color: var(--ink);
  border: 0; border-left: 3px solid transparent; border-radius: 0; padding: var(--space-3) var(--space-4) var(--space-3) 13px; cursor: pointer;
}
.card-select:hover, .card[data-highlight="true"] .card-select { background: var(--surface-raised); border-left-color: var(--accent); }
.card[aria-current="true"] .card-select { border-left-color: var(--data-power); background: var(--surface-raised); }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.card-name { font-weight: 500; font-size: var(--type-body-size); line-height: 1.35; }
.card-total { flex: none; font-weight: 500; font-size: var(--type-body-size); }
.card-meta { display: flex; gap: var(--space-3); color: var(--ink-muted); }
.card-dist { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.card-breakdown { color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* details: in the same column, above the list */
.details { border-top: 3px solid var(--data-power); }
.details-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.details h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); margin: 0; }
.details h2:focus:not(:focus-visible) { outline: none; }
.details h2:focus-visible { outline: 2px solid var(--focus); }
.details h3 { font-size: var(--type-body-size); line-height: var(--type-body-line); font-weight: 500; margin: var(--space-4) 0 var(--space-1); }
.details-sub { color: var(--ink-muted); margin: var(--space-1) 0 var(--space-3); }
.details-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-2); }
.details-total .k { color: var(--ink-muted); }
.details-total .price { font-size: var(--type-heading-sm-size); font-weight: 400; }
.details-costs { margin: 0; }
.details-costs div { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) 0; border-top: 1px solid var(--line); }
.details-costs dt { color: var(--ink-muted); }
.details-costs dd { margin: 0; flex: none; }
.details-note { color: var(--ink-muted); margin: var(--space-2) 0 0; }
.details-pnk { margin: 0; }
.details-sources { list-style: none; color: var(--ink-muted); }
.details-sources li { padding: var(--space-1) 0; }
.details-sources .k { color: var(--ink); font-weight: 500; }
.details-actions { margin: var(--space-4) 0 0; }
.details .demo-disclaimer { margin: var(--space-3) 0 0; }

/* Ask the Exchange (Step 19): an outlined button at the end of the search panel; the panel sits in the column under
   it, never over the map. One primary (Ask); the examples are outlined and wrap. */
.ask-open { margin: var(--space-3) 0 0; }
.ask-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.ask h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); margin: 0; }
.ask-preview { color: var(--ink-muted); margin: var(--space-2) 0 var(--space-3); }
.ask-tag {
  display: inline-block; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 0 var(--space-2); font-size: var(--type-data-size); font-weight: 500; margin-right: var(--space-1);
}
.ask-form label { display: block; font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.ask-form input {
  width: 100%; min-height: 44px; font-size: var(--type-body-size); color: var(--ink); background: var(--canvas);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
}
.ask-form input:focus-visible { border-color: var(--focus); }
.ask-form .button-primary { flex: none; padding: 0 var(--space-4); }
.ask-examples { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0 0; }
.ask-examples .ghost-btn { white-space: normal; text-align: left; justify-content: flex-start; padding: var(--space-2) var(--space-3); }
.ask-region:empty { display: none; }
.ask-answer { margin-top: var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-3); }
.ask-text { margin: 0 0 var(--space-2); }
.ask-items { list-style: none; }
.ask-item { display: grid; gap: 2px; padding: var(--space-2) 0; border-top: 1px solid var(--line); }
.ask-name { font-weight: 500; }
.ask-figs { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); color: var(--ink-muted); }
.ask-dist { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.ask-note { color: var(--ink-muted); }
.ask-answer .ghost-btn { margin-top: var(--space-2); }

/* the footer, last in the column */
.finder-col > .site-footer { margin: 0; padding: var(--space-3) var(--space-4); }
.finder-col > .site-footer .wrap { padding: 0; max-width: none; }

/* the maps: OpenStreetMap standard tiles; the theme sets a filter on the tile pane only (never on the map box, the
   pins or the controls). Night: greyscale first, then inversion, tuned so land sits near the dark surface and the
   major roads read as lighter grey. Paper: a light desaturation. Controls through tokens, the pins. */
:root:not([data-theme="paper"]) .leaflet-container .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(1.3) contrast(1.1); }
:root[data-theme="paper"] .leaflet-container .leaflet-tile-pane { filter: saturate(0.6); }
#map.leaflet-container, #store-map.leaflet-container { background: var(--surface-raised); font-family: var(--font-sans); font-size: var(--type-data-size); line-height: var(--type-data-line); }
#map .leaflet-bar { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: none; }
#map .leaflet-bar a { font-family: var(--font-sans); font-weight: 500; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); cursor: pointer; }
#map .leaflet-bar a:hover { background: var(--surface-raised); }
#map .leaflet-bar a.leaflet-disabled { background: var(--surface-raised); color: var(--ink-muted); }
.leaflet-container .leaflet-control-attribution { background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: var(--type-data-size); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent); }
.map-missing { display: flex; align-items: center; justify-content: center; background: var(--surface); padding: var(--space-6); }

/* facility pins (Step 15): the root is the hit box, centred on the point with the translate property (Leaflet owns
   transform); a muted dot without a price, a price label once the facility has a total; the selected pin is larger and
   in the accent colour; the imaginary facility has its own outline colour */
.leaflet-marker-icon.fac-pin {
  display: flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; translate: -50% -50%;
  cursor: pointer; font-family: var(--font-sans);
}
.fac-pin:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-pill); }
.pin-dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--data-muted); border: 1.5px solid var(--line-strong); }
.fac-pin[data-highlight="true"] .pin-dot { border-color: var(--ink); }
.pin-label {
  display: inline-flex; align-items: center; gap: var(--space-1); white-space: nowrap;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 2px var(--space-2); font-size: var(--type-data-size); line-height: 20px; font-weight: 600; box-shadow: var(--shadow-panel);
}
.pin-label .price { font-variant-numeric: tabular-nums lining-nums; }
.fac-pin[data-highlight="true"] .pin-label { border-color: var(--ink); }
.fac-pin[data-demo-listing] .pin-label { background: var(--surface-raised); border: 2px solid var(--data-material); }
.pin-tag { font-weight: 500; }
/* the selected pin grows through its own box, not `scale`: `scale` would also multiply Leaflet's transform offset and
   move the pin away from its point */
.leaflet-marker-icon.fac-pin.is-selected { min-width: 28px; min-height: 28px; }
.fac-pin.is-selected .pin-label { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill);
  font-size: var(--type-body-size); line-height: 26px; padding: 2px var(--space-3); }
.fac-pin.is-selected .pin-dot { width: 13px; height: 13px; }
.fac-pin.is-selected .ast { color: var(--on-accent); }
.fac-pin.is-selected .pin-dot { background: var(--accent-fill); border-color: var(--ink); }
/* the job location: a ring with a centre dot, never a facility pin */
.leaflet-marker-icon.project-mark, .leaflet-marker-icon.store-pin {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; translate: -50% -50%;
  border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--canvas), inset 0 0 0 3px var(--canvas); pointer-events: none;
}
.project-ring, .store-pin-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.leaflet-marker-icon.store-pin { border-color: var(--accent-fill); }
.store-pin-dot { background: var(--accent-fill); }

/* the quote dialog */
.quote-notice {
  max-width: min(32rem, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: var(--space-6);
}
.quote-notice::backdrop { background: var(--canvas); opacity: 0.8; }
.quote-notice h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); }

/* ---------- phones: the controls, then the map, then the results in a sheet below ---------- */
@media (max-width: 47.99rem) {
  body[data-page="search"] { overflow: visible; }
  .site-header { position: relative; height: auto; min-height: 56px; }
  /* Step 17: three links, the site name on three short lines and the theme button fit one row at 375 px */
  .site-nav { gap: 0; padding-right: max(var(--space-1), env(safe-area-inset-right)); padding-left: max(var(--space-2), env(safe-area-inset-left)); }
  .nav-mark { flex: 0 1 auto; min-width: 0; }
  .site-name { font-size: var(--type-data-size); white-space: normal; overflow-wrap: normal; letter-spacing: var(--type-heading-lg-tracking); display: block; line-height: 1.15; }
  .nav-links { gap: 0; }
  .nav-links a { flex: none; white-space: nowrap; min-height: 44px; padding: 0 var(--space-1); font-size: var(--type-data-size); }
  .theme-toggle, .icon-btn { width: 44px; height: 44px; min-height: 44px; }
  .finder { position: static; display: flex; flex-direction: column; }
  /* display: contents puts the panels in the page flow; overflow must be visible, or a zero-size scroller hides them */
  .finder-col { display: contents; overflow: visible; }
  .finder-col, .panel, .demo-notice-btn, .demo-explanation, .controls label, .cost-settings summary,
  .find-btn, .quote-btn, .ghost-btn { font-size: var(--type-body-size); line-height: var(--type-body-line); }
  .panel { border-top: 1px solid var(--line); }
  .controls { order: 1; border-top: 0; padding: var(--space-3); }
  .ask { order: 1; padding: var(--space-3); }
  .finder-map { order: 2; position: relative; inset: auto; height: max(420px, 60dvh); }
  .demo-notice { order: 3; }
  .demo-explanation { order: 4; }
  .details { order: 5; border-top: 3px solid var(--data-power); padding-bottom: var(--space-6); }
  .results { order: 6; }
  .finder-col > .site-footer { order: 7; font-size: var(--type-body-size); line-height: var(--type-body-line); padding-bottom: max(var(--space-3), env(safe-area-inset-bottom)); }
  .field-row { margin-top: var(--space-2); }
  .card-select { padding-left: 13px; }
  #map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
  #map .leaflet-control-attribution { font-size: var(--type-data-size); }
  .quote-notice { max-width: calc(100% - 2rem); }
}

/* ---------- the store page of the imaginary facility (Step 15) ---------- */
/* Motion: the hero photo fades in once, and a product card lifts on hover; nothing else moves. */
.store-hero { position: relative; }
.store-hero-media img {
  display: block; width: 100%; height: clamp(260px, 36vw, 500px); object-fit: cover;
  animation: hero-in var(--nn-dur-reveal) var(--nn-ease) both;
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.store-card {
  position: relative; margin-top: -136px; max-width: 760px; padding: var(--space-8);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.store-card h1 { margin: 0 0 var(--space-2); }
.store-demo { color: var(--ink-muted); margin: 0 0 var(--space-3); }
.store-tagline { font-size: var(--type-body-lg-size); line-height: var(--type-body-lg-line); color: var(--ink); max-width: var(--measure); margin: 0 0 var(--space-3); }
.store-meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); color: var(--ink-muted); margin: 0 0 var(--space-4); }
.open-state {
  display: inline-flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-6);
  background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-pill); padding: var(--space-1) var(--space-4); font-weight: 500;
}
.open-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--hazard); }
.open-dot.is-open { background: var(--accent); }
.store-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.store-actions .button-primary, .store-actions .ghost-btn { font-size: var(--type-body-size); padding: 11px 24px; }

.store-view, .store-edit { padding-bottom: var(--space-12); }
.store-section { margin-top: var(--space-18); }
.section-head { margin-bottom: var(--space-6); }
.section-head h2, .store-section > h2 { margin-bottom: var(--space-2); }
.section-sub { color: var(--ink-muted); max-width: var(--measure); margin: 0; }
.store-notice { margin: 0 0 var(--space-6); max-width: var(--measure); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }

.product-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-6); }
.product {
  display: flex; flex-direction: column; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md); transition: transform var(--nn-dur-ui) var(--nn-ease);
}
.product:hover { transform: translateY(-3px); }
.product-media { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--surface-raised); color: var(--accent); }
.product-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-icon { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; background: var(--surface); }
.product-body { padding: var(--space-4) var(--space-6) var(--space-6); }
.product h3 { margin: 0 0 var(--space-2); }
.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-1); margin: 0 0 var(--space-1); }
.product-price .price { font-size: var(--type-heading-size); line-height: var(--type-heading-line); font-weight: 400; letter-spacing: var(--type-heading-tracking); }
.product-price .ast { font-size: var(--type-heading-sm-size); }
.product-unit, .product-updated { font-size: var(--type-body-sm-size); color: var(--ink-muted); }
.product-unit { margin-left: var(--space-1); }
.product-updated { margin: 0; }
.product-set { margin: var(--space-2) 0 0; color: var(--accent); font-weight: 500; }
.product .caveat { margin-top: var(--space-3); }

.store-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-12); }
.hours-list, .mat-list, .gallery, .edit-list { list-style: none; }
.hours-list { margin-bottom: var(--space-3); }
.hours-list li { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-2) 0; border-top: 1px solid var(--line); }
.hours-list li:last-child { border-bottom: 1px solid var(--line); }
.hours-list li.is-today { font-weight: 600; }
.day-hours { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.mat-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.mat-col h3 { font-size: var(--type-body-lg-size); line-height: var(--type-body-lg-line); margin-bottom: var(--space-2); }
.mat-list li { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; }
.mat-icon { flex: none; display: inline-flex; }
.mat-icon.is-yes { color: var(--accent); }
.mat-icon.is-no { color: var(--hazard); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-4); }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-none); }

.store-location { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6) var(--space-12); align-items: start; }
.store-location address { font-style: normal; font-size: var(--type-body-lg-size); line-height: var(--type-body-lg-line); margin: 0 0 var(--space-2); }
.store-map { width: 480px; max-width: 100%; height: 240px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }

/* owner mode */
.store-edit { padding-top: var(--space-12); }
.edit-form { max-width: 880px; }
.edit-form h2:focus:not(:focus-visible) { outline: none; }
#h-edit { width: fit-content; } /* the focus ring hugs the heading text */
.edit-block { margin-top: var(--space-6); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.edit-block > h3 { margin-bottom: var(--space-1); }
.edit-block > .section-sub { margin-bottom: var(--space-3); }
.edit-row, .edit-day { display: grid; gap: var(--space-2) var(--space-6); align-items: end; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.edit-row { grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); }
.edit-day { grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1fr) 7rem; }
.edit-row:first-child, .edit-day:first-child { border-top: 0; }
.edit-day .field-error { grid-column: 1 / -1; }
.edit-day .day-name { align-self: center; font-weight: 500; }
.check { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; cursor: pointer; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent-fill); cursor: pointer; }
.edit-field label, .time-field span { display: block; font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.store-edit input[type="text"], .store-edit input[type="time"] {
  width: 100%; min-height: 44px; font-size: var(--type-body-size); color: var(--ink); background: var(--canvas);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
}
.store-edit input:focus-visible { border-color: var(--focus); }
.store-edit input:disabled { opacity: 0.45; cursor: not-allowed; }
.store-edit input[aria-invalid="true"] { border-color: var(--hazard); }
.edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-8); }
.edit-actions .button-primary, .edit-actions .ghost-btn { font-size: var(--type-body-size); padding: 11px 24px; }
.save-status { flex: 1 1 100%; margin: 0; font-weight: 500; }
.save-status:empty { display: none; }

@media (min-width: 48rem) {
  .store-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 47.99rem) {
  .store-card { margin-top: -48px; padding: var(--space-6) var(--space-4); }
  .store-section { margin-top: var(--space-12); }
  .store-location { grid-template-columns: minmax(0, 1fr); }
  .store-map { width: 100%; }
  .mat-cols { grid-template-columns: minmax(0, 1fr); }
  .edit-row, .edit-day { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .edit-day { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .edit-day .day-name, .edit-day .check { grid-column: 1 / -1; }
  .edit-block { padding: var(--space-4); }
  .edit-field label, .time-field span, .product-unit, .product-updated { font-size: var(--type-body-size); }
  body[data-page="facility"] .site-footer { font-size: var(--type-body-size); line-height: var(--type-body-line); }
}

/* ---------- the job planner (Step 17): the plan on the left, the map beside it ---------- */
.planner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.plan-col { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); min-width: 0; }
.plan-col h1 { font-size: var(--type-heading-size); line-height: var(--type-heading-line); margin: 0; }
.plan-col .panel { border: 1px solid var(--line); border-radius: var(--radius-md); }
.plan-col .demo-notice { border-radius: var(--radius-md); }
.plan-col h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); margin: 0 0 var(--space-2); }
.plan-map { position: sticky; top: 56px; height: calc(100dvh - 56px); z-index: var(--z-map); background: var(--surface-raised); }
.examples { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.example-btn { min-height: 40px; padding: 0 var(--space-4); }
.plan-fields { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
.sample-label { color: var(--ink-muted); margin: 0 0 var(--space-3); }
.mix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--space-3); }
.plan .results-status { padding: 0; margin: 0 0 var(--space-2); }
.plan-rows { list-style: none; }
.plan-row { padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.plan-row[data-highlight="true"] { border-top-color: var(--accent); }
.plan-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.plan-mat { font-weight: 500; }
.plan-tons, .plan-meta [data-field] { color: var(--ink-muted); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.plan-tons { font-weight: 400; margin-left: var(--space-1); }
.plan-total { flex: none; font-weight: 500; }
.plan-fac { margin: 0; }
.plan-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-4); margin: 0; }
.plan-link { display: inline-flex; align-items: center; min-height: 32px; }
.plan-row .caveat { margin: var(--space-1) 0 0; }
.compare-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.compare-side { padding-top: var(--space-2); border-top: 3px solid var(--line-strong); }
.compare-k { margin: 0; color: var(--ink-muted); font-weight: 500; }
.compare-amt { margin: 0; font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); }
.compare-sub { margin: 0; color: var(--ink-muted); }
.compare-diff { margin: var(--space-4) 0 0; font-weight: 500; }
.compare-note { margin: var(--space-2) 0 0; color: var(--ink-muted); }
body[data-page="plan"] .site-footer { margin-top: 0; }
@media (max-width: 47.99rem) {
  .planner { grid-template-columns: minmax(0, 1fr); }
  .plan-col > * { order: 0; } /* the finder's phone order rules (.controls, .demo-notice) do not apply here */
  .plan-col { padding: var(--space-4) var(--space-3); }
  .plan-map { position: relative; top: auto; height: 360px; }
  .plan-fields, .compare-pair { grid-template-columns: minmax(0, 1fr); }
  .plan-col .panel { padding: var(--space-3); }
  .example-btn { font-size: var(--type-body-size); }
  .plan-link { min-height: 44px; }
  body[data-page="plan"] .site-footer { font-size: var(--type-body-size); line-height: var(--type-body-line); }
}
/* print: one clean page with the mix, the plan rows, the comparison and the notice */
@media print {
  .skip-link, .site-header, .site-footer, [data-panel="job"], #map, .demo-explanation, .plan-link, .plan-row .caveat, .compare-note { display: none !important; }
  .planner { display: block; }
  .plan-col { padding: 0; gap: var(--space-2); }
  .plan-col h1 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); }
  .plan-col h2 { font-size: var(--type-body-size); line-height: var(--type-body-line); margin: 0; }
  .plan-col .panel { border: 0; padding: 0; }
  .demo-notice, .demo-notice-btn { padding: 0; min-height: 0; }
  .sample-label { margin: 0 0 var(--space-1); }
  .mix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--space-3); }
  .mix-grid .field { display: flex; align-items: baseline; gap: var(--space-2); }
  .mix .field label { margin: 0; }
  .mix input { min-height: 0; width: 5rem; padding: 0; border: 0; background: transparent; }
  .plan .results-status { display: none; }
  .plan-row { padding: var(--space-1) 0; }
  .plan-row-top, .plan-fac, .plan-meta { display: inline; }
  .plan-fac::before, .plan-meta::before { content: " "; }
  .plan-meta [data-field] { margin-left: var(--space-2); }
  .compare-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-diff { margin-top: var(--space-2); }
}

/* ---------- the agency coverage view (Step 20): the column on the left, the full-height map beside it ---------- */
.agency { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); }
.reach-control { border: 0; margin: 0 0 var(--space-3); padding: 0; min-width: 0; }
.reach-control legend { padding: 0; font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.reach-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.controls .reach-option { position: relative; display: inline-flex; align-items: center; margin: 0; color: var(--ink); }
.controls .reach-option input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.reach-option span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); font-size: var(--type-label-size); font-weight: 500; font-variant-numeric: tabular-nums lining-nums;
}
.reach-option input:checked + span { background: var(--surface-raised); border-color: var(--ink); }
.reach-option input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.check-prompt { margin: 0; color: var(--ink-muted); }
.check-place { margin: 0 0 var(--space-2); font-weight: 500; }
/* Step 22: listed facilities with no map point that may be closer, under the result */
.check-gap { margin: var(--space-2) 0 0; padding-top: var(--space-2); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: var(--type-body-size); line-height: var(--type-body-line); }
.check-list, .count-list { margin: 0; list-style: none; }
.check-list > div, .count-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-1) 0; border-top: 1px solid var(--line); }
.check-list dt, .count-list dt { color: var(--ink-muted); overflow-wrap: normal; }
.check-list > [data-row="nearest"] { display: block; }
.check-list > [data-row="nearest"] dd { text-align: left; }
.check-list dd, .count-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.count-list > li { display: flex; gap: var(--space-2); padding: var(--space-1) 0; border-top: 1px solid var(--line); color: var(--ink-muted); }
.count-list > [data-coverage-row="posted-cd"] { display: block; }
.count-num { display: inline-block; min-width: 2.5rem; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.panel-note { color: var(--ink-muted); margin: 0 0 var(--space-2); }
.unplaced-more summary { display: list-item; padding: var(--space-2) 0; color: var(--accent); font-weight: 500; }
.unplaced-more summary:hover { color: var(--ink); }
.unplaced-list { list-style: none; max-height: 14rem; overflow-y: auto; font-size: var(--type-body-sm-size); line-height: var(--type-body-sm-line); }
.unplaced-list li { padding: 2px 0; border-top: 1px solid var(--line); }
.unplaced-county { color: var(--ink-muted); }
body[data-page="agency"] .site-footer { margin-top: 0; }
/* the reach circles: a soft fill so the basemap shows through and the gaps read; marks on top */
.reach-circle { fill: var(--accent-fill); fill-opacity: 0.1; stroke: var(--accent); stroke-opacity: 0.45; stroke-width: 1; }
.site-mark { fill: var(--accent); fill-opacity: 1; stroke: var(--canvas); stroke-opacity: 1; stroke-width: 1.5; }
.site-mark.is-muted { fill: var(--data-muted); stroke: var(--line-strong); stroke-width: 1; }

/* the menu button: shown only below 48rem, where the links fold behind it */
.nav-menu-btn { display: none; }
@media (max-width: 47.99rem) {
  .nav-menu-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); margin-right: var(--space-1);
    background: transparent; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    font-size: var(--type-label-size); font-weight: 500;
  }
  .nav-menu-btn[aria-expanded="true"] { background: var(--surface-raised); }
  .site-header .nav-links { display: none; }
  .site-header .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 100%; right: var(--space-2);
    min-width: 12rem; padding: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    box-shadow: var(--shadow-panel);
  }
  .site-header .nav-links.is-open a { min-height: 44px; padding: 0 var(--space-3); font-size: var(--type-body-size); }
  .site-name { font-size: var(--type-label-size); white-space: nowrap; }
  .agency { grid-template-columns: minmax(0, 1fr); }
  .agency .plan-map { height: max(420px, 60dvh); }
  .reach-option span, .reach-control legend { font-size: var(--type-body-size); }
  .reach-option span { min-height: 44px; }
}
@media print {
  .nav-menu-btn { display: none !important; }
}

/* ---------- quote requests (Step 18): the form, My requests, the owner's inbox and dashboard, the marking ---------- */
.quote-dialog { width: min(34rem, calc(100vw - 2rem)); }
.quote-form h2 { margin-bottom: var(--space-1); }
.quote-to { color: var(--ink-muted); margin: 0 0 var(--space-4); }
.quote-form .field { margin-top: var(--space-3); }
.quote-form .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 0; }
.quote-form label, .inbox-detail label { display: block; font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.quote-form input, .quote-form select, .quote-form textarea, .inbox-detail textarea {
  width: 100%; min-height: 44px; font-size: var(--type-body-size); color: var(--ink); background: var(--canvas);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
}
.quote-form textarea, .inbox-detail textarea { resize: vertical; }
.quote-form :is(input, select, textarea):focus-visible, .inbox-detail textarea:focus-visible { border-color: var(--focus); }
.quote-form [aria-invalid="true"], .inbox-detail [aria-invalid="true"] { border-color: var(--hazard); }
.quote-actions, .inbox-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.quote-done { margin: 0 0 var(--space-2); font-weight: 500; }
.storage-note { color: var(--ink-muted); margin: var(--space-2) 0 var(--space-4); }
.my-requests { margin: 0; padding: var(--space-3) var(--space-4) 0; }
.my-requests a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* the acceptance marking: words in the muted ink, a small "?" on the pin before its price */
.unconfirmed { color: var(--ink-muted); margin: var(--space-2) 0 0; }
.card-select .unconfirmed { display: block; margin: 0; white-space: normal; }
.pin-unconfirmed { font-weight: 600; color: var(--hazard); }
.fac-pin.is-selected .pin-unconfirmed { color: var(--on-accent); }
.compare-caveat { margin: var(--space-1) 0 0; color: var(--ink-muted); }

/* My requests */
.requests-main { padding-top: var(--space-12); padding-bottom: var(--space-12); max-width: calc(var(--measure) + 2 * var(--space-6)); }
.requests-main h1 { margin-bottom: var(--space-2); }
.requests-main .sample-label { margin: 0; font-weight: 500; color: var(--accent); }
.preview-why { color: var(--ink-muted); margin: 0 0 var(--space-6); }
.requests-main .demo-notice { border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: var(--space-6); }
.thread { border-top: 1px solid var(--line); padding: var(--space-6) 0; }
.thread-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.thread-head h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); margin: 0 0 var(--space-3); }
.thread-status, .inbox-status { flex: none; font-size: var(--type-label-size); font-weight: 500; color: var(--ink-muted); }
.thread-status.is-answered, .inbox-status.is-answered { color: var(--accent); }
.msgs { list-style: none; display: grid; gap: var(--space-4); }
.msg { padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.msg[data-from="you"] { background: transparent; }
.msg p:last-child { margin-bottom: 0; }
.msg-who { margin: 0 0 var(--space-2); font-weight: 500; }
.msg-who time, .msg-tag { color: var(--ink-muted); font-weight: 400; font-size: var(--type-body-sm-size); }
.reply-quote { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.reply-quote dl { margin: 0; display: grid; gap: var(--space-1); }
.reply-quote dl div { display: flex; justify-content: space-between; gap: var(--space-4); }
.reply-quote dt { color: var(--ink-muted); }
.reply-quote dd { margin: 0; text-align: right; }
.reply-set { margin: var(--space-2) 0 0; color: var(--accent); font-weight: 500; }
.requests-actions { margin: var(--space-4) 0 0; }
.requests-empty { border-top: 1px solid var(--line); padding-top: var(--space-6); }

/* owner mode: the switch, the dashboard row and the inbox */
.owner-switch { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-12); }
.owner-switch + .store-edit { padding-top: var(--space-6); }
.owner-switch .ghost-btn[aria-pressed="true"] { background: var(--surface-raised); border-color: var(--ink); }
.store-inbox { padding-top: var(--space-6); padding-bottom: var(--space-12); }
.dash { padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.dash-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-4); }
.dash-head h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); margin: 0; }
.dash-head .sample-label { margin: 0; font-weight: 500; }
.dash-why { color: var(--ink-muted); margin: var(--space-1) 0 var(--space-4); max-width: var(--measure); }
.dash-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: var(--space-4) var(--space-12); align-items: start; }
.dash-stat { margin: 0; display: grid; }
.dash-num { font-size: var(--type-heading-size); line-height: var(--type-heading-line); font-weight: 400; font-variant-numeric: tabular-nums lining-nums; }
.dash-k { color: var(--ink-muted); margin: 0 0 var(--space-1); }
.bars { list-style: none; display: grid; gap: var(--space-1); }
.bar { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 3rem; gap: var(--space-3); align-items: center; }
.bar-track { display: block; height: 8px; background: var(--surface-raised); border-radius: var(--radius-pill); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent-fill); border-radius: var(--radius-pill); }
.bar-num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.inbox { margin-top: var(--space-8); }
.inbox h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); }
.inbox-list { list-style: none; }
.inbox-row {
  display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 6rem auto; gap: var(--space-2) var(--space-4); align-items: center;
  padding: var(--space-3) 0; border-top: 1px solid var(--line);
}
.inbox-who { font-weight: 500; }
.inbox-what { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); color: var(--ink-muted); }
.inbox-detail { margin-top: var(--space-6); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.inbox-detail h3 { margin-bottom: var(--space-2); }
.inbox-detail h3:focus:not(:focus-visible) { outline: none; }
.inbox-note { color: var(--ink-muted); }
.inbox-detail .save-status { margin-top: var(--space-3); }
@media (max-width: 47.99rem) {
  .quote-form .field-row { grid-template-columns: minmax(0, 1fr); }
  .quote-form label, .inbox-detail label, .unconfirmed, .compare-caveat { font-size: var(--type-body-size); }
  .requests-main { padding-top: var(--space-8); }
  .thread-head { flex-direction: column; gap: 0; }
  .dash { padding: var(--space-4); }
  .dash-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-bars { grid-column: 1 / -1; }
  .bar { grid-template-columns: 7rem minmax(0, 1fr) 2.5rem; }
  .inbox-row { grid-template-columns: minmax(0, 1fr) auto; }
  .inbox-who, .inbox-what { grid-column: 1 / -1; }
}

/* ---------- access-code page (Step 12) ---------- */
.gate-intro { padding: var(--space-12) 0 var(--space-6); }
.gate-card { max-width: 32rem; }
.gate-card label { display: block; font-size: var(--type-label-size); font-weight: 500; margin: 0 0 var(--space-1); }
.gate-card input {
  box-sizing: border-box; width: 100%; min-height: 44px; font-family: var(--font-sans); font-size: var(--type-body-size); color: var(--ink);
  background: var(--canvas); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
}
.gate-card input:focus-visible { border-color: var(--focus); }
.gate-card .button-primary { margin-top: var(--space-4); }
@media (max-width: 47.99rem) {
  .gate-card label, .gate-card .button-primary, body[data-page="gate"] .site-footer { font-size: var(--type-body-size); line-height: var(--type-body-line); }
  .gate-card .button-primary { min-height: 44px; }
}

/* ---------- phone width, other pages ---------- */
@media (max-width: 40rem) {
  .wrap { padding: 0 var(--space-4); }
  h1 { font-size: var(--type-heading-size); line-height: var(--type-heading-line); }
  h2 { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); }
}

/* ---------- the guided tour (Step 24): one callout card, the dim layer, the highlight ring ---------- */
/* The bar control: a compact pill like the menu button. */
.tour-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-3); margin-right: var(--space-1);
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: 500; white-space: nowrap; flex: none;
}
.tour-btn:hover { background: var(--surface-raised); }
/* The dim: a fixed layer over the viewport that lets every pointer through; the hole around the control is the only
   undimmed part (its shadow is the dim). */
/* 100vw/100dvh: a classic scrollbar is inside the covered area too. */
.tour-dim { position: fixed; inset: 0 auto auto 0; width: 100vw; height: 100dvh; z-index: var(--z-tour); pointer-events: none; opacity: 0.72; }
.tour-hole { position: fixed; left: 0; top: 0; border-radius: var(--radius-sm); box-shadow: 0 0 0 200vmax var(--canvas); pointer-events: none; }
[data-tour-target] { outline: 3px solid var(--accent); outline-offset: 3px; }
/* The card: the panel surface, line and shadow of the site; at most 24 rem wide beside its control. */
.tour-card {
  position: fixed; z-index: var(--z-tour); width: min(24rem, calc(100vw - 2rem)); margin: 0;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel); padding: var(--space-4) var(--space-6) var(--space-6);
  font-size: var(--type-body-size); line-height: var(--type-body-line);
}
.tour-card:focus:not(:focus-visible) { outline: none; }
.tour-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tour-callout { left: var(--space-4); top: var(--space-4); }
.tour-modal { left: 50%; top: 50%; translate: -50% -50%; width: min(30rem, calc(100vw - 2rem)); padding: var(--space-6); }
.tour-counter {
  margin: 0 0 var(--space-2); color: var(--ink-faint); font-size: var(--type-eyebrow-size); line-height: var(--type-eyebrow-line);
  font-weight: var(--type-eyebrow-weight); letter-spacing: var(--type-eyebrow-tracking); text-transform: uppercase;
}
.tour-title { font-size: var(--type-heading-sm-size); line-height: var(--type-heading-sm-line); font-weight: var(--type-heading-sm-weight); margin: 0 0 var(--space-2); }
.tour-text { margin: 0; color: var(--ink-muted); }
.tour-missing { margin: var(--space-3) 0 0; color: var(--ink); font-weight: 500; }
.tour-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }
.tour-confirm .tour-text { color: var(--ink); margin-top: var(--space-4); }
/* Motion: each card eases in as it is inserted, the dim fades in, and the highlight ring glides to the next target.
   Tokens only; the reduced-motion block at the top turns all of it off, and the tour's JS never waits for it. */
.tour-card { transition: opacity var(--nn-dur-ui) var(--nn-ease), transform var(--nn-dur-ui) var(--nn-ease); }
.tour-dim { transition: opacity var(--nn-dur-ui) var(--nn-ease); }
.tour-hole { transition: transform var(--nn-dur-reveal) var(--nn-ease); }
@starting-style {
  .tour-card { opacity: 0; transform: translateY(var(--space-2)); }
  .tour-dim { opacity: 0; }
}
@media (max-width: 47.99rem) {
  /* A sheet across the bottom; the page gains room below so any control can scroll above it. */
  .tour-card, .tour-callout, .tour-modal {
    left: 0; right: auto; top: auto; bottom: 0; translate: none; width: 100vw;
    border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom: 0;
    padding: var(--space-3) var(--space-4) max(var(--space-4), env(safe-area-inset-bottom));
  }
  .tour-title { font-size: var(--type-body-lg-size); line-height: var(--type-body-sm-line); margin-bottom: var(--space-1); }
  .tour-text { font-size: var(--type-body-sm-size); line-height: var(--type-body-sm-line); }
  .tour-actions { flex-wrap: nowrap; gap: var(--space-1); margin-top: var(--space-3); }
  .tour-actions .ghost-btn, .tour-actions .button-primary { padding: 11px 14px; }
  html.tour-sheet body { padding-bottom: 80dvh; }
  .tour-btn { min-height: 44px; padding: 0 var(--space-2); font-size: var(--type-data-size); }
}
