/* IDAX Counts Portal — modern, clean, professional. */

:root {
  --idax-blue: #366092;
  --idax-blue-dark: #2d5080;
  --idax-blue-light: #8DB4E2;
  --accent: #4f8ef7;
  --accent-soft: #dbeafe;
  --accent-glow: #e8f0fe;

  --bg: #f4f6f9;
  --bg-card: #ffffff;
  --bg-sidebar: #1e293b;
  --bg-sidebar-bottom: #0f172a;
  --bg-input: #f8fafc;
  --bg-hover: #f1f5f9;

  --text-primary: #1a1f36;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-heading: #0f172a;
  --text-sidebar: #cbd5e1;
  --text-sidebar-active: #ffffff;

  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-sidebar: #334155;

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  --peak-gold: #FFC000;
  --peak-fill: #D6DCE4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100%;
}

a { color: var(--idax-blue); text-decoration: none; }
a:hover { color: var(--idax-blue-dark); text-decoration: underline; }

button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Layout shell ────────────────────────────────────────────────── */
.app {
  display: grid;
  /* minmax(0,1fr): the content column must be allowed to SHRINK so its
     tables scroll internally instead of pushing the page sideways. */
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  padding: 22px 0 12px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  padding: 0 22px 18px 22px;
  border-bottom: 1px solid var(--border-sidebar);
  margin-bottom: 14px;
}
.sidebar .brand .logo {
  font-weight: 800;
  font-size: 22px;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.sidebar .brand .tag {
  font-size: 11px;
  color: var(--text-sidebar);
  margin-top: 2px;
}
/* CountVault logo in the sidebar (2026-09-25 redesign: templates/_cv_logo.html,
 * motion in cv_logo.css): the dark lockup on a faint steel-blue plate, in the same
 * 196 x 86 px box the old PNG card used (width 100%, padding 9/12, 141:56 inside),
 * so nothing below it moves. */
.sidebar .brand .cv-logo {
  width: 100%;
  max-width: 200px;
  height: auto;
  padding: 9px 12px;
  border-radius: 12px;
  background:
    radial-gradient(110px 80px at 18% 50%, rgba(79, 142, 247, 0.14), rgba(79, 142, 247, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.16),
    0 10px 24px -16px rgba(0, 0, 0, 0.7);
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-sidebar);
  font-size: 13px;
  font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar nav a.active {
  background: linear-gradient(135deg, var(--idax-blue) 0%, var(--accent) 100%);
  color: var(--text-sidebar-active);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(54,96,146,0.35);
}
/* the icon family (_macros.html nav_icon): 16 px line icons, currentColor */
.sidebar nav a .icon { width: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.nav-ico { width: 16px; height: 16px; flex: none; display: block; }
/* a count on an item (Issues red, Unlock Requests violet), at the row's end */
.sidebar nav a .nav-badge {
  margin-left: auto; border-radius: 10px; padding: 1px 7px; line-height: 1.5;
  font-size: 10px; font-weight: 700; color: #fff; background: #dc2626;
}
.sidebar nav a .nav-badge.violet { background: #7c3aed; }
/* The Admin group (2026-09-25): admin-only items in their own inset panel
   under a hairline and a small label; rendered for admins only (base.html). */
.sidebar nav .nav-admin {
  display: flex; flex-direction: column; gap: 2px;
  margin: 12px -4px 0; padding: 10px 4px 4px;
  border-top: 1px solid var(--border-sidebar);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.30), rgba(2, 6, 23, 0.14));
  border-radius: 0 0 10px 10px;
}
.sidebar nav .nav-section {
  display: flex; align-items: center; gap: 7px;
  padding: 0 12px 6px; color: #94a3b8;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.sidebar nav .nav-section .nav-ico { width: 13px; height: 13px; color: #fbbf24; opacity: 0.85; }

.sidebar .spacer { flex: 1; }
.sidebar .footer {
  padding: 16px 22px 4px 22px;
  border-top: 1px solid var(--border-sidebar);
  font-size: 11px;
  color: var(--text-sidebar);
  margin-top: 12px;
}
/* the CountVault Radio note (base.html, app.radio_page): quiet until hovered */
.sidebar .footer .cv-radio-note { margin-left: 6px; color: inherit; text-decoration: none; opacity: 0.45;
  font-size: 13px; transition: opacity .15s, color .15s; }
.sidebar .footer .cv-radio-note:hover { opacity: 1; color: #fbbf24; }
.sidebar .user-card {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 12px 8px 12px;
  font-size: 11.5px;
  color: var(--text-sidebar);
}
.sidebar .user-card .name { color: #fff; font-weight: 600; margin-bottom: 2px; }
.sidebar .user-card .meta { font-size: 10px; color: var(--text-sidebar); }
.sidebar .user-card form { margin: 8px 0 0 0; padding: 0; }
.sidebar .user-card .signout {
  background: transparent; color: #fda4af; border: none;
  padding: 0; font-size: 11px; cursor: pointer;
}
.sidebar .user-card .signout:hover { text-decoration: underline; }

/* Main content */
/* FULL WINDOW WIDTH. The old 1500px cap meant a 1990px-wide screen left
   ~490px empty while the tables were squeezed and cut off (user
   2026-08-15: "MAKE THE DEFAULT WIDTH FIT ALL COLUMNS"). Tables get the
   whole window first; .table-wrap horizontal scrolling is only the
   fallback for when even that isn't enough. */
.main { padding: 24px 32px 40px 32px; max-width: none; min-width: 0; }
.page-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
}
.page-header h1 {
  margin: 0; color: var(--text-heading); font-size: 22px; font-weight: 700;
}
.page-header .subtitle { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* ─── Cards / surfaces ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.card + .card { margin-top: 14px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: -4px 0 12px 0; padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.card-header h2 {
  margin: 0; font-size: 15px; font-weight: 700; color: var(--text-heading);
}
.card-header .subtitle { font-size: 12px; color: var(--text-muted); }

/* Grid */
.grid { display: grid; gap: 14px; }
/* minmax(0,1fr) — NOT bare 1fr. A grid child's implicit min-width is its
   CONTENT width, so a wide table inside a bare-1fr column blows the column
   past the viewport and the whole PAGE scrolls horizontally (user
   2026-08-14: "adjust dynamically… proper horizontal scrolling"). With
   minmax(0,…) the column shrinks to fit and the table scrolls INSIDE its
   own .table-wrap instead. Same rule for any new grid. */
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1150px) {
  .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* cards must clip/scroll their own content, never push the page wider */
.card { min-width: 0; max-width: 100%; overflow-x: hidden; }
.card .table-wrap { overflow-x: auto; }
/* Dashboard cards: BOTH tables scroll inside a shared height cap (~20
   rows) so neither side leaves a void below the other (user 2026-08-14:
   no blank space — the earlier full-list version made Your Projects a
   mile long next to a short Recent Activity). Sticky headers keep the
   columns readable while scrolling. */
.dash-scroll { max-height: min(74vh, 860px); overflow-y: auto; }
.dash-scroll thead th { position: sticky; top: 0; z-index: 2;
  background: var(--bg-card); box-shadow: 0 1px 0 var(--border); }
/* Leaflet paints popup <a> in link-blue, which turned .btn-primary
   buttons blue-on-blue (user 2026-08-14). Buttons keep button colors. */
.leaflet-popup-content a.btn-primary,
.leaflet-popup-content a.btn-primary:hover { color: #fff; text-decoration: none; }
.leaflet-popup-content a.btn-secondary,
.leaflet-popup-content a.btn-secondary:hover { text-decoration: none; }

/* Metric cards */
.metric-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.metric-card .value {
  font-size: 28px; font-weight: 700; color: var(--idax-blue);
  letter-spacing: -0.5px; line-height: 1.2;
}
.metric-card.accent .value { color: var(--accent); }
.metric-card.success .value { color: var(--success); }
.metric-card.warning .value { color: var(--warning); }
.metric-card .label { color: var(--text-secondary); font-size: 12px; margin-top: 3px; font-weight: 500; }
.metric-card .sublabel { font-size: 10.5px; color: var(--text-muted); margin-top: 6px; }
.metric-card .delta { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--idax-blue); color: #fff; }
.btn-primary:hover { background: var(--idax-blue-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); text-decoration: none; }
.btn-small { padding: 4px 10px; font-size: 11px; border-radius: 6px; }
.btn-xs { padding: 2px 8px; font-size: 10px; border-radius: 5px; }

/* ─── Inputs ─────────────────────────────────────────────────────── */
.input, .select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--text-muted); }

/* Filter bar: a real grid so fields line up in tidy columns instead of
 * reflowing into a ragged last row (the date + Clear button used to end up
 * alone on a full-width line). */
.form-row {
  display: grid; gap: 10px 12px; align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.form-row > * { min-width: 0; }
.form-row > .wide { grid-column: span 2; }
.form-row > .auto { justify-self: start; }
.form-row .input, .form-row .select { width: 100%; }
.label {
  display: block; font-size: 11px; color: var(--text-secondary);
  font-weight: 600; margin-bottom: 4px; text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ─── Tables ─────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
/* SIZING MODEL (user 2026-08-15: "it should just try to fit this stuff…
   then have compact horizontal scrolling"). `width:100%` FORCED the table
   to the container, so every column squeezed and cells wrapped to three
   lines ("State Highway 71" / "US Highway 34 (US-34)") while the
   .table-wrap scrollbar never engaged because the table always "fit".
   width:auto + min-width:100% = fill the card when there's room, grow to
   the content when there isn't, and let .table-wrap scroll. Do NOT put
   width:100% back. */
table.tmc {
  /* max-content, NOT auto. With `auto` the automatic table-layout
     algorithm still shrinks the table to the available width and WRAPS
     the cells (it only overflows when min-content exceeds the box), so
     columns stayed squeezed and .table-wrap never showed a scrollbar
     (user 2026-08-15, twice). max-content = size to the content, overflow
     the box, and let .table-wrap scroll. min-width keeps it filling the
     card when the content is narrow. */
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: var(--bg-card);
}
/* Short factual columns never wrap; only genuinely long prose (project
   names) is allowed to. */
table.tmc td.date-cell, table.tmc td.num, table.tmc th.num,
table.tmc td.nowrap, table.tmc th.nowrap { white-space: nowrap; }
table.tmc td .site-cell-body { white-space: nowrap; }
/* …but genuinely long prose still wraps at a sane width, or max-content
   would stretch one project name into a 3000px-wide table. */
table.tmc td .proj-pill { display: inline-block; max-width: 250px; }
table.tmc thead th { white-space: nowrap; }
table.tmc thead th {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  position: sticky; top: 0; z-index: 1;
  cursor: pointer; user-select: none; white-space: nowrap;
}
table.tmc thead th:hover { background: var(--bg-hover); color: var(--text-heading); }
table.tmc tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
table.tmc tbody tr:hover { background: var(--accent-glow); }
table.tmc tbody tr:last-child td { border-bottom: none; }
table.tmc .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tmc .muted { color: var(--text-muted); }
/* Dates, times and window labels must never wrap mid-value — "2026-07-15"
 * was breaking across two lines and doubling row height. */
table.tmc td.nowrap, table.tmc td.date-cell { white-space: nowrap; }
table.tmc td.date-cell { font-variant-numeric: tabular-nums; }

/* ─── Badges / pills ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-secondary);
}
.badge.primary { background: var(--accent-soft); color: var(--idax-blue); }
.badge.success { background: #d1fae5; color: #065f46; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.error   { background: #fee2e2; color: #991b1b; }
.badge.merged  { background: #fef3c7; color: #92400e; }

.pill {
  display: inline-block; padding: 1px 7px; margin: 1px 2px 1px 0;
  border-radius: 999px;
  background: var(--accent-soft); color: var(--idax-blue);
  font-size: 10.5px; font-weight: 500;
}

/* ─── Login ──────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #366092 0%, #1e293b 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px 36px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.25);
}
.login-card .brand-line {
  text-align: center; font-size: 22px; font-weight: 800;
  color: var(--idax-blue); letter-spacing: -0.5px;
}
/* Sign-in logo (login, forgot, reset; 2026-09-25 redesign: templates/_cv_logo.html,
 * motion in cv_logo.css): the dark lockup on a navy vault plate, the same box as
 * the old PNG card (padding 14/18, the 303 x 120 logo capped at 260 px), so the
 * form below does not move. */
.login-card .brand-logo {
  display: flex; justify-content: center; align-items: center;
  margin: 4px auto 14px;
  padding: 14px 18px;
  width: fit-content;
  max-width: 340px;
  border-radius: 14px;
  background:
    radial-gradient(150px 110px at 20% 50%, rgba(79, 142, 247, 0.22), rgba(79, 142, 247, 0) 70%),
    linear-gradient(160deg, #23426f 0%, #16294f 55%, #0f1d3c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(148, 163, 184, 0.18),
    0 12px 28px -14px rgba(15, 23, 42, 0.6);
}
.login-card .brand-logo .cv-logo {
  max-width: 260px; width: 100%; height: auto;
}
.login-card .brand-sub {
  text-align: center; font-size: 12px; color: var(--text-muted);
  margin-top: 4px; margin-bottom: 26px;
}
.login-card .field { margin-bottom: 14px; }
.login-card .field-note {
  font-size: 11px; color: var(--text-muted); margin-top: 5px;
}
.login-card .field-note a { color: var(--idax-blue); font-weight: 600; }
.login-card .stay-signed-in {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-secondary);
  margin: 2px 0 16px; cursor: pointer; user-select: none;
}
.login-card .stay-signed-in input {
  width: 15px; height: 15px; margin: 0;
  accent-color: var(--idax-blue); cursor: pointer;
}
.login-card .btn { width: 100%; justify-content: center; padding: 11px 0; }
.login-card .help {
  text-align: center; font-size: 11.5px; color: var(--text-muted);
  margin-top: 18px;
}

.flash {
  padding: 10px 14px; border-radius: 8px; font-size: 12.5px;
  margin-bottom: 14px;
}
.flash.error { background: #fee2e2; color: #991b1b; }
.flash.info { background: var(--accent-soft); color: var(--idax-blue); }
.flash.success { background: #d1fae5; color: #065f46; }

/* ─── Site detail ────────────────────────────────────────────────── */
.site-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 14px; }
@media (max-width: 1000px) { .site-detail-grid { grid-template-columns: 1fr; } }
.date-group { margin-bottom: 16px; }
.date-group .date-hdr {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
}
.date-group .date-hdr .date {
  font-weight: 700; color: var(--idax-blue); font-size: 13px;
}
.date-group .date-hdr .count { color: var(--text-muted); font-size: 11px; }
.record-card {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 6px; background: #fff;
}
.record-card .top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.record-card .period { font-weight: 700; color: var(--text-heading); font-size: 12.5px; }
.record-card .range-pill {
  background: var(--bg-input); color: var(--text-secondary);
  padding: 1px 7px; border-radius: 5px; font-size: 10.5px;
}
.record-card .stats {
  font-size: 11.5px; color: var(--text-secondary); display: flex;
  flex-wrap: wrap; gap: 8px;
}
.record-card .stats b { color: var(--text-primary); font-weight: 600; }
.record-card .files { margin-top: 6px; display: flex; flex-wrap: wrap;
  gap: 4px; align-items: flex-start; }
.record-card .files .btn { margin-right: 0; }
/* Long project names: keep the pill hugging the right edge, wrapping
 * downward instead of shoving a void into the middle of the row. */
.record-card .top { align-items: flex-start; }
.record-card .top .proj-pill { align-items: flex-end; text-align: right; }
.record-card .top .proj-pill .proj-num { align-self: flex-end; }

/* ─── Action dropdowns on record cards (Download ▾ / View ▾) ─────── */
.act-menu { position: relative; display: inline-block; }
.act-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.act-menu > summary::-webkit-details-marker { display: none; }
.act-menu[open] > summary { box-shadow: 0 0 0 2px rgba(54,96,146,.25); }
.act-menu .act-panel {
  position: absolute; z-index: 60; top: calc(100% + 4px); left: 0;
  min-width: 150px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 22px rgba(15,23,42,.14);
  padding: 5px; display: flex; flex-direction: column;
}
.act-menu .act-panel a, .act-menu .act-panel button {
  display: block; width: 100%; text-align: left; background: none;
  border: none; padding: 5px 9px; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: var(--text-primary); text-decoration: none;
}
.act-menu .act-panel a:hover, .act-menu .act-panel button:hover {
  background: var(--bg-input);
}
.act-menu .act-sec {
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 5px 9px 2px;
}
.act-menu .act-sec-modern { color: #1d6b34; }
/* Classic entries with no stored classic file — visibly unavailable.
   Clicks are blocked in JS (not pointer-events) so the explanatory
   tooltip still shows on hover (portal.js::_classicGray). */
.act-menu .act-panel .cls-off {
  opacity: .42; filter: grayscale(1); cursor: not-allowed;
}
.act-menu .act-panel .cls-off:hover { background: transparent; }
.act-menu .act-sec:not(:first-child) {
  border-top: 1px solid var(--border); margin-top: 3px; padding-top: 6px;
}
/* Open act-menu panels are promoted to a FIXED overlay by portal.js
   (_actPlace) so scroll containers (tables, popups, the corridor
   panel) can never clip or squish them. This right-align rule is only
   the no-JS fallback for menus in tables. */
table.tmc .act-menu .act-panel { left: auto; right: 0; }
/* Panels stay HIDDEN until portal.js reparents them into the floating
   host (.act-float). The toggle event fires a frame AFTER <details>
   opens, so without this the panel painted inline inside the Leaflet
   popup for one frame — flashing a scrollbar whose scroll event then
   insta-closed the menu (user 2026-08-14). */
.act-menu .act-panel { display: none; }
.act-menu.act-float .act-panel { display: flex; }

/* ─── Map ────────────────────────────────────────────────────────── */
#map { width: 100%; height: calc(100vh - 180px); min-height: 480px; border-radius: 12px; }
.map-wrap { position: relative; }
.map-controls {
  position: absolute; top: 14px; left: 60px; z-index: 500;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex; gap: 8px; align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.map-controls .input { width: 200px; height: 30px; padding: 4px 10px; font-size: 12px; }

/* ─── Misc ───────────────────────────────────────────────────────── */
.muted { color: var(--text-muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
hr.sep { border: 0; border-top: 1px solid var(--border-light); margin: 14px 0; }
.spacer-sm { height: 8px; } .spacer { height: 14px; } .spacer-lg { height: 24px; }
.muted-tiny { font-size: 10.5px; color: var(--text-muted); }

/* Site-grouping stripe — a thin colored bar on the left edge of each
 * row that belongs to the same site cluster. AM/PM of the same
 * intersection share the stripe color so the eye can pair them in a
 * recency-sorted list. Color is a deterministic hash of site_id,
 * painted via the --site-color custom property set inline.
 * Much more subtle than a circular dot. */
.site-row {
  position: relative;
}
.site-row > td:first-child {
  /* NOT border-left: with border-collapse:collapse a cell border belongs
     to the TABLE's border layer and paints straight over a position:sticky
     <th> (user 2026-08-15: "color ribbons scrolling up into the headers").
     An inset shadow paints with the cell background and stays underneath. */
  box-shadow: inset 3px 0 0 var(--site-color, transparent);
  padding-left: 10px;
}
.site-cell { display: flex; align-items: center; gap: 8px; }
.site-cell .site-cell-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* When "Group by site" is on: rows belonging to the same site get a
 * very faint tinted background so the cluster reads as a single
 * block. First/last row of each group get rounded inner corners +
 * subtle outline to suggest grouping. */
.site-row.site-grouped > td {
  background: var(--site-tint, transparent);
}
.site-row.site-group-first > td:first-child { border-top-left-radius: 6px; }
.site-row.site-group-first > td:last-child  { border-top-right-radius: 6px; }
.site-row.site-group-last  > td:first-child { border-bottom-left-radius: 6px; }
.site-row.site-group-last  > td:last-child  { border-bottom-right-radius: 6px; }
.site-row.site-group-first > td             { border-top: 1px solid var(--site-color-soft, transparent); }
.site-row.site-group-last  > td             { border-bottom: 1px solid var(--site-color-soft, transparent); }

/* Group-toggle button — small inline pill in the card header. */
.group-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.group-toggle:hover { background: var(--bg-hover); }
.group-toggle.on {
  background: var(--accent-soft);
  color: var(--idax-blue);
  border-color: var(--idax-blue-light);
}
.group-toggle .group-toggle-icon { font-size: 10px; }
/* Project pill — the NAME is the headline; our internal P-NNNNN number
 * sits under it as a small muted tag (user direction 2026-07-26: clients
 * don't care about internal numbers). Falls back to showing the number as
 * the headline when no name is known. */
.proj-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.3;
  max-width: 340px;
}
.proj-pill .proj-name {
  font-weight: 650;
  color: var(--text-heading);
  font-size: 12.5px;
  /* Wrap between WORDS only. `word-break: break-word` split names
   * mid-word in narrow table cells ("Collecti / on On-Call"). */
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}
.proj-pill a.proj-name { color: var(--idax-blue); text-decoration: none; }
.proj-pill a.proj-name:hover { text-decoration: underline; }
.proj-pill .proj-num {
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
/* ─── Map: project filter control (static/mapkit.js) ──────────────── */
.projfilter {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.30);
  font: 12.5px/1.4 'Segoe UI', system-ui, sans-serif;
  color: var(--text-heading);
  width: 322px; overflow: hidden;
}
.projfilter.compact { width: 280px; font-size: 12px; }
.projfilter .pf-head { border-bottom: 1px solid var(--border-light); }
.projfilter .pf-toggle {
  width: 100%; display: flex; align-items: center; gap: 6px;
  background: transparent; border: none; cursor: pointer;
  padding: 7px 9px; font: 700 12px 'Segoe UI', sans-serif;
  color: var(--text-heading);
}
.projfilter .pf-count {
  margin-left: auto; font-weight: 600; font-size: 10px;
  color: var(--text-muted); background: var(--bg-hover);
  border-radius: 10px; padding: 1px 7px;
}
.projfilter .pf-tools { display: flex; gap: 4px; padding: 7px 8px 5px; }
.projfilter .pf-search {
  flex: 1; min-width: 0; padding: 4px 7px; font-size: 11.5px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-input);
}
.projfilter .pf-mini {
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  border-radius: 6px; padding: 3px 7px; font-size: 10.5px; font-weight: 600;
  color: var(--text-secondary);
}
.projfilter .pf-mini:hover { background: var(--bg-hover); }
.projfilter .pf-mini.on { background: var(--idax-blue); color: #fff;
                          border-color: var(--idax-blue); }
.projfilter .pf-tools2 { padding-top: 0; flex-wrap: wrap; }
.projfilter .pf-tools2 .pf-mini { flex: 1; white-space: nowrap; }
/* Labeled segmented rows (Sort / Group) — replaced the two dropdowns
   that truncated to "Sort: Na…" at panel width (user 2026-08-06). */
.projfilter .pf-segrow {
  display: flex; align-items: center; gap: 8px; padding: 3px 8px 5px;
}
.projfilter .pf-seglabel {
  flex: none; width: 42px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted);
}
.projfilter .pf-seg {
  flex: 1; display: flex; border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden; background: var(--bg-input);
}
.projfilter .pf-seg button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 4px 6px; font-size: 11px; font-weight: 600;
  color: var(--text-secondary); white-space: nowrap;
}
.projfilter .pf-seg button + button { border-left: 1px solid var(--border); }
.projfilter .pf-seg button:hover { background: var(--bg-hover); }
.projfilter .pf-seg button.on {
  background: var(--idax-blue); color: #fff;
}
.projfilter .pf-list { max-height: 46vh; overflow: auto; padding: 0 5px 8px; }
.projfilter.compact .pf-list { max-height: 240px; }
.projfilter .pf-group { margin-bottom: 3px; }
.projfilter .pf-grouphead {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px; background: var(--bg-hover); border-radius: 6px;
  position: sticky; top: 0; z-index: 1;
}
.projfilter .pf-caret {
  border: none; background: transparent; cursor: pointer; padding: 0 3px;
  font-size: 11px; color: var(--text-secondary);
}
.projfilter .pf-gname { font-weight: 700; font-size: 12px; }
.projfilter .pf-gcount { margin-left: auto; font-size: 10.5px; color: var(--text-muted); }
.projfilter .pf-row {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 6px 4px 22px; cursor: pointer; border-radius: 6px;
}
.projfilter .pf-row:hover { background: var(--accent-glow); }
.projfilter .pf-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 500; font-size: 12px;
}
.projfilter .pf-num { font-size: 10px; color: var(--text-muted); }
.projfilter .pf-sites {
  font-size: 10.5px; color: var(--text-secondary); font-weight: 600;
  background: var(--bg-hover); border-radius: 9px; padding: 0 6px;
}
.projfilter .pf-empty { padding: 8px; color: var(--text-muted); font-size: 11px; }
.projfilter input[type="checkbox"] { accent-color: var(--idax-blue); margin: 0; }

/* Compact "view intersection" trigger used inside table rows / lists. */
.xsec-btn {
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  border-radius: 6px; font-size: 12.5px; line-height: 1;
  color: var(--text-secondary); flex: none;
  width: 28px; height: 24px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.xsec-btn:hover { background: var(--accent-glow); border-color: var(--accent); }
/* Compact variant used inline next to the N-S street name in tables. */
.xsec-btn.xsec-inline { padding: 0 4px; font-size: 12px; line-height: 1.35;
                        flex: none; }

/* ─── Intersection viewer modal (static/intersection.js) ──────────── */
.xsec-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.xsec-modal {
  background: var(--bg-card); border-radius: 14px; width: min(1180px, 100%);
  max-height: 92vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}
.xsec-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.xsec-title { display: flex; flex-direction: column; min-width: 0; }
.xsec-name { font-size: 16px; font-weight: 700; color: var(--text-heading); }
.xsec-sub { font-size: 11.5px; color: var(--text-muted); }
.xsec-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.xsec-close {
  border: none; background: transparent; font-size: 17px; cursor: pointer;
  color: var(--text-muted); padding: 2px 6px; border-radius: 6px;
}
.xsec-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.xsec-controls { padding: 10px 18px 4px; border-bottom: 1px solid var(--border-light); }
.xsec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.xsec-lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-muted); width: 46px; flex: none;
}
.xsec-chip {
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 550;
  color: var(--text-secondary); display: inline-flex; align-items: baseline; gap: 5px;
}
.xsec-chip:hover { background: var(--bg-hover); }
.xsec-chip.on {
  background: var(--idax-blue); border-color: var(--idax-blue); color: #fff;
}
.xsec-chip-sub { font-size: 9.5px; opacity: 0.75; }
.xsec-gap { width: 12px; }
.xsec-custom { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; position: relative; }
.xsec-custom input {
  border: 1px solid var(--border); border-radius: 7px; padding: 3px 6px;
  font-size: 11.5px; background: var(--bg-input); color: var(--text-primary);
  transition: border-color .18s, box-shadow .18s;
}
.xsec-custom input:focus {
  outline: none; border-color: var(--idax-blue);
  box-shadow: 0 0 0 3px rgba(54, 96, 146, 0.18);
}
/* out-of-coverage value just got snapped back: amber pulse + micro shake */
.xsec-custom input.snap {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.30);
  animation: xsecSnapShake .38s ease;
}
@keyframes xsecSnapShake {
  20% { transform: translateX(-2px); } 40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); } 80% { transform: translateX(1px); }
}
/* small bubble under the custom inputs ("Data ends at 6:00 PM") */
.xsec-tip {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  background: #78350f; color: #fef3c7; font-size: 10.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.xsec-tip::before {
  content: ""; position: absolute; top: -4px; left: 16px;
  border: 4px solid transparent; border-bottom-color: #78350f; border-top: 0;
}
.xsec-tip.show { opacity: 1; transform: translateY(0); }
/* the full available window, always visible; emphasized while custom active */
.xsec-covnote {
  font-size: 10.5px; color: var(--text-muted); margin-left: 8px;
  padding: 2px 8px; border: 1px dashed var(--border); border-radius: 999px;
  white-space: nowrap;
}
.xsec-covnote.on {
  color: #1d4ed8; border-color: #93c5fd; border-style: solid; background: #eff6ff;
}
.xsec-dash { color: var(--text-muted); }
.xsec-apply {
  border: 1px solid var(--border); background: #fff; border-radius: 6px;
  padding: 3px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  color: var(--text-secondary);
}
.xsec-apply:hover { background: var(--bg-hover); }
.xsec-body {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 16px; padding: 14px 18px 18px; overflow: auto;
}
.xsec-diagram { display: flex; align-items: center; justify-content: center; min-height: 320px; }
.xsec-diagram.busy { opacity: 0.45; transition: opacity .12s; }
/* qc_svg emits `<svg width="100%" height="100%" viewBox=...>`: it has an
   intrinsic RATIO but NO intrinsic pixel size. The old rule gave it neither
   a definite width (auto-width flex item) nor a definite height
   (`height:auto`), so the browser fell back to the CSS default object size
   (300x150, ratio-corrected to 300x300) and the diagram rendered at 300px
   inside a ~708px column — every street label landed at ~6px, which is the
   "labels and text all scrunched together" the user reported 2026-07-27.
   The QC map escapes this because Leaflet's divIcon writes an explicit px
   box; the report escapes it because report_diagram._resize_svg wraps the
   SVG in `<div style="width:Npx;height:Npx">`. The portal was the only
   consumer handing it an indefinite box. This is the web equivalent: a
   DEFINITE, aspect-locked box.
   DO NOT reintroduce `height:auto` on the svg — that is exactly what
   removes the definite height. DO NOT cap with `max-height` on the svg
   either: it clamps one axis only, and preserveAspectRatio="meet" then
   letterboxes with dead gutters. */
.xsec-svg {
  width: 100%;
  max-width: min(100%, 82vh);       /* fill the pane (user 2026-08-05: too small) */
  aspect-ratio: var(--xsec-ar, 1);  /* every qc_svg canvas is square */
  margin: 0 auto;
}
.xsec-svg svg { display: block; width: 100%; height: 100%; max-width: none; }
.xsec-loading, .xsec-empty {
  color: var(--text-muted); font-size: 12.5px; padding: 40px 10px; text-align: center;
}
.xsec-scope {
  font-size: 11.5px; color: var(--text-secondary); font-weight: 600;
  background: var(--bg-hover); border-radius: 6px; padding: 6px 9px; margin-bottom: 10px;
}
.xsec-warn {
  font-size: 11.5px; background: #fef3c7; color: #92400e;
  border-radius: 6px; padding: 6px 9px; margin-bottom: 8px;
}
.xsec-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.xsec-kpi {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px;
  background: var(--bg-card);
}
.xsec-kpi-v { font-size: 16px; font-weight: 800; color: var(--text-heading); line-height: 1.1; }
.xsec-kpi-l { font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-top: 2px; }
.xsec-kpi-s { font-size: 9.5px; color: var(--text-secondary); margin-top: 1px; }
.xsec-legs { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.xsec-legs th, .xsec-legs td {
  padding: 5px 7px; border-bottom: 1px solid var(--border-light); text-align: left;
}
.xsec-legs th {
  background: var(--bg-hover); color: var(--text-secondary);
  font-size: 10px; text-transform: uppercase; letter-spacing: .4px;
}
.xsec-legs td.num, .xsec-legs th.num { text-align: right; }
.xsec-foot { font-size: 10px; color: var(--text-muted); margin-top: 10px; }
@media (max-width: 900px) {
  .xsec-body { grid-template-columns: 1fr; }
  .xsec-kpis { grid-template-columns: repeat(3, 1fr); }
}

/* Dashboard overview map — spread only; full interaction lives on /map */
.mini-map {
  height: 420px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
}
.mini-map .leaflet-container { background: #eef2f7; }

.text-right { text-align: right; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.empty-state {
  text-align: center; padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .big { font-size: 48px; margin-bottom: 8px; opacity: 0.4; }

/* Scroll-saver: avoid layout shift when scrollbar appears */
html { scrollbar-gutter: stable; }

/* City links (user 2026-08-15): every city shown anywhere links to its
   /city/<name> page, and a multi-city cell renders ONE LINK PER CITY.
   Mirrors _macros.html::city_links + portal.js::cityLinks. */
a.city-link { color: var(--idax-blue); text-decoration: none; }
a.city-link:hover { text-decoration: underline; }
.city-sep { color: var(--text-muted); }
/* inside Leaflet popups the generic anchor color would win */
.leaflet-popup-content a.city-link { color: var(--idax-blue); }

/* Long record tables (My Counts, Discover) scroll INSIDE a viewport-tall
   box. Before this the horizontal scrollbar lived at the bottom of a
   1,000-row page — unreachable without scrolling to the end (user
   2026-08-15: "theres a scroll bar but it is WAY at the bottom"). The
   header stays stuck so columns remain identifiable while scrolling. */
.table-wrap.tall { max-height: calc(100vh - 230px); min-height: 320px;
                   overflow: auto; }
.table-wrap.tall table.tmc thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--bg-input); box-shadow: 0 1px 0 var(--border);
}

/* Action column: the 🚦 / ↗ controls get their OWN narrow column so the
   N–S Street header sits over the street text, not over the buttons
   (user 2026-08-15). Never put them back inside the street cell. */
table.tmc td.act-col, table.tmc th.act-col {
  white-space: nowrap; width: 1%; padding-right: 6px;
}
table.tmc td.act-col .xsec-btn { margin-right: 4px; }
table.tmc td.act-col .xsec-btn:last-child { margin-right: 0; }

/* Sticky table headers must be OPAQUE and above every row layer. */
.table-wrap.tall table.tmc thead th,
.dash-scroll table.tmc thead th,
.dash-scroll thead th {
  position: sticky; top: 0; z-index: 6;
  background: var(--bg-input);
  box-shadow: 0 1px 0 var(--border);
}

/* ALWAYS-VISIBLE SCROLLBARS on table containers. Windows/Chromium use
   OVERLAY scrollbars that only fade in while you are already scrolling —
   so a horizontal scrollbar was undiscoverable and the table just looked
   cut off (user 2026-08-15, three times). Styling ::-webkit-scrollbar
   switches the element to CLASSIC scrollbars: always visible, and they
   reserve their own space. */
.table-wrap::-webkit-scrollbar { height: 13px; width: 13px; }
.table-wrap::-webkit-scrollbar-track {
  background: var(--border-light); border-radius: 7px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #94a3b8; border-radius: 7px;
  border: 3px solid var(--border-light);
}
.table-wrap::-webkit-scrollbar-thumb:hover { background: #64748b; }
.table-wrap::-webkit-scrollbar-corner { background: var(--border-light); }
.table-wrap { scrollbar-color: #94a3b8 var(--border-light); }

/* On-call badge sits UNDERNEATH its project name, compact — not floating
   off to the right in its own column of whitespace (user 2026-08-15). */
a.oncall-badge {
  display: block; width: fit-content; max-width: 100%;
  margin: 3px 0 0 0 !important; font-size: 10px; line-height: 1.35;
  padding: 1px 6px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
a.oncall-badge:hover { text-decoration: underline; }

/* Mirrored horizontal scrollbar ABOVE a wide table (portal.js
   attachTopScrollbars). Native h-scrollbars sit at the bottom of the
   scroll box, which on a long table is off screen (user 2026-08-15).
   COMPACT on purpose: 10px strip, no margins — it must not eat vertical
   space. Only inserted when the table actually overflows. */
.hscroll-top {
  overflow-x: auto; overflow-y: hidden;
  height: 10px; line-height: 0; font-size: 0;
  margin: 0 0 1px 0;
  border-radius: 6px; background: var(--border-light);
}
.hscroll-top .hscroll-top-inner { height: 1px; }
.hscroll-top::-webkit-scrollbar { height: 10px; }
.hscroll-top::-webkit-scrollbar-track {
  background: var(--border-light); border-radius: 6px;
}
.hscroll-top::-webkit-scrollbar-thumb {
  background: #94a3b8; border-radius: 6px;
  border: 2px solid var(--border-light);
}
.hscroll-top::-webkit-scrollbar-thumb:hover { background: #64748b; }
.hscroll-top { scrollbar-color: #94a3b8 var(--border-light); }

/* "Counted in" date filter on the map (2026-09-08) */
.projfilter.datefilter{width:250px;padding:0}
.datefilter .pf-head{display:flex;align-items:center;gap:6px;padding:6px 9px;font-size:12px;border-bottom:1px solid #e2e8f0;white-space:nowrap}
.datefilter .pf-head b{white-space:nowrap}
.datefilter .pf-toggle{margin-left:auto;border:0;background:transparent;cursor:pointer;color:#64748b;font-size:12px}
.datefilter .df-on{font-size:9.5px;color:#fff;background:#0f766e;border-radius:9px;padding:1px 6px}
.datefilter .df-body{padding:7px 9px}
.datefilter .df-chips{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.datefilter .df-chip{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:12px;padding:2px 9px;font-size:11px;cursor:pointer}
.datefilter .df-chip.on{background:#366092;border-color:#366092;color:#fff;font-weight:600}
.datefilter .df-range{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:10.5px;color:#475569}
.datefilter .df-range input{border:1px solid #cbd5e1;border-radius:5px;padding:2px 4px;font-size:10.5px}
.datefilter .df-clear{border:1px solid #cbd5e1;background:#fff;border-radius:5px;padding:2px 7px;font-size:10.5px;cursor:pointer}
.datefilter .df-hint{font-size:9.5px;color:#94a3b8;margin-top:5px}

/* ─── Released-data editor (Client Manager, 2026-09-16) ─────────────
   Opened by static/releases.js. Project → site → day → collection rows,
   each with a tri-state tick: ticked = released, unticked = held back,
   partial = some of it held. Colours reuse the badge palette so "Held"
   reads like an error badge and "Released" like a success badge. */
.rel-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 210;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(2px); }
.rel-panel { background: var(--bg-card); border-radius: 16px; width: min(1060px, 96vw);
  height: min(88vh, 940px); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.rel-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start; }
.rel-head h3 { margin: 0; font-size: 17px; color: var(--text-heading); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.rel-head .sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.rel-x { border: 0; background: transparent; font-size: 18px; cursor: pointer; flex: none;
  color: var(--text-muted); padding: 4px 9px; border-radius: 8px; }
.rel-x:hover { background: var(--bg-hover); color: var(--text-primary); }
.rel-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rel-stat { background: var(--bg-input); border: 1px solid var(--border-light); border-radius: 10px;
  padding: 4px 11px; font-size: 11.5px; color: var(--text-secondary); }
.rel-stat b { color: var(--text-heading); font-size: 13px; font-variant-numeric: tabular-nums; margin-right: 2px; }
.rel-stat.held b { color: #b91c1c; }
.rel-tools { display: flex; gap: 8px; align-items: center; padding: 10px 22px;
  border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }
.rel-q { padding: 7px 11px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-input); color: var(--text-primary); outline: none; min-width: 240px; }
.rel-q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.rel-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--bg-input); }
.rel-seg button { border: 0; background: transparent; padding: 6px 11px; font-size: 11.5px;
  cursor: pointer; color: var(--text-secondary); white-space: nowrap; }
.rel-seg button.on { background: var(--idax-blue); color: #fff; font-weight: 600; }
.rel-legend { font-size: 10.5px; color: var(--text-muted); display: flex; gap: 4px; align-items: center; }
.rel-body { flex: 1; overflow: auto; padding: 6px 12px 16px; }
.rel-row { display: grid; grid-template-columns: 22px 26px minmax(0,1fr) auto auto; gap: 6px;
  align-items: center; padding: 6px 10px 6px calc(10px + var(--lvl, 0) * 28px);
  border-radius: 9px; min-height: 42px; }
.rel-row:hover { background: var(--bg-hover); }
.rel-row.rel-focus { box-shadow: inset 0 0 0 2px var(--accent); }
.rel-p { border-top: 1px solid var(--border-light); margin-top: 6px; padding-top: 10px; }
.rel-p:first-child { border-top: 0; margin-top: 0; }
.rel-s { background: linear-gradient(90deg, transparent, transparent); }
.rel-tw { width: 20px; height: 20px; border: 0; background: transparent; cursor: pointer;
  color: var(--text-secondary); font-size: 14px; line-height: 20px; border-radius: 5px; padding: 0; }
.rel-tw:hover { background: var(--border-light); color: var(--text-primary); }
.rel-tw.none { visibility: hidden; display: inline-block; width: 20px; }
.rel-ck { display: flex; align-items: center; justify-content: center; }
.rel-ck input { width: 16px; height: 16px; accent-color: var(--idax-blue); cursor: pointer; margin: 0; }
.rel-ck input:disabled { cursor: not-allowed; }
.rel-main { min-width: 0; }
.rel-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); display: flex; gap: 7px;
  align-items: center; min-width: 0; }
.rel-title .rel-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-code { display: inline-block; min-width: 22px; text-align: center; font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--idax-blue); }
.rel-dow { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em; min-width: 26px; }
.rel-r .rel-title { font-weight: 500; }
.rel-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.rel-row.rel-off .rel-name, .rel-row.rel-off .rel-sub { color: var(--text-muted); }
.rel-row.rel-off .rel-title .rel-name { text-decoration: line-through; text-decoration-color: #fca5a5;
  text-decoration-thickness: 1.5px; }
.rel-hold-note { font-size: 10px; font-weight: 500; color: #b91c1c; background: #fee2e2;
  padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.rel-pill { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.rel-pill.on { background: #d1fae5; color: #065f46; }
.rel-pill.off { background: #fee2e2; color: #991b1b; }
.rel-pill.mix { background: #fef3c7; color: #92400e; }
.rel-pill.chg { outline: 2px solid var(--accent); outline-offset: 1px; }
.rel-status { display: flex; justify-content: flex-end; min-width: 80px; }
.rel-act { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; min-width: 0; }
.rel-row:hover .rel-act, .rel-row:focus-within .rel-act { opacity: 1; }
.rel-act button { font-size: 10px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-card); cursor: pointer; color: var(--text-secondary); white-space: nowrap; }
.rel-act button:hover { border-color: var(--accent); color: var(--idax-blue); }
.rel-foot { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px;
  align-items: center; background: var(--bg-card); }
.rel-chips { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; min-width: 0; align-items: center;
  font-size: 12px; color: var(--text-primary); }
.rel-chip { font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  background: #fee2e2; color: #991b1b; max-width: 320px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.rel-chip.rel { background: #d1fae5; color: #065f46; }
.rel-chip.more { background: var(--bg-input); color: var(--text-secondary); }
.rel-empty { padding: 44px 20px; text-align: center; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 720px) {
  .rel-row { grid-template-columns: 18px 24px minmax(0,1fr) auto; }
  .rel-act { display: none; }
  .rel-panel { height: 94vh; width: 100vw; border-radius: 10px; }
}

/* ─── Remove a grant (Client Manager, 2026-10-10; static/ungrant.js) ──
   A hold hides data and keeps the grant; "Remove grant" takes the grant
   away. The release editor's project rows carry the button (always shown,
   red so it never reads like Hold all); the "what gives access" window
   lists every grant that gives a customer one project. */
.rel-actwrap { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 0; }
.rel-ungrant { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px;
  border: 1px solid #fca5a5; background: var(--bg-card); color: #b91c1c; cursor: pointer; white-space: nowrap; }
.rel-ungrant:hover:not(:disabled) { background: #fee2e2; border-color: #b91c1c; }
.rel-ungrant:disabled { opacity: .5; cursor: not-allowed; }
.rel-ungrant.alt { border-color: var(--border); color: var(--text-secondary); }
.rel-ungrant.alt:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--accent); color: var(--idax-blue); }
.rel-own-note { font-size: 10px; color: var(--text-muted); white-space: nowrap; cursor: help; }
@media (max-width: 720px) {
  .rel-actwrap { grid-column: 1 / -1; }
}
.ung-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 230;
  display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
.ung-panel { background: var(--bg-card); border-radius: 14px; width: min(680px, 96vw); max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.ung-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 12px;
  align-items: flex-start; }
.ung-head h3 { margin: 0; font-size: 16px; color: var(--text-heading); }
.ung-name { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.ung-sub0 { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.45; }
.ung-x { border: 0; background: transparent; font-size: 18px; cursor: pointer; flex: none;
  color: var(--text-muted); padding: 4px 9px; border-radius: 8px; }
.ung-x:hover { background: var(--bg-hover); color: var(--text-primary); }
.ung-body { overflow: auto; padding: 6px 20px 10px; }
.ung-row { display: flex; gap: 12px; align-items: center; padding: 11px 0;
  border-bottom: 1px solid var(--border-light); }
.ung-row:last-child { border-bottom: 0; }
.ung-main { flex: 1; min-width: 0; }
.ung-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.ung-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.ung-do { flex: none; }
.ung-btn { font-size: 11.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text-primary); white-space: nowrap; }
.ung-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--idax-blue); }
.ung-btn.danger { border-color: #fca5a5; color: #b91c1c; background: var(--bg-card); }
.ung-btn.danger:hover:not(:disabled) { background: #fee2e2; border-color: #b91c1c; color: #b91c1c; }
.ung-btn:disabled { opacity: .5; cursor: not-allowed; }
.ung-note { font-size: 11px; color: var(--text-muted); padding: 8px 0 2px; }
.ung-empty { padding: 30px 10px; text-align: center; color: var(--text-muted); font-size: 12.5px; }
.ung-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px;
  align-items: center; }
.ung-foot-note { flex: 1; min-width: 0; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
@media (max-width: 560px) {
  .ung-row { flex-direction: column; align-items: stretch; }
  .ung-foot { flex-wrap: wrap; }
}

/* ─── Tube counts (schema v17, 2026-09-23; drawn by tube.js) ─────────
   Tube sites are squares on maps, TMC intersections circles. The Tube
   data badge is gold (TMC's is green). */
.badge.tube { background: #fff4d6; color: #8a5a00; }
/* the TMC data badge beside it in the My Counts Type column (Ped/Bike gets its own later) */
.badge.tmc { background: #dbeafe; color: #1e3a8a; }
.tube-site-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
@media (max-width: 1000px) { .tube-site-grid { grid-template-columns: minmax(0, 1fr); } }
.tube-site-grid > div, .tube-charts > div { min-width: 0; }
table.tube-table thead th, table.tube-table tbody td { padding: 8px 9px; }
table.tube-table td.tube-site { max-width: 230px; white-space: normal; }
table.tube-table td .proj-pill { max-width: 200px; }
table.tmc tr.tube-active td { background: var(--accent-glow); }
table.tmc tr.tube-pickable { cursor: pointer; }
table.tmc tr.tube-active td:first-child { box-shadow: inset 3px 0 0 var(--idax-blue); }
.tube-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tube-kpi { background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; min-width: 112px; }
.tube-kpi small { display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .4px; }
.tube-kpi b { display: block; font-size: 15px; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.tube-kpi span { display: block; font-size: 10.5px; color: var(--text-secondary); }
.tube-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.tube-charts .wide { grid-column: 1 / -1; }
.tube-charts h3 { margin: 0 0 4px; font-size: 12.5px; color: var(--text-heading); }
.tube-chart { position: relative; height: 240px; }
.tube-empty { padding: 30px 10px; text-align: center; color: var(--text-muted); font-size: 12px; }
.tube-loading { opacity: .45; transition: opacity .15s; }
.tube-seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 7px; overflow: hidden; }
.tube-seg-btn { border: 0; padding: 4px 11px; cursor: pointer; background: #fff; color: #334155;
  font: inherit; font-size: 11.5px; }
.tube-seg-btn + .tube-seg-btn { border-left: 1px solid #e2e8f0; }
.tube-seg-btn.on { background: var(--idax-blue); color: #fff; font-weight: 700; }
.tube-note { background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; color: var(--text-secondary); }
.tube-limit { display: flex; align-items: baseline; gap: 8px; }
.tube-limit big { font-size: 30px; font-weight: 700; color: var(--idax-blue); line-height: 1.1; }
table.tube-geh th.grp { text-align: center; }
table.tube-geh tr.geh-flag td { background: #fef2f2; }
table.tube-geh td.geh-bad { color: #b91c1c; font-weight: 700; }
table.tube-geh tr.tube-total td { font-weight: 700; background: var(--bg-input); border-top: 2px solid var(--border); }
.tube-modal { position: fixed; inset: 0; z-index: 9990; }
.tube-modal-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.tube-modal-card { position: relative; width: min(1180px, 94vw); height: 86vh; margin: 5vh auto 0;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(15, 23, 42, .35);
  display: flex; flex-direction: column; overflow: hidden; }
.tube-modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); }
.tube-modal-x { margin-left: auto; border: none; background: none; color: #94a3b8; font-size: 15px; cursor: pointer; }
.tube-modal-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; }
.tube-cmp-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tube-cmp-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 11.5px; }
.tube-cmp-legend i, .tube-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 5px; vertical-align: -1px; }
.tube-cmp-view { flex: 1; min-height: 0; overflow: auto; }
table.tube-sum td, table.tube-sum thead th { text-align: left; font-variant-numeric: tabular-nums; }

/* ─── One tube count and the compare view (2026-09-24, tube.js
   mountStudy / mountCompare): context line, KPI groups (Volume, Speed,
   Class), tools, chart panels with CSV / PNG buttons, Export menus. ── */
.tube-detail-line { display: flex; flex-wrap: wrap; align-items: center; row-gap: 3px;
  font-size: 12.5px; color: var(--text-secondary); margin-bottom: 12px; }
.tube-detail-line .sep { color: #cbd5e1; margin: 0 8px; }
.tube-kgroups { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tube-kgroup-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 5px;
  font: 700 10.5px/1.4 'Segoe UI', system-ui, sans-serif; color: var(--text-heading);
  text-transform: uppercase; letter-spacing: .6px; }
.tube-kgroup-head small { font-weight: 400; font-size: 11.5px; text-transform: none; letter-spacing: 0;
  color: var(--text-secondary); }
.tube-kgroup-head small b { color: var(--text-heading); }
.tube-kgroup .tube-kpis { margin-bottom: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tube-kgroup .tube-kpi { min-width: 0; }
.tube-kpi.hero { background: #f2f6fb; border-color: #c9d8ec; }
.tube-kpi.hero b { font-size: 18px; color: var(--idax-blue); }
.tube-kpi b em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-left: 1px; }
.tube-kpi .na { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.tube-kpi > span { line-height: 1.4; max-width: 260px; }
.tube-split { display: flex; width: 100%; min-width: 90px; height: 4px; border-radius: 2px; overflow: hidden;
  margin: 3px 0; background: var(--border); }
.tube-split i { display: block; height: 100%; }
.tube-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 12px;
  padding: 7px 10px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px;
  font-size: 12px; }
.tube-tools .lab { font: 700 10px/1 'Segoe UI', system-ui, sans-serif; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px; }
.tube-ctl { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-right: 8px; }
.tube-tools .select { width: auto; max-width: 100%; padding: 4px 8px; font-size: 12px; border-radius: 6px; }
.tube-tools .tube-exp-menu { margin-left: auto; }
.tube-seg-btn .tube-sw { margin-right: 4px; }
.tube-panel { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 8px;
  background: var(--bg-card); min-width: 0; }
.tube-panel > header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tube-panel > header h3 { flex: 1; min-width: 0; margin: 0; font-size: 12.5px; color: var(--text-heading); }
.tube-exp { display: inline-flex; gap: 4px; flex-shrink: 0; }
.tube-exp button { border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary);
  font: 600 10px/1.8 'Segoe UI', system-ui, sans-serif; padding: 0 8px; border-radius: 5px; cursor: pointer; }
.tube-exp button:hover { border-color: var(--idax-blue); color: var(--idax-blue); background: #fff; }
.tube-exp button.on { background: var(--idax-blue); border-color: var(--idax-blue); color: #fff; }
/* a chart's Table view (tube.js wireExports: the rows its CSV holds) */
.tube-tblview[hidden] { display: none; }
.tube-tblview .table-wrap { max-height: 300px; overflow: auto; }
.tube-tblview table { font-size: 11.5px; }
.tube-tblview td, .tube-tblview th { white-space: nowrap; }
.tube-panel .note { margin-top: 6px; line-height: 1.45; }
.tube-panel .tube-tbl { max-height: 460px; overflow: auto; }
.tube-panel[data-p="summary"] .tube-tbl { max-height: none; }
.tube-cmp > .tube-panel { margin-bottom: 16px; }
.tube-cmp-legend { margin: 0 0 12px; }
.tube-cmp-legend label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.tube-cmp-legend label.off { opacity: .45; }
.tube-cmp-legend label i { width: 18px; height: 0; border-radius: 0; margin: 0; }
table.tube-sum thead th { white-space: normal; min-width: 150px; max-width: 240px; text-transform: none;
  letter-spacing: 0; vertical-align: bottom; cursor: default; position: static; }
table.tube-sum thead th:first-child { min-width: 0; }
table.tube-sum tbody th { position: sticky; left: 0; z-index: 1; background: var(--bg-card); text-align: left;
  white-space: nowrap; font-weight: 600; font-size: 12px; color: var(--text-secondary); padding: 7px 12px;
  border-bottom: 1px solid var(--border-light); }
table.tube-sum tbody td { padding: 7px 12px; }
table.tube-sum th.off, table.tube-sum td.off { opacity: .35; }
table.tube-sum tr.secondary th, table.tube-sum tr.secondary td { color: var(--text-muted); font-size: 11.5px; }
.act-menu.tube-busy > summary { opacity: .6; cursor: progress; }
.tube-head-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) {
  .tube-charts { grid-template-columns: minmax(0, 1fr); }
  .tube-chart { height: 220px; }
  .tube-tools .tube-exp-menu { margin-left: 0; }
  .tube-kgroup .tube-kpis { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .tube-kpi > span { max-width: none; }
}

/* ─── Phone width (2026-09-24): the sidebar becomes a top bar so a page
   gets the whole screen width (it kept a fixed 240px column before). ── */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 8px 0; }
  .sidebar .brand { display: none; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 2px; padding: 0 8px; }
  .sidebar nav a { padding: 6px 9px; font-size: 12px; gap: 7px; }
  /* the Admin group: its own row under the others, the label first */
  .sidebar nav .nav-admin { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center;
    margin: 6px 0 0; padding: 6px 2px 2px; border-radius: 0 0 8px 8px; }
  .sidebar nav .nav-section { padding: 0 6px 0 7px; }
  .sidebar .spacer, .sidebar .footer { display: none; }
  .sidebar .user-card { padding: 6px 14px 0; }
  .main { padding: 12px 12px 30px; }
  .page-header { flex-wrap: wrap; gap: 8px; }
  .page-header .row { flex-wrap: wrap; }
  .card { padding: 14px 12px; }
}

/* ─── Count-type filter (2026-09-23; portal.js cvKindFilter) ────────
   Rows of the other kind hide; !important beats an expander's inline
   display so a hidden row stays hidden until the filter changes. */
tr.kind-hidden { display: none !important; }
.kind-filter { display: inline-flex; align-items: center; gap: 6px; }
.kind-filter select { width: auto; padding: 3px 26px 3px 8px; font-size: 12px; border-radius: 6px; }

/* ─── Tube data release control (schema v20, 2026-09-24) ────────────
   Admins choose which tube data types (Volume / Speed / Class) customers
   get; static/tube_release.js draws the chips and saves every click.
   Green = released, grey struck through = withheld from customers,
   amber = released for some of the counts in scope. */
.trel { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; vertical-align: middle; }
.trel-chip { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 1px 9px;
  font: 600 11px/1.6 'Segoe UI', system-ui, sans-serif; cursor: pointer; color: var(--text-secondary);
  display: inline-flex; gap: 4px; align-items: center; transition: background .12s, border-color .12s; }
.trel-chip i, .trel-chip em { font-style: normal; }
.trel-chip em { font-weight: 700; opacity: .85; }
.trel-chip.on { background: #e8f5ee; border-color: #9fd3b4; color: #1d6b34; }
.trel-chip.off { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
.trel-chip.off s { text-decoration-thickness: 1.5px; }
.trel-chip.some { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.trel-chip:hover:not(:disabled) { border-color: var(--idax-blue); box-shadow: 0 0 0 2px rgba(54, 96, 146, .12); }
.trel-chip:disabled { cursor: progress; }
.trel.trel-busy { opacity: .5; }
.trel-card { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px;
  border-left: 4px solid #1d6b34; }
.trel-card .trel-title { font-weight: 700; font-size: 13px; color: var(--text-heading); }
.trel-card .trel-note { font-size: 11.5px; color: var(--text-muted); }
.trel-row { margin-top: 4px; }
#trel-toasts { position: fixed; top: 16px; right: 16px; z-index: 9995; display: flex;
  flex-direction: column; gap: 8px; pointer-events: none; }
.trel-toast { background: #0f172a; color: #f1f5f9; font-size: 12.5px; padding: 10px 16px;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .28); max-width: 440px;
  transition: opacity .3s; }
.trel-toast.ok::before { content: "✔  "; color: #34d399; font-weight: 700; }
.trel-toast.err { background: #7f1d1d; }
/* the data types of a tube count (My Counts Type column, tube site rows) */
.tube-types { display: inline-flex; gap: 2px 6px; flex-wrap: wrap; font-size: 11px;
  color: var(--text-secondary); vertical-align: middle; }
.tube-types .tt-off { text-decoration: line-through; color: #94a3b8; }
.tube-panel .trel-withheld, .trel-withheld { font: 600 10px/1.5 'Segoe UI', system-ui, sans-serif;
  color: #9a3412; background: #fff7ed; border: 1px solid #fdba74; border-radius: 999px;
  padding: 0 7px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
/* the Data cell of a project: TMC, Tube or TMC + Tube (_macros.html data_badges) */
.data-badges { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.data-plus { font-weight: 700; color: var(--text-muted); font-size: 11px; }

/* ─── The tube site popup on every map (tube.js popupShell / popupBody,
   2026-09-24): dates, the latest count's figures, every count's
   downloads. The Posted Speed Limit is the small secondary line. ── */
.tpop { font: 12px/1.45 'Segoe UI', system-ui, sans-serif; color: var(--text-primary); min-width: 236px; }
.tpop-title { font-size: 13.5px; color: var(--text-heading); margin-bottom: 1px; }
.tpop-sub { color: var(--text-secondary); font-size: 11px; margin-bottom: 4px; }
.tpop-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 10px; font-size: 11.5px; margin: 4px 0 5px; }
.tpop-k { color: var(--text-muted); white-space: nowrap; }
.tpop-v { font-weight: 600; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.tpop-m { color: var(--text-muted); font-size: 10.5px; font-weight: 400; }
.tpop-sec { font: 700 10px/1.4 'Segoe UI', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .5px;
  color: #8a5a00; border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; }
.tpop-limit { font-size: 10.5px; color: var(--text-secondary); margin: -2px 0 4px; }
.tpop-limit b { font-weight: 600; }
.tpop-note { font-size: 11px; color: var(--text-secondary); background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 7px; margin: 4px 0; }
.tpop-body { max-height: 290px; overflow-y: auto; }
.tpop-count { padding: 4px 0; border-bottom: 1px solid var(--border-light); }
.tpop-count:last-child { border-bottom: 0; }
.tpop-cl { font-size: 11px; }
.tpop-links { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.tpop-projs { margin: 2px 0; font-size: 11px; }
.tpop-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tube-modal-card.tube-modal-short { height: auto; max-height: 88vh; width: min(980px, 94vw); }

/* ─── The TMC site popup on every map (static/tmcpop.js, 2026-09-24): the
   tube popup's design (.tpop*) for an intersection. Its sections are navy
   (the TMC badge's colour), the tube's gold. The newest count's picture:
   the 15-minute profile (the peak hour in orange) or the drawing. ── */
.tmcpop { min-width: 250px; }
.tmcpop .tpop-body { max-height: min(440px, 56vh); }
.tpop-sec.tmc { color: #1e3a8a; }
.tmcpop-when { font-size: 11.5px; color: var(--text-primary); margin: 1px 0 3px; }
.tmcpop-viz { margin: 6px 0 4px; }
.tmcpop-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; margin-bottom: 5px; }
.tmcpop-tabs button { border: 0; background: #fff; font: 600 10.5px 'Segoe UI', system-ui, sans-serif; color: var(--text-secondary);
  padding: 3px 9px; cursor: pointer; }
.tmcpop-tabs button + button { border-left: 1px solid var(--border); }
.tmcpop-tabs button[aria-pressed="true"] { background: var(--idax-blue); color: #fff; }
.tmcpop-pane[hidden] { display: none; }
.tmcpop-spark { display: block; width: 100%; height: 64px; }
.tmcpop-axis { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.tmcpop-pk i { display: inline-block; width: 8px; height: 8px; background: #F5A623; border-radius: 2px; margin-right: 4px; vertical-align: -0.5px; }
.tmcpop-diagram { display: block; width: 100%; padding: 2px; border: 1px solid var(--border-light); border-radius: 8px;
  background: #fff; cursor: zoom-in; }
.tmcpop-diagram:hover { border-color: var(--idax-blue-light); }
.tmcpop-diagram svg { display: block; width: 100%; height: auto; max-height: 270px; }
/* the projects of a site, one line each (name, then its number) */
.tmcpop .tpop-projs { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.tmcpop .tpop-projs .proj-pill { flex-direction: row; align-items: baseline; gap: 6px; max-width: 100%; }
.tmcpop .tpop-projs .proj-name { font-size: 11.5px; }
.tmcpop-cap { font-size: 10px; color: var(--text-muted); margin-top: 3px; text-align: center; }
.tmcpop .tpop-links { align-items: center; }
.tmcpop .tpop-links .act-menu > summary { font-size: 10px; padding: 2px 8px; }
.ctr .ctr-links .act-menu { display: inline-block; }
.ctr .ctr-links .act-menu > summary { font-size: 10px; padding: 2px 8px; }
.tmc-area { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.corr-tmc-list { margin: 6px 0; max-height: 300px; overflow: auto; }
/* a phone's map is about 520 px tall (tmcpop.js fitInMap keeps the popup
   inside it; the drawing is smaller there) */
@media (max-width: 760px) {
  .tmcpop-diagram svg { max-height: 210px; }
  /* map.html: while a popup is open on a phone the corner panels step aside */
  .cv-popup-open .leaflet-top { opacity: 0; pointer-events: none !important; }
  .cv-popup-open .leaflet-top * { pointer-events: none !important; }
}

/* ─── The map's drawn area (map.html, 2026-09-24): tube sites listed with
   their figures and downloads; tube / intersection pairs with the GEH
   status of their hour-by-hour comparison. ── */
.corr-tube-list { margin: 6px 0; max-height: 260px; overflow: auto; }
.ctr { padding: 5px 0; border-bottom: 1px solid var(--border-light); font-size: 11px; }
.ctr:last-child { border-bottom: 0; }
.ctr-head { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; font-size: 11.5px; }
.ctr-head a { font-weight: 600; }
.ctr-meta { color: var(--text-muted); font-size: 10.5px; }
.ctr-fig { color: var(--text-secondary); margin-top: 1px; }
.ctr-fig b { color: var(--text-heading); font-weight: 600; }
.ctr-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.ctr-d { font-size: 10px; color: var(--text-muted); margin-right: 2px; }
.pair-area { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.pair-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px solid var(--border-light); font-size: 11px; }
.pair-row:last-child { border-bottom: 0; }
.pair-row .pair-main { flex: 1; min-width: 0; }
.pair-row .pair-names { color: var(--text-muted); font-size: 10px; }
.pair-st { display: inline-block; border-radius: 999px; padding: 0 7px; font-weight: 600; font-size: 10px; border: 1px solid; }
.pair-st.ok { color: #166534; background: #f0fdf4; border-color: #86efac; }
.pair-st.flagged { color: #991b1b; background: #fef2f2; border-color: #fca5a5; }
.pair-st.none { color: #92400e; background: #fffbeb; border-color: #fcd34d; }
.pair-st.na, .pair-st.wait { color: #475569; background: #f8fafc; border-color: #cbd5e1; }
.corr-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: var(--text-secondary); margin: 2px 0 6px; }
.corr-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border: 2px solid; }
.corr-legend i.c { border-radius: 50%; background: #f59e0b; border-color: #b45309; }
.corr-legend i.s { background: #FFC000; border-color: #5c3d00; }
.corr-legend i.l { width: 14px; height: 0; border-width: 2px 0 0; border-style: dashed; border-color: #15803d; vertical-align: 2px; }

/* ─── The map's two modes (2026-09-24): My counts and The Vault (map.html +
   static/library.js). The header, the mode switch and the area panel live
   here; everything the Vault draws (popups, the access request, the form,
   the card under the map, the status chips) is in static/vault.css. ── */
.map-head-right { flex-direction: column; align-items: flex-end; gap: 4px; }
.map-head-right #sites-count { font-size: 12px; text-align: right; }
.map-mode-seg { display: inline-flex; flex-shrink: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.map-mode-seg button { border: 0; background: transparent; padding: 7px 14px; font: 600 12.5px 'Segoe UI', system-ui, sans-serif;
  color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.map-mode-seg button + button { border-left: 1px solid var(--border); }
.map-mode-seg button.on { background: var(--idax-blue); color: #fff; }
.corr-panel { display: none; position: absolute; top: 12px; right: 12px; z-index: 1001; width: 360px;
  max-height: calc(100% - 24px); overflow-y: auto; background: #fff; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .28); font: 12px 'Segoe UI', sans-serif; color: #0f172a; padding: 12px 14px; }

/* the map page at phone width: the search bar and the selection panel sit
   above / below the map instead of on it */
@media (max-width: 760px) {
  .map-controls { position: static; flex-wrap: wrap; margin-bottom: 8px; box-shadow: none; }
  .map-controls .input { width: 100%; }
  .map-controls .select { flex: 1; min-width: 0; }
  .corr-panel { position: static; width: auto; max-height: none; margin-top: 10px; box-shadow: none;
    border: 1px solid var(--border); }
  #map { height: 62vh; min-height: 360px; }
  .map-head-right { align-items: stretch; width: 100%; }
  .map-head-right #sites-count { text-align: left; }
  .map-mode-seg { width: 100%; }
  .map-mode-seg button { flex: 1; }
  .tpop { min-width: 0; }
}
/* the release editor granting a Count Library request (releases.js grant mode) */
.rel-req-tag { font: 700 9.5px/1.5 'Segoe UI', system-ui, sans-serif; color: #1e3a6e; background: #eef3fb;
  border: 1px solid #c5d3ea; border-radius: 999px; padding: 0 6px; margin-left: 6px; text-transform: uppercase; letter-spacing: .3px; }
.rel-row.rel-req { box-shadow: inset 3px 0 0 #142858; }
/* the Posted Speed Limit of a tube site (static/tube_limit.js): the live
   DOT / OSM check, the admin form, the header chip, the popup dialog */
.tlim-live { margin-top: 8px; font-size: 12px; line-height: 1.45; }
.tlim-pend, .tlim-none { color: var(--text-muted); }
.tlim-ok { color: #166534; }
.tlim-flag { background: #fffbeb; border: 1px solid #fcd34d; border-left: 4px solid #d97706; border-radius: 8px;
  padding: 7px 10px; color: #78350f; }
.tlim-flag b { color: #92400e; }
.tlim-flag .btn { margin-left: 8px; vertical-align: baseline; }
.tlim-flag .muted-tiny { margin-top: 3px; overflow-wrap: anywhere; }
.tlim-chip { display: inline-block; font: 600 11px/1.6 'Segoe UI', system-ui, sans-serif; color: #92400e;
  background: #fef3c7; border: 1px solid #fcd34d; border-radius: 999px; padding: 0 8px; margin-left: 4px; }
.tlim-edit-btn { margin-left: 6px; vertical-align: baseline; }
.tlim-form { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-input); }
.tlim-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tlim-row label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.tlim-row .tlim-mph { width: 76px; }
.tlim-row .tlim-note { flex: 1; min-width: 200px; }
.tlim-row .tlim-note .input { flex: 1; min-width: 0; }
.tlim-err { color: #991b1b; font-size: 12px; }
.tlim-cur { font-size: 13px; }
.tube-modal-card.tlim-modal-card { height: auto; max-height: 90vh; width: min(560px, 94vw); }
.tpop-limedit { margin-top: 4px; }
@media (max-width: 760px) {
  /* the map's Volume Map panel: just its title row until it is switched on */
  #tmcHeatPanel.heat-off > label, #tmcHeatPanel.heat-off > div:last-child { display: none !important; }
  #tmcHeatPanel.heat-off { width: auto !important; }
  #tmcHeatPanel.heat-off > div:first-child { margin-bottom: 0 !important; gap: 8px; }
}

/* ── View as (2026-09-28): the bar in every page's top row (base.html,
   admins only; static/viewas.js). While it is on, an amber strip runs along
   the top of the window and the sidebar card says whose app it is. ── */
.va-bar { margin-left: auto; position: relative; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.va-btn { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 'Segoe UI', system-ui, sans-serif;
  padding: 6px 12px; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 6px; cursor: pointer; }
.va-btn:hover { border-color: #94a3b8; background: #f8fafc; }
.va-btn-exit { background: #1a3c63; border-color: #1a3c63; color: #fff; }
.va-btn-exit:hover { background: #142f4f; border-color: #142f4f; }
.va-exit { margin: 0; display: inline-flex; }
.va-eye { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.va-pill { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 520px; padding: 4px 6px 4px 10px;
  border-radius: 999px; border: 1px solid #FC9C1C; background: #fff7ed; color: #7c2d12;
  font: 400 12px/18px 'Segoe UI', system-ui, sans-serif; box-shadow: 0 0 0 2px rgba(252, 156, 28, .16); }
.va-pill .va-eye { color: #c2410c; }
.va-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.va-who b { color: #431407; }
.va-co { color: #9a3412; }
.va-ro { flex: none; padding: 0 8px; border-radius: 999px; background: #FC9C1C; color: #fff;
  font: 700 10px/18px 'Segoe UI', system-ui, sans-serif; letter-spacing: .4px; text-transform: uppercase; }
.va-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 2000; width: 360px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; box-shadow: 0 14px 36px rgba(15, 23, 42, .22);
  padding: 8px; font-family: 'Segoe UI', system-ui, sans-serif; }
.va-menu[hidden] { display: none; }
.va-q { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 13px; }
.va-list { max-height: min(60vh, 420px); overflow-y: auto; margin-top: 6px; }
.va-acct { display: block; width: 100%; text-align: left; padding: 7px 9px; border: 0; border-radius: 7px;
  background: transparent; cursor: pointer; font: inherit; }
.va-acct:hover, .va-acct:focus-visible { background: #eef3fa; outline: none; }
.va-acct.cur { background: #fff7ed; box-shadow: inset 3px 0 0 #FC9C1C; }
.va-a-name { display: block; font-weight: 600; font-size: 13px; color: #0f172a; }
.va-a-role { font-weight: 600; font-size: 10px; color: #3730a3; background: #e0e7ff; border-radius: 9px; padding: 0 6px; }
.va-a-sub { display: block; font-size: 11px; color: #64748b; }
.va-empty { padding: 10px; font-size: 12px; color: #64748b; }
.va-foot { margin-top: 6px; padding: 6px 4px 2px; border-top: 1px solid #e2e8f0; font-size: 11px; color: #64748b; }
body.cv-viewas::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #FC9C1C;
  z-index: 3000; pointer-events: none; }
.sidebar .user-card .va-tag { display: inline-block; margin-bottom: 4px; padding: 0 7px; border-radius: 999px;
  background: #FC9C1C; color: #fff; font: 700 9.5px/16px 'Segoe UI', system-ui, sans-serif; letter-spacing: .4px;
  text-transform: uppercase; }
/* ── GIS data dialog (static/gis_export.js, 2026-10-12) ───────────────── */
.tube-modal-card.gis-card { height: auto; max-height: 92vh; width: min(1060px, 96vw); margin-top: 4vh; }
.gis-what { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gis-body { padding: 12px 16px 8px; }
.gis-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.gis-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gis-lab { font-size: 10.5px; font-weight: 600; color: var(--text-muted); min-width: 84px;
  text-transform: uppercase; letter-spacing: .03em; }
.gis-lab2 { min-width: 0; margin-left: 14px; }
.gis-in { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; color: var(--text-primary); min-width: 0; }
.gis-in:focus { outline: 2px solid var(--accent-glow); border-color: var(--idax-blue); }
.gis-tabs { display: flex; gap: 2px; }
.gis-tab { border: 1px solid transparent; border-bottom: 0; background: none; padding: 6px 12px; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--text-secondary); border-radius: 7px 7px 0 0; }
.gis-tab.on { background: var(--bg-input); border-color: var(--border); color: var(--text-heading); font-weight: 700; }
.gis-list-head, .gis-f { display: grid; gap: 8px; grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) 176px; }
.gis-body.has-shp .gis-list-head, .gis-body.has-shp .gis-f {
  grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) 112px 176px; }
.gis-list-head { padding: 6px 10px 6px 34px; align-items: center; font-size: 10.5px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em;
  border: 1px solid var(--border); border-bottom: 0; background: var(--bg-input); border-radius: 0 7px 0 0; }
.gis-find { width: 100%; text-transform: none; font-weight: 400; letter-spacing: 0; }
.gis-list { border: 1px solid var(--border); max-height: 36vh; min-height: 150px; overflow: auto; background: #fff;
  border-radius: 0 0 7px 7px; }
.gis-g + .gis-g { border-top: 1px solid var(--border-light); }
.gis-gh { display: flex; align-items: center; gap: 8px; padding: 5px 10px; }
.gis-g.open > .gis-gh { background: #f8fafc; }
.gis-gt { border: 0; background: none; padding: 2px 0; cursor: pointer; font: inherit; font-size: 12.5px;
  font-weight: 600; color: var(--text-heading); text-align: left; }
.gis-car { display: inline-block; width: 12px; color: var(--text-muted); }
.gis-gf { padding: 2px 10px 8px 34px; display: flex; flex-direction: column; gap: 4px; }
.gis-f { font-size: 12.5px; align-items: start; }
.gis-f:not(.on) .gis-in { opacity: .45; }
.gis-fl { display: flex; align-items: center; gap: 6px; min-width: 0; cursor: pointer; }
.gis-f .gis-fl { padding-top: 3px; }
.gis-nm .gis-in, .gis-sh .gis-in { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.gis-rd { display: flex; gap: 4px; }
.gis-rd .gis-in { flex: 1; }
.gis-hint { font-size: 10.5px; color: #b45309; margin-top: 1px; overflow-wrap: anywhere; }
.gis-fmts { margin-top: 10px; }
.gis-chip { border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: 4px 12px;
  cursor: pointer; font: inherit; font-size: 12px; }
.gis-chip.on { background: var(--idax-blue); border-color: var(--idax-blue); color: #fff; font-weight: 600; }
.gis-warn { margin-top: 8px; font-size: 12px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 7px; padding: 6px 10px; }
.gis-err { color: var(--error); padding: 16px 4px; }
.gis-prevbox { margin-top: 10px; font-size: 12px; }
.gis-prevbox > summary { cursor: pointer; color: var(--text-secondary); }
.gis-prev-wrap { max-height: 170px; overflow: auto; margin-top: 6px; }
/* a field name shows exactly as it will be written: its case is part of it */
.gis-prev th, .gis-prev td { white-space: nowrap; font-size: 11.5px; padding: 4px 8px; }
table.tmc.gis-prev th { text-transform: none; letter-spacing: 0; font-family: ui-monospace, Consolas, monospace; }
.gis-psh { font-weight: 400; color: var(--text-muted); font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; }
.gis-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
.gis-sum { margin-right: auto; }
@media (max-width: 760px) {
  .gis-list-head { display: none; }
  .gis-f, .gis-body.has-shp .gis-f { grid-template-columns: 1fr; }
  .gis-gf { padding-left: 14px; }
  .gis-lab { min-width: 0; }
  .gis-lab2 { margin-left: 0; }
}
@media (max-width: 760px) {
  .va-bar { margin-left: 0; width: 100%; }
  .va-pill { max-width: 100%; }
  .va-menu { left: 0; right: auto; }
}
