/*
 * police-map.css
 * Styles shared by crime.html and calls.html.
 * Colors come from the VPD 2026–2029 Strategic Plan (navy, charcoal, sky blue, pale blue) and the
 * City of Ventura palette (COV Blue). Text and control colors meet WCAG 2.2 AA contrast
 * (4.5:1 for text, 3:1 for controls and focus outlines).
 */

:root {
  --pm-navy: #1e4167; /* plan navy: white text on it is 10.5:1 */
  --pm-charcoal: #242120;
  --pm-sky: #99daf2; /* plan accent: 6.8:1 on navy */
  --pm-pale: #e5f4fa;
  --pm-slate: #5d7489;
  --pm-brand: #0071a6; /* COV Blue: 5.4:1 on white */
  --pm-brand-dark: #005795; /* PowerPoint Blue Dark: 7.4:1 on white */
  --pm-muted: #595959; /* 7:1 on white */
  --pm-line: #d9dee3;
  --pm-rail-bg: #f2f4f6;
  --pm-panel-width: 360px;
  --pm-rail-width: 156px;
  --pm-details-width: 400px;
  --pm-focus: #0071a6;

  /* Calcite and the map components pick these up */
  --calcite-font-family: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --calcite-color-brand: #0071a6;
  --calcite-color-brand-hover: #005795;
  --calcite-color-brand-press: #004b80;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: var(--calcite-font-family);
  color: #151515;
  background: #fff;
}

/* Calcite components set their own display, so make the hidden attribute win. */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--pm-focus);
  outline-offset: 2px;
}

.pm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip links appear when tabbed to */
.pm-skip {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--pm-charcoal);
  color: #fff;
  font-weight: 600;
}

.pm-skip:focus {
  top: 8px;
}

.pm-mobile-only {
  display: none !important;
}

/* ---------- Header (plan cover style) ---------- */

.pm-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 6px 16px;
  background: var(--pm-navy);
  color: #fff;
}

.pm-header :focus-visible {
  outline-color: var(--pm-sky);
}

.pm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pm-badge {
  flex: none;
  width: auto;
  height: 48px;
}

.pm-brand-text {
  min-width: 0;
}

.pm-agency {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pm-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pm-sky);
}

.pm-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.pm-hbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.pm-hbtn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Navy-to-light-blue line under the header, as in the plan */
.pm-header-rule {
  flex: none;
  height: 5px;
  background: linear-gradient(90deg, var(--pm-navy) 0%, #3f7fb9 35%, var(--pm-sky) 70%, var(--pm-pale) 100%);
}

/* ---------- Main layout: side bar | resize handle | map or table ---------- */

.pm-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 8px minmax(0, 1fr);
}

.pm-side {
  display: grid;
  grid-template-columns: var(--pm-rail-width) var(--pm-panel-width);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "rail top" "rail panels";
  min-height: 0;
  background: #fff;
}

.pm-side:focus,
.pm-map-wrap:focus {
  outline: none; /* only focused by skip links and the jump buttons */
}

.pm-side.rail-collapsed {
  --pm-rail-width: 60px;
}

/* Tab rail, like a records explorer: icon plus name */
.pm-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px;
  background: var(--pm-rail-bg);
  border-inline-end: 1px solid var(--pm-line);
}

.pm-tablist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #2b3640;
  font: inherit;
  font-size: 15px;
  text-align: start;
  cursor: pointer;
}

.pm-tab:hover {
  background: rgba(30, 65, 103, 0.08);
}

.pm-tab[aria-selected="true"] {
  background: #dfe7ee;
  color: var(--pm-navy);
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--pm-brand);
}

.pm-tab calcite-icon {
  flex: none;
}

.pm-side.rail-collapsed .pm-tab {
  justify-content: center;
  padding: 8px;
}

/* Collapsed rail: names stay available to screen readers (and as tooltips) */
.pm-side.rail-collapsed .pm-tab-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pm-rail-toggle {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border: 1px solid var(--pm-line);
  border-radius: 6px;
  background: #fff;
  color: #2b3640;
  cursor: pointer;
}

.pm-side.rail-collapsed .pm-rail-toggle {
  align-self: center;
  transform: scaleX(-1);
}

.pm-top {
  grid-area: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pm-line);
}

.pm-panels {
  grid-area: panels;
  min-height: 0;
  overflow-y: auto;
}

.pm-tabpanel {
  padding: 14px 16px 28px;
}

.pm-tabpanel:focus-visible {
  outline-offset: -3px;
}

.pm-panel-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pm-navy);
}

.pm-h2 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm-muted);
}

.pm-h3 {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-navy);
}

/* Resize handle (drag, or arrow keys when focused) */
.pm-splitter {
  position: relative;
  background: #e8ecef;
  cursor: col-resize;
  touch-action: none;
}

.pm-splitter::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 4px;
  height: 36px;
  margin-top: -18px;
  border-radius: 2px;
  background: repeating-linear-gradient(180deg, #6b7a87 0 2px, transparent 2px 5px);
}

.pm-splitter:hover,
.pm-splitter.dragging,
.pm-splitter:focus-visible {
  background: var(--pm-sky);
}

.pm-splitter:focus-visible {
  outline-offset: -1px;
}

.pm-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* Map | Table switch */
.pm-viewbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 1px solid var(--pm-line);
}

.pm-viewtabs {
  display: inline-flex;
}

.pm-vtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #8795a1;
  background: #fff;
  color: #1f2a33;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pm-vtab:first-child {
  border-radius: 6px 0 0 6px;
}

.pm-vtab:last-child {
  margin-inline-start: -1px;
  border-radius: 0 6px 6px 0;
}

.pm-vtab[aria-selected="true"] {
  background: var(--pm-navy);
  border-color: var(--pm-navy);
  color: #fff;
}

.pm-vtab-count {
  font-weight: 400;
}

.pm-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

.pm-map-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden; /* keeps the print-area dimming on the map */
}

/*
 * The map stays laid out (so its extent doesn't change) while the Table or Charts view covers it.
 * It also stays drawn: hiding it (visibility: hidden) made the map redraw everything when it was
 * shown again, which froze the page for many seconds after a filter change. z-index keeps the map's
 * own controls under the covering view; the map is also inert (no focus, hidden from screen readers).
 */
.pm-covered {
  z-index: 0;
}

arcgis-map {
  display: block;
  width: 100%;
  height: 100%;
}

.pm-map-status {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(21, 21, 21, 0.88);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}

/* ---------- Top of the side bar: totals, toggle, filters ---------- */

.pm-status {
  margin-bottom: 8px;
}

.pm-status-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--pm-muted);
}

.pm-summary {
  font-size: 14px;
  color: var(--pm-muted);
}

.pm-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 8px 0 10px;
}

.pm-indicator {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--pm-pale);
  border-inline-start: 4px solid var(--pm-navy);
}

.pm-indicator-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--pm-navy);
  font-variant-numeric: tabular-nums;
}

.pm-indicator-label {
  font-size: 13px;
  color: #33404c;
}

.pm-extent-label {
  font-size: 14px;
}

.pm-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.pm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-chips:empty {
  display: none;
}

.pm-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pm-empty,
.pm-note {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--pm-muted);
}

.pm-about {
  font-size: 14px;
  line-height: 1.55;
}

.pm-about p {
  margin: 0 0 8px;
}

.pm-about a,
.pm-splash a {
  color: var(--pm-brand-dark);
}

.pm-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin-top: 6px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--pm-brand-dark);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.pm-icon {
  flex: none;
  width: 24px;
  height: 24px;
}

.pm-dot {
  display: inline-block;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

/* ---------- Legend tab ---------- */

.pm-legend-list,
.pm-key-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.pm-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}

.pm-legend-item:hover {
  background: #f1f3f5;
}

.pm-legend-item.on {
  background: var(--pm-pale);
  box-shadow: inset 4px 0 0 var(--pm-brand-dark);
  font-weight: 700;
}

.pm-legend-item.on .pm-legend-label::after {
  content: " ✓";
}

.pm-legend-item.dim .pm-icon {
  opacity: 0.45;
}

.pm-legend-label {
  flex: 1;
  min-width: 0;
}

.pm-legend-count {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--pm-muted);
}

.pm-key-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 14px;
}

.pm-key-line {
  flex: none;
  width: 28px;
}

/* ---------- Charts ---------- */

.pm-chart-sec {
  margin-bottom: 18px;
}

.pm-chart-sec .pm-h3 {
  margin-top: 8px;
}

.pm-chart {
  width: 100%;
}

/* Plain bar charts (fallback and printouts): label beside the bar, count at the end */
.pm-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-bar {
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(36px, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 3px 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
}

button.pm-bar {
  cursor: pointer;
}

button.pm-bar:hover {
  background: #f1f3f5;
}

.pm-bar[aria-pressed="true"] {
  background: var(--pm-pale);
  box-shadow: inset 4px 0 0 var(--pm-brand-dark);
  font-weight: 700;
}

.pm-bar[aria-pressed="true"] .pm-bar-text::after {
  content: " ✓";
}

.pm-bar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}

.pm-bar-text {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pm-bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 2px;
  background: #e6e9ec;
}

.pm-bar-fill {
  display: block;
  height: 100%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.pm-bar-value {
  min-width: 3ch;
  font-size: 13px;
  font-weight: 600;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.pm-months {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.pm-month {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

button.pm-month {
  cursor: pointer;
}

.pm-month-value,
.pm-month-label {
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.pm-month-label {
  margin-top: 3px;
  color: var(--pm-muted);
}

.pm-month-bar {
  margin-top: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--pm-brand);
  opacity: 0.4;
}

button.pm-month:hover .pm-month-bar {
  opacity: 0.65;
}

.pm-month.in-period .pm-month-bar {
  opacity: 1;
}

.pm-month.partial .pm-month-bar {
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0 3px, transparent 3px 6px);
}

.pm-month[aria-pressed="true"] .pm-month-label {
  font-weight: 700;
  color: #151515;
}

/* ---------- List tab and group lists ---------- */

.pm-list {
  display: flex;
  flex-direction: column;
}

.pm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--pm-line);
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.pm-item:hover {
  background: #f1f3f5;
}

.pm-item .pm-icon {
  margin-top: 2px;
}

.pm-item-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-size: 14px;
}

.pm-muted {
  font-size: 13px;
  color: var(--pm-muted);
}

.pm-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ---------- Table view ---------- */

.pm-table-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.pm-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 4px;
}

.pm-t-search {
  width: 280px;
  max-width: 100%;
}

.pm-toolbar-spacer {
  flex: 1;
}

.pm-export-label {
  font-size: 14px;
  font-weight: 600;
  color: #33404c;
}

.pm-export {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-table-info {
  margin: 4px 12px 8px;
  font-size: 13px;
  color: var(--pm-muted);
}

.pm-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--pm-line);
}

.pm-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  table-layout: fixed;
}

.pm-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef2f5;
}

.pm-table th,
.pm-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--pm-line);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pm-table th {
  padding: 0;
  background: #eef2f5;
}

.pm-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--pm-navy);
  font: inherit;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.pm-sort:hover {
  background: #e1e8ee;
}

.pm-sort-icon::after {
  content: "↕";
  color: #6b7a87;
}

th[aria-sort="ascending"] .pm-sort-icon::after {
  content: "▲";
  color: var(--pm-navy);
}

th[aria-sort="descending"] .pm-sort-icon::after {
  content: "▼";
  color: var(--pm-navy);
}

.pm-filter-row td {
  padding: 4px 6px 8px;
  background: #eef2f5;
  border-bottom: 2px solid #b8c3cc;
}

.pm-table tbody tr:nth-child(even) td {
  background: #f8fafb;
}

.pm-table tbody tr:hover td {
  background: var(--pm-pale);
}

.pm-cell-cat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-rowbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--pm-brand);
  border-radius: 4px;
  background: #fff;
  color: var(--pm-brand-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pm-rowbtn:hover {
  background: var(--pm-pale);
}

.pm-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px;
  border-top: 1px solid var(--pm-line);
  font-size: 14px;
}

/* ---------- Details panel, docked on the right of the map ---------- */

.pm-details {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  width: var(--pm-details-width);
  max-width: 100%;
  background: #fff;
  border-inline-start: 1px solid var(--pm-line);
  box-shadow: -3px 0 12px rgba(0, 0, 0, 0.22);
}

.pm-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  background: var(--pm-navy);
  color: #fff;
}

.pm-details-head :focus-visible {
  outline-color: var(--pm-sky);
}

.pm-details-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.pm-iconbtn {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.pm-iconbtn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.pm-details-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
  font-size: 14px;
}

.pm-d-meta {
  margin: 0 0 10px;
  color: var(--pm-muted);
}

.pm-d-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 10px;
  font-size: 16px;
}

.pm-d-table {
  width: 100%;
  margin-bottom: 12px;
  border-collapse: collapse;
}

.pm-d-table th,
.pm-d-table td {
  padding: 5px 8px 5px 0;
  border-bottom: 1px solid var(--pm-line);
  text-align: start;
  vertical-align: top;
}

.pm-d-table th {
  width: 40%;
  font-weight: 600;
}

.pm-d-types td:last-child,
.pm-d-types th:last-child {
  text-align: end;
}

.pm-d-list {
  max-height: 46vh;
  margin: 10px 0 4px;
  overflow-y: auto;
  border: 1px solid var(--pm-line);
  border-radius: 6px;
}

.pm-d-list .pm-item {
  padding: 8px;
}

.pm-more-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: #eef2f5;
  color: var(--pm-brand-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.pm-back {
  margin: 0 0 6px;
}

/* ---------- Welcome and print dialogs ---------- */

.pm-splash {
  font-size: 15px;
  line-height: 1.5;
}

.pm-splash-badge {
  float: right;
  width: auto;
  height: 56px;
  margin: 0 0 8px 12px;
}

.pm-splash p {
  margin: 0 0 10px;
}

.pm-splash h3 {
  margin: 16px 0 6px;
  font-size: 15px;
  color: var(--pm-navy);
}

.pm-splash ul {
  margin: 0 0 10px;
  padding-inline-start: 22px;
}

.pm-splash li {
  margin-bottom: 6px;
}

.pm-print-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pm-fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--pm-line);
  border-radius: 6px;
}

.pm-fieldset legend {
  padding: 0 4px;
  font-weight: 700;
}

.pm-field-label {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.pm-print-howto {
  margin: 0;
  padding: 8px 10px;
  border-inline-start: 4px solid var(--pm-brand);
  background: var(--pm-pale);
  color: #1f2a33;
}

.pm-print-actions {
  display: flex;
  gap: 8px;
}

/* The print area, drawn over the map while the print panel is open; the rest of the map is dimmed */
/* The hidden map that draws the printed map at paper size: a 1-pixel window behind the page.
   (Inside the window so the browser keeps drawing it at full speed; a map off the screen draws slowly.) */
.pm-print-render {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
@media print {
  .pm-print-render { display: none !important; }
}

.pm-print-frame {
  position: absolute;
  z-index: 2;
  border: 2px dashed var(--pm-navy);
  box-shadow: 0 0 0 9999px rgba(21, 21, 21, 0.28);
  pointer-events: none;
}

.pm-print-frame .pm-frame-label {
  position: absolute;
  top: -1px;
  left: -1px;
  padding: 2px 8px;
  background: var(--pm-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

/* Corner handles: a 12 px square to see, inside a 28 px target to grab */
.pm-frame-handle {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
}

.pm-frame-handle::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid #fff;
  background: var(--pm-navy);
  box-shadow: 0 0 0 1px var(--pm-navy);
}

.pm-frame-handle:focus-visible {
  outline: 3px solid var(--pm-brand);
  outline-offset: 0;
}

.pm-frame-nw { top: -15px; left: -15px; cursor: nwse-resize; }
.pm-frame-se { bottom: -15px; right: -15px; cursor: nwse-resize; }
.pm-frame-ne { top: -15px; right: -15px; cursor: nesw-resize; }
.pm-frame-sw { bottom: -15px; left: -15px; cursor: nesw-resize; }

/* "Draw print area": a layer over the map that takes the drag */
.pm-draw-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: crosshair;
  touch-action: none;
}

.pm-draw-layer:focus-visible {
  outline: 3px solid var(--pm-brand);
  outline-offset: -3px;
}

.pm-draw-rect {
  position: absolute;
  border: 2px solid var(--pm-brand);
  background: rgba(0, 113, 166, 0.12);
  pointer-events: none;
}

.pm-draw-hint {
  position: absolute;
  top: 12px;
  left: 50%;
  margin: 0;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--pm-navy);
  color: #fff;
  font-size: 14px;
  transform: translateX(-50%);
  pointer-events: none;
}

.pm-p-scale-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.pm-p-scale-label {
  flex: 1;
  min-width: 0;
}

.pm-p-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pm-p-area .pm-note {
  margin: 0;
}

/* "Created with assistance from Claude.ai." */
.pm-credit {
  position: absolute;
  left: 10px;
  bottom: 30px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #8795a1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2a33;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.pm-credit:hover {
  background: #fff;
  border-color: var(--pm-navy);
}

.pm-credit-text {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  max-width: 260px;
}

.pm-keyicon {
  flex: none;
}

.pm-key-list li span {
  flex: 1;
}

/* ---------- Phones and narrow windows ---------- */

@media (max-width: 760px) {
  html,
  body {
    height: auto;
  }

  .pm-mobile-only {
    display: inline-flex !important;
  }

  .pm-header {
    gap: 6px;
    min-height: 52px;
    padding: 4px 8px 4px 12px;
  }

  .pm-badge {
    height: 38px;
  }

  .pm-agency {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .pm-title {
    font-size: 15px;
    letter-spacing: 0.01em;
  }

  .pm-header-actions {
    flex-wrap: nowrap;
    gap: 0;
  }

  .pm-hbtn {
    justify-content: center;
    min-width: 44px;
    padding: 0 6px;
  }

  /* Header buttons become icons; their names stay for screen readers */
  .pm-hbtn-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .pm-main {
    display: flex;
    flex-direction: column;
  }

  .pm-center {
    order: -1;
    height: 62vh;
    height: 62dvh;
    min-height: 360px;
  }

  .pm-splitter,
  .pm-rail-toggle {
    display: none;
  }

  .pm-side,
  .pm-side.rail-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "top" "rail" "panels";
    min-height: 100vh;
    min-height: 100dvh;
    align-content: start;
  }

  /* Tabs become a row that sticks to the top while the panel scrolls */
  .pm-rail {
    position: sticky;
    top: 0;
    z-index: 6;
    flex-direction: row;
    padding: 4px 6px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--pm-line);
  }

  .pm-tablist {
    flex-direction: row;
    gap: 2px;
    overflow-x: auto;
  }

  .pm-tab,
  .pm-side.rail-collapsed .pm-tab {
    flex: none;
    width: auto;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 10px;
  }

  .pm-tab[aria-selected="true"] {
    box-shadow: inset 0 -4px 0 var(--pm-brand);
  }

  .pm-side.rail-collapsed .pm-tab-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .pm-panels {
    overflow: visible;
  }

  .pm-jump {
    position: absolute;
    right: 12px;
    bottom: 40px;
    z-index: 5;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #fff;
    border-radius: 22px;
    background: var(--pm-navy);
    color: #fff;
    font: inherit;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
  }

  .pm-top-links {
    gap: 20px;
  }

  /* Details slide up from the bottom of the screen */
  .pm-details {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    width: auto;
    max-height: 72vh;
    max-height: 72dvh;
    border-inline-start: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
  }

  .pm-details-head {
    border-radius: 12px 12px 0 0;
  }

  /* Leave room above the print panel to see the print area */
  .pm-printpanel {
    max-height: 46vh;
    max-height: 46dvh;
  }

  .pm-table-toolbar {
    padding: 8px;
  }

  .pm-t-search {
    width: 100%;
  }

  .pm-toolbar-spacer {
    display: none;
  }

  .pm-legend-item,
  .pm-bar,
  .pm-item,
  .pm-tab {
    min-height: 44px;
  }
}

/* ---------- Accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .pm-tab[aria-selected="true"],
  .pm-vtab[aria-selected="true"],
  .pm-bar[aria-pressed="true"],
  .pm-legend-item.on {
    outline: 2px solid Highlight;
  }

  .pm-month-bar,
  .pm-bar-fill {
    background: CanvasText;
    forced-color-adjust: none;
  }
}

/* ---------- Printouts ---------- */

.pm-print {
  display: none;
}

@media print {
  html,
  body {
    height: auto;
    background: #fff;
  }

  body {
    display: block;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body > *:not(.pm-print) {
    display: none !important;
  }

  .pm-print {
    display: block;
    font-family: Inter, Arial, sans-serif;
    font-size: 9pt;
    color: #000;
  }

  /* ---- Page 1: header, map, filters and legend ---- */

  /* The map page is a named page, so it can have its own orientation (see setPageStyle in police-map.js) */
  .pp-page1 {
    page: pm-map;
    break-after: auto;
  }

  .pp-head {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .pp-logo {
    width: auto;
    height: 0.55in;
  }

  .pp-head h1 {
    margin: 0;
    font-size: 16pt;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--pm-navy);
  }

  .pp-head p {
    margin: 2px 0 0;
    color: #333;
  }

  .pp-rule {
    height: 4px;
    margin: 5px 0 8px;
    background: linear-gradient(90deg, var(--pm-navy) 0%, #3f7fb9 35%, var(--pm-sky) 70%, var(--pm-pale) 100%);
  }

  .pp-h2 {
    margin: 0 0 3px;
    font-size: 9pt;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pm-navy);
  }

  .pp-landscape .pp-body {
    display: flex;
    gap: 0.2in;
    align-items: flex-start;
  }

  .pp-landscape .pp-side {
    flex: 1;
    min-width: 0;
    max-height: var(--pp-map-h, 6.25in);
    overflow: hidden;
  }

  .pp-portrait .pp-top {
    display: flex;
    gap: 0.3in;
    align-items: flex-start;
    margin-bottom: 4px;
  }

  .pp-portrait .pp-filters-block {
    flex: 1;
    min-width: 0;
  }

  .pp-portrait .pp-indicators {
    flex: none;
    flex-direction: column;
    gap: 2px;
    margin: 14px 0 0;
    white-space: nowrap;
  }

  .pp-portrait .pp-filterlist {
    grid-template-columns: auto 1fr auto 1fr;
  }

  .pp-filterlist {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1px 8px;
    margin: 0 0 8px;
    font-size: 8pt;
  }

  .pp-filterlist dt {
    font-weight: 700;
  }

  .pp-filterlist dd {
    margin: 0;
  }

  .pp-filterlist .pp-dim {
    color: #555;
  }

  .pp-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-bottom: 8px;
  }

  .pp-indicators strong {
    font-size: 13pt;
    color: var(--pm-navy);
  }

  /* The map: sized in inches to fill the page, with the north arrow and scale bar on top */
  .pp-mapbox {
    position: relative;
    flex: none;
    margin: 0;
    overflow: hidden;
  }

  /* Neatline: a 1 pt black line around the map. Drawn as an inset shadow because Chrome rounds
     borders down to whole pixels, which prints a 1 pt border as 0.75 pt. */
  .pp-mapbox::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    box-shadow: inset 0 0 0 1pt #000;
    pointer-events: none;
  }

  .pp-mapimg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .pp-north {
    position: absolute;
    top: 0.1in;
    right: 0.1in;
    width: 0.34in;
    padding: 3px 3px 1px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.88);
  }

  .pp-north svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .pp-scale {
    position: absolute;
    left: 0.1in;
    bottom: 0.1in;
    padding: 4px 6px 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 7pt;
  }

  .pp-scale-bar {
    display: flex;
    height: 5px;
    border: 1px solid #000;
  }

  .pp-scale-bar span {
    flex: 1;
    background: #fff;
  }

  .pp-scale-bar span:nth-child(odd) {
    background: #000;
  }

  .pp-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1px;
  }

  .pp-scale-text {
    margin-top: 1px;
    color: #333;
  }

  /* Legend: icons without boxes */
  .pp-legend {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: 8pt;
  }

  .pp-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 0.19in;
    break-inside: avoid;
  }

  .pp-legend .pp-icon,
  .pp-legend .pm-keyicon {
    flex: none;
    border: 0;
  }

  .pp-legend-dense {
    font-size: 7.5pt;
  }

  /* A long legend in the landscape side column uses two columns so it never runs off the page */
  .pp-landscape .pp-legend-dense {
    columns: 2;
    column-gap: 0.12in;
    font-size: 7pt;
  }

  .pp-legend-dense li {
    min-height: 0.17in;
  }

  .pp-portrait .pp-legend {
    columns: 3;
    column-gap: 0.2in;
    margin-top: 6px;
  }

  .pp-portrait.pp-tabloid .pp-legend {
    columns: 4;
  }

  /* 11 × 17: a little more room for the landscape side column's legend */
  .pp-landscape.pp-tabloid .pp-legend-dense {
    font-size: 7.5pt;
  }

  .pp-icon {
    width: 14px;
    height: 14px;
    border: 0;
    vertical-align: -2px;
  }

  .pp-table .pp-icon {
    margin-inline-end: 4px;
  }

  .pp-line {
    display: inline-block;
    flex: none;
    width: 22px;
    border-top: 1.5px solid #000;
  }

  .pp-line.dashed {
    border-top-style: dashed;
    border-top-width: 2.5px;
  }

  .pp-line.blue {
    border-top-color: #005a8c;
  }

  .pp-line.purple {
    border-top-color: #6a1b9a;
  }

  .pp-sources {
    margin: 4px 0 6px;
    font-size: 6.5pt;
    line-height: 1.35;
    color: #333;
  }

  /* ---- Later pages ---- */

  .pp-sec h2 {
    margin: 0 0 6px;
    font-size: 13pt;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--pm-navy);
  }

  .pp-sec h3 {
    margin: 8px 0 4px;
    font-size: 10pt;
    color: var(--pm-navy);
  }

  .pp-break-before {
    break-before: page;
  }

  /* Charts follow the statistics on the same page when the whole section fits there; otherwise the next page */
  .pp-keep {
    break-inside: avoid;
    margin-top: 0.2in;
  }

  .pp-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 10px;
  }

  .pp-cols-3 {
    grid-template-columns: 1.2fr 1.2fr 1fr;
  }

  .pp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
  }

  .pp-gap {
    margin-top: 10px;
  }

  .pp-table th,
  .pp-table td {
    padding: 2px 5px;
    border-bottom: 0.5pt solid #bbb;
    text-align: left;
    vertical-align: top;
  }

  .pp-table thead th {
    background: var(--pm-pale);
    border-bottom: 1pt solid var(--pm-navy);
  }

  .pp-table .num {
    text-align: right;
    white-space: nowrap;
  }

  .pp-table tr {
    break-inside: avoid;
  }

  .pp-records {
    font-size: 7.5pt;
  }

  .pp-note {
    margin: 4px 0;
    font-size: 7.5pt;
    color: #333;
  }

  .pp-charts .pm-bars,
  .pp-charts .pm-months {
    break-inside: avoid;
  }

  .pp-charts .pm-bar {
    min-height: 0;
    padding: 1px 0;
  }

  .pp-charts .pm-bar-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow-wrap: normal;
  }

  .pp-charts .pm-month-label,
  .pp-charts .pm-month-value {
    font-size: 7pt;
  }

  /* Footer for browsers without @page margin boxes (Chrome and Edge use the margin boxes instead) */
  .pp-runfoot {
    display: none;
  }

  .pp-fixed-foot .pp-runfoot {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 7.5pt;
    color: #333;
  }
}

/* ======================================================================
 * Internal maps only: the Charts view (Map | Table | Charts), extra filters and details
 * ==================================================================== */

/* A middle view tab joins its neighbours */
.pm-vtab + .pm-vtab {
  margin-inline-start: -1px;
}

.pm-charts-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow-y: auto;
  background: #f4f6f8;
}

.pm-charts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 16px 0;
}

.pm-charts-head .pm-note {
  margin: 0;
}

.pm-cgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  padding: 10px 16px 32px;
}

.pm-csec-title {
  grid-column: 1 / -1;
  margin: 10px 0 -4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pm-navy);
}

.pm-card {
  min-width: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  background: #fff;
}

.pm-card.wide {
  grid-column: 1 / -1;
}

.pm-card .pm-h3 {
  margin: 0 0 2px;
  font-size: 15px;
}

.pm-card > .pm-note {
  margin: 0 0 8px;
}

/* Hour x day-of-week heat map: a real table, each cell a toggle */
.pm-heat-scroll {
  overflow-x: auto;
}

.pm-heat {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.pm-heat th {
  padding: 2px 4px;
  font-weight: 600;
  color: #33404c;
  white-space: nowrap;
}

.pm-heat thead th {
  text-align: center;
}

.pm-heat tbody th {
  text-align: end;
}

.pm-heat td {
  padding: 0;
}

.pm-heat-cell {
  display: block;
  width: 100%;
  min-width: 34px;
  min-height: 24px;
  padding: 2px 4px;
  border: 0;
  border-radius: 3px;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.pm-heat-cell:hover {
  outline: 2px solid var(--pm-navy);
  outline-offset: -2px;
}

.pm-heat-cell[aria-pressed="true"] {
  outline: 3px solid #151515;
  outline-offset: -3px;
  font-weight: 800;
}

.pm-heat-key {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--pm-muted);
}

.pm-heat-key span.ramp {
  width: 120px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f1f6fa, #9cc4de, #3b82b8, #0b3c66);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* Big numbers at the top of a card (same period last year) */
.pm-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 4px 0 10px;
}

.pm-stat {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--pm-pale);
}

.pm-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--pm-navy);
  font-variant-numeric: tabular-nums;
}

.pm-stat-label {
  font-size: 12px;
  color: #33404c;
}

.pm-up {
  color: #a1260d; /* 6.6:1 on white */
}

.pm-down {
  color: #1a6b2f; /* 6.3:1 on white */
}

/* Trend tables: each year's count, a small line, and the change */
.pm-trend-scroll {
  overflow-x: auto;
  margin-top: 8px;
}

.pm-trend {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pm-trend th,
.pm-trend td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--pm-line);
  text-align: end;
  white-space: nowrap;
}

.pm-trend thead th {
  position: sticky;
  top: 0;
  background: #eef2f5;
  color: var(--pm-navy);
}

.pm-trend th[scope="row"],
.pm-trend thead th:first-child {
  min-width: 160px;
  max-width: 260px;
  text-align: start;
  white-space: normal;
}

.pm-trend .pm-trend-btn {
  display: inline;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--pm-brand-dark);
  font: inherit;
  font-weight: 600;
  text-align: start;
  text-decoration: underline;
  cursor: pointer;
}

.pm-trend .pm-trend-btn[aria-pressed="true"] {
  color: #151515;
  font-weight: 800;
  text-decoration: none;
}

.pm-trend .pm-trend-btn[aria-pressed="true"]::after {
  content: " ✓";
}

.pm-trend td.cur {
  font-weight: 700;
  background: var(--pm-pale);
}

.pm-spark {
  display: block;
  margin-inline-start: auto;
}

/* Dimension filters in the Filters tab */
.pm-more-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

/* Extra details loaded from the server */
.pm-d-more {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pm-d-loading {
  color: var(--pm-muted);
  font-style: italic;
}

@media (max-width: 760px) {
  .pm-cgrid {
    padding: 8px 8px 24px;
  }

  .pm-card {
    padding: 10px;
  }
}

@media print {
  .pp-heat {
    border-collapse: collapse;
    font-size: 6.5pt;
  }

  .pp-heat th,
  .pp-heat td {
    padding: 1px 2px;
    border: 0.5pt solid #ccc;
    text-align: center;
  }
}

/* ======================================================================
 * Time period at the top of the side bar, and crime offenses grouped by incident
 * ==================================================================== */

/* The time period, under "Only count what's visible on the map" (it shows on every tab) */
.pm-top-date {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

/* One incident (report number) in the List tab and in a group's "Show all" list */
.pm-incident {
  padding: 8px 4px 6px;
  border-bottom: 1px solid var(--pm-line);
}

.pm-d-list .pm-incident {
  padding: 8px;
}

.pm-incident-head {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #33404c;
}

.pm-incident-head strong {
  color: var(--pm-navy);
}

.pm-incident-offenses {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pm-offense;
}

.pm-incident-offenses > li {
  counter-increment: pm-offense;
}

/* Each offense is a row button: its number, icon, category and type */
.pm-incident .pm-item.pm-offense {
  align-items: center;
  min-height: 36px;
  padding: 4px 6px;
  border-bottom: 0;
  border-radius: 4px;
}

.pm-incident .pm-item.pm-offense::before {
  content: counter(pm-offense) ".";
  flex: none;
  min-width: 1.5em;
  font-size: 14px;
  font-weight: 600;
  color: var(--pm-muted);
  text-align: end;
}

@media (max-width: 760px) {
  .pm-incident .pm-item.pm-offense {
    min-height: 44px;
  }
}

/* ======================================================================
 * Accessibility view (public maps): a text version of the map
 * Plain HTML controls, headings and tables, sized for 200% zoom and touch.
 * ==================================================================== */

.pm-vtab + .pm-vtab {
  margin-inline-start: -1px;
}

.pm-vtab:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* While the view is open it fills the page beside nothing: the side bar is hidden and inert. */
.pm-a11y-on .pm-main {
  grid-template-columns: minmax(0, 1fr);
}

.pm-a11y-on .pm-side,
.pm-a11y-on .pm-splitter {
  display: none;
}

.pm-a11y {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: auto;
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
}

.pm-a-inner {
  max-width: 980px;
  padding: 16px 20px 48px;
}

.pm-a-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.pm-a-title {
  margin: 0;
  color: var(--pm-navy);
  font-size: 24px;
  line-height: 1.25;
}

.pm-a-title:focus,
.pm-a-sec h3:focus,
.pm-a-records > li:focus {
  outline: 3px solid var(--pm-focus);
  outline-offset: 3px;
}

.pm-a-lead {
  max-width: 70ch;
  margin: 8px 0 12px;
}

.pm-a-jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.pm-a-jump a,
.pm-a11y a {
  color: var(--pm-brand-dark);
  font-weight: 600;
}

.pm-a-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
}

.pm-a-sec {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--pm-line);
}

.pm-a-sec h3 {
  margin: 0 0 8px;
  color: var(--pm-navy);
  font-size: 20px;
}

.pm-a-summary {
  max-width: 75ch;
  margin: 0 0 8px;
  font-size: 17px;
}

.pm-a-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.pm-a-totals strong {
  color: var(--pm-navy);
  font-size: 26px;
}

.pm-a-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-a-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 4px 0;
  padding: 6px 16px;
  border: 2px solid var(--pm-brand);
  border-radius: 6px;
  background: #fff;
  color: var(--pm-brand-dark);
  font: inherit;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.pm-a-btn:hover {
  background: var(--pm-pale);
}

.pm-a-btn:disabled {
  border-color: #8a8a8a;
  color: #595959;
  cursor: not-allowed;
}

.pm-a-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 8px 16px;
  margin-bottom: 8px;
}

.pm-a-wide {
  grid-column: 1 / -1;
}

.pm-a-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pm-a-field label,
.pm-a-fieldset legend,
.pm-a-details summary {
  font-weight: 700;
}

.pm-a11y select,
.pm-a11y input[type="search"],
.pm-a11y input[type="text"],
.pm-a11y input[type="date"] {
  min-height: 44px;
  padding: 6px 10px;
  border: 2px solid #6b7682; /* 4.7:1 on white */
  border-radius: 6px;
  background: #fff;
  color: #151515;
  font: inherit;
}

.pm-a-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-a-inline input {
  flex: 1 1 240px;
  min-width: 0;
}

.pm-a-inline .pm-a-btn {
  margin: 0;
}

.pm-a-help,
.pm-a-muted {
  margin: 0;
  color: var(--pm-muted);
  font-size: 15px;
}

.pm-a-error {
  margin: 4px 0 0;
  color: #a4000f; /* 7.4:1 on white */
  font-weight: 600;
}

.pm-a-error:empty {
  display: none;
}

.pm-a-fieldset {
  min-width: 0;
  margin: 8px 0;
  padding: 8px 12px 12px;
  border: 1px solid var(--pm-line);
  border-radius: 6px;
}

.pm-a-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 0 16px;
}

.pm-a-check,
.pm-a-radios label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}

.pm-a11y input[type="checkbox"],
.pm-a11y input[type="radio"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--pm-brand);
}

.pm-a-count {
  color: var(--pm-muted);
}

.pm-a-details {
  margin: 8px 0;
}

.pm-a-details summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.pm-a-details summary::before {
  content: "▸";
  margin-inline-end: 8px;
}

.pm-a-details[open] summary::before {
  content: "▾";
}

.pm-a-details summary::-webkit-details-marker {
  display: none;
}

.pm-a-status {
  margin: 8px 0;
  font-weight: 600;
}

.pm-a-status:empty {
  display: none;
}

.pm-a-matchlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-a-table {
  width: 100%;
  max-width: 760px;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 15px;
}

.pm-a-table caption {
  padding: 4px 0;
  font-weight: 700;
  text-align: start;
}

.pm-a-table th,
.pm-a-table td {
  padding: 6px 10px;
  border: 1px solid #b5bdc5;
  text-align: start;
  vertical-align: top;
}

.pm-a-table thead th {
  background: var(--pm-pale);
}

.pm-a-table tbody th {
  font-weight: 400;
  overflow-wrap: anywhere; /* long names such as "Destruction/Damage/Vandalism of Property" wrap on phones */
}

.pm-a-table .pm-a-num {
  text-align: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pm-a-empty {
  color: var(--pm-muted);
}

.pm-a-sort {
  max-width: 260px;
}

.pm-a-records {
  margin: 8px 0;
  padding-inline-start: 1.6em;
}

.pm-a-records > li {
  margin-bottom: 12px;
  padding: 8px 0 8px 4px;
  border-bottom: 1px solid var(--pm-line);
}

.pm-a-records h4 {
  margin: 0;
  font-size: 17px;
}

.pm-a-records p {
  margin: 2px 0;
}

.pm-a-records ol {
  margin: 4px 0 0;
  padding-inline-start: 1.4em;
}

.pm-a-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.pm-a-invite {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--pm-line);
}

@media (max-width: 760px) {
  .pm-a11y-on .pm-center {
    height: auto;
    min-height: 0;
  }

  .pm-a11y-on .pm-stage {
    flex: none;
  }

  /* The map keeps its size behind the view (resizing it would redraw it) */
  .pm-a11y-on .pm-map-wrap {
    inset: 0 0 auto 0;
    height: 62vh;
    height: 62dvh;
  }

  .pm-a11y {
    position: relative;
    inset: auto;
    overflow: visible;
  }

  .pm-a-inner {
    padding: 12px 16px 40px;
  }

  .pm-a-title {
    font-size: 20px;
  }

  .pm-a-table {
    font-size: 14px;
  }

  .pm-a-table th,
  .pm-a-table td {
    padding: 6px;
  }
}

@media (forced-colors: active) {
  .pm-a-btn,
  .pm-a11y select,
  .pm-a11y input {
    border-color: ButtonText;
  }
}

/* Printing the accessibility view ("Print this view") */
@media print {
  .pa-doc {
    font-size: 10pt;
    line-height: 1.35;
  }

  .pa-doc .pa-head h1 {
    margin: 0;
    color: #1e4167;
    font-size: 16pt;
  }

  .pa-doc .pa-head p {
    margin: 2px 0 10px;
    color: #333;
  }

  .pa-doc h2 {
    margin: 14px 0 4px;
    color: #1e4167;
    font-size: 13pt;
    break-after: avoid;
  }

  .pa-doc .pm-a-table {
    width: 100%;
    max-width: none;
    margin: 6px 0 12px;
    border-collapse: collapse;
    font-size: 9pt;
    break-inside: auto;
  }

  .pa-doc .pm-a-table caption {
    font-weight: 700;
    text-align: start;
  }

  .pa-doc .pm-a-table th,
  .pa-doc .pm-a-table td {
    padding: 2px 6px;
    border: 0.75pt solid #888;
    text-align: start;
  }

  .pa-doc .pm-a-table .pm-a-num {
    text-align: end;
  }

  .pa-doc .pm-a-table tr {
    break-inside: avoid;
  }

  .pa-records > li {
    margin-bottom: 6px;
    break-inside: avoid;
  }

  .pa-records h4 {
    margin: 0;
    font-size: 10pt;
  }

  .pa-records p,
  .pa-records ol {
    margin: 0;
  }
}

/* ---------- Near an address (Filters tab and the search box's place details) ---------- */

.pm-near {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-near-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.pm-near-status:empty {
  display: none;
}

.pm-near-list {
  margin: 0;
  padding-inline-start: 1.2em;
}

.pm-near-list .pm-link {
  min-height: 32px;
  text-align: start;
}

.pm-d-outside {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-inline-start: 4px solid #b4006e;
  background: #fbeef6;
  color: #151515;
}

/* ======================================================================
 * Filters: time period pills, filter sections, and active filters that stand out
 * ==================================================================== */

:root {
  --pm-amber: #b45309; /* 5.0:1 on white */
  --pm-amber-dark: #7c3a06;
  --pm-amber-bg: #fff4e0;
  --pm-amber-line: #f0b45d;
}

/* Time period pills */
.pm-periods {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-pill {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #8795a1;
  border-radius: 999px;
  background: #fff;
  color: #1f2a33;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pm-pill:hover {
  border-color: var(--pm-navy);
  background: var(--pm-pale);
}

.pm-pill[aria-pressed="true"] {
  border-color: var(--pm-navy);
  background: var(--pm-navy);
  color: #fff;
}

.pm-pill:focus-visible,
.pm-fchip:focus-visible,
.pm-frow:focus-visible,
.pm-achip:focus-visible,
.pm-activebar-clear:focus-visible,
.pm-facet summary:focus-visible,
.pm-fsearch:focus-visible {
  outline: 3px solid var(--pm-focus);
  outline-offset: 2px;
}

/* Filter sections */
.pm-facets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-facets:focus {
  outline: none;
}

.pm-facet {
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  background: #fff;
}

.pm-facet.active {
  border-color: var(--pm-amber-line);
  box-shadow: inset 4px 0 0 var(--pm-amber);
}

.pm-facet summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.pm-facet summary::-webkit-details-marker {
  display: none;
}

.pm-facet summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-inline-start: 4px;
  border-right: 2px solid #4a5560;
  border-bottom: 2px solid #4a5560;
  transform: rotate(45deg) translateY(-2px);
}

.pm-facet[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.pm-facet-title {
  flex: 1;
  font-weight: 700;
  color: var(--pm-navy);
}

.pm-facet-all {
  font-size: 12px;
  color: var(--pm-muted);
}

.pm-facet-badge {
  max-width: 55%;
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pm-amber-bg);
  color: var(--pm-amber-dark);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-facet-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 10px;
}

.pm-fsearch {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #8795a1;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
}

/* Toggle chips (short lists) */
.pm-fchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-fchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 3px 10px;
  border: 1px solid #b9c6d2;
  border-radius: 999px;
  background: #fff;
  color: #1f2a33;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.pm-fchip:hover {
  border-color: var(--pm-navy);
}

.pm-fchip[aria-pressed="true"] {
  border-color: var(--pm-amber);
  background: var(--pm-amber);
  color: #fff;
  font-weight: 700;
}

.pm-fchip-n {
  font-size: 11px;
  color: var(--pm-muted);
  font-variant-numeric: tabular-nums;
}

.pm-fchip[aria-pressed="true"] .pm-fchip-n {
  color: #fff;
}

.pm-fchip.zero:not([aria-pressed="true"]),
.pm-frow.zero:not([aria-pressed="true"]) {
  color: #5c6773; /* muted, still 4.5:1 on white */
}
.pm-frow.zero:not([aria-pressed="true"]) .pm-fcheck,
.pm-fchip.zero:not([aria-pressed="true"]) .pm-fchip-n,
.pm-frow.zero:not([aria-pressed="true"]) .pm-icon { opacity: 0.6; }

/* Checklists (long lists) */
.pm-flist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-frow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 4px 6px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #1f2a33;
  font: inherit;
  font-size: 13.5px;
  text-align: start;
  cursor: pointer;
}

.pm-frow:hover {
  background: #f1f5f8;
}

.pm-frow[aria-pressed="true"] {
  background: var(--pm-amber-bg);
  font-weight: 700;
}

.pm-fcheck {
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid #6b7884;
  border-radius: 3px;
  background: #fff;
}

.pm-fcheck.radio {
  border-radius: 50%;
}

.pm-frow[aria-pressed="true"] .pm-fcheck {
  border-color: var(--pm-amber);
  background: var(--pm-amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.pm-frow-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pm-frow-n {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: #33404c;
}

.pm-frow-bar {
  position: absolute;
  right: 6px;
  bottom: 3px;
  left: 30px;
  height: 3px;
  border-radius: 2px;
  background: #e8edf2;
}

.pm-frow-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: #7aa7c7;
}

.pm-frow[aria-pressed="true"] .pm-frow-bar span {
  background: var(--pm-amber);
}

.pm-fmore,
.pm-fclear {
  align-self: flex-start;
}

/* Active filters: the bar over every view */
.pm-activebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 12px;
  border-bottom: 2px solid var(--pm-amber-line);
  background: var(--pm-amber-bg);
}

.pm-activebar[hidden] {
  display: none;
}

.pm-activebar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--pm-amber-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pm-activebar-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.pm-achip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  padding: 2px 6px 2px 10px;
  border: 1px solid var(--pm-amber);
  border-radius: 999px;
  background: #fff;
  color: var(--pm-amber-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pm-achip span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-achip:hover {
  background: var(--pm-amber);
  color: #fff;
}

.pm-achip-x {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.pm-activebar-clear {
  min-height: 30px;
  padding: 2px 12px;
  border: 1px solid var(--pm-amber-dark);
  border-radius: 6px;
  background: var(--pm-amber-dark);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* The "Showing" box turns amber while filters are on */
.pm-filtered-tag {
  display: none;
  margin-inline-start: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pm-amber);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}

.pm-top.is-filtered {
  background: var(--pm-amber-bg);
  box-shadow: inset 4px 0 0 var(--pm-amber);
}

.pm-top.is-filtered .pm-filtered-tag {
  display: inline-block;
}

/* Filters tab: the count of active filters */
.pm-tab {
  position: relative;
}

.pm-tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pm-amber);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.pm-tab-badge[hidden] {
  display: none;
}

.pm-side.rail-collapsed .pm-tab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
}

@media print {
  .pm-activebar {
    display: none !important;
  }
}

/* The filter bar over the views lists the active filters; the side bar keeps just "Clear all filters" */
.pm-chips-row .pm-chips {
  display: none;
}

.pm-pill {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12.5px;
}

.pm-pill-note{flex-basis:100%;font-size:.75rem;color:var(--calcite-color-text-3,#6a6a6a);margin-top:-2px}

/* ---- The Showing box folds up to its totals and dates ---- */
.pm-top-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-top-head .pm-h2 { margin-bottom: 0; }
.pm-top-toggle {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--pm-navy, #1e4167); cursor: pointer;
}
.pm-top-toggle:hover { background: rgba(30, 65, 103, .08); border-color: rgba(30, 65, 103, .25); }
.pm-top-toggle:focus-visible { outline: 2px solid var(--pm-navy, #1e4167); outline-offset: 2px; }
.pm-top-chev { transition: transform .15s ease; }
.pm-top-toggle[aria-expanded="false"] .pm-top-chev { transform: rotate(180deg); }
.pm-top-more[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .pm-top-chev { transition: none; } }
@media print { .pm-top-toggle { display: none !important; } .pm-top-more[hidden] { display: block !important; } }

.pm-top-fold {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 6px 10px;
  border: 1px dashed #c3cbd4; border-radius: 6px; background: transparent; color: var(--pm-navy, #1e4167);
  font: 600 .8125rem/1.2 inherit; cursor: pointer; min-height: 32px;
}
.pm-top-fold:hover { background: rgba(30, 65, 103, .06); border-style: solid; }
.pm-top-fold:focus-visible { outline: 2px solid var(--pm-navy, #1e4167); outline-offset: 2px; }
@media print { .pm-top-fold { display: none !important; } }

/* ---- Folded Showing box: a button to open it again ---- */
.pm-top-show { margin-top: 8px; border-style: solid; background: #fff; }
.pm-top-show[hidden] { display: none !important; }

/* ---- Copy link: the note, and the box when copying isn't allowed ---- */
.pm-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1000; max-width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 8px; background: #1e2b38; color: #fff; font-size: .9rem; line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: opacity .2s ease, transform .2s ease;
}
.pm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .pm-toast { transition: none; } }
.pm-link-dlg { width: min(560px, calc(100vw - 32px)); padding: 18px 20px; border: 1px solid #c9d1da; border-radius: 10px; box-shadow: 0 18px 48px rgba(0, 0, 0, .28); }
.pm-link-dlg::backdrop { background: rgba(10, 20, 35, .45); }
.pm-link-dlg .pm-h2 { margin: 0 0 6px; font-size: 1.05rem; }
.pm-link-input { width: 100%; box-sizing: border-box; padding: 8px 10px; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid #b9c3cf; border-radius: 6px; }
.pm-link-input:focus-visible { outline: 2px solid var(--pm-navy, #1e4167); outline-offset: 2px; }
.pm-link-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.pm-link-dlg .pm-code-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--pm-navy, #1e4167); background: var(--pm-navy, #1e4167); color: #fff; font: 600 .875rem/1 inherit;
}
@media print { .pm-toast, .pm-link-dlg, #pm-link-copy { display: none !important; } }

/* ---- When the data was loaded; partial loads and newer data ---- */
.pm-dataline { margin: 6px 0 8px; font-size: .78rem; line-height: 1.35; color: var(--calcite-color-text-3, #5c6773); }
.pm-dataline.is-warn { color: var(--pm-amber-dark, #7c3a06); }
.pm-dataline-warn { font-weight: 600; }
.pm-dataline .pm-dataline-reload { font-size: .78rem; min-height: 24px; }

/* ---- "Updating map…" while the points redraw ---- */
.pm-map-busy {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .95); color: var(--pm-navy, #1e4167); font-size: .8125rem; font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.pm-map-busy[hidden] { display: none; }
.pm-busy-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pm-spin .8s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pm-busy-dot { animation: none; border-right-color: currentColor; opacity: .6; } }
@media print { .pm-map-busy, .pm-dataline .pm-dataline-reload { display: none !important; } }

/* Phones: keep a focused control from scrolling under the sticky tab row */
@media (max-width: 760px) {
  html { scroll-padding-top: 64px; }
}

/* Phones: the view switch (Map, Table, Charts and Accessibility or Trends) fits the screen width */
@media (max-width: 520px) {
  .pm-viewtabs { display: flex; width: 100%; min-width: 0; }
  .pm-vtab { flex: 1 1 auto; justify-content: center; min-width: 0; gap: 4px; padding: 0 6px; font-size: 13px; }
  .pm-vtab calcite-icon { display: none; }
}

/* Only the time period set: the bar stays neutral (COV blues); amber is kept for other filters */
.pm-activebar.is-neutral {
  border-bottom-color: var(--pm-line);
  background: var(--pm-pale);
}

.pm-activebar.is-neutral .pm-activebar-label {
  color: var(--pm-navy);
}

.pm-activebar.is-neutral .pm-achip {
  border-color: var(--pm-brand);
  color: var(--pm-navy);
}

.pm-activebar.is-neutral .pm-achip:hover {
  background: var(--pm-brand);
  color: #fff;
}

.pm-achip.pm-achip-static,
.pm-activebar.is-neutral .pm-achip.pm-achip-static {
  padding-inline-end: 10px;
  border-color: var(--pm-line);
  background: #fff;
  color: var(--pm-navy);
  cursor: default;
}

.pm-activebar.is-neutral .pm-activebar-clear {
  border-color: var(--pm-navy);
  background: var(--pm-navy);
}

.pm-activebar-clear[hidden] {
  display: none;
}

/* The (i) button after the date lag note, and the note it opens */
.pm-info-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-inline-start: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pm-brand);
  vertical-align: middle;
  cursor: pointer;
}

.pm-info-btn:hover,
.pm-info-btn[aria-expanded="true"] {
  background: var(--pm-pale);
  color: var(--pm-navy);
}

.pm-lag-info {
  flex-basis: 100%;
  margin: 2px 0 0;
  padding: 6px 10px;
  border-inline-start: 3px solid var(--pm-brand);
  border-radius: 4px;
  background: var(--pm-pale);
  color: var(--pm-charcoal);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.pm-lag-info[hidden] {
  display: none;
}
