:root {
  --bs-body-bg: #f2f5f8;
  --bs-body-color: #1b2b40;
  --bs-link-color: #24669a;
  --bs-border-color: #e0e7ef;
}
body { min-width: 320px; }
.dashboard-container { max-width: 1600px; padding-inline: 28px; }
.site-header { background: #142438; color: #fff; }
.site-header a { color: #dce7f3; }
.brand { display: flex; gap: 9px; align-items: center; font-size: 22px; font-weight: 700; letter-spacing: -.7px; }
.brand-region { color: #9fb4ca; font-weight: 400; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #e77550; color: #142438; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; font-weight: 700; color: #687b90; }
.status-pill { background: #e5edf4; color: #47617a; border-radius: 30px; padding: 8px 13px; }
.dashboard-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 14px #1b2b4005; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 18px; background: #fff; min-height: 58px; }
.mapcontrols { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; min-height: 42px; }
.mapframe { position: relative; }
#map { height: 390px; background: #e7edf3; }
.leaflet-container { font: inherit; font-size: 13px; }
.leaflet-popup-content { line-height: 1.7; }
#mapNotice { display: none; position: absolute; inset: 12px 12px auto; z-index: 1000; background: #fff9ee; border: 1px solid #eed2a7; border-radius: 8px; padding: 12px; color: #6b4716; font-size: 13px; pointer-events: none; }
#mapNotice.visible { display: block; }
.depthlegend { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--bs-border-color); font-size: 12px; }
.depthlegend.visible { display: flex; }
.depthbar { height: 11px; width: 140px; border-radius: 4px; background: linear-gradient(90deg,#2c7bb6,#abd9e9,#ffffbf,#fdae61,#d7191c); }
.legendunknown { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; }
.chartwrap { height: 350px; padding: 16px; position: relative; }
.site-footer { border-top: 1px solid var(--bs-border-color); background: #fff; }
.site-footer p { line-height: 1.8; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--bs-border-color); }
.skip-link:focus { display: block; padding: 10px; background: #fff; }
@media (max-width: 575.98px) {
  .dashboard-container { padding-inline: 14px; }
  #map { height: 330px; }
  .chartwrap { height: 300px; }
}

/* Shared desktop sidebar / mobile offcanvas navigation. */
html { scroll-padding-top: 90px; }
.site-header { position: sticky; top: 0; z-index: 1030; }
.site-header .dashboard-container { max-width: none; }
.sidebar { --bs-offcanvas-width: 260px; background: #fff; }
.sidebar .nav-link { color: #52667c; border-radius: 7px; padding: 11px 14px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: #eaf1f8; color: #1d5d91; }
.sidebar .offcanvas-body { padding: 24px 16px; }
.global-filters, .range-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.global-filters .form-control { max-width: 260px; }
.range-controls .form-range { flex: 1; min-width: 100px; width: auto; margin: 0; }
.range-controls output { font-variant-numeric: tabular-nums; }
.summary-strip { border-top: 1px solid var(--bs-border-color); padding: 12px 16px; background: #f8fafc; font-size: 13px; color: #4c647d; }
.chartwrap { height: 390px; }
.section-toggle { border: 0; background: transparent; color: inherit; font: inherit; padding: 6px 0; display: flex; align-items: center; gap: 10px; }
.collapse-chevron { display: inline-block; }
.section-toggle[aria-expanded="false"] .collapse-chevron { transform: rotate(-90deg); }
.event-columns, .event-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 95px 100px 75px; gap: 16px; align-items: center; padding: 14px 20px; }
.event-columns { font-size: 12px; color: #617387; background: #f8fafc; }
.event-item { border-top: 1px solid #e8edf3; font-size: 13px; }
.event-row { list-style: none; cursor: pointer; }
.event-row::-webkit-details-marker { display: none; }
.event-row:hover { background: #f5f8fb; }
.event-item.selected { background: #edf5ff; box-shadow: inset 3px 0 #1764a3; }
.event-time { display: block; color: #6a7b8d; font-size: 12px; margin-top: 3px; }
.event-place { font-weight: 600; }
.event-magnitude { font-weight: 700; color: #9c482c; }
.event-depth { color: #627388; }
.event-disclosure { color: #24669a; }
.event-disclosure span { display: inline-block; }
.event-item details[open] .event-disclosure span { transform: rotate(180deg); }
.event-details { padding: 4px 20px 20px; line-height: 1.7; overflow-wrap: anywhere; }
.mobile-label { display: none; }
.legal-content { max-width: 900px; }
@media (min-width: 992px) {
  .sidebar.offcanvas-lg { position: fixed; top: 72px; bottom: 0; left: 0; width: 210px; border-right: 1px solid var(--bs-border-color); }
  .sidebar .offcanvas-body { height: 100%; display: flex; background: #fff; }
  .page-content { margin-left: 210px; }
}
@media (max-width: 767.98px) {
  .event-columns { display: none; }
  .event-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 16px; }
  .event-place { grid-column: 1; grid-row: 1; }
  .event-magnitude { grid-column: 2; grid-row: 1; }
  .event-date { grid-column: 1 / -1; grid-row: 2; color: #627388; }
  .event-time { display: inline; margin-left: 8px; }
  .event-depth { grid-column: 1; grid-row: 3; }
  .event-disclosure { grid-column: 2; grid-row: 3; }
  .event-details { padding-inline: 16px; }
  .mobile-label { display: inline; }
}
@media (max-width: 575.98px) {
  .global-filters .form-control { max-width: none; width: 100%; }
  .range-controls label { width: 100%; }
  .range-controls output { width: 100%; }
  .range-controls .btn { padding-left: 0; }
  .chartwrap { height: 290px; }
  .brand { font-size: 20px; }
}
.fault-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; font-size: 12px; border-top: 1px solid var(--bs-border-color); }
.fault-legend[hidden] { display: none; }
.fault-legend small { flex-basis: 100%; color: #627388; }
.fault-line { display: inline-block; width: 25px; margin-right: 5px; vertical-align: middle; border-top: 2px solid #be3f70; }
.fault-line.assumed { border-top-style: dashed; }

/* Basemap variants use the same OSM tiles, without extra requests/providers. */
#map[data-map-style="light"] .leaflet-tile-pane { filter: grayscale(1) contrast(.65) brightness(1.22); }
#map[data-map-style="gray"] .leaflet-tile-pane { filter: grayscale(1); }
#map .leaflet-faults-pane { z-index: 350; pointer-events: none; }
.map-style-control { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.map-style-control .form-select { width: auto; }
.fault-line { border-top-color: #a51b65; border-top-width: 3px; }
@media (max-width: 575.98px) {
  .map-style-control label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* Keep the column headings visible above the scrollable event list. */
#eventList { max-height: min(600px, 65vh); overflow-y: auto; scrollbar-gutter: stable; }
#eventList:focus-visible { outline: 2px solid #1764a3; outline-offset: -2px; }

/* Two native, keyboard-accessible sliders share one track. */
.magnitude-range { position: relative; height: 36px; --range-start: 0%; --range-end: 100%; }
.magnitude-track { position: absolute; top: 15px; left: 10px; right: 10px; height: 6px; border-radius: 4px; background: linear-gradient(to right, #dce4ed var(--range-start), #24669a var(--range-start), #24669a var(--range-end), #dce4ed var(--range-end)); }
.magnitude-range input[type="range"] { position: absolute; inset: 0; width: 100%; height: 36px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; pointer-events: none; }
#maximumMagnitude { z-index: 2; }
.magnitude-range input::-webkit-slider-runnable-track { height: 6px; background: transparent; }
.magnitude-range input::-moz-range-track { height: 6px; background: transparent; }
.magnitude-range input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border: 2px solid #fff; border-radius: 50%; background: #24669a; box-shadow: 0 0 0 1px #24669a; pointer-events: auto; cursor: grab; }
.magnitude-range input::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: #24669a; box-shadow: 0 0 0 1px #24669a; pointer-events: auto; cursor: grab; }
.magnitude-range input:focus { outline: none; }
.magnitude-range input:focus-visible::-webkit-slider-thumb { outline: 3px solid #142438; outline-offset: 3px; }
.magnitude-range input:focus-visible::-moz-range-thumb { outline: 3px solid #142438; outline-offset: 3px; }
