@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('./fonts/schibsted-grotesk.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Narrow';
  src: url('./fonts/archivo-narrow.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --gutter: var(--space-6);
  --heat-ramp: linear-gradient(90deg, #f6d59680, #eca848b8, #cd7616d6, #964808e6, #602804f0);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --heat-ramp: linear-gradient(90deg, #76440c66, #b8701a9e, #e8a038d1, #f7c870eb, #fce2aaf5);
  }
}
:root[data-theme='dark'] {
  --heat-ramp: linear-gradient(90deg, #76440c66, #b8701a9e, #e8a038d1, #f7c870eb, #fce2aaf5);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 var(--font-sans);
}
a {
  color: var(--brand-ink);
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
  color: var(--ink);
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
select {
  min-height: var(--tap-min);
}
button {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
  font-weight: 500;
}
button:hover {
  background: var(--brand-soft);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:disabled:hover {
  background: var(--surface);
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-3);
  background: var(--surface);
}
.skip-link:focus {
  top: var(--space-4);
}
main,
footer {
  max-width: var(--content-max);
  margin: auto;
  padding-inline: var(--gutter);
}

/* Masthead: full-bleed bar, content aligned to the report column. */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 64px;
  padding-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2 + var(--gutter)));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap-min);
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark img {
  display: block;
  border-radius: 9px;
}
.masthead nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: 14px;
  font-weight: 500;
}
.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  text-decoration: none;
}
.masthead nav a:hover {
  text-decoration: underline;
}
#report-theme {
  padding: 0 var(--space-3);
  min-height: 36px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--ink-muted);
}

/* Type */
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}
h3 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

/* Hero: the month is the headline. */
.hero {
  padding: var(--space-12) 0 var(--space-8);
}
.kicker {
  margin-bottom: var(--space-3);
  color: var(--brand-ink);
  font-size: 15px;
  font-weight: 600;
}
.hero h1 {
  margin: 0 0 var(--space-5);
  font-size: clamp(52px, 9vw, 112px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.lede {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
  color: var(--ink-muted);
}
.notice {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
/* The first edition says up front that it starts partway through its month. */
.first-report {
  max-width: 60ch;
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--brand-soft);
  border-radius: var(--radius-md);
}
.first-report strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--brand-ink);
  font-size: 15px;
  font-weight: 700;
}
.first-report p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

/* At a glance */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--space-4);
  border-block: 1px solid var(--line);
}
.stats > div {
  padding: var(--space-5) var(--space-5) var(--space-6);
  border-left: 1px solid var(--line);
}
.stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.stats span {
  font: 600 15px/20px var(--font-narrow);
  color: var(--ink-muted);
}
.stats strong {
  display: block;
  margin: var(--space-2) 0 var(--space-1);
  font: 600 46px/1.05 var(--font-narrow);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stats small {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}

/* Sections */
.report-section {
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--line);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}
.section-heading h2 {
  margin-bottom: 0;
  flex-shrink: 0;
}
.section-heading p {
  max-width: 52ch;
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  text-align: right;
}

/* Map explorer */
.explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  height: min(720px, calc(100vh - 96px));
  min-height: 560px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-control);
}
.map-pane {
  position: relative;
  min-width: 0;
  background: var(--map-land);
}
#report-map {
  position: absolute;
  inset: 0;
  isolation: isolate;
}
#report-map.map-unavailable {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, var(--line) 14px 15px), var(--map-land);
}
#map-status {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  max-width: min(360px, 85%);
  margin: 0;
  padding: var(--space-3) var(--space-5);
  background: var(--surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-control);
  font-size: 14px;
  text-align: center;
  color: var(--ink-muted);
}
.map-mode {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  display: flex;
  padding: 3px;
  background: var(--surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-control);
}
.map-mode button {
  min-height: 38px;
  padding: 0 var(--space-4);
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
}
.map-mode button:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}
.map-mode button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--surface);
}
.heat-legend,
.pin-legend {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-control);
  font: 600 13px/16px var(--font-narrow);
  color: var(--ink-muted);
}
.pin-legend {
  gap: 0;
}
/* Zoomed to one call: name it, and offer the way back, just below the view toggle. */
.map-focus {
  position: absolute;
  top: calc(var(--space-4) + 44px + var(--space-2));
  left: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: calc(100% - var(--space-4) * 2);
  padding: 3px 3px 3px var(--space-3);
  background: var(--surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-control);
  font-size: 13px;
  font-weight: 600;
}
.map-focus::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--brand);
}
.map-focus span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-focus button {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 var(--space-3);
  border: 0;
  background: var(--surface-sunken);
  font-size: 13px;
  font-weight: 600;
}
.map-focus button:hover {
  background: var(--brand-soft);
}
.heat-legend i {
  width: 96px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--heat-ramp);
}
.heat-layer {
  position: absolute;
  pointer-events: none;
}
.pin-layer {
  position: absolute;
  left: 0;
  top: 0;
}
.pin {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  min-height: 0;
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  padding: 0;
  /* Slightly translucent, so neighbouring bubbles and the streets beneath still read. */
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  color: var(--surface);
  border: 1.5px solid var(--marker-ring);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-marker);
  font: 700 clamp(11px, calc(var(--size) * 0.34), 13px) / 1 var(--font-narrow);
  font-variant-numeric: tabular-nums;
}
/* Small pins keep a 44px target. */
.pin::before {
  content: '';
  position: absolute;
  inset: min(-2px, calc((var(--size) - var(--tap-min)) / 2));
  border-radius: var(--radius-full);
}
/* Priority calls, per the CallMarker rules: a single call is an alert dot; a bubble holding
   any wears an alert badge on its rim (at 45°), numbered when the bubble has room. */
.pin.is-urgent {
  background: var(--alert);
}
.pin[data-urgent]::after {
  --badge: 9px;
  content: '';
  position: absolute;
  top: calc(var(--size) * 0.1464 - 1.5px - var(--badge) / 2);
  right: calc(var(--size) * 0.1464 - 1.5px - var(--badge) / 2);
  box-sizing: border-box;
  min-width: var(--badge);
  height: var(--badge);
  border-radius: var(--radius-full);
  background: var(--alert);
  box-shadow: 0 0 0 2px var(--marker-ring);
}
.pin.has-urgent-count::after {
  --badge: 17px;
  content: attr(data-urgent);
  padding: 0 4px;
  color: var(--on-alert);
  font: 700 11px/17px var(--font-narrow);
  text-align: center;
}
.pin:hover {
  background: var(--brand);
  color: var(--on-brand);
  z-index: 3;
}
.pin.is-selected {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--brand) 28%, transparent),
    var(--shadow-marker);
  z-index: 2;
}
.pin.is-focused {
  z-index: 4;
  box-shadow:
    0 0 0 5px var(--surface),
    0 0 0 8px var(--brand),
    var(--shadow-marker);
}
.pin:focus-visible {
  outline-offset: 4px;
  z-index: 5;
}
.maplibregl-map {
  font-family: var(--font-sans);
}
/* MapLibre's zoom and fullscreen controls, in the report's surfaces for both themes. */
.maplibregl-ctrl-group:not(:empty) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-control);
  overflow: hidden;
}
.maplibregl-ctrl-group button {
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--line);
}
.maplibregl-ctrl-group button:not(:disabled):hover {
  background: var(--surface-sunken);
}
:root[data-theme='dark'] .maplibregl-ctrl-group .maplibregl-ctrl-icon {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .maplibregl-ctrl-group .maplibregl-ctrl-icon {
    filter: invert(1);
  }
}
/* Attribution matches the live map's (apps/web/app/main.css). */
.maplibregl-ctrl.maplibregl-ctrl-attrib {
  margin: 0 8px 8px 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 16px;
}
.maplibregl-ctrl-attrib a {
  color: var(--ink-muted);
}
.maplibregl-ctrl-attrib.maplibregl-compact {
  min-height: 24px;
}
:root[data-theme='dark'] .maplibregl-ctrl-attrib-button {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .maplibregl-ctrl-attrib-button {
    filter: invert(1);
  }
}

/* Calls with stories: a news badge on the bubble's rim (opposite the priority badge), in the
   legend and on call rows, and a popup of the stories, linked out. */
.pin-news {
  position: absolute;
  left: calc(50% - var(--size) * 0.354 - 9px);
  bottom: calc(50% - var(--size) * 0.354 - 9px);
  box-sizing: content-box;
  padding: 3px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  pointer-events: none;
}
.news-key {
  flex-shrink: 0;
  margin: 0 6px 1px 0;
  color: var(--ink-muted);
  vertical-align: -2px;
}
.legend-urgent,
.legend-news {
  display: inline-flex;
  align-items: center;
}
.legend-urgent + .legend-news:not([hidden]) {
  margin-left: var(--space-3);
}
.row-news {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  font: 600 12px/16px var(--font-narrow);
  color: var(--ink-muted);
}
.row-news .news-key {
  margin-right: 4px;
}
.news-popup .maplibregl-popup-content {
  padding: var(--space-3) var(--space-4) var(--space-3);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-control);
  font-family: var(--font-sans);
}
.news-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: var(--surface);
}
.news-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: var(--surface);
}
.news-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--surface);
}
.news-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--surface);
}
.news-popup .maplibregl-popup-close-button {
  min-height: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-full);
  color: var(--ink-muted);
  font-size: 18px;
}
.popup-news {
  display: grid;
  gap: var(--space-2);
}
.popup-label {
  display: flex;
  align-items: center;
  margin: 0 28px 0 0;
  font: 700 12px/16px var(--font-narrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.popup-story {
  display: grid;
  gap: 2px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.popup-story:hover .news-headline {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.popup-story .news-headline {
  font-size: 16px;
  line-height: 21px;
}
.popup-more {
  font-size: 13px;
}

/* In the news: story cards like the public app's (packages/design NewsLink), linked out. */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.news-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-4) 44px var(--space-4) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}
.news-card:hover {
  background: var(--surface-sunken);
}
.news-meta {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
  font: 700 12px/16px var(--font-narrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.news-meta time {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  font-size: 13px;
}
.news-headline {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  text-wrap: pretty;
}
.news-call {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}
.news-out {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  color: var(--ink-faint);
}

/* Call panel */
.call-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
}
.panel-filters {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.panel-filters input,
.panel-filters select {
  width: 100%;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
#incident-search {
  min-height: var(--tap-min);
  font-size: 15px;
}
.filter-row input {
  font: 400 14px/18px var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.filter-row > label,
.multi-select {
  display: grid;
  /* A long call type name or a wide date field must not widen the panel. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
  min-width: 0;
  font: 600 13px/16px var(--font-narrow);
  color: var(--ink-muted);
}
.multi-select {
  position: relative;
}
#incident-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  font: 400 14px/18px var(--font-sans);
  text-align: left;
  color: var(--ink);
}
#incident-type span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#incident-type::after {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border: solid var(--ink-muted);
  border-width: 0 1.5px 1.5px 0;
  rotate: 45deg;
}
#incident-type[aria-expanded='true']::after {
  margin-top: 3px;
  rotate: 225deg;
}
#incident-type.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.multi-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 20;
  width: min(320px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-control);
  font: 400 14px/20px var(--font-sans);
  color: var(--ink);
}
.multi-head {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  border-bottom: 1px solid var(--line);
}
.multi-head input {
  flex: 1;
}
.multi-menu fieldset {
  max-height: 300px;
  margin: 0;
  padding: var(--space-1) 0;
  overflow-y: auto;
  border: 0;
}
.multi-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 40px;
  padding: var(--space-1) var(--space-3);
  cursor: pointer;
}
.multi-option:hover {
  background: var(--surface-sunken);
}
.multi-option input {
  width: 18px;
  min-height: 0;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}
.multi-option small {
  font: 600 12px/16px var(--font-narrow);
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}
.panel-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-1) var(--space-4);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}
#incident-count {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.text-button {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 var(--space-3);
  border-color: var(--line);
  font-size: 13px;
}
.incident-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.incident-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 14px;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  font-weight: 400;
}
button.incident-row:hover {
  background: var(--surface-sunken);
}
.incident-row.is-focused {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.incident-row time {
  display: flex;
  flex-direction: column;
  font: 600 13px/17px var(--font-narrow);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}
.incident-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.incident-main strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.incident-main span {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}
.row-pin {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--marker-ring);
}
.is-focused .row-pin {
  background: var(--brand);
}
.row-tag {
  grid-column: 2;
  justify-self: start;
  font: 600 12px/16px var(--font-narrow);
  color: var(--ink-faint);
}
.empty {
  padding: var(--space-6) var(--space-4);
  color: var(--ink-muted);
  font-size: 14px;
}
.paging {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--line);
}
.paging button {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 var(--space-3);
  border-color: var(--line);
  font-size: 13px;
}
/* Earlier and later steps flank the timeline scrubber as chevrons. */
.paging .step {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink);
}
.step::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 8px;
  height: 8px;
  margin: auto;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  translate: 1.5px 0;
  rotate: 45deg;
}
.step-later::before {
  translate: -1.5px 0;
  rotate: 225deg;
}
.call-scrubber {
  display: grid;
  flex: 1;
  min-width: 0;
  text-align: center;
}
.call-scrubber input {
  width: 100%;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
  cursor: ew-resize;
}
.call-scrubber output {
  font: 600 12px/16px var(--font-narrow);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}
/* Priority calls carry the rare alert red, per the CallMarker rules. The same dot keys
   the tile, the ranked list and the map legend. */
.incident-row.is-urgent strong::before,
.urgent-key {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin: 0 6px 1px 0;
  border-radius: var(--radius-full);
  background: var(--alert);
}
h3 .urgent-key {
  margin: 0 8px 3px 0;
}

/* Charts */
.chart-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
figure {
  margin: 0;
  min-width: 0;
}
figcaption {
  font: 600 15px/20px var(--font-narrow);
  color: var(--ink-muted);
}
.year-comparison {
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: 14px;
}
.chart {
  display: block;
  width: 100%;
  max-height: 340px;
  margin: var(--space-4) 0;
  overflow: visible;
}
.chart text {
  font: 600 15px var(--font-narrow);
  font-variant-numeric: tabular-nums;
  fill: var(--ink-muted);
}
.chart-baseline {
  stroke: var(--line-strong);
}
.chart-bar {
  fill: var(--brand);
}
.chart g:hover .chart-bar {
  fill: var(--brand-ink);
}
.chart-bar-partial {
  fill-opacity: 0.4;
  stroke: var(--brand);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}
details {
  font-size: 14px;
}
summary {
  cursor: pointer;
  min-height: var(--tap-min);
  padding-block: var(--space-3);
  color: var(--brand-ink);
  font-weight: 500;
}
.table-scroll,
.chart-scroll {
  position: relative;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
td,
th {
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
/* What was reported: two compact ranked lists. Both columns share one set of rows (heading,
   note, five calls) through subgrid, so the lists line up even when a name wraps. */
.rank-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-12);
}
.rank-pair > div {
  display: grid;
  grid-row: span 7;
  grid-template-rows: subgrid;
}
.rank-pair .rank {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
}
.rank-pair h3 {
  margin-bottom: var(--space-2);
  font-size: 18px;
  line-height: 24px;
}
.rank-note {
  margin-bottom: var(--space-2);
  font-size: 13px;
  color: var(--ink-muted);
}
.rank {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rank li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-3);
  row-gap: 6px;
  /* When the other column's row is taller, keep each label on its bar. */
  align-content: end;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
}
.rank li strong,
.precincts td {
  font: 600 15px var(--font-narrow);
  font-variant-numeric: tabular-nums;
}
.rank meter {
  grid-column: 1 / -1;
}
.rank-empty {
  color: var(--ink-muted);
}
meter {
  width: 100%;
  height: 6px;
  appearance: none;
}
/* Calls by precinct */
.precincts th[scope='row'] {
  font-weight: 600;
}
.precincts thead th {
  font: 600 13px/16px var(--font-narrow);
  color: var(--ink-muted);
}
.precincts td,
.precincts thead th:not(:first-child) {
  text-align: right;
}
.precincts .precinct-meter {
  width: 40%;
  min-width: 120px;
}
.precincts .precinct-meter meter {
  display: block;
}
meter::-webkit-meter-bar {
  background: var(--line);
  border: 0;
  border-radius: var(--radius-full);
}
meter::-webkit-meter-optimum-value {
  background: var(--brand);
  border-radius: var(--radius-full);
}
meter::-moz-meter-bar {
  background: var(--brand);
}
.provenance {
  font-size: 12px;
  color: var(--ink-faint);
  padding: var(--space-5) 0;
  overflow-wrap: anywhere;
}
footer {
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: var(--space-12);
  padding-block: var(--space-12);
  font-size: 14px;
  color: var(--ink-muted);
}
footer h2 {
  font-size: 22px;
  line-height: 28px;
  color: var(--ink);
}
footer strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.legal-page {
  max-width: 76ch;
  padding-block: var(--space-12);
}
.legal-page h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
}
.legal-page h2 {
  margin-top: var(--space-8);
  font-size: 24px;
}

/* Archive */
.archive {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.edition {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-decoration: none;
  background: var(--surface);
  color: var(--ink);
}
.edition:hover {
  border-color: var(--brand);
}
.edition:first-child {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.edition > span {
  font: 600 14px var(--font-narrow);
  color: var(--ink-muted);
}
.edition:first-child > span {
  color: var(--brand-ink);
}
.edition h3 {
  margin: var(--space-6) 0 var(--space-1);
}
.edition p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .explorer {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .map-pane {
    height: 62vh;
    min-height: 380px;
    max-height: 560px;
  }
  .call-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .incident-list {
    overflow: visible;
  }
  .chart-pair {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  :root {
    --gutter: var(--space-4);
  }
  .masthead {
    flex-wrap: wrap;
    gap: 0 var(--space-4);
    padding-block: var(--space-2);
  }
  .masthead nav {
    gap: var(--space-4);
    font-size: 13px;
  }
  .hero {
    padding-block: var(--space-8) var(--space-6);
  }
  .section-heading {
    display: block;
  }
  .section-heading p {
    margin-top: var(--space-3);
    text-align: left;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats > div {
    padding: var(--space-4) var(--space-4) var(--space-5);
  }
  .stats > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .stats strong {
    font-size: 36px;
  }
  h2 {
    font-size: 26px;
    line-height: 30px;
  }
  .report-section {
    padding-block: var(--space-8);
  }
  .explorer {
    margin-inline: calc(var(--gutter) * -1);
    border-radius: 0;
    border-inline: 0;
  }
  .map-mode {
    top: var(--space-3);
    left: var(--space-3);
  }
  .heat-legend {
    left: var(--space-3);
    bottom: var(--space-3);
  }
  .precincts .precinct-meter {
    display: none;
  }
  .rank-pair,
  footer,
  .archive {
    grid-template-columns: 1fr;
  }
  .rank-pair,
  footer {
    gap: var(--space-6);
  }
  .rank-pair > div,
  .rank-pair .rank {
    display: block;
    grid-row: auto;
  }
  .map-focus {
    top: calc(var(--space-3) + 44px + var(--space-2));
    left: var(--space-3);
    max-width: calc(100% - var(--space-3) * 2);
  }
  .pin-legend {
    left: var(--space-3);
    bottom: var(--space-3);
  }
  footer {
    padding-block: var(--space-8);
  }
}
@media print {
  #report-theme,
  .masthead nav,
  .panel-filters,
  .paging,
  .map-mode,
  .map-focus {
    display: none;
  }
  .explorer {
    height: auto;
    box-shadow: none;
  }
  .report-section {
    break-inside: avoid;
  }
}
