/* Concrete Delivery Planner v3.
   Brand from the client's card (Construction Industry Consulting): forest green ground, leaf green, amber accent.
   Theme lives in the chrome, the map and the markers. The working list is ink on white with hairlines.
   Safety orange = the selected route, the job-site cone and the selected plant. Nothing else. */

@font-face { font-family: "Overpass"; src: url(media/fonts/overpass-latin-wght-normal.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url(media/fonts/overpass-mono-latin-wght.woff2) format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap; }
:root {
  /* brand (the card) */
  --fence: #244D3D;        /* CIC forest, reserved for chrome and principal actions */
  --fence-dark: #173F30;
  --fence-hi: #32604C;
  --leaf: #3F9550;         /* the card's mid green: truck routes, the swoosh */
  --amber: #F2B12E;        /* the card's accent: the mark, the swoosh, the drum stripe */
  --fence-wash: rgba(30, 74, 47, 0.08);
  --fence-wash-2: rgba(30, 74, 47, 0.14);
  --fence-glow: rgba(30, 74, 47, 0.22);
  --on-fence: #F4F6F1;
  --on-fence-2: #C4D6C9;

  /* signals */
  --orange: #F2B12E;      /* the route, the job site, the selected plant: nothing else */
  --yellow: #F5D31F;       /* clearance plates: a cooler sign yellow than the brand amber */
  --warn: #8C2A12;         /* "Needs review": brick, not orange */

  /* ground (v4 atlas, 11-12 night: green-tinted neutrals so the page and the map read as one sheet) */
  --page: #F2F4F0;
  --page-2: #EAF0E9;
  --panel: #FCFDFB;
  --ink: #233A32;
  --ink-2: #596A60;
  --ink-3: #69766D;
  --rule: #D0D8CF;
  --line: rgba(23, 37, 29, 0.09);   /* hairlines between rows */
  --line-2: rgba(23, 37, 29, 0.15); /* hairlines that separate sections */
  --ctl-edge: #8D978F;              /* boxed controls, 3.2:1 on white */
  --ctl-edge-hi: #6F7B73;
  --hover: #F3F6F2;
  --sel: #E3ECE2;          /* the selected row / plant */
  --water: #C0D1C8;
  --float: 0 0 0 1px rgba(23, 37, 29, 0.06), 0 8px 28px rgba(23, 37, 29, 0.14);  /* panels over the map only */

  --sans: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --mono: "Overpass Mono", ui-monospace, Menlo, Consolas, monospace;
  --display: "Overpass", "Arial Narrow", sans-serif;

  /* space: 4-base */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --gut: 24px;             /* the list's side gutter */

  /* radii */
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-md: 10px; --r-lg: 12px;

  /* control heights */
  --h-sm: 32px; --h-md: 36px; --h-lg: 44px;

  /* elevation: one light straight above, ink-tinted, the ring is the border */
  --e1: 0 0 0 1px rgba(22, 24, 26, 0.08), 0 1px 2px rgba(22, 24, 26, 0.05);
  --e2: 0 0 0 1px rgba(22, 24, 26, 0.08), 0 1px 2px rgba(22, 24, 26, 0.06), 0 4px 12px -4px rgba(22, 24, 26, 0.14);
  --e3: 0 0 0 1px rgba(22, 24, 26, 0.08), 0 2px 4px -1px rgba(22, 24, 26, 0.08), 0 14px 32px -10px rgba(22, 24, 26, 0.26);

  /* motion */
  --ease: cubic-bezier(.25, 1, .5, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  --t1: 120ms; --t2: 200ms; --t3: 320ms;

  --bar: 56px;
  --side: 384px;
  --ticket: 420px;
  --inset: 16px;           /* floating panels sit this far in from the map's edges */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 500 16px/1.45 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(22, 24, 26, 0.35); transition: color var(--t1) var(--ease), text-decoration-color var(--t1) var(--ease); }
a:hover { color: var(--fence); text-decoration-color: currentColor; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--fence); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.ic { display: block; flex: none; width: 16px; height: 16px; }

/* ---------- scrollbars: a thin concrete sliver, darker when you reach for it ----------
   WebKit/Blink draw the pill. Firefox gets scrollbar-width/color only where ::-webkit-scrollbar is unsupported:
   Chrome 121+ lets scrollbar-color override the pseudo-elements, which would flatten the pill. */
*::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  border: 3px solid transparent; border-radius: 999px; background-clip: padding-box;
  background-color: rgba(22, 24, 26, 0.20);
}
*::-webkit-scrollbar-thumb:hover { border-width: 2px; background-color: rgba(22, 24, 26, 0.38); }
*::-webkit-scrollbar-thumb:active { border-width: 2px; background-color: var(--fence); }
*::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
html::-webkit-scrollbar { width: 12px; }
html::-webkit-scrollbar-thumb { border-width: 3px; background-color: rgba(22, 24, 26, 0.24); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(22, 24, 26, 0.26) transparent; }
}

/* ---------- the bar: the card's green, the C/C lockup, the sweep at the right end ---------- */
.bar {
  position: relative; z-index: 30; isolation: isolate;
  height: var(--bar); display: flex; align-items: center; gap: var(--s6);
  padding: 0 var(--s5); background: var(--fence); color: var(--on-fence);
  box-shadow: 0 1px 0 var(--fence-dark);
}
.brand {
  display: flex; align-items: center; gap: var(--s3); min-width: 0; height: 100%;
  color: var(--on-fence); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: #fff; }
.brand-mark { display: block; width: 52px; height: auto; flex: none; }
.brand-co { font: 600 19px/1 var(--display); letter-spacing: 0.005em; padding-bottom: 1px; }
.brand-tool {
  display: flex; align-items: center; gap: var(--s3);
  font: 500 15px/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--on-fence-2);
  padding-bottom: 1px;
}
.brand-tool::before { content: ""; width: 1px; height: 22px; background: rgba(244, 246, 241, 0.24); }
.brand:hover .brand-tool { color: var(--on-fence); }
.bar :focus-visible { outline-color: var(--on-fence); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  display: flex; align-items: center; height: var(--h-md); padding: 1px 14px 0; border-radius: var(--r);
  font-weight: 700; font-size: 15px; text-decoration: none; color: var(--on-fence-2);
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease);
}
.nav a:hover { color: #fff; background: rgba(244, 246, 241, 0.08); }
.nav a[aria-current="page"] { color: #fff; background: rgba(244, 246, 241, 0.14); }
.menu { display: none; }

/* Shared mineral-paper app chrome. */
.appbar { background:var(--panel); color:var(--ink); box-shadow:0 1px 0 var(--rule); gap:24px; }
.appbar::before,.appbar::after { display:none; }
.appbar .brand,.appbar .brand:hover { color:var(--fence); }
.appbar .brand-mark { width:44px; }
.appbar .brand-co { display:none; }
.appbar .brand-tool { color:var(--ink); font:700 19px/1 var(--sans); text-transform:none; letter-spacing:-.025em; }
.appbar .brand-tool::before { display:none; }
.appbar .nav { margin-left:auto; }
.appbar .nav a { color:var(--ink-2); border-radius:5px; height:40px; }
.appbar .nav a:hover { background:var(--page-2); color:var(--fence); }
.appbar .nav a[aria-current="page"] { color:var(--fence); background:var(--page-2); }
.appbar :focus-visible { outline-color:var(--fence); }
@media(max-width:860px) {
  .appbar { --bar:48px; height:48px; padding:0 16px; }
  .appbar .brand-mark { width:36px; }
  .appbar .brand-tool { display:block; font-size:16px; }
  .appbar .menu { border:0; color:var(--fence); background:var(--page-2); min-height:44px; }
  .appbar .nav { color:var(--ink); background:var(--panel); border:1px solid var(--rule); }
}

/* ---------- Call: one tap, quiet until you reach for it ---------- */
.call {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none;
  height: var(--h-md); padding: 1px 11px 0 9px; border-radius: var(--r);
  background: var(--fence-wash); color: var(--fence); text-decoration: none; white-space: nowrap;
  font: 600 13.5px/1 var(--mono); letter-spacing: -0.03em;
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease), box-shadow var(--t1) var(--ease);
}
.call .ic-phone { width: 14px; height: 14px; margin-top: -1px; }
.call:hover { background: var(--fence); color: var(--on-fence); }
.call:active { background: var(--fence-dark); color: var(--on-fence); }
.call-none { background: none; color: var(--ink-3); font: 600 13px/1 var(--sans); padding: 0 4px; }
.call-none:hover { background: none; color: var(--ink-3); }
.call-wide {
  width: 100%; height: var(--h-lg); gap: 10px; font-size: 16px; border-radius: var(--r);
  background: var(--fence); color: var(--on-fence);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 1px 2px rgba(22, 24, 26, 0.18);
}
.call-wide .ic-phone { width: 16px; height: 16px; }
.call-wide:hover { background: var(--fence-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px -4px rgba(30, 74, 47, 0.5); }

/* =================== FIND =================== */
/* v4 atlas: the map fills the whole workspace; the search/results panel and the ticket float over its left edge.
   The search box never moves between the empty state and results. */
.page-find { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.find { flex: 1; min-height: 0; position: relative; }
.side {
  position: absolute; z-index: 3; left: var(--inset); top: var(--inset); width: var(--side); max-height: calc(100% - 2 * var(--inset));
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--float); overflow: hidden;
}
.has-site .side { bottom: var(--inset); }
.controls { position: relative; z-index: 5; padding: var(--s5) var(--gut) var(--s3); }

/* ---------- the picker: a custom select (common.js RM.picker) ---------- */
.picker { position: relative; }
.picker-btn {
  display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 60px; padding: 9px 14px 8px 16px;
  border-radius: var(--r-md); background: var(--panel); cursor: pointer; user-select: none;
  box-shadow: inset 0 0 0 1px var(--ctl-edge), 0 1px 2px rgba(22, 24, 26, 0.06);
  transition: box-shadow var(--t2) var(--ease), background-color var(--t2) var(--ease);
}
.picker-btn:hover { box-shadow: inset 0 0 0 1px var(--ctl-edge-hi), 0 1px 2px rgba(22, 24, 26, 0.08); }
.picker-btn:focus-visible { outline: none; }
.picker-btn:focus-visible, .picker.is-open .picker-btn { box-shadow: inset 0 0 0 1.5px var(--fence), 0 0 0 4px var(--fence-glow); }
.picker-v { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.picker-name { font: 800 19px/1.15 var(--sans); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.15em; }
.picker-sub { font-size: 13.5px; line-height: 1.2; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn .ic-chev { width: 18px; height: 18px; color: var(--ink-2); transition: transform var(--t2) var(--out), color var(--t2) var(--ease); }
.picker.is-open .picker-btn .ic-chev { transform: rotate(180deg); color: var(--fence); }

.picker-pop {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px);
  border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--e3); overflow: hidden;
  opacity: 0; transform: translateY(-4px) scale(.985); transform-origin: top center;
  transition: opacity var(--t1) var(--ease), transform var(--t2) var(--out);
}
.picker-pop.is-in { opacity: 1; transform: none; transition: opacity var(--t2) var(--ease), transform var(--t3) var(--out); }
.picker-pop[hidden] { display: none; }
.picker-list { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; outline: none; }
.opt-group { padding: 10px 10px 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); cursor: default; user-select: none; }
.opt {
  display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 7px 10px 6px 12px; border-radius: var(--r);
  cursor: pointer; user-select: none; color: var(--ink);
}
.opt + .opt { margin-top: 1px; }
.opt.is-active { background: var(--page-2); }
.opt-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.opt-name { font-size: 15.5px; font-weight: 700; line-height: 1.2; }
.opt-sub { font-size: 13px; line-height: 1.25; color: var(--ink-3); }
.opt .ic-check { width: 16px; height: 16px; color: var(--fence); opacity: 0; }
.opt[aria-selected="true"] .opt-name { font-weight: 800; }
.opt[aria-selected="true"] .ic-check { opacity: 1; }

/* ---------- the address box: the picker's trigger with a text field in it (common.js RM.addressBox) ---------- */
.search-box { cursor: text; user-select: auto; padding-right: 10px; }
.search-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--fence), 0 0 0 4px var(--fence-glow); }
.search-box .ic-search { flex: none; width: 18px; height: 18px; color: var(--ink-2); }
.search-box:focus-within .ic-search { color: var(--fence); }
.search-input {
  flex: 1; min-width: 0; height: 40px; margin: 0; padding: 2px 0 0; border: 0; outline: none; background: transparent;
  font: 800 19px/1.15 var(--sans); letter-spacing: -0.01em; color: var(--ink); text-overflow: ellipsis;
}
.search-input::placeholder { color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.search-clear {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r);
  background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color var(--t1) var(--ease);
}
.search-clear:hover { background: var(--page-2); color: var(--ink); }
.search-clear[hidden] { display: none; }
.search-clear .ic-close { width: 16px; height: 16px; }
.search-msg { margin: var(--s2) 0 0 2px; font-size: 14px; font-weight: 700; color: var(--warn); }
.search-msg[hidden] { display: none; }
.scroll .rows { transition: opacity var(--t2) var(--ease); }
.scroll.is-loading .rows, .scroll.is-loading .rows-unconfirmed { opacity: 0.4; }

/* ---------- the summary row: haul budget left, the count right ---------- */
.summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); }
.budget-line {
  display: inline-flex; align-items: baseline; gap: 6px; min-height: var(--h-md); padding: 7px 10px 5px; margin-left: -10px;
  background: none; border: 0; border-radius: var(--r); cursor: pointer; font-size: 16px; font-weight: 600; color: var(--ink);
  transition: background-color var(--t1) var(--ease);
}
.budget-line:hover { background: var(--hover); }
.budget-line .n { font: 700 20px/1 var(--mono); letter-spacing: -0.02em; }
.budget-line .edit {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; align-self: center;
  color: var(--fence); font-weight: 800; font-size: 14.5px;
}
.budget-line .edit .ic-chev { width: 14px; height: 14px; margin-top: -2px; transition: transform var(--t2) var(--out); }
.budget-line[aria-expanded="true"] { background: var(--page-2); }
.budget-line[aria-expanded="true"] .edit .ic-chev { transform: rotate(180deg); }
.count { margin: 0; min-height: 24px; font-size: 14.5px; color: var(--ink-2); display: flex; align-items: center; white-space: nowrap; }
.count strong { color: var(--ink); font-weight: 800; margin-right: 5px; }
.drum { animation: turn 1.6s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

.budget-edit {
  margin-top: var(--s2); padding: 14px var(--s4) var(--s3); border-radius: var(--r-md); background: var(--page-2);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: drop var(--t3) var(--out) both;
}
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sum { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; }
.sum label, .traffic { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.sum label span { display: block; margin: 0 0 5px 2px; }
.budget-edit input {
  width: 62px; height: var(--h-md); padding: 2px 9px 0; text-align: right;
  font: 700 17px/1 var(--mono); color: var(--ink); background: var(--panel);
  border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--ctl-edge), inset 0 1px 2px rgba(22, 24, 26, 0.05);
  transition: box-shadow var(--t2) var(--ease);
  -moz-appearance: textfield; appearance: textfield;
}
.budget-edit input::-webkit-inner-spin-button, .budget-edit input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.budget-edit input:hover { box-shadow: inset 0 0 0 1px var(--ctl-edge-hi), inset 0 1px 2px rgba(22, 24, 26, 0.05); }
.budget-edit input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--fence), 0 0 0 3px var(--fence-glow); }
.op { width: 14px; height: var(--h-md); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink-3); }
.eq { height: var(--h-md); display: flex; align-items: center; padding: 2px 2px 0 4px; font: 800 22px/1 var(--mono); letter-spacing: -0.03em; }
.eq.is-bad { color: var(--warn); }
.traffic { display: flex; align-items: center; gap: 6px; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.traffic > span:first-child { margin: 0 6px 0 2px; }
.traffic .plus { font: 700 17px/1 var(--mono); color: var(--ink-2); }
.traffic > span:last-child { font: 700 15px/1 var(--mono); color: var(--ink-2); }
.hint { margin: var(--s2) 0 0 2px; font-size: 12.5px; color: var(--ink-3); }

.viewswitch { display: none; }

/* ---------- the list ---------- */
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-top: 1px solid var(--line-2); }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2);
  padding-right: calc(var(--gut) - 10px);
  transition: background-color var(--t1) var(--ease);
}
.row::after { content: ""; position: absolute; left: var(--gut); right: calc(var(--gut) - 10px); bottom: 0; height: 1px; background: var(--line); pointer-events: none; }
.row:hover { background: var(--hover); }
.row .hit {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; align-items: center;
  width: 100%; min-height: 76px; padding: 12px 0 12px calc(var(--gut) - 8px); text-align: left;
  background: none; border: 0; cursor: pointer; text-decoration: none; color: inherit;
}
.row .hit:focus-visible { outline-offset: -2px; border-radius: var(--r); }
.min { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
.min .n { font: 600 32px/1 var(--mono); letter-spacing: -0.05em; }
.min .u { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.who { display: flex; flex-direction: column; min-width: 0; }
.name { font-weight: 700; font-size: 18px; line-height: 1.22; letter-spacing: -0.005em; }
.meta { font-size: 14px; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.sep { margin: 0 6px; color: rgba(23, 37, 29, 0.32); }
.review { font-size: 13px; font-weight: 800; color: var(--warn); margin-top: 3px; line-height: 1.3; }
.row.is-sel { background: var(--sel); }
.row.is-sel::after { display: none; }
.row.is-sel .min .n { color: var(--fence); }
.row.is-over .min .n { color: var(--ink-2); }
.row.is-over .name, .row.is-over .meta { color: var(--ink-2); }
.row.is-over .call { background: rgba(23, 37, 29, 0.05); color: var(--ink-2); }
.row.is-over .call:hover { background: var(--fence); color: var(--on-fence); }
.cut {
  display: flex; align-items: center; gap: var(--s3); padding: 22px var(--gut) 10px;
  font-size: 13px; font-weight: 800; color: var(--ink);
}
.cut span { flex: none; }
.cut::after {
  content: ""; flex: 1; height: 8px; border-radius: 2px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 5px, transparent 5px 10px);
  opacity: 0.85;
}
.group { padding: 28px var(--gut) 8px; font-size: 13px; font-weight: 800; color: var(--ink-2); list-style: none; }
.row.is-unc .min .n { color: var(--ink-3); }
.empty { padding: var(--gut); color: var(--ink-2); }
/* the illustration: the empty state's picture, beneath the search; gone once there are results */
.art-foot {
  display: block; width: calc(100% - 2 * var(--gut)); height: auto; aspect-ratio: 2 / 1; object-fit: cover;
  margin: var(--s2) var(--gut) var(--s5); border-radius: var(--r-sm); background: var(--page-2);
}
.has-site .art-foot { display: none; }
.page-find:not(.has-site) .scroll { border-top: 0; }
.side-foot { padding: 12px var(--gut) 14px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.side-foot p { margin: 0; }
.side-foot .credit { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ---------- the delivery ticket ---------- */
.ticket {
  position: absolute; z-index: 2; left: calc(2 * var(--inset) + var(--side) - 4px); top: var(--inset); bottom: var(--inset);
  width: var(--ticket); min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--float); padding-bottom: var(--s6);
  animation: slide var(--t3) var(--out) both;
}
@keyframes slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.ticket[hidden] { display: none; }
.t-head { position: relative; padding: var(--s5) var(--s5) var(--s4); }
.t-min { margin: 0; display: flex; align-items: baseline; gap: 6px; font: 600 14px/1 var(--mono); color: var(--ink-3); }
.t-min .n { font-size: 44px; font-weight: 650; color: var(--ink); letter-spacing: -0.05em; }
.t-head h2 { margin: var(--s3) 44px 0 0; font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.t-town { margin: 3px 0 0; color: var(--ink-2); font-size: 15px; }
.close {
  position: absolute; top: var(--s4); right: var(--s4); width: var(--h-md); height: var(--h-md);
  display: grid; place-items: center; border: 0; border-radius: var(--r); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease);
}
.close .ic { width: 18px; height: 18px; }
.close:hover { background: var(--page-2); color: var(--ink); }
.close:active { background: var(--page); }
.t-review { margin: -4px var(--s5) var(--s4); font-size: 13.5px; font-weight: 800; color: var(--warn); }
.t-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); padding: 0 var(--s5) var(--s5); }
.web { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14.5px; }
.web .ic-out { width: 13px; height: 13px; color: var(--ink-3); }
.web:hover .ic-out { color: currentColor; }
.aerial { position: relative; margin: 0 var(--s5); border-radius: var(--r-md); overflow: hidden; background: #2C302C; box-shadow: 0 0 0 1px var(--line-2); }
.aerial img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.aerial::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: var(--orange); box-shadow: 0 0 0 2px #fff, 0 1px 4px 2px rgba(0, 0, 0, 0.25); pointer-events: none;
}
.aerial figcaption {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 7px 2px; border-radius: var(--r-xs);
  font-size: 11px; font-weight: 600; color: #fff; background: rgba(22, 24, 26, 0.55);
}
.kv { display: grid; grid-template-columns: 88px minmax(0, 1fr); margin: var(--s4) var(--s5) 0; }
.kv dt, .kv dd { margin: 0; padding: 10px 0 9px; border-top: 1px solid var(--line); }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.kv dt { font-size: 13px; color: var(--ink-3); font-weight: 700; padding-top: 12px; }
.kv dd { font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.check { margin: var(--s3) var(--s5) 0; border-top: 1px solid var(--line-2); }
.check summary {
  display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin: 0 -8px; padding: 0 8px;
  border-radius: var(--r); font-weight: 800; font-size: 15px; cursor: pointer; list-style: none;
  transition: background-color var(--t1) var(--ease);
}
.check summary:hover { background: var(--hover); }
.check summary::-webkit-details-marker { display: none; }
.check summary .ic-chev { width: 18px; height: 18px; color: var(--ink-2); transition: transform var(--t2) var(--out); }
.check[open] summary .ic-chev { transform: rotate(180deg); }
.check[open] > :not(summary) { animation: drop var(--t3) var(--out) both; }
.check .kv { margin: 0; grid-template-columns: 96px minmax(0, 1fr); }
.check .kv dt:first-of-type, .check .kv dt:first-of-type + dd { border-top: 1px solid var(--line); }
.why { margin: 0 0 var(--s3); font-size: 13.5px; color: var(--ink-2); }
.plates { list-style: none; margin: 0; padding: 0; }
.plates li { display: flex; align-items: center; gap: var(--s2); padding: 3px 0; font-size: 14px; }
.plate {
  flex: none; font: 700 12px/1 var(--mono); padding: 4px 6px 2px; border: 1.5px solid var(--ink); border-radius: 2px;
  background: var(--panel); white-space: nowrap;
}
.plate-h { background: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--yellow), inset 0 0 0 2.3px var(--ink); padding: 5px 7px 3px; }
.t-more { margin: var(--s4) var(--s5) 0; font-weight: 700; font-size: 14.5px; }
.t-more a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--fence); }
.t-more .ic-arrow { width: 14px; height: 14px; transition: transform var(--t2) var(--out); }
.t-more a:hover .ic-arrow { transform: translateX(3px); }

/* ---------- the map ---------- */
.mapwrap { position: absolute; inset: 0; z-index: 1; min-width: 0; background: var(--water); }
.map { position: absolute; inset: 0; }
.layerbar {
  position: absolute; left: calc(2 * var(--inset) + var(--side) - 4px); bottom: var(--inset); z-index: 2; display: flex; gap: 2px; padding: 4px;
  background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--float);
  transition: left var(--t3) var(--out);
}
.has-ticket .layerbar { left: calc(3 * var(--inset) + var(--side) + var(--ticket) - 8px); }
.lyr {
  display: flex; align-items: center; gap: var(--s2); height: var(--h-sm); padding: 1px 12px 0 10px;
  background: transparent; border: 0; border-radius: var(--r);
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease);
}
.lyr:hover { background: var(--page-2); color: var(--ink); }
.lyr[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lyr:focus-visible { outline-offset: 0; }
.sw { flex: none; display: inline-block; width: 20px; height: 12px; margin-top: -1px; border-radius: 2px; background-color: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.sw-truck { background-image: linear-gradient(var(--leaf), var(--leaf)); background-size: 100% 4px; background-position: center; background-repeat: no-repeat; }
.sw-parkways { background-image: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 7px); background-size: 100% 2px; background-position: center; background-repeat: no-repeat; }
.sw-bridges { box-shadow: none; border-radius: 0; background: url(media/art/clearance.svg) center / 100% 100% no-repeat; }
.sw-zones { box-shadow: none; border: 1.5px dashed var(--ink); }
.lyr[aria-pressed="true"] .sw { box-shadow: none; }
.layers-btn, .strip { display: none; }
.strip[hidden] { display: none !important; }
.map-msg {
  position: absolute; left: 50%; top: 40%; transform: translateX(-50%); margin: 0; padding: var(--s3) var(--s4);
  background: var(--panel); border-radius: var(--r-md); box-shadow: var(--e3); max-width: 320px; font-size: 14px;
}
.cone { display: block; width: 30px; height: 40px; filter: drop-shadow(0 1px 1px rgba(22, 24, 26, 0.35)); pointer-events: none; }
.maplibregl-ctrl-bottom-right { padding: 0 var(--s2) var(--s2) 0; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0 var(--s2) var(--s2) 0; }
.maplibregl-ctrl-group:not(:empty) {
  border-radius: var(--r-md) !important; overflow: hidden; background: var(--panel) !important; box-shadow: var(--e3) !important;
}
.maplibregl-ctrl-group button { width: 36px !important; height: 36px !important; transition: background-color var(--t1) var(--ease); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--page-2) !important; }
.maplibregl-ctrl-group button:focus-visible { box-shadow: inset 0 0 0 2px var(--fence) !important; }
.maplibregl-ctrl-attrib { font: 500 11px/1.4 var(--sans); color: var(--ink-2); }
.maplibregl-ctrl-attrib a { color: var(--ink-2); }
.maplibregl-ctrl.maplibregl-ctrl-attrib.maplibregl-compact {
  min-height: 28px; border-radius: 14px; background: rgba(255, 255, 255, 0.92) !important; box-shadow: var(--e2);
}
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button { width: 28px; height: 28px; top: 0; right: 0; border-radius: 14px; background-color: transparent; }
.maplibregl-ctrl-attrib.maplibregl-compact-show { padding: 5px 34px 4px 12px; }
.tip .maplibregl-popup-content { padding: 6px 10px 4px; border-radius: var(--r); font: 700 13px/1.3 var(--sans); box-shadow: var(--e3); }
.tip .maplibregl-popup-tip { display: none; }

@media (max-width: 1600px) {
  :root { --side: 460px; --ticket: 380px; }
}
@media (max-width: 1280px) {
  .brand-co { display: none; }
  :root { --side: 420px; --ticket: 360px; --inset: 12px; }
}
@media (max-width: 1100px) and (min-width: 861px) {
  .has-ticket .layerbar { display: none; }
}

/* =================== content pages =================== */
.band { background: var(--page); padding: var(--s5) var(--s6) 0; }
.band img { display: block; width: 100%; max-width: 1200px; height: auto; margin: 0 auto; }
.page { max-width: 1440px; margin: 0 auto; padding: var(--s6) var(--s6) var(--s7); }
.page h1 { margin: 0; font: 600 40px/1.05 var(--display); letter-spacing: 0; }
.page h2 { margin: var(--s7) 0 var(--s3); font-size: 19px; line-height: 1.2; font-weight: 800; letter-spacing: -0.005em; }
.line { margin: var(--s2) 0 0; font-size: 15.5px; font-weight: 700; color: var(--ink-2); }
.page-foot { margin-top: var(--s7); padding-top: var(--s3); border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3); }
.page-foot p { margin: 0 0 2px; }

/* ---------- plants ---------- */
.dir-layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: var(--s7); align-items: start; }
.dir-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.dir-head .n { font: 600 17px/1 var(--mono); color: var(--ink-3); }
.filter-box { position: relative; max-width: 420px; margin-top: var(--s5); }
.filter-box .ic-search { position: absolute; left: 14px; top: 50%; margin-top: -8px; color: var(--ink-3); pointer-events: none; transition: color var(--t2) var(--ease); }
.filter-box:focus-within .ic-search { color: var(--fence); }
.filter {
  width: 100%; height: var(--h-lg); padding: 2px 14px 0 40px;
  font-size: 16px; font-weight: 600; background: var(--panel); border: 0; border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--ctl-edge), 0 1px 2px rgba(22, 24, 26, 0.05);
  transition: box-shadow var(--t2) var(--ease);
}
.filter:hover { box-shadow: inset 0 0 0 1px var(--ctl-edge-hi), 0 1px 2px rgba(22, 24, 26, 0.06); }
.filter:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--fence), 0 0 0 4px var(--fence-glow); }
.filter::placeholder { color: var(--ink-3); font-weight: 500; }
.filter::-webkit-search-cancel-button { cursor: pointer; }
.dir-group h2 { display: flex; align-items: baseline; gap: var(--s3); margin-top: var(--s6); padding-bottom: var(--s2); border-bottom: 1px solid var(--ink); }
.dir-group h2 span { font: 600 14px/1 var(--mono); color: var(--ink-3); }
.dir-list { list-style: none; margin: 0; padding: 0; }
.dir-list li { border-bottom: 1px solid var(--line); }
.dir-list a {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 150px 110px; gap: var(--s4); align-items: baseline;
  padding: 12px var(--s3) 11px var(--s5); text-decoration: none; color: inherit;
  transition: background-color var(--t1) var(--ease);
}
.dir-list a:hover { background: rgba(255, 255, 255, 0.7); color: inherit; }
.dir-list a:focus-visible { outline-offset: -2px; border-radius: var(--r-sm); }
.dir-list a[aria-current="true"] { background: var(--panel); }
.dir-list a[aria-current="true"]::before { content: ""; position: absolute; left: 8px; top: 19px; width: 8px; height: 8px; background: var(--orange); }
.d-name { font-weight: 800; }
.d-town { color: var(--ink-2); }
.d-phone { font: 600 14.5px/1 var(--mono); letter-spacing: -0.02em; }
.d-state { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-align: right; }
.d-state.is-unc { color: var(--warn); }

.detail {
  position: sticky; top: var(--s5); max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--e2); padding-bottom: var(--s5);
}
.detail .t-head h2 { margin-top: 0; font-size: 25px; }
.detail-empty { padding: var(--s5); }
.detail-empty p { margin: 0; color: var(--ink-2); }
.flags { margin: var(--s2) var(--s5) 0; padding: 0; list-style: none; }
.flags li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.flags li:first-child { border-top: 0; }
.sec { margin: var(--s5) var(--s5) 0; font-size: 14.5px; font-weight: 800; padding-top: var(--s4); border-top: 1px solid var(--line-2); }

/* ---------- zones ---------- */
.zones-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.zone-list { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.zone-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); padding: 12px 0; border-top: 1px solid var(--line-2); }
.zone-list .zn { font: 600 30px/1 var(--display); }
.zone-list .zl { font-size: 15px; line-height: 1.4; padding-top: 4px; }
.zones-map { position: relative; height: calc(100vh - var(--bar) - 160px - 64px); min-height: 560px; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--e2); }
.zones-map .map { position: absolute; inset: 0; }

/* ---------- sources ---------- */
.src {
  width: 100%; margin-top: var(--s5); border-collapse: separate; border-spacing: 0;
  background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--e1); overflow: hidden;
}
.src th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 700; padding: 14px var(--s4) 10px; border-bottom: 1px solid var(--line-2); background: var(--page-2); }
.src td { padding: 12px var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14.5px; line-height: 1.45; }
.src tr:last-child td { border-bottom: 0; }
.src tbody tr { transition: background-color var(--t1) var(--ease); }
.src tbody tr:hover { background: var(--hover); }
.src td:first-child { font-weight: 800; width: 24%; }
.src td.date { font: 600 13.5px/1.45 var(--mono); white-space: nowrap; }
.src td.conf { width: 26%; }
.src .no { color: var(--warn); font-weight: 800; }
.src .yes { font-weight: 800; }
.assume { margin: 0; padding: 0; list-style: none; max-width: 72ch; }
.assume li { padding: 10px 0; border-top: 1px solid var(--line-2); line-height: 1.5; }
.soft { color: var(--ink-2); font-size: 14px; max-width: 80ch; }

/* =================== phone =================== */
@media (max-width: 860px) {
  :root { --bar: 56px; --gut: 16px; }
  .bar { padding: 0 var(--s2) 0 var(--s4); gap: 0; justify-content: space-between; }
  .brand { gap: 10px; }
  .brand-mark { width: 46px; }
  .brand-co { display: none; }
  .brand-tool { font-size: 15px; color: var(--on-fence); letter-spacing: 0.04em; }
  .brand-tool::before { display: none; }
  .menu {
    display: flex; align-items: center; height: 40px; padding: 2px var(--s4) 0; margin: 0; border-radius: var(--r);
    background: rgba(244, 246, 241, 0.10); color: #fff; border: 0; font-weight: 800; font-size: 15px; cursor: pointer;
  }
  .menu[aria-expanded="true"] { background: rgba(244, 246, 241, 0.2); }
  .nav {
    display: none; position: absolute; top: calc(var(--bar) + 6px); left: var(--s2); right: var(--s2); flex-direction: column; align-items: stretch; gap: 2px;
    padding: 6px; background: var(--fence); border-radius: var(--r-lg);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 14px 32px -10px rgba(22, 24, 26, 0.45);
  }
  .nav.is-open { display: flex; animation: drop var(--t3) var(--out) both; }
  .nav a { height: 48px; padding: 2px var(--s4) 0; }

  .page-find { height: auto; overflow: visible; display: block; }
  .find { display: block; }
  .side { position: static; width: auto; max-height: none; border-radius: 0; box-shadow: none; overflow: visible; }
  .mapwrap { position: relative; inset: auto; }
  /* empty state: search, budget, the picture, then a small live map; List | Map only once there are results */
  .page-find:not(.has-site) .viewswitch { display: none; }
  .page-find:not(.has-site) .mapwrap { display: block; height: 260px; margin: 0 var(--gut) var(--s5); border-radius: var(--r-lg); overflow: hidden; }
  .page-find:not(.has-site) .side-foot { border-top: 0; }
  .art-foot { margin-bottom: var(--s4); }
  .has-ticket .layerbar { left: var(--s3); }
  .controls { padding: var(--s3) var(--gut) var(--s3); }
  .picker-btn { min-height: 58px; }
  .picker-name, .search-input { font-size: 18px; }
  .opt { min-height: 56px; }
  .summary { margin-top: var(--s2); }
  .viewswitch {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: var(--s2); padding: 3px;
    background: var(--page); border-radius: var(--r-md);
  }
  .viewswitch button {
    display: flex; align-items: center; justify-content: center; gap: var(--s2); height: 40px; padding-top: 2px;
    border: 0; border-radius: var(--r); background: transparent; font-weight: 800; font-size: 15px; color: var(--ink-2); cursor: pointer;
    transition: background-color var(--t2) var(--ease), color var(--t2) var(--ease), box-shadow var(--t2) var(--ease);
  }
  .viewswitch button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--e1); }
  .viewswitch img { display: block; }
  .scroll { overflow: visible; border-top: 1px solid var(--line-2); }
  .row { padding-right: var(--gut); gap: var(--s3); }
  .row::after { right: var(--gut); }
  .row .hit { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; min-height: 76px; padding: 12px 0 12px calc(var(--gut) - 6px); }
  .min .n { font-size: 27px; }
  .name { font-size: 17px; }
  .call { width: 44px; height: 44px; padding: 0; border-radius: var(--r-md); }
  .call .ic-phone { width: 18px; height: 18px; margin: 0; }
  .call .call-n { display: none; }
  .call-wide { width: 100%; height: 48px; padding: 0 16px; gap: 10px; }
  .call-wide .call-n { display: inline; }
  .side-foot { padding: var(--s3) var(--gut) var(--s5); }
  .mapwrap { display: none; }
  .ticket { display: none; }

  body[data-view="map"] { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body[data-view="map"] .find { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body[data-view="map"] .side { flex: none; }
  body[data-view="map"] .scroll, body[data-view="map"] .side-foot { display: none; }
  body[data-view="map"] .controls { padding-bottom: var(--s2); }
  body[data-view="map"] .mapwrap { display: block; flex: 1; min-height: 0; }
  .layers-btn {
    display: flex; align-items: center; gap: var(--s2); position: absolute; top: var(--s3); left: var(--s3); z-index: 3; height: 40px; padding: 2px 14px 0 12px;
    border: 0; border-radius: var(--r-md); background: var(--panel); color: var(--ink); box-shadow: var(--e3);
    font-weight: 800; font-size: 14px; cursor: pointer;
  }
  .layers-btn .ic { margin-top: -2px; }
  .layers-btn[aria-expanded="true"] { background: var(--ink); color: #fff; }
  .layerbar { display: none; top: 60px; bottom: auto; left: var(--s3); flex-direction: column; align-items: stretch; }
  .layerbar.is-open { display: flex; animation: drop var(--t3) var(--out) both; }
  .lyr { height: 44px; font-size: 14.5px; }
  .strip {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2);
    position: absolute; left: var(--s2); right: var(--s2); bottom: 58px; z-index: 3; padding-right: 10px;
    background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--e3);
    animation: rise var(--t3) var(--out) both;
  }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .strip-hit { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0 12px 12px; background: none; border: 0; text-align: left; cursor: pointer; border-radius: var(--r-lg); }
  .maplibregl-ctrl-group { display: none; }

  body.ticket-open { overflow: hidden; }
  body.ticket-open .ticket:not([hidden]) {
    display: block; position: fixed; top: var(--bar); left: 0; right: 0; bottom: 0; z-index: 25; width: auto; box-shadow: none; border-radius: 0;
  }
  .t-head, .t-actions { padding-left: var(--gut); padding-right: var(--gut); }
  .aerial, .kv, .check, .t-more, .t-review, .sec, .flags { margin-left: var(--gut); margin-right: var(--gut); }
    .detail-empty { padding: var(--gut); }
  .aerial img { aspect-ratio: 4 / 3; }

  .band { padding: var(--s4) var(--s4) 0; }
  .page { padding: var(--s5) var(--s4) var(--s6); }
  .page h1 { font-size: 32px; }
  .dir-layout, .zones-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .filter-box { max-width: none; }
  .dir-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 3px var(--s3); padding: 12px 4px 12px var(--s5); }
  .d-town { grid-column: 1; }
  .d-phone { grid-column: 2; grid-row: 1; }
  .d-state { grid-column: 2; grid-row: 2; }
  .detail { position: static; max-height: none; overflow: visible; }
  .zones-map { height: 64vh; min-height: 0; }
  .src { display: block; border-radius: var(--r-lg); }
  .src tbody, .src tr, .src td { display: block; width: auto !important; }
  .src thead { display: none; }
  .src tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
  .src tr:last-child { border-bottom: 0; }
  .src td { border: 0; padding: 2px var(--s4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .drum { animation: none !important; }
}

/* Materials finder: compact controls above the existing atlas and working list. */
[hidden] { display: none !important; }
.action-switch { display: grid; grid-template-columns: 1.2fr .8fr .8fr; border-bottom: 1px solid var(--line-2); margin: -4px 0 12px; }
.action-switch button { position: relative; min-height: 40px; border: 0; padding: 4px 8px; background: transparent; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.action-switch button[aria-pressed="true"] { color: var(--fence); }
.action-switch button[aria-pressed="true"]::after { content: ""; height: 3px; background: var(--fence); position: absolute; left: 8px; right: 8px; bottom: -1px; }
.action-switch button:hover { background: var(--hover); }
.material-controls, .directory-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.material-controls:has(.product-field[hidden]) { grid-template-columns: 1fr; }
.material-controls label, .directory-filters label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.material-controls label > span, .directory-filters label > span { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.material-controls select, .directory-filters select { width: 100%; min-width: 0; height: 40px; padding: 2px 30px 0 10px; border: 1px solid var(--rule); border-radius: 3px; background-color: var(--panel); font-weight: 700; font-size: 16px; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 28px; padding-top: 10px; }
.results-heading .count { margin: 0; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.leg-label { margin: 0; font-size: 12px; line-height: 1.35; color: var(--ink-3); text-align: right; }
.haul-settings { margin-top: 10px; }
.haul-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line-2); }
.haul-settings > summary::-webkit-details-marker { display: none; }
.haul-edit { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.settings-body { padding: 12px 0 4px; max-height: min(49vh,450px); overflow-y: auto; overflow-x: hidden; }
.settings-body .sum { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.settings-body .sum label { min-width: 0; }
.settings-body .sum input { width: 100%; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 9px 0; font-size: 13px; }
.setting-row input, .truck-grid input, .approach-weight input { width: 64px; min-height: 34px; padding: 4px 6px; border: 1px solid var(--rule); background: white; border-radius: 3px; font-family: var(--mono); font-size: 13px; }
.setting-row select { max-width: 205px; min-height: 38px; font-size: 14px; border: 1px solid var(--rule); border-radius: 3px; padding: 3px 8px; background: white; }
.truck-settings { border-top: 1px solid var(--line-2); padding-top: 5px; margin-top: 12px; }
.truck-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding-top: 5px; }
.truck-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); }
.truck-grid label span { white-space: nowrap; color: var(--ink); font-size: 12px; }
.truck-grid input { max-width: calc(100% - 20px); width: 68px; }
.truck-grid small { display: block; min-height: 15px; color: var(--ink-3); font-size: 10px; font-weight: 500; }
.pickup-start { margin-top: 10px; }
.pickup-start > details > summary { min-height: 34px; cursor: pointer; font-size: 13px; font-weight: 700; }
.pickup-start summary > span { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.pickup-start .picker-btn { min-height: 44px; }
.pickup-start .search-input { font-size: 16px; }
.approach-weight { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; }
.product-line { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--ink-2); }
.row .review { max-width: 100%; font-size: 11.5px; line-height: 1.3; margin-top: 3px; }
.row .review.quiet { font-weight: 500; color: var(--ink-3); }
.row.is-unrouted .min .n { font-size: 22px; color: var(--ink-3); font-weight: 400; }
.detail-note { margin: 0 var(--s5) 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.t-type { font: 500 13px/1.3 var(--sans); margin: 0 0 6px; color: var(--ink-2); }
.route-basis { display: block; font: 500 12px/1.4 var(--sans); color: var(--ink-2); margin-top: 3px; }
.approach-warning { margin: 0 var(--s5) 16px; color: var(--warn); font-size: 13px; line-height: 1.45; }
.approach-warning strong { font-weight: 700; }
.approach-warning p { margin: 4px 0 0; }
.route-leg + .route-leg { border-top: 1px solid var(--line-2); margin-top: 12px; padding-top: 12px; }
.route-leg h4 { font-size: 13px; margin: 10px 0 6px; }
.route-leg p { margin: 5px 0; }
.leg-vehicle { color: var(--ink-2); font-size: 12px; }
.offerings { list-style: none; padding: 0; margin: 8px var(--s5) 16px; }
.offerings li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.offerings li strong { display: block; font-weight: 600; }
.offerings li > span { display: block; color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.offerings li p { font-size: 12px; color: var(--ink-2); margin: 4px 0 0; line-height: 1.4; }
.evidence-links { list-style: none; margin: 12px 0; padding: 0; }
.evidence-links li { margin-bottom: 10px; font-size: 13px; overflow-wrap: anywhere; }
.evidence-links li > span { display: block; color: var(--ink-3); font-size: 12px; }
.evidence-links .ic { display: inline; vertical-align: middle; width: 12px; height: 12px; margin-left: 3px; }
.check p, .check li { overflow-wrap: anywhere; }
.agency-records { list-style: none; padding: 0; font-size: 12px; }
.agency-records li { border-top: 1px solid var(--line); padding: 8px 0; }
.agency-records strong, .agency-records span { display: block; }
.agency-records p { margin: 4px 0 0; color: var(--ink-2); }
.shared-yard { margin: 14px var(--s5); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shared-yard h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.shared-yard a { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; }
@media (min-width: 861px) { .controls { padding-top: 14px; padding-bottom: 10px; } .ticket .t-head h2 { margin-right: 25px; } }
@media (max-width: 860px) {
  .page-find:not(.has-site) .viewswitch { display: grid; }
  .page-find:not(.has-site) .mapwrap { display: none; }
  .page-find:not(.has-site)[data-view="map"] .mapwrap { display: block; margin: 0; border-radius: 0; min-height: 180px; height: auto; }
  .page-find .controls { padding-top: 10px; }
  .action-switch { margin-bottom: 10px; }
  .action-switch button { min-height: 40px; padding-left: 4px; padding-right: 4px; font-size: 14px; }
  .material-controls { gap: 10px; margin-bottom: 10px; }
  .material-controls select { height: 40px; font-size: 15px; }
  .page-find .picker-btn { min-height: 48px; }
  .page-find .search-input { font-size: 17px; }
  .haul-settings { margin-top: 7px; }
  .haul-settings > summary { min-height: 34px; font-size: 14px; }
  .results-heading { min-height: 24px; padding-top: 6px; }
  .page-find .controls:has(.haul-settings[open]), .page-find .controls:has(#approach-edit[open]) { max-height: calc(100vh - var(--bar) - 96px); max-height: calc(100dvh - var(--bar) - 96px); overflow-y: auto; overflow-x: hidden; }
  .settings-body { max-height: none; overflow: visible; }
  .viewswitch { margin-top: 6px; }
  .detail-note, .offerings, .shared-yard, .approach-warning { margin-left: var(--gut); margin-right: var(--gut); }
  .row .hit { min-height: 90px; }
  .page-find.ticket-open .ticket { z-index: 40; top: 0; }
  .page-find.ticket-open .ticket .t-head { padding-top: 30px; }
}
