/* JPD 3D crime map (/crime-info/map/), built Oct 2026 from the "Night Ops" prototype */

@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bar-h: 56px;
  --panel-w: 392px;
  --n950: #07101d;
  --n900: #0a1626;
  --n850: #0d1b2f;
  --n800: #102039;
  --n750: #152849;
  --n700: #1b3155;
  --rule: #233a5c;
  --rule-soft: #1a2e4c;
  --paper: #f3eee4;
  --paper-2: #faf7f1;
  --text-2: #c3cbd6;
  --text-3: #9eabbc;
  --gold: #d9b675;
  --red: #b4232b;
  --focus: #79bde8;
  --c-violent: #c74a4d;
  --c-property: #c68206;
  --c-traffic: #3899e2;
  --c-disorder: #995eb2;
  --c-service: #29a987;
  --c-other: #7f8b99;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-ui: 180ms;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--n900);
  color: var(--paper);
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, .tab { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px 0 14px;
  background: var(--n950);
  border-bottom: 1px solid var(--rule-soft);
}
.brand { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-right: -6px; flex: none; }
.brand img { width: 30px; height: 34px; object-fit: contain; }
.brand-txt { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-name { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.brand-name .sep, .brand-name .sub { color: var(--text-2); font-weight: 400; }
.proto-tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 9px;
  border: 1px solid rgba(217, 182, 117, .55); border-radius: 2px;
  color: var(--gold); font-size: 0.75rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.bar-spacer { flex: 1; }
.bar-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px;
  font-size: 0.875rem; font-weight: 600; color: var(--text-2); text-decoration: none; white-space: nowrap;
}
.bar-link:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.bar-link svg { width: 14px; height: 14px; }

/* ---------- app + map ---------- */
.app { position: fixed; inset: var(--bar-h) 0 0 0; }
.map { position: absolute; inset: 0; background: var(--n900); }
.map-loading {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none;
  color: var(--text-3); font-size: 0.875rem; letter-spacing: .02em;
  transition: opacity 300ms var(--ease);
}
.map-loading.done { opacity: 0; }
.maplibregl-canvas:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* ---------- panel ---------- */
.panel {
  position: absolute; z-index: 20; top: 0; left: 0; bottom: 0; width: var(--panel-w);
  background: var(--n800);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
}
.sheet-handle { display: none; }
.panel-scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.sec { padding: 18px 20px; border-top: 1px solid var(--rule-soft); }
.sec:first-child { border-top: 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 10px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; }
.sec-h h2 { font-size: 1rem; }
.lbl { font-size: 0.75rem; font-weight: 600; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.meta { font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { margin: 8px 0 0; font-size: 0.875rem; color: var(--text-3); }
.note b { color: var(--text-2); font-weight: 600; }

.p-head { padding-top: 20px; padding-bottom: 14px; }
.p-head h1 { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.875rem; line-height: 1.05; }
.stamp { margin: 6px 0 0; font-size: 0.8125rem; color: var(--text-3); }
.stamp b { color: var(--text-2); font-weight: 600; }

/* text button */
.txtbtn {
  min-height: 44px; margin: -10px -8px; padding: 0 8px; border: 0; background: none;
  font-size: 0.875rem; font-weight: 600; color: var(--text-2);
  text-decoration: underline; text-decoration-color: rgba(195, 203, 214, .45); text-underline-offset: 3px;
}
.txtbtn:hover { color: var(--paper); text-decoration-color: currentColor; }
.txtbtn[aria-pressed="true"] { color: var(--gold); text-decoration: none; }

/* segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.seg button {
  min-height: 44px; border: 0; border-left: 1px solid var(--rule); background: transparent;
  font-size: 0.9375rem; font-weight: 600; color: var(--text-2);
  transition: background var(--t-ui) var(--ease), color var(--t-ui) var(--ease);
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--n750); color: var(--paper); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--n900); }
.seg button:focus-visible { outline-offset: -3px; }

.summary { margin: 12px 0 0; font-size: 0.9375rem; color: var(--text-2); }
.summary .big { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.375rem; color: var(--paper); font-variant-numeric: tabular-nums; }
.summary-sub { margin: 4px 0 0; font-size: 0.8125rem; color: var(--text-3); }

/* search */
.search { position: relative; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding: 0 40px 0 38px;
  background: var(--n900); border: 1px solid var(--rule); border-radius: 2px;
  font-size: 1rem; color: var(--paper);
}
.search input::placeholder { color: #8796aa; }
.search input:focus-visible { outline-offset: 0; border-color: var(--focus); }
.search-clear {
  position: absolute; right: 1px; top: 1px; width: 44px; height: 44px; border: 0; background: none; color: var(--text-3);
  display: grid; place-items: center;
}
.search-clear svg { position: static; transform: none; width: 14px; height: 14px; }
.sug {
  list-style: none; margin: 4px 0 0; padding: 4px 0; position: absolute; left: 0; right: 0; z-index: 5;
  background: var(--n900); border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  max-height: 320px; overflow-y: auto;
}
.sug li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 12px; cursor: pointer; font-size: 0.9375rem;
}
.sug li .ct { color: var(--text-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sug li[aria-selected="true"], .sug li:hover { background: var(--n750); }
.sug .empty { color: var(--text-3); cursor: default; }
.sug .empty:hover { background: none; }

/* ---------- time of day ---------- */
.readout { margin: 0 0 10px; font-size: 0.9375rem; color: var(--text-2); min-height: 1.4em; }
.readout b { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.125rem; color: var(--paper); font-variant-numeric: tabular-nums; }
.sky { position: relative; height: 76px; }
.sky-bars { position: absolute; inset: 0 0 0 0; display: flex; align-items: flex-end; gap: 2px; }
.sky-bars i {
  flex: 1; min-height: 3px; border-radius: 2px 2px 0 0; display: block; position: relative;
  transition: height 240ms var(--ease), opacity var(--t-ui) var(--ease);
}
.sky.has-hour .sky-bars i { opacity: .38; }
.sky.has-hour .sky-bars i.on { opacity: 1; }
.sky-bars i.on::after {
  content: ""; position: absolute; left: -1px; right: -1px; top: -6px; height: 3px; background: var(--gold); border-radius: 1px;
}
.sky input[type="range"] {
  position: absolute; inset: -6px 0 -10px 0; width: 100%; height: calc(100% + 16px); margin: 0;
  opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; background: transparent;
}
.sky input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 92px; }
.sky input[type="range"]::-moz-range-thumb { width: 16px; height: 92px; border: 0; }
.sky:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 2px; }
.sky-base { height: 1px; background: var(--rule); }
.sky-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.hour-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.play {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--n750);
  font-size: 0.9375rem; font-weight: 600;
  transition: background var(--t-ui) var(--ease);
}
.play:hover { background: var(--n700); }
.play svg { width: 14px; height: 14px; }
.play .i-pause { display: none; }
.play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }
.hour-row .note { margin: 0; font-size: 0.8125rem; }
.step { display: flex; gap: 0; }
.step button {
  width: 44px; min-height: 44px; border: 1px solid var(--rule); background: transparent; color: var(--text-2);
  display: grid; place-items: center;
}
.step button + button { border-left: 0; }
.step button:hover { background: var(--n750); color: var(--paper); }
.step svg { width: 14px; height: 14px; }

/* ---------- category chips ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chip {
  width: 100%; display: grid; grid-template-columns: 12px 1fr auto 64px; align-items: center; column-gap: 12px;
  min-height: 52px; padding: 6px 10px 6px 12px; border: 0; border-radius: 2px; background: var(--n850); text-align: left;
  transition: background var(--t-ui) var(--ease), opacity var(--t-ui) var(--ease);
}
.chip:hover { background: var(--n750); }
.chip .sw { width: 12px; height: 12px; border-radius: 2px; border: 2px solid currentColor; background: currentColor; }
.chip .nm { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.chip .nm b { font-weight: 600; font-size: 0.9375rem; }
.chip .nm small { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .ct { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.125rem; font-variant-numeric: tabular-nums; text-align: right; }
.chip .spark { width: 64px; height: 22px; display: block; overflow: visible; }
.chip .spark path { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.chip .spark .ar { stroke: none; opacity: .18; }
.chip[aria-pressed="false"] { background: transparent; }
.chip[aria-pressed="false"] .sw { background: transparent; }
.chip[aria-pressed="false"] .nm b, .chip[aria-pressed="false"] .ct { color: var(--text-3); }
.chip[aria-pressed="false"] .spark { opacity: .35; }

/* ---------- switches ---------- */
.switch {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; text-align: left;
  font-size: 0.9375rem; font-weight: 600;
}
.switch .trk {
  flex: none; position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--n700); border: 1px solid var(--rule);
  transition: background var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease);
}
.switch .trk::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2);
  transition: transform var(--t-ui) var(--ease), background var(--t-ui) var(--ease);
}
.switch[aria-checked="true"] .trk { background: var(--gold); border-color: var(--gold); }
.switch[aria-checked="true"] .trk::after { transform: translateX(16px); background: var(--n900); }
.switch .st { margin-left: auto; font-size: 0.8125rem; font-weight: 400; color: var(--text-3); }

.legend-faint { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.8125rem; color: var(--text-3); }
.legend-faint i { width: 22px; height: 12px; border-radius: 2px; background: rgba(142, 162, 186, .28); border: 1px solid rgba(142, 162, 186, .55); flex: none; }

/* ---------- block / area card ---------- */
.card { background: var(--n850); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0; }
.card[hidden] { display: none; }
.card-in { padding: 16px 20px 18px; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-k { margin: 0 0 2px; }
.card-t { font-size: 1.1875rem; line-height: 1.25; }
.card-x {
  flex: none; width: 44px; height: 44px; margin: -8px -12px 0 0; border: 0; background: none; color: var(--text-2);
  display: grid; place-items: center; border-radius: 2px;
}
.card-x:hover { background: var(--n750); color: var(--paper); }
.card-x svg { width: 16px; height: 16px; }
.kpi { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0 0; }
.kpi .n { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 3.25rem; line-height: .9; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 0.875rem; color: var(--text-2); line-height: 1.3; padding-bottom: 2px; }
.kpi .l small { display: block; color: var(--text-3); font-size: 0.8125rem; }
.card h3 { font-size: 0.875rem; margin: 18px 0 8px; color: var(--text-2); }
.wk { display: block; width: 100%; height: 74px; overflow: visible; }
.wk rect.b { fill: #8c9bb0; }
.wk rect.b.now { fill: var(--gold); }
.wk rect.hit { fill: transparent; }
.wk text { fill: var(--text-3); font-size: 11px; font-family: "Barlow", sans-serif; font-variant-numeric: tabular-nums; }
.wk text.v { fill: var(--paper); font-weight: 600; }
.wk line.avg { stroke: var(--paper); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.typ { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 14px; background: var(--rule-soft); border: 1px solid var(--rule-soft); border-radius: 2px; overflow: hidden; }
.typ div { background: var(--n850); padding: 10px 12px; }
.typ .k { display: block; font-size: 0.75rem; color: var(--text-3); }
.typ .v { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.verdict { margin: 10px 0 0; font-size: 0.875rem; color: var(--text-2); }
.verdict b { color: var(--paper); }
.mixbar { display: flex; gap: 2px; height: 12px; border-radius: 2px; overflow: hidden; }
.mixbar i { display: block; height: 100%; min-width: 3px; }
.mixleg { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 0.8125rem; }
.mixleg li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.mixleg li i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.mixleg li span { margin-left: auto; color: var(--paper); font-variant-numeric: tabular-nums; }
.facts { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.875rem; color: var(--text-2); }
.facts li b { color: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.card-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px;
  font-weight: 600; font-size: 0.9375rem; color: var(--paper); text-underline-offset: 3px;
}
.card-link svg { width: 14px; height: 14px; }
.blist { list-style: none; margin: 0; padding: 0; }
.blist button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 2px;
  border: 0; border-bottom: 1px solid var(--rule-soft); background: none; text-align: left; font-size: 0.9375rem;
}
.blist button:hover { color: var(--gold); }
.blist button span { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 0.875rem; white-space: nowrap; }
.yrs { display: block; width: 100%; height: 86px; overflow: visible; }
.yrs rect { fill: #8c9bb0; }
.yrs rect.last { fill: var(--gold); }
.yrs text { fill: var(--text-3); font-size: 11px; font-family: "Barlow", sans-serif; font-variant-numeric: tabular-nums; }
.yrs text.v { fill: var(--paper); font-weight: 600; }

/* ---------- last night's calls ---------- */
.ln { list-style: none; margin: 0; padding: 0; }
.ln li { border-bottom: 1px solid var(--rule-soft); }
.ln .row {
  width: 100%; display: grid; grid-template-columns: 58px 10px 1fr; column-gap: 10px; align-items: baseline;
  min-height: 48px; padding: 8px 2px; border: 0; background: none; text-align: left; font-size: 0.875rem;
}
.ln button.row:hover .ty { color: var(--gold); }
.ln .tm { color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ln .dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.ln .ty { font-weight: 600; }
.ln .at { grid-column: 3; color: var(--text-3); font-size: 0.8125rem; }
.ln-more { margin-top: 10px; }

/* ---------- footer ---------- */
.foot { padding-bottom: 28px; }
.foot p { margin: 10px 0 0; font-size: 0.8125rem; color: var(--text-3); }
.foot a { color: var(--text-2); text-underline-offset: 2px; }

/* ---------- on-map controls ---------- */
.zl {
  position: absolute; z-index: 10; right: 16px; bottom: 34px;
  display: flex; align-items: stretch; background: var(--n900); border: 1px solid var(--rule); border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.zl button {
  min-height: 44px; padding: 0 14px; border: 0; border-left: 1px solid var(--rule); background: none;
  font-size: 0.875rem; font-weight: 600; color: var(--text-3);
}
.zl button:first-child { border-left: 0; }
.zl button:hover { color: var(--paper); background: var(--n800); }
.zl button[aria-current="true"] { color: var(--paper); box-shadow: inset 0 -3px 0 var(--gold); }
.zl-cap {
  position: absolute; right: 16px; bottom: 86px; z-index: 10; margin: 0; padding: 5px 9px;
  background: rgba(7, 16, 29, .88); border-radius: 2px; font-size: 0.75rem; color: var(--text-2);
}

.tip {
  position: absolute; z-index: 15; pointer-events: none; max-width: 260px;
  padding: 8px 10px; background: var(--n950); border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  font-size: 0.8125rem; line-height: 1.35; color: var(--text-2);
  transform: translate(14px, 14px);
}
.tip b { display: block; color: var(--paper); font-size: 0.875rem; font-weight: 600; }
.tip[hidden] { display: none; }

/* hour readout on the map */
.hud {
  position: absolute; z-index: 12; top: 12px; left: calc(var(--panel-w) + 12px);
  display: flex; align-items: center; gap: 4px; padding: 0 4px 0 0;
  background: rgba(7, 16, 29, .92); border: 1px solid var(--rule); border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.hud[hidden] { display: none; }
.hud-b { width: 44px; height: 44px; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; }
.hud-b:hover { color: var(--paper); background: var(--n800); }
.hud-b svg { width: 14px; height: 14px; }
.hud-b .i-pause { display: none; }
.hud-b[aria-pressed="true"] .i-play { display: none; }
.hud-b[aria-pressed="true"] .i-pause { display: block; }
.hud-t { display: flex; align-items: baseline; gap: 10px; padding: 0 6px; min-width: 0; }
.hud-t b { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; min-width: 3.4em; }
.hud-t span { font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* district markers: a dot on the centre, a label placed around it */
.dmw { position: relative; width: 0; height: 0; }
.dm-dot {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; padding: 0; border: 0; background: none; border-radius: 50%;
  transition: opacity 220ms var(--ease);
}
.dm-dot::before { content: ""; position: absolute; left: 16px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(7, 16, 29, .85); }
.dm-dot:hover::before { box-shadow: 0 0 0 3px rgba(7, 16, 29, .85), 0 0 0 5px rgba(217, 182, 117, .5); }
.dm[hidden] { display: none; }
.dm.compact { min-height: 0; padding: 5px 8px; }
.dm.compact span { display: none; }
.dm.compact b { font-size: 0.875rem; }
.dm {
  position: absolute; left: 0; top: 0; display: block; padding: 7px 10px 8px; min-height: 44px;
  border: 1px solid rgba(217, 182, 117, .45); border-radius: 2px;
  background: rgba(7, 16, 29, .92); text-align: left; color: var(--paper);
  font-family: "Barlow", sans-serif; cursor: pointer; white-space: nowrap;
  transition: opacity 220ms var(--ease), background var(--t-ui) var(--ease), transform 200ms var(--ease);
}
.dm:hover { background: var(--n800); border-color: var(--gold); }
.dm b { display: block; font-weight: 600; font-size: 0.9375rem; line-height: 1.2; }
.dm span { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dm span em { font-style: normal; font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1rem; color: var(--paper); }
.dm-hidden .dm, .dm-hidden .dm-dot { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 220ms var(--ease), visibility 0s 220ms; }

/* maplibre control restyle */
.maplibregl-ctrl-top-right { top: 12px; right: 12px; }
.maplibregl-ctrl-group { background: var(--n900); border: 1px solid var(--rule); border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.maplibregl-ctrl-group button { width: 44px; height: 44px; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--rule); }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(.9); }
.maplibregl-ctrl-group button:not(:disabled):hover { background: var(--n800); }
.maplibregl-ctrl-attrib { background: rgba(7, 16, 29, .72) !important; color: var(--text-3); font-size: 11px; }
.maplibregl-ctrl-attrib a { color: var(--text-2); }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.maplibregl-ctrl.maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(7, 16, 29, .72) !important; }

/* ---------- phones: bottom sheet ---------- */
@media (max-width: 899.98px) {
  :root { --bar-h: 56px; }
  .brand-name .full { display: none; }
  .bar { gap: 10px; padding: 0 8px 0 6px; }
  .brand-txt { flex-direction: column; align-items: flex-start; gap: 1px; }
  .brand-name .sub { color: var(--paper); font-weight: 600; }
  .proto-tag { height: auto; padding: 0; border: 0; font-size: 0.75rem; }
  .bar-link { font-size: 0.8125rem; }
  .bar-link .wide { display: none; }

  .panel {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: var(--sheet-max, 70vh);
    border-right: 0; border-top: 1px solid var(--rule);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
    transform: translateY(var(--sheet-y, 60vh));
    transition: transform 260ms var(--ease);
    will-change: transform;
    touch-action: none;
  }
  .panel.dragging { transition: none; }
  .sheet-handle {
    display: grid; place-items: center; flex: none; width: 100%; height: 44px; padding: 0; border: 0; background: none;
    touch-action: none; cursor: grab;
  }
  .sheet-handle::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: #5d6f88; }
  .sheet-handle:focus-visible { outline-offset: -4px; }
  .panel-scroll { touch-action: pan-y; }
  .panel[data-snap="peek"] .panel-scroll { overflow: hidden; }
  .p-head { padding-top: 2px; padding-bottom: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .p-head h1 { font-size: 1.5rem; }
  .stamp { margin: 0; font-size: 0.75rem; }
  .sec { padding: 14px 16px; }
  .p-head.sec { padding-top: 0; }
  .search-sec { border-top: 0; padding-top: 0; }

  .zl { right: auto; left: 12px; top: 12px; bottom: auto; }
  .hud { left: 12px; top: 64px; }
  .hud-t .wide { display: none; }
  .zl button { padding: 0 11px; font-size: 0.8125rem; }
  .zl-cap { display: none; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: var(--sheet-vis, 150px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- production additions (Oct 2026) ---------- */
/* EN / ES, same saved choice as the rest of the site */
.lang { display: flex; flex: none; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.lang button { min-width: 42px; min-height: 40px; padding: 0 8px; background: transparent; border: 0; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
.lang button + button { border-left: 1px solid var(--rule); }
.lang button:hover { color: var(--paper); background: var(--n750); }
.lang button[aria-pressed="true"] { background: var(--red); color: #fff; }
/* color the columns by call type or by severity */
.colorby-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: 16px; }
.cb-l { font-size: 0.875rem; color: var(--text-2); }
.colorby-row .seg { flex: 1 1 200px; max-width: 240px; }
.colorby-row .seg button { font-size: 0.875rem; }
.sev-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.8125rem; color: var(--text-2); }
.sev-legend li { display: flex; align-items: center; gap: 8px; }
.sev-legend i { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.foot a { color: var(--gold); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 420px) {
  .bar { gap: 10px; padding-right: 10px; }
  .bar-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bar-link { min-width: 40px; justify-content: center; border: 1px solid var(--rule); border-radius: 2px; }
}
.search-clear[hidden] { display: none; }

/* ---------- Oct 14 polish: busiest blocks, share link, attribution, loading ---------- */
.top { list-style: none; margin: 0; padding: 0; }
.top-row {
  width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 7px;
  align-items: center; min-height: 52px; padding: 10px 2px 11px; border: 0; border-bottom: 1px solid var(--rule-soft); background: none; text-align: left;
}
.top-row .rk { color: var(--text-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.top-row .nm { font-size: 0.9375rem; font-weight: 600; color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row .ct { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.0625rem; color: var(--paper); font-variant-numeric: tabular-nums; }
.top-row .tr { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: var(--n750); overflow: hidden; }
.top-row .tr i { display: block; height: 100%; border-radius: 2px; transition: width 400ms var(--ease); }
.top-row:hover .nm { color: var(--gold); }
.top-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.top-none { padding: 10px 2px; color: var(--text-3); font-size: 0.875rem; }
.card-share {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 6px 0 0; padding: 0 12px; border: 1px solid var(--rule);
  border-radius: 8px; background: none; color: var(--text-2); font: 600 0.875rem "Barlow", sans-serif;
}
.card-share svg { width: 15px; height: 15px; flex: none; }
.card-share span { overflow-wrap: anywhere; }
.card-share:hover { color: var(--paper); border-color: var(--text-3); }
.maplibregl-ctrl-attrib-inner, .maplibregl-ctrl-attrib-inner * { color: var(--text-3) !important; }
.maplibregl-ctrl-attrib-inner a { color: var(--text-2) !important; }
.map-loading { animation: mapl-pulse 1.4s ease-in-out infinite; }
.map-loading.done { animation: none; }
@keyframes mapl-pulse { 50% { color: var(--text-2); } }
@media (prefers-reduced-motion: reduce) { .map-loading { animation: none; } }
.intro-run .dm, .intro-run .dm-dot { opacity: 0; pointer-events: none; visibility: hidden; }
