/* Pilot car & escort requirements matrix: the input bar, the side panel and the compliance page (the map itself is the shared na-map component). Site tokens only. */
.esc.esc { margin: 0 0 24px; color: var(--ink); background: var(--paper); text-align: left; }
.esc [hidden] { display: none; }
.esc .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Numbers the spacing guard does not take as layout steps are stated once, as properties (the owner's: a 76px chat-widget clearance, 6px pill gaps, a 148 x 62 band preview). */
.esc, .qh-shell { --esc-chat-clearance: 76px; --esc-pill-gap: 6px; }
/* THE LOAD CARD: units segment top right, width / height / length in one row of three, the route popover, one full-width call to action. */
.esc { --esc-cta: #2563EB; --esc-cta-ink: var(--accent-ink); --esc-micro: #64748B; }
:root[data-theme="dark"] .esc { --esc-micro: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .esc { --esc-micro: var(--muted); } }
.esc-bar { display: grid; gap: 12px; padding: 0 0 16px; }
.esc-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.esc-bar-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.esc .esc-seg { height: 36px; }
.esc .esc-seg-o { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; margin: 0; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.esc .esc-seg-o + .esc-seg-o { border-left: 1px solid var(--ink); }
.esc .esc-seg-o input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.esc .esc-seg-o span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0 12px; }
.esc .esc-seg-o:has(input:checked) { color: var(--esc-cta-ink); background: var(--accent); }
.esc .esc-seg-o:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -4px; }
.esc-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.esc-f { display: grid; gap: 4px; margin: 0; min-width: 0; }
.esc-flab { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.esc-inwrap { position: relative; display: block; }
.esc .esc-inwrap input { width: 100%; min-width: 0; height: 44px; box-sizing: border-box; padding: 0 24px 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; /* 16px: iOS does not zoom the page on focus */ font-variant-numeric: tabular-nums; }
.esc .esc-inwrap input::placeholder { color: var(--muted-soft); font-size: 14px; }
.esc .esc-inwrap input:focus-visible, .esc .esc-native:focus-visible, .esc .esc-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.esc-unit-t { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--muted); pointer-events: none; }
.esc-route { max-width: 100%; }
.esc .esc-native { width: 100%; min-height: 44px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.esc-pop .esc-road-cur, .esc-pop .esc-road-cur svg { display: inline-flex; flex: none; }
.esc-pop .na-pop-panel { width: 100%; max-width: none; }
.esc-road-row { gap: 12px; padding: 8px 12px; }
.esc-road-row .esc-ico { flex: none; color: var(--muted); }
.esc-road-txt { display: grid; min-width: 0; }
.esc-road-txt strong { font-size: 14px; }
.esc-road-txt small { font-size: 12px; color: var(--muted); }
.esc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.esc .esc-cta { flex: 1 1 100%; display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 44px; box-sizing: border-box; padding: 0 16px; border: 0; border-radius: 10px; background: var(--esc-cta); color: var(--esc-cta-ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.esc .esc-cta:hover { filter: brightness(0.92); }
.esc-clear { min-height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; }
.esc-clear:hover { border-color: var(--ink); }
/* room under the page so the floating chat widget never covers the last content */
main.qh-shell.qh-shell { padding-bottom: var(--esc-chat-clearance); }

/* THE MAP is the shared component (/na-map/na-map.css); the side panel below opens over its frame. */
.esc-rv { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.esc-panel .esc-rv { margin: 0 0 12px; color: var(--ink-soft); }
.esc-head .esc-rv { flex: 1 1 100%; margin: 0; color: var(--ink-soft); }

/* THE SIDE PANEL */
.esc-panel { position: absolute; z-index: 5; top: 8px; right: 8px; width: min(380px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow-y: auto; padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-md); }
.esc-panel h2 { margin: 0; font-size: 18px; }
.esc-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.esc-x { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 18px; line-height: 1.4; cursor: pointer; }
.esc-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 9999px; border: 1px solid var(--border-strong); background: var(--na-c, var(--surface-3)); font-size: 12px; font-weight: 600; color: var(--ink); }
.esc-micro { margin: 12px 0 8px; font-size: 11px; line-height: 1.4; letter-spacing: 0.04em; text-transform: uppercase; color: var(--esc-micro); }
.esc-trig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.esc-tile { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 8px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.esc-trig dt { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.esc-trig dd { margin: 0; }
.esc-tv { font-size: 16px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.esc-tile[data-kind="none"] .esc-tv, .esc-tile[data-kind="review"] .esc-tv { font-size: 12px; line-height: 1.4; }
.esc-tc { font-size: 11px; line-height: 1.4; color: var(--accent); }
.esc-tile[data-kind="none"] .esc-tc, .esc-tile[data-kind="review"] .esc-tc { color: var(--muted); }
.esc-verdict { margin: 0 0 12px; padding: 12px; border-radius: 8px; border-left: 4px solid var(--na-line, var(--border-strong)); background: var(--na-c, var(--surface-3)); color: var(--ink); }
.esc-verdict p { margin: 0; }
.esc-verdict-k { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.esc-verdict-t { margin-top: 4px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.esc-mine { margin: 0 0 12px; padding: 12px; border-radius: 8px; background: var(--na-c, var(--surface-3)); font-size: 13px; line-height: 1.5; }
.esc-mine p { margin: 0; }
.esc-mine .esc-big { font-size: 15px; font-weight: 700; }
.esc-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius-btn); background: var(--accent-fill); color: var(--accent-ink, var(--surface)); font-weight: 600; font-size: 14px; text-decoration: none; }
.esc-open:hover { filter: brightness(1.05); }

.esc-all { margin-top: 24px; }
.esc-dir-sum { cursor: pointer; font-weight: 600; font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.esc-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.esc-card a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13px; }
.esc-card a:hover { border-color: var(--accent); }
.esc-card .esc-chip { font-size: 11px; }

/* THE COMPLIANCE PAGE */
.esc-page { display: grid; gap: 16px; }
.esc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.esc-head .esc-trig { flex: 1 1 360px; margin: 0; }
.esc-sec { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.esc-sec h2 { margin: 0 0 12px; font-size: 16px; }
.esc-sec p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.esc-note, .esc-empty { color: var(--muted); font-size: 13px; }
.esc-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.esc-tbl th { text-align: left; padding: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.esc-tbl td { padding: 8px; border-top: 1px solid var(--border); vertical-align: top; }
.esc-fig { margin: 4px 0 8px; padding-left: 16px; font-size: 12px; line-height: 1.5; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.esc-sub { margin: 16px 0 8px; font-size: 14px; }
.esc-rules, .esc-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.esc-rule { padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.esc-rule p { margin: 0 0 4px; }
.esc-rule-o { font-weight: 600; font-size: 13px; }
.esc-rule-s { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.esc-rule-s a, .esc-src a { color: var(--accent); }
@media (max-width: 720px) {
  .esc-panel { position: static; width: auto; max-height: none; margin-top: 0; }
}

/* From 1100px the card sits in one row: title and units on top, then the three sizes, the route and the button side by side. */
@media (min-width: 1100px) {
  .esc-bar { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto; align-items: end; }
  .esc-bar-head { grid-column: 1 / -1; }
  .esc .esc-cta { flex: none; width: auto; min-width: 260px; white-space: nowrap; }
  .esc-actions { flex-wrap: nowrap; }
}

/* ═══ POLISH (smart inputs, presets, sliding units, live status, sticky summary). Appended after the baselined block above. Site tokens only. ═══ */
.esc { --esc-fade: 32px; --esc-ease: cubic-bezier(0.2, 0, 0, 1); }
/* units: a real radiogroup of radios, with a thumb that slides (transform only) from ft to m */
.esc .esc-seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; height: 44px; overflow: hidden; }
.esc .esc-seg-thumb { position: absolute; inset: 0 auto 0 0; width: 50%; background: var(--accent); transform: translateX(0); transition: transform 150ms var(--esc-ease); will-change: transform; }
.esc .esc-seg:has(input[value="m"]:checked) .esc-seg-thumb { transform: translateX(100%); }
.esc .esc-seg-o { z-index: 1; min-width: 48px; }
.esc .esc-seg-o:has(input:checked) { color: var(--esc-cta-ink); background: transparent; }
@media (prefers-reduced-motion: reduce) { .esc .esc-seg-thumb { transition: none; } }
/* one-tap common loads: a single scrollable row; links with no script, toggle buttons once the module runs */
.esc-presets { display: flex; gap: var(--esc-pill-gap); overflow-x: auto; margin: 0; padding: 0 0 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.esc-presets::-webkit-scrollbar { display: none; }
.esc .esc-preset { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; height: 36px; min-height: 36px; box-sizing: border-box; padding: 0 12px; line-height: 1.4; border: 1px solid var(--border-strong); border-radius: 9999px; background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; }
.esc .esc-preset:hover { border-color: var(--ink); }
.esc .esc-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.esc .esc-preset[aria-pressed="true"] { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.esc-presets[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--esc-fade)), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--esc-fade)), transparent); }
.esc-presets[data-fade="start"] { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--esc-fade)), transparent); mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--esc-fade)), transparent); }
.esc-presets[data-fade="both"] { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) var(--esc-fade), var(--ink) calc(100% - var(--esc-fade)), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) var(--esc-fade), var(--ink) calc(100% - var(--esc-fade)), transparent); }
@media (pointer: coarse) { .esc .esc-preset { height: 44px; min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .esc-presets { scroll-snap-type: none; } }
/* the three fields: label row (with the Oversize tag), input (suffix + clear), and a reserved line for the readout / typo fix, so nothing below ever moves */
.esc-flabrow { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 16px; }
.esc-flabrow .esc-flab { min-width: 0; overflow: hidden; white-space: nowrap; }
.esc-over { flex: none; display: inline-flex; align-items: center; height: 16px; box-sizing: border-box; padding: 0 4px; border: 1px solid var(--warn); border-radius: 9999px; background: color-mix(in srgb, var(--warn) 30%, var(--surface)); color: var(--ink); font-size: 10px; font-weight: 700; line-height: 1.4; cursor: help; }
.esc .esc-inwrap input[data-over] { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.esc .esc-inwrap input[aria-invalid="true"] { border-color: var(--error); }
.esc .esc-inwrap[data-has] input { padding-right: 48px; }
.esc .esc-clr { position: absolute; min-height: 0; min-width: 0; right: 24px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 9999px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--muted); cursor: pointer; }
.esc .esc-clr::after { content: ""; position: absolute; inset: -12px -4px; }
.esc .esc-clr:hover { color: var(--ink); }
.esc .esc-clr:focus-visible, .esc .esc-fix:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.esc-hint { position: relative; display: block; min-height: 2.8em; font-size: 11px; line-height: 1.4; }
.esc-cap { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.esc-cap[data-bad] { color: var(--error); }
.esc .esc-fix { position: relative; display: block; min-height: 0; padding: 0; line-height: 1.4; border: 0; background: none; color: var(--accent); font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }
.esc .esc-fix::after { content: ""; position: absolute; inset: -8px -4px; }
@media (min-width: 560px) { .esc-hint { min-height: 1.4em; } }
/* live recalculation: the send button gives way to a status line (same height, so the card does not move) */
.esc-actions { min-height: 44px; }
.esc-livehint { flex: 1 1 auto; margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.esc-livehint[data-state="error"] { color: var(--ink); }
.esc-bar[data-live] .esc-cta { display: none; }
.esc[aria-busy="true"] .na-svg { opacity: 0.7; }
.esc[aria-busy="true"] .na-legend strong { opacity: 0.5; }
.na-svg { transition: opacity 120ms; }
@media (prefers-reduced-motion: reduce) { .na-svg { transition: none; } }
/* the sticky summary: slides down under the site header once the load card has scrolled away */
.esc-sticky { position: fixed; z-index: 60; top: var(--esc-sticky-top, 64px); left: 0; right: 0; display: flex; justify-content: center; box-sizing: border-box; padding: 4px 16px 0; pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(-120%); transition: transform 150ms var(--esc-ease), opacity 150ms var(--esc-ease), visibility 0s linear 150ms; }
.esc-sticky.is-on { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.esc .esc-sticky-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%; max-width: 1132px; min-height: 44px; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-md); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.4; text-align: left; cursor: pointer; pointer-events: auto; }
.esc .esc-sticky-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.esc-sticky-load { font-weight: 700; font-variant-numeric: tabular-nums; }
.esc-sticky-counts { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.esc-sticky-n { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.esc-sticky-up { margin-left: auto; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .esc-sticky, .esc-sticky.is-on { transition: none; } }
@media (min-width: 1100px) {
  .esc-bar .esc-presets { grid-column: 1 / -1; }
  .esc-actions { min-width: 260px; } /* the column the send button filled keeps its width when the status line takes its place */
}
.esc-barwrap { scroll-margin-top: 80px; }
/* the searchable region picker is printed hidden and shown by the module: its row is reserved so showing it moves nothing (no script: a plain gap above the map) */
.esc .na-picker--pop { min-height: 44px; }
/* `hidden` has to win over the display these controls are given above */
.esc .esc-clr[hidden], .esc .esc-fix[hidden], .esc .esc-over[hidden], .esc .esc-cap[hidden], .esc .esc-livehint[hidden], .esc #esc-copy[hidden], .esc .esc-sticky[hidden] { display: none; }
@media (max-width: 480px) {
  .esc-flabrow .esc-flab { font-size: 10px; letter-spacing: 0; }
  .esc-over { font-size: 9px; }
}
@media (max-width: 639px) { .esc-sticky-n--opt { display: none; } .esc-sticky-up { position: absolute; right: 12px; top: 12px; margin: 0; } .esc .esc-sticky-btn { position: relative; padding-right: 32px; } }
/* ONE primary blue: the site's --accent-fill token (white --accent-ink on it, in both themes). No other blue literal or token is used for a filled control on this page. */
.esc { --esc-cta: var(--accent-fill); --esc-cta-ink: var(--accent-ink); }
.esc .esc-seg-thumb { background: var(--accent-fill); }
.esc .esc-seg-o:has(input:checked) { color: var(--accent-ink); }
.esc .esc-preset[aria-pressed="true"] { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--accent-ink); box-shadow: none; }
.esc .esc-sticky-up { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; box-sizing: border-box; border-radius: 9999px; background: var(--accent-fill); color: var(--accent-ink); }
