/* Minnesota Crime Watch — same civic style as the Fraud Tracker and Property Tax Watch (navy + gold, Source Sans Pro, Georgia headings) */
@font-face { font-family: "Source Sans Pro"; src: url("../fonts/SourceSansPro-Regular.woff2") format("woff2"), url("../fonts/SourceSansPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("../fonts/SourceSansPro-Bold.woff2") format("woff2"), url("../fonts/SourceSansPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root {
  --ink: #1a1a1a; --ink-2: #3d3d3d; --muted: #565e66; --paper: #fbfaf7; --card: #fff; --rule: #e3ded3;
  --navy: #1f3a5f; --navy-dark: #142944; --navy-2: #2c5282; --gold: #f2c14e; --gold-soft: #ffe08a; --amber: #8a5a00; --amber-bg: #fff6e0;
  --up: #a12a28; --down: #1d6b3a;
  --bs-body-font-family: "Source Sans Pro", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --bs-body-color: var(--ink); --bs-body-bg: var(--paper); --bs-link-color: var(--navy-2);
}
html { font-size: 17px; scroll-padding-top: 5rem; }
body { background: var(--paper); color: var(--ink); line-height: 1.55; font-family: var(--bs-body-font-family); overflow-x: hidden; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.45rem; font-weight: 700; margin-top: 2rem; }
h3 { font-size: 1.15rem; font-weight: 700; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 54rem; }
.kicker { text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; font-weight: 700; color: var(--amber); }
.small-muted, .text-muted, .form-text { color: var(--muted) !important; }
a { color: var(--navy-2); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
main p, main li, main dd { overflow-wrap: anywhere; }
main td { overflow-wrap: break-word; }
code { color: #a01c5c; }
.skip-link { position: absolute; left: 1rem; top: .5rem; background: #fff; padding: .5rem 1rem; z-index: 2000; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: #142944; --bs-btn-hover-border-color: #142944; --bs-btn-active-bg: #142944; --bs-btn-active-border-color: #142944; background: var(--navy); border-color: var(--navy); }
.btn-primary:hover, .btn-primary:focus { background: #142944; border-color: #142944; }
.btn-outline-secondary { color: #495057; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm { min-height: 44px; }

/* ---------- Header: sticky, compact ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--rule); z-index: 1030; }
.site-nav { padding-top: .4rem; padding-bottom: .4rem; }
.navbar-brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); padding: 0; margin-right: 1rem; min-height: 44px; }
.brand-mark { background: var(--navy); color: #fff; font-family: Georgia, serif; font-weight: 700; padding: .25rem .45rem; border-radius: 3px; }
.brand-text { font-family: Georgia, serif; font-weight: 700; line-height: 1.05; font-size: 1rem; }
.navbar-toggler { min-width: 44px; min-height: 44px; }
.site-nav .navbar-nav .nav-link { position: relative; color: #2b2f36; font-weight: 600; font-size: .97rem; white-space: nowrap; padding: .55rem .6rem; border-radius: 6px; min-height: 44px; display: flex; align-items: center; }
.site-nav .navbar-nav .nav-link:hover { color: var(--navy); background: #f1efe9; }
.site-nav .navbar-nav .nav-link[aria-current="page"] { color: var(--navy); }
@media (min-width: 992px) {
  .site-nav .main-links > .nav-item > .nav-link[aria-current="page"]::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: .15rem; height: 3px; border-radius: 2px; background: var(--gold); }
}
@media (max-width: 1199.98px) and (min-width: 992px) { .site-nav .navbar-nav .nav-link { padding-left: .4rem; padding-right: .4rem; font-size: .9rem; } }
@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { border-top: 1px solid #ebe7de; margin-top: .4rem; padding: .3rem 0 .5rem; max-height: calc(100vh - 4rem); overflow-y: auto; }
  .site-nav .navbar-nav .nav-link { font-size: 1.02rem; }
  .site-nav .navbar-nav .nav-link[aria-current="page"] { background: #eef2f7; box-shadow: inset 4px 0 0 var(--navy); }
}

/* ---------- Hero and stat cards ---------- */
.hero { background: var(--navy); color: #fff; border-radius: 10px; padding: 1.75rem 1.75rem 1.5rem; }
.hero h1 { color: #fff; max-width: 48rem; }
.hero-kicker { color: var(--gold); }
.hero-lede { color: #e6edf7; font-size: 1.1rem; margin-bottom: 0; max-width: 52rem; }
.stat-card { display: flex; flex-direction: column; gap: .25rem; height: 100%; background: #fff; border: 1px solid var(--rule); border-top: 5px solid var(--navy); border-radius: 8px; padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.stat-card:hover, .stat-card:focus-visible { box-shadow: 0 6px 18px rgba(31,58,95,.14); transform: translateY(-1px); color: var(--ink); }
.stat-card.up { border-top-color: var(--up); }
.stat-card.down { border-top-color: var(--down); }
.stat-figure { font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: -0.02em; }
.stat-card.up .stat-figure { color: var(--up); }
.stat-card.down .stat-figure { color: var(--down); }
.stat-title { font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.stat-detail { color: var(--ink-2); font-size: .95rem; }
.stat-base { color: var(--muted); font-size: .82rem; margin-top: auto; padding-top: .35rem; }
.tile { background: #fff; border: 1px solid var(--rule); border-left: 6px solid var(--navy); border-radius: 6px; padding: 1rem 1.1rem; height: 100%; }
.tile .label { font-weight: 700; }
.tile .note { font-size: .9rem; color: var(--muted); }
.figure-big { font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.15; }
.chg-up { color: var(--up); font-weight: 700; }
.chg-down { color: var(--down); font-weight: 700; }
.card-plain { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; }
.section-rule { border-top: 3px solid var(--ink); padding-top: .5rem; margin-top: 2.25rem; }
.section-links .card-plain h2 { margin-top: 0; font-size: 1.15rem; }
.section-links a.card-plain { display: block; text-decoration: none; color: inherit; height: 100%; }
.section-links a.card-plain:hover, .section-links a.card-plain:focus-visible { border-color: var(--navy-2); box-shadow: 0 4px 14px rgba(31,58,95,.1); }

/* ---------- Charts ---------- */
.chart-figure { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1rem .75rem; margin: 1rem 0 1.5rem; }
.chart-title { font-family: var(--bs-body-font-family); font-size: 1.1rem; margin: 0; }
.chart-unit { font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.chart-box { position: relative; height: 360px; }
.chart-caption { font-size: .92rem; color: var(--ink-2); margin: .6rem 0 .2rem; }
.fig-src { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.show-data summary { cursor: pointer; font-weight: 700; color: var(--navy-2); min-height: 44px; display: flex; align-items: center; }
.show-data[open] summary { margin-bottom: .4rem; }
@media (max-width: 576px) {
  html { font-size: 16px; }
  h1 { font-size: 1.65rem; }
  .chart-box { height: 280px; }
  .chart-figure { padding: .75rem .6rem .5rem; }
  .hero { padding: 1.25rem; }
  .stat-figure { font-size: 2rem; }
}

/* Chips: offense tabs and view toggles (links, so they work without script) */
.offense-tabs, .view-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .75rem 0; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .9rem; border: 1px solid #c9c3b5; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.chip:hover { border-color: var(--navy-2); color: var(--navy); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (max-width: 576px) { .offense-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; } .chip { white-space: nowrap; } }

/* ---------- Tables ---------- */
.table-data { background: #fff; font-size: .95rem; }
.table-data thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table-data td { vertical-align: top; }
.table-data td.num, .table-data th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list-table { background: #fff; border: 1px solid var(--rule); border-radius: 6px; max-height: 70vh; }
.list-table thead th { background: #f6f4ef; position: sticky; top: 0; z-index: 1; }
.list-table .sort-link { color: #1a1a1a; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.list-table th[aria-sort] .sort-link { color: var(--navy); }
.list-table th[aria-sort="ascending"] .sort-link::after { content: " ↑"; }
.list-table th[aria-sort="descending"] .sort-link::after { content: " ↓"; }
.list-table tbody th[scope=row] a { display: inline-block; padding: .2rem 0; }
.race-footnote { font-size: .9rem; color: var(--ink-2); margin-top: .5rem; }
.race-table .other-row th, .race-table .other-row td { color: var(--muted); }

/* ---------- Map ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
@media (min-width: 992px) { .map-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.map { height: 560px; border: 1px solid var(--rule); border-radius: 8px; background: #f3f1ec; }
@media (max-width: 768px) { .map { height: 440px; } }
.map-lazy { position: relative; display: flex; align-items: center; justify-content: center; }
.map-loading .map-load { opacity: .6; }
.map-noscript { position: absolute; bottom: .5rem; left: .5rem; right: .5rem; margin: 0; background: rgba(255,255,255,.92); padding: .4rem .6rem; border-radius: 4px; font-size: .9rem; }
.leaflet-container { background: #f3f1ec; font-family: var(--bs-body-font-family); }
.leaflet-interactive:focus { outline: none; }
.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.map-controls label { font-weight: 700; font-size: .95rem; }
.map-controls select { width: auto; min-height: 44px; }
.legend { background: rgba(255,255,255,.96); padding: .45rem .6rem; border-radius: 6px; font-size: .8rem; line-height: 1.45; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.legend i { display: inline-block; width: 14px; height: 12px; margin-right: 5px; vertical-align: -1px; border-radius: 2px; }
@media (max-width: 575px) { .legend { font-size: .68rem; padding: .3rem .4rem; } .legend i { width: 10px; height: 9px; } }
.county-panel { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.1rem; position: relative; align-self: start; }
.county-panel:not(.open) .county-panel-close { display: none; }
.county-panel-close { position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px; }
.panel-stats { margin: .5rem 0; }
.panel-stats dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: .4rem; }
.panel-stats dd { margin: 0; }
.spark-axis { display: flex; justify-content: space-between; width: 220px; font-size: .75rem; color: var(--muted); }
@media (max-width: 991.98px) {
  /* bottom sheet on phones and tablets */
  .county-panel:not(.open) { display: none; }
  .county-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; max-height: 70vh; overflow-y: auto; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25); padding-top: 1.25rem; }
}
.county-search { max-width: 30rem; margin: 1rem 0; }
.county-search .form-control { min-height: 44px; }
.county-matches li { padding: .25rem 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 3px solid var(--navy); }
.timeline li { position: relative; padding: 0 0 1.25rem 1.25rem; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .35rem; width: 15px; height: 15px; border-radius: 50%; background: var(--gold); border: 3px solid var(--navy); }
.timeline time { font-weight: 700; color: var(--navy); }
.timeline p { margin: .15rem 0 .2rem; }
.timeline a { font-size: .9rem; }
.timeline-mini li { margin-bottom: .4rem; }

/* ---------- Boxes ---------- */
.sources-box { border-top: 2px solid var(--ink); margin-top: 2.5rem; padding-top: .75rem; font-size: .92rem; }
.sources-box h2 { font-family: var(--bs-body-font-family); letter-spacing: .06em; margin-top: 0; }
.note-box { background: var(--amber-bg); border-left: 5px solid #b07a00; padding: .6rem .9rem; margin: 1rem 0; font-size: .95rem; }
.gap-box { background: #eef2f7; border-left: 5px solid var(--navy-2); padding: .6rem .9rem; margin: 1rem 0; font-size: .95rem; }
.our-view { border: 2px solid var(--navy); background: #f4f6fa; border-radius: 8px; padding: 1rem 1.15rem; margin: 1.5rem 0; max-width: 54rem; }
.our-view-label { display: inline-block; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 3px; }
.terms dt { margin-top: .5rem; }
.breadcrumb a { display: inline-block; padding: .3rem 0; }

/* ---------- Share bars ---------- */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .75rem 0 .25rem; }
.share-bar .share-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #555; margin-right: .2rem; }
.btn-share-x { background: #111; color: #fff; border: 1px solid #111; }
.btn-share-x:hover, .btn-share-x:focus { background: #333; color: #fff; }
@media (max-width: 575.98px) { .share-bar .btn { flex: 1 1 auto; } }

/* ---------- Footer ---------- */
.report-error-bar { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #ddd; }
.site-footer { border-top: 1px solid var(--rule); background: #f3f1ec; padding: 2.5rem 0 2rem; margin-top: 3rem; color: var(--ink-2); }
.site-footer .footer-title { font-family: Georgia, serif; font-weight: 700; font-size: 1.05rem; color: #1b1f24; margin-bottom: .5rem; }
.site-footer .footer-heading { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #3d4148; margin: 0 0 .6rem; font-family: var(--bs-body-font-family); }
.site-footer .footer-links li { margin-bottom: .1rem; font-size: .93rem; }
.site-footer a { display: inline-block; padding: .45rem 0; color: var(--navy); }
.site-footer .footer-links a { text-decoration: none; }
.site-footer .footer-links a:hover { text-decoration: underline; }
.footer-sister a { font-weight: 600; }

/* Network bar: same top strip as Budget / Costs / Audits */
.network-bar { background: var(--navy-dark, #142944); color: #dfe7f2; font-size: .85rem; }
.network-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding-top: .3rem; padding-bottom: .3rem; }
.network-label { font-weight: 700; letter-spacing: .04em; color: var(--gold-soft, #ffe08a); }
.network-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .2rem; margin: 0; padding: 0; }
.network-nav a { color: #fff; text-decoration: none; display: inline-block; padding: .35rem .5rem; border-radius: 4px; min-height: 32px; }
.network-nav a:hover { background: rgba(255,255,255,.12); }
.network-nav a[aria-current], .network-current { color: var(--gold-soft, #ffe08a); font-weight: 700; display: inline-block; padding: .35rem .5rem; }
@media (max-width: 576px) { .network-label { display: none; } }

@media print { .network-bar { display: none !important; } }
