/* v0.0.6 */
/* Reuses the main dashboard's style.css for shared base styles (fonts,
   colours, .rows/.station-name/.muted/.text-link, .top-banner, .brand) —
   this file only adds what's specific to this page's own layout. */

.crime-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 62px 20px 40px;
}

.crime-intro h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 14px;
}
.crime-intro p {
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.crime-summary {
  margin: 32px 0;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(20, 23, 28, 0.07);
}
.crime-summary h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 12px;
}

/* Comparison table — up to 9 columns (crime type + 8 areas), so this
   scrolls horizontally on narrow screens rather than squeezing. The
   first column (crime type names) stays pinned while scrolling
   sideways, so you can always see which row you're looking at. */
.summary-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
}
.comparison-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 13px;
}
.comparison-table th,
.comparison-table td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.comparison-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 2px solid var(--hairline);
}
.comparison-table thead th a {
  color: var(--ink);
  text-decoration: none;
}
.comparison-table thead th a:hover,
.comparison-table thead th a:focus-visible {
  text-decoration: underline;
}
.header-population {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  text-transform: none;
  letter-spacing: normal;
}
.comparison-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  position: sticky;
  left: 0;
  background: var(--surface);
}
.comparison-table thead th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
}
.comparison-table .summary-total-row th,
.comparison-table .summary-total-row td {
  font-weight: 700;
  border-bottom: 2px solid var(--hairline);
}
.comparison-table .summary-density-row th,
.comparison-table .summary-density-row td {
  color: var(--muted);
  font-style: italic;
  border-bottom: 2px solid var(--hairline);
}
.comparison-table .summary-percapita-row th,
.comparison-table .summary-percapita-row td {
  border-bottom: 10px solid var(--paper);
}
.table-note {
  margin: 8px 0 0;
  font-size: 11.5px;
}

.crime-area {
  margin: 40px 0;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(20, 23, 28, 0.07);
  scroll-margin-top: 62px; /* clears the fixed top-banner when jumped to via the summary links */
}
.crime-area h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 4px;
}
.area-month {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 22px;
}

.area-map {
  width: 100%;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  margin-top: 14px;
}
.area-map .crime-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--crime-a);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(20, 23, 28, 0.3);
}

@media (min-width: 900px) {
  .crime-page {
    max-width: 900px;
    padding-top: 72px;
  }
  .area-map {
    height: 420px;
  }
}
