/* Admin → Permit Review (queue.html). Console tokens only (styles.css): --accent, --green, --red, --amber and the
   neutrals. Taste skill app sheet `data-terminal` (seed 2109335082), the console's palette and type kept: every
   selection is one 1px accent line on the nearest edge (a list tab, a route tab, the open row's left edge); the
   primary action is an inverted button; colour is otherwise on status only. Mobile first: the list OR a permit;
   the list beside the permit from 901px; the PDF beside the route from 1200px. */

/* The PDF and the route need the whole screen: no 1600px cap (styles.css) on this page. */
body:has(> .nav) > main.adm.rq-page, .adm.rq-page { max-width: none; }
.rq-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
/* A <header>, so the console's global header rule made it sticky: scrolled on an iPad it stuck under the review's
   own sticky bar, which covered half of it. It scrolls with the page. */
/* The case's own <header> (title, driver, the warning chips) had the same rule: scrolled, it stuck at top 0 under the
   decision bar, and being taller than the bar its warning chips hung out below it, over the bar's status line. */
.rq-head { position: static; z-index: auto; }
.rq-case-h { position: static; z-index: auto; border-bottom: 0; background: none; }
.rq-head h1 { margin: 0; font-size: 24px; }
.rq-sub { margin: 0; font-size: 14px; color: var(--dim); line-height: 1.5; max-width: 72ch; }
.rq-empty { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px; color: var(--dim); font-size: 14px; }
.rq-empty .spinner { width: 16px; height: 16px; color: var(--accent); }
.rq-alert { margin: 0; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--amber) 14%, var(--card)); font-size: 14px; }
.rq-warn { color: var(--amber); }
.bad, .rq-late { color: var(--red); }

.rq-grid { display: flex; flex-direction: column; gap: 20px; }

/* ── Underline tabs on one rule: the list views, the route's steps, a permit's files ── */
.rq-views { display: flex; gap: 16px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.rq-views[hidden] { display: none; }
.rq-view { display: inline-flex; align-items: stretch; gap: 6px; flex: none; min-height: 40px; padding: 0; border: 0; background: none;
  color: var(--dim); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.rq-view > * { display: inline-flex; align-items: center; }
.rq-view:hover { color: var(--text); }
.rq-view[aria-selected="true"] { color: var(--text); }
/* The move: the selection is a 1px accent line exactly as wide as its label, on the tab's bottom edge. */
.rq-view-l { position: relative; }
.rq-view[aria-selected="true"] .rq-view-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); }
.rq-view-n { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--dim); }
.rq-view.is-urgent .rq-view-n { color: var(--red); font-weight: 600; }
.rq-view:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.rq-view kbd { align-self: center; font-size: 11px; }

/* ── The list column: one card. Folder tabs across its top (the console's Chats tabs, owner 2026-10-27: the
   open tab a sheet with a 3px accent top edge that joins the card under it, a count in front of each label),
   then search and Filters, the filter panel, the count, the rows. ── */
.rq-list { display: flex; flex-direction: column; min-width: 0; }
.rq-listcard { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line-soft); border-radius: 10px; }
.rq-toolbar { display: flex; flex-direction: column; background: var(--card); border-radius: 10px 10px 0 0; }
.rq-tabs { display: flex; align-items: flex-end; gap: 0; padding: 8px 6px 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  background: var(--bg); border-radius: 10px 10px 0 0; box-shadow: inset 0 -1px 0 var(--line-soft); } /* taste-skill-ignore: the tab rule, drawn inset so the open tab covers it */
.rq-tabs::-webkit-scrollbar { display: none; }
.rq-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px;
  border: 1px solid transparent; border-top-width: 3px; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: transparent; color: var(--dim); font: inherit; font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.rq-tab:hover { color: var(--text); background: var(--raised-2); }
.rq-tab.is-on { background: var(--card); color: var(--text); border-color: var(--line-soft); border-top-color: var(--accent); }
.rq-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.rq-tab-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-soft); border-radius: 5px;
  background: var(--raised-2); color: var(--dim); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rq-tab.is-on .rq-tab-n { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); }
.rq-tab-n.is-hot, .rq-tab.is-on .rq-tab-n.is-hot { background: color-mix(in srgb, var(--red) 16%, transparent); border-color: color-mix(in srgb, var(--red) 45%, transparent); color: var(--red); }

.rq-tools { display: flex; gap: 8px; padding: 10px 10px 8px; }
.rq-search { flex: 1; min-width: 0; display: flex; align-items: center; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.rq-search:focus-within { border-color: var(--accent); }
.rq-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14px; }
.rq-filterbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.rq-filterbtn:hover { background: var(--raised-2); }
.rq-filterbtn.is-on { border-color: var(--accent); }
.rq-filterbtn .rq-fi { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
/* The panel: label above each control, every change applies at once. */
.rq-filterpanel { display: flex; flex-direction: column; gap: 12px; padding: 4px 10px 14px; border-bottom: 1px solid var(--line-soft); }
.rq-filterpanel[hidden] { display: none; }
.rq-field { display: flex; flex-direction: column; gap: 6px; }
.rq-lbl { font-size: 12.5px; font-weight: 500; color: var(--dim); }
.rq-input { display: flex; align-items: center; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.rq-input:focus-within { border-color: var(--accent); }
.rq-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14px; }
.rq-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-seg button { min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--dim); font: inherit; font-size: 13px; cursor: pointer; }
.rq-seg button:hover { color: var(--text); }
.rq-seg button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.rq-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 32px; padding: 0 4px 0 12px; border: 1px solid var(--accent); border-radius: 999px; font-size: 13.5px; }
.rq-chip button { width: 26px; height: 26px; border: 0; border-radius: 999px; background: none; color: var(--dim); font-size: 16px; cursor: pointer; }
.rq-chip button:hover { color: var(--text); background: var(--raised-2); }
.rq-filterpanel .rq-link { align-self: flex-start; }

.rq-count { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px 0 10px; color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.rq-bulk { color: var(--text); }
.rq-bulk-n { font-weight: 500; }
.rq-bulk-acts { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.rq-bulk-acts .btn { width: auto; min-height: 32px; padding: 0 12px; border-radius: 6px; }
.rq-check { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--text); cursor: pointer; }
/* Tags: the facts that change what you do with a permit; each explains itself on hover. */
.rq-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rq-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--raised-2); color: var(--text);
  font-size: 11.5px; font-weight: 500; white-space: nowrap; cursor: help; }

/* Rows: a tick, then who (and how long they have waited), the permit, and its facts. The open row takes the
   active fill and the 1px accent line on its left edge; a ticked row keeps its tick and nothing louder. */
.rq-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.rq-list ol > li:last-child { border-bottom: 0; }
.rq-item { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--line-soft); }
.rq-item .rq-check { margin-top: 13px; }
.rq-item:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.rq-item.is-on { background: var(--raised-2); }
.rq-item.is-on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--accent); }
.rq-row { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 11px 0 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.rq-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.rq-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rq-row-who { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-row-when { flex: none; font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.rq-row-when.bad { color: var(--red); }
.rq-row-t { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.rq-row-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--dim); }
.rq-row-note { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-row-note { font-style: italic; }

/* ── One permit ── */
.rq-case { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rq-case-h { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rq-case-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rq-case-top h2 { flex: 1; margin: 0; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
/* A narrow case panel (a phone, a narrow window, the list beside it): the title gets its own line under Back and the
   pager. Squeezed between them it broke one letter per line (owner, 2026-11-09). By the panel's width, not the window's. */
.rq-case-h { container-type: inline-size; }
@container (max-width: 560px) {
  .rq-case-top { flex-wrap: wrap; }
  .rq-case-top h2 { order: 3; flex-basis: 100%; }
  .rq-case-top .rq-pager { margin-left: auto; }
}
.rq-pos { flex: none; min-width: 44px; text-align: center; color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
/* Previous / next as a small pager beside "1 of N", not two big buttons. */
.rq-pager { display: flex; align-items: center; gap: 2px; flex: none; }
.rq-pg { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--text); cursor: pointer; }
.rq-pg:hover { background: var(--raised-2); }
.rq-pg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rq-pg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rq-back { align-self: center; width: auto; flex: none; }
.rq-ids { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 13px; color: var(--dim); min-width: 0; }
.rq-who { color: var(--text); font-weight: 500; }
.rq-id { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.rq-id .adm-copy .txt { max-width: 140px; }
.rq-wait { font-variant-numeric: tabular-nums; }
.rq-ids a, .rq-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.rq-ids a:hover, .rq-link:hover { text-decoration: underline; }

/* The decision bar: decide on the left, move on the right. Sticky so Approve is never scrolled away. */
.rq-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; gap: 8px; padding: 12px 0; background: var(--bg);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.rq-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
/* Content-width buttons, one height and one radius: the primary, Send Back, and ⋯ More. */
.rq-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-acts .btn { gap: 8px; height: 40px; min-height: 40px; padding: 0 14px; width: auto; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.rq-acts .btn:disabled { opacity: .4; cursor: not-allowed; } /* the primary and Send Back keep the console's blue (styles.css), faded */
.rq-page .rq-back { height: 40px; min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
.rq-acts .btn kbd { height: 18px; min-width: 18px; font-size: 11px; }
.rq-more { position: relative; }
.rq-more-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.rq-more-btn[aria-expanded="true"] { border-color: var(--text); }
.rq-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 240px; max-width: min(320px, calc(100vw - 32px)); padding: 6px;
  display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.rq-menu-i { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.rq-menu-i:hover:not([aria-disabled="true"]), .rq-menu-i:focus-visible { background: var(--raised-2); outline: none; }
.rq-menu-i[aria-disabled="true"] { color: var(--dim); cursor: default; }
.rq-menu-l { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rq-menu-why { font-size: 12.5px; color: var(--dim); }
.rq-acts .rq-primary kbd { border-color: color-mix(in srgb, var(--bg) 40%, transparent); }

.rq-status { margin: 0; font-size: 13.5px; color: var(--dim); min-height: 20px; }
.rq-status.bad { color: var(--red); }
.rq-note-row { display: flex; flex-direction: column; gap: 8px; }
.rq-note { width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; font-size: 15px; resize: vertical; }
.rq-note:focus { outline: 2px solid var(--focus); outline-offset: 0; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent); font: 500 11.5px/1 inherit; font-variant-numeric: tabular-nums; opacity: .8; }

/* A multi-state permit's legs, above the route's own tabs. */
.rq-legs .rq-view-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 4px; background: var(--raised-2); font-size: 11px; }

/* The stage (owner, 2026-10-27, after Google Maps' directions): the parsed directions on the left, the map as the
   main thing, the permit PDF an overlay sheet on the map's right side, opened with View PDF (P) to compare. */
/* The tabs keep their width and the buttons wrap to a row of their own when both do not fit (a scrolling tab
   strip shrinks to nothing beside fixed-width buttons, which then overlap). */
.rq-stagebar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0 12px; border-bottom: 1px solid var(--line-soft); }
.rq-stagebar .rq-steps { border-bottom: 0; flex: 0 0 auto; max-width: 100%; }
/* The route score (admin only, admin/queue.js paintScore): the bench's number, coloured by its verdict, and the top problems beside it. */
.rq-score { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; align-self: center; padding: 4px 0 4px 12px; border-left: 1px solid var(--line-soft); font-size: 13px; }
.rq-score[hidden] { display: none; }
.rq-score-n { flex: none; min-width: 2ch; font-family: var(--font-head); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.rq-score-n.ok, .rq-score-legs .ok { color: var(--green); }
.rq-score-n.warn, .rq-score-legs .warn { color: var(--amber); }
.rq-score-n.bad, .rq-score-legs .bad { color: var(--red); }
.rq-score-n.none { color: var(--dim); }
.rq-score-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-score-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.rq-score-v { color: var(--text); font-weight: 500; }
.rq-score-legs { display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--dim); font-variant-numeric: tabular-nums; }
.rq-score-legs .is-on { color: var(--text); font-weight: 500; }
.rq-score-p { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; color: var(--dim); }
.rq-score-p li { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rq-pdfbtn { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 32px; margin-bottom: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap;
  background: var(--card); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.rq-pdfbtn:hover:not(:disabled) { background: var(--raised-2); }
.rq-pdfbtn[aria-expanded="true"] { border-color: var(--accent); }
/* Nothing to open ("No PDF"): a quiet chip, not a button. */
.rq-pdfbtn:disabled { border-color: transparent; background: var(--raised-2); color: var(--dim); cursor: default; }
.rq-stage { position: relative; min-width: 0; }
.rq-route { min-width: 0; }
.rq-review { min-width: 0; }
.rq-pdf { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; background: var(--card); }
.rq-pdf[hidden] { display: none; }
.rq-pdfhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.rq-pdfacts { display: flex; align-items: center; gap: 16px; }
.rq-frame { flex: 1; min-height: 0; border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; background: var(--raised); }
.rq-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.rq-pages { display: flex; flex-direction: column; gap: 8px; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.rq-pages canvas { display: block; width: 100%; height: auto; background: #fff; }
.rq-frame-empty { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 24px; }
.rq-frame-empty p { margin: 0; }
.rq-note-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 640px; }
.rq-done { display: flex; flex-direction: column; gap: 6px; padding: 40px 0; }
.rq-done h2 { margin: 0; font-size: 20px; }
/* The review mounted here: its own header (Back, title) repeats the case. */
.rq-route .rv-head, .rq-route .rv-progress { display: none; }
/* Phone and tablet: the PDF opens as a full-screen sheet. */
@media (max-width: 1099px) {
  .rq-pdf { position: fixed; inset: 0; z-index: 60; padding: 12px; }
}
/* Desktop: the stage fills the screen under the bar; directions left (a fixed column that scrolls), the map
   fills the rest, and the PDF opens on the right. */
@media (min-width: 1100px) {
  .rq-stage { height: calc(100vh - 230px); min-height: 520px; }
  .rq-route, .rq-review { height: 100%; }
  /* The review wraps its grid in section.rv (with the hidden header): pass the height down as flex. */
  .rq-review > .rv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .rq-route .rv-grid { flex: 1; min-height: 0; }
  .rq-route .rv-grid.rv-step-2, .rq-route .rv-grid.rv-step-3 { flex-direction: row-reverse; align-items: stretch; }
  /* Narrower screens (an iPad) give the directions a little less so the map keeps real width. */
  .rq-route .rv-step-2 .rv-panel, .rq-route .rv-step-3 .rv-panel { flex: 0 0 var(--rq-dir, 380px); height: 100%; max-height: none; overflow-y: auto; }
  .rq-route .rv-step-2 .rv-map, .rq-route .rv-step-3 .rv-map { flex: 1; position: relative; top: auto; height: 100%; min-height: 0; }
  .rq-route .rv-step-1 { height: 100%; overflow-y: auto; }
  /* Open, the PDF takes the stage's right side and the map narrows beside it (never covered), so the directions,
     the whole route and the permit are on screen together. */
  .rq-stage { display: flex; }
  .rq-route { flex: 1; min-width: 0; }
  .rq-pdf { flex: 0 0 var(--rq-pdf, min(46%, 760px)); height: 100%; padding: 0 0 0 14px; background: none; }
  /* The column handles: a 14px hit area in the gap, a blue grip, the full-height line lit while hovered or dragged. */
  .rq-handle { position: absolute; top: 0; bottom: 0; z-index: 7; width: 14px; margin-left: -7px; display: flex; align-items: center; justify-content: center;
    cursor: col-resize; touch-action: none; }
  .rq-handle[hidden] { display: none; }
  .rq-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 6px; width: 2px; border-radius: 2px; background: transparent; }
  .rq-handle:hover::before, .rq-handle.is-drag::before, .rq-handle:focus-visible::before { background: color-mix(in srgb, var(--accent) 55%, transparent); }
  .rq-handle span { position: relative; width: 6px; height: 44px; border-radius: 4px; background: var(--accent); }
  .rq-handle:focus-visible { outline: none; }
  body.rq-dragging, body.rq-dragging * { cursor: col-resize !important; user-select: none; }
  body.rq-dragging iframe { pointer-events: none; }
}

/* iPad landscape (1100-1399px): directions, map and PDF only fit side by side with the list hidden (the PDF hides it
   on open) and with a narrower directions column and PDF, so the map keeps a usable width. A dragged width wins. */
@media (min-width: 1100px) and (max-width: 1399px) {
  .rq-route .rv-step-2 .rv-panel, .rq-route .rv-step-3 .rv-panel { flex-basis: var(--rq-dir, 280px); }
  .rq-pdf { flex-basis: var(--rq-pdf, 40%); }
}

/* ── The bulk confirm: who will be told, what was never opened, then the result per permit ── */
.rq-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); } /* taste-skill-ignore: a dialog floats */
.rq-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.rq-dlg { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.rq-dlg h2 { margin: 0; font-size: 18px; }
.rq-dlg-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--line-soft); }
.rq-dlg-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.rq-dlg-who { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-dlg-mail { color: var(--dim); font-weight: 400; }
.rq-dlg-t { grid-column: 1; color: var(--dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-dlg-s { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; color: var(--dim); font-size: 13px; max-width: 260px; }
.rq-dlg-s.warn { color: var(--amber); }
.rq-dlg-s.bad { color: var(--red); }
.rq-dlg-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.rq-dlg-acts .btn { width: auto; min-height: 36px; padding: 0 14px; border-radius: 6px; }

.rq-keys { display: none; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; font-size: 12.5px; color: var(--dim); }
.rq-keys span { display: inline-flex; align-items: center; gap: 6px; }

/* Small phones: Approve takes the row's spare room; tablets keep every button content-width. */
@media (max-width: 560px) {
  .rq-acts { flex: 1; flex-wrap: nowrap; }
  .rq-acts .rq-approve { flex: 1; min-width: 0; }
}
/* Phone: the list OR the permit, never both; the shortcuts are for keyboards. */
@media (max-width: 900px) {
  body.rq-has-case .rq-list, body.rq-has-case .rq-head { display: none; }
  /* Phone: Approve takes the room, Send Back and ⋯ stay content-width beside it; 44px targets. */
  .rq-acts .btn { height: 44px; min-height: 44px; }
  .rq-more-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rq-more-btn { padding: 0 12px; }
  .rq-menu { left: auto; right: 0; }
  .rq-pg { width: 40px; height: 40px; }
  .rq-acts kbd, .rq-view kbd, .rq-pdfbtn kbd { display: none; }
  /* Base rules for these sit further down the file, so the phone ones carry the extra .rq-stagebar. */
  /* The tabs on their own line, the three buttons content-width on the next one, wrapping only if they must. */
  .rq-stagebar { column-gap: 8px; padding-bottom: 6px; justify-content: flex-start; align-items: center; }
  .rq-stagebar .rq-steps { flex-basis: 100%; }
  .rq-stagebar .rq-score { flex-basis: 100%; padding: 4px 0 0; border-left: 0; }
  .rq-stagebar .rq-gmaps { display: contents; }
  .rq-stagebar .rq-pdfbtn { height: 40px; margin: 6px 0 0; padding: 0 10px; font-size: 13px; }
  .rq-stagebar .rq-pdfbtn:disabled { height: 30px; padding: 0 9px; }
  .rq-stagebar .rq-gmaps + .rq-pdfbtn { margin-left: 0; }
  .rq-view { min-height: 44px; }
  .rq-search, .rq-filterbtn, .rq-input { height: 44px; }
  .rq-tab, .rq-seg button { min-height: 44px; }
  .rq-check { width: 22px; height: 22px; }
  .rq-dlg-list li { grid-template-columns: 1fr; }
  .rq-dlg-s { grid-column: 1; grid-row: auto; text-align: left; max-width: none; }
}
@media (min-width: 901px) {
  /* 472px: the four tabs (To Review, Needs Driver, Approved, Expired) need 458px; at 384 Expired was cut off (owner, 2026-11-09). */
  .rq-grid { display: grid; grid-template-columns: 472px minmax(0, 1fr); align-items: start; gap: 24px; }
  .rq-list { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
  .rq-toolbar { position: sticky; top: 0; z-index: 2; }
  .rq-keys { display: flex; }
  /* Folded (a permit picked, or L): the list leaves a slim Permits tab on the left edge, as the console sidebar
     folds to its rail. The tab is the way back; L and Show List still work. */
  .rq-grid.list-hidden { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .rq-grid.list-hidden > .rq-list { display: none; }
  .rq-grid.list-hidden > .rq-reopen { display: flex; }
}
.rq-reopen { display: none; position: sticky; top: 16px; flex-direction: column; align-items: center; gap: 10px; width: 40px; padding: 10px 0 12px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--card); color: var(--dim); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.rq-reopen:hover { color: var(--text); background: var(--raised-2); }
.rq-reopen:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rq-reopen svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rq-reopen span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
/* A leg you corrected on a multi-state permit: a small accent dot after its state. */
.rq-fixed { color: var(--accent); font-weight: 700; margin-left: 2px; }

/* The route's warnings as chips in the header: the title only, tinted by tone; one opens as a card under it. */
.rq-notices { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-notices:empty { display: none; }
.rq-notices .rv-notice { position: relative; margin: 0; padding: 0 10px; min-height: 26px; display: inline-flex; align-items: center; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); color: var(--text); cursor: pointer; }
.rq-notices .rv-notice.block { border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.rq-notices .rv-notice.info { border-color: var(--line); background: none; }
.rq-notices .rv-notice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rq-notices .rv-n-t { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.rq-notices .rv-n-t svg { width: 14px; height: 14px; }
.rq-notices .rv-n-b, .rq-notices .rv-n-l { display: none; }
.rq-notices .rv-notice.is-open { flex-direction: column; align-items: flex-start; gap: 6px; flex-basis: 100%; padding: 10px 12px; border-radius: 10px; cursor: default; }
.rq-notices .rv-notice.is-open .rv-n-t { cursor: pointer; white-space: normal; }
.rq-notices .rv-notice.is-open .rv-n-b, .rq-notices .rv-notice.is-open .rv-n-l { display: block; margin: 0; font-size: 13px; color: var(--dim); line-height: 1.45; }
/* Narrow directions: the section card's Modify and Accept wrap instead of running past the card. */
.rq-route .rv-split { flex-wrap: wrap; }
.rq-route .rv-split .btn { flex: 1 1 108px; min-width: 0; white-space: nowrap; }

/* The list folds from its own toolbar: an icon button after Filters. */
.rq-collapse { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; align-self: stretch; min-height: 40px; font: inherit; font-size: 14px;
  border: 1px solid var(--line-soft); border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; }
.rq-collapse:hover { background: var(--line-soft); color: var(--text); }
.rq-collapse:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rq-collapse svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { .rq-collapse { min-height: 44px; } }
@media (max-width: 900px) { .rq-collapse { display: none; } }

/* Google Maps second opinion, beside View PDF. */
.rq-gmaps { display: flex; gap: 8px; margin-left: auto; }
.rq-gmaps + .rq-pdfbtn { margin-left: 8px; }
a.rq-pdfbtn { text-decoration: none; display: inline-flex; align-items: center; }
/* A state with no permit between two legs (bundleLegs.js gaps): named in the leg tabs where it is missing. */
.rq-legs-gap { align-self: center; padding: 2px 8px; border: 1.5px dashed var(--amber); border-radius: 6px; color: var(--text); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
/* A score finding that opens its place on the map or its permit row. */
.rq-score-p .rq-score-go { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
