:root {
  --blue: #256c9a;
  --cream: #f7f5ef;
  --ink: #112d31;
  --line: #d6ddd8;
  --muted: #5f7173;
  --navy: #102d31;
  --orange: #c75a30;
  --panel: #fcfbf7;
  --teal: #0e746d;
  --teal-dark: #075954;
  --teal-pale: #dcefeb;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--teal-dark);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
.skip-link:focus {
  outline: 3px solid rgba(14, 116, 109, 0.38);
  outline-offset: 2px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  background: var(--navy);
  color: #fff;
  left: 12px;
  padding: 10px 14px;
  position: fixed;
  top: -60px;
  z-index: 100;
}

.skip-link--map {
  left: 190px;
}

.skip-link:focus {
  top: 12px;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  flex: 0 0 64px;
  gap: 24px;
  grid-template-columns: minmax(270px, 1fr) auto;
  padding: 0 22px;
  position: relative;
  z-index: 20;
}

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

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.2;
  margin: 4px 0 0;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.12);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  position: relative;
  width: 36px;
}

.brand-mark::before,
.brand-mark::after {
  background: #fff;
  border-radius: 3px;
  content: "";
  position: absolute;
}

.brand-mark::before {
  height: 17px;
  width: 5px;
}

.brand-mark::after {
  height: 5px;
  width: 17px;
}

.brand-mark span {
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  height: 25px;
  width: 25px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  min-height: 44px;
  padding: 8px 4px;
}

.notice-bar {
  align-items: center;
  background: #e8f4f0;
  border-bottom: 1px solid #bfd8cf;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  justify-content: center;
  min-height: 38px;
  padding: 8px 52px;
  position: relative;
  z-index: 17;
}

.notice-bar button {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  min-height: 38px;
  position: absolute;
  right: 18px;
}

.workspace {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 0;
  transition: grid-template-columns 220ms ease;
}

.workspace--panel-closed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.side-panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.workspace--panel-closed .side-panel {
  opacity: 0;
  pointer-events: none;
}

.panel-heading {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 0 8px 0 12px;
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.panel-close {
  align-self: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  flex: 0 0 44px;
  font-size: 27px;
  height: 44px;
  line-height: 1;
  width: 44px;
}

.panel-tabs {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(3, 1fr);
  min-width: 0;
}

.panel-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  min-height: 44px;
  padding: 9px 4px 8px;
}

.panel-tabs button.is-active {
  border-bottom-color: var(--teal);
  color: var(--teal-dark);
}

.panel-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 22px 24px;
  scrollbar-color: #bcc9c5 transparent;
  scrollbar-width: thin;
}

.control-section {
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}

.control-section--first {
  padding-top: 12px;
}

.section-title {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title span,
.section-title strong,
.section-title small {
  display: block;
}

.section-title span {
  font-size: 11px;
  font-weight: 850;
}

.section-title small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 550;
  line-height: 1.4;
  margin-top: 2px;
}

.section-title > strong {
  color: var(--teal-dark);
  font-size: 11px;
}

.count-badge {
  background: var(--teal-pale);
  border-radius: 99px;
  color: var(--teal-dark);
  font-size: 8px !important;
  padding: 5px 8px;
  white-space: nowrap;
}

.toggle-row {
  align-items: center;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  margin: 2px -7px;
  min-height: 48px;
  padding: 6px 7px;
}

.toggle-row:hover {
  background: #f3f5f1;
}

.toggle-row--conditional {
  opacity: 0.82;
}

.toggle-copy strong,
.toggle-copy small {
  display: block;
}

.toggle-copy strong {
  font-size: 11px;
}

.toggle-copy small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  margin-top: 2px;
}

.heatmap-scale-settings {
  background: #f4f7f3;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  margin: 7px 0 10px 28px;
  padding: 9px;
}

.heatmap-scale-settings legend {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  padding: 0 4px;
  text-transform: uppercase;
}

.heatmap-mode-options {
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr 1fr;
}

.heatmap-mode-options label {
  align-items: center;
  background: #fff;
  border: 1px solid #ccd7d3;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  font-size: 8px;
  font-weight: 750;
  gap: 5px;
  min-height: 34px;
  padding: 5px 7px;
}

.heatmap-mode-options input {
  accent-color: var(--teal);
  margin: 0;
}

#heatmap-meter-range-form {
  margin-top: 0;
}

.heatmap-meter-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.heatmap-meter-grid label {
  display: grid;
  font-size: 7px;
  font-weight: 800;
  gap: 3px;
}

.heatmap-meter-grid input {
  background: #fff;
  border: 1px solid #cbd5d1;
  border-radius: 6px;
  font-size: 10px;
  height: 34px;
  min-width: 0;
  padding: 0 7px;
  width: 100%;
}

#heatmap-meter-range-form button {
  background: #eaf2ef;
  border: 1px solid #b8cbc5;
  border-radius: 6px;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 800;
  margin-top: 8px;
  width: 100%;
}

.heatmap-range-actions {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

#heatmap-reset-meter-ranges {
  background: #fff;
}

#heatmap-meter-range-help {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
  margin: 6px 0 0;
}

#heatmap-meter-range-help.is-error {
  color: #a84228;
}

.legend-symbol {
  display: inline-block;
  flex: 0 0 auto;
  height: 12px;
  width: 12px;
}

.legend-symbol--facility {
  background: var(--orange);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--orange);
  transform: rotate(45deg);
}

.legend-symbol--transit {
  background: var(--blue);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--blue);
}

.legend-symbol--heatmap {
  background: linear-gradient(
    90deg,
    #198754 0 20%,
    #86a850 20% 40%,
    #f2c94c 40% 60%,
    #dd8344 60% 80%,
    #c83c3c 80% 100%
  );
  border: 1px solid rgba(17, 45, 49, 0.32);
  border-radius: 3px;
  height: 10px;
  width: 22px;
}

.line-symbol {
  border-top: 3px solid var(--teal);
  display: block;
  transform: rotate(-25deg);
  width: 17px;
}

.switch {
  display: inline-flex;
  position: relative;
}

.switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.switch > span {
  background: #c5ceca;
  border-radius: 99px;
  display: block;
  height: 22px;
  position: relative;
  transition: background 150ms ease;
  width: 38px;
}

.switch > span::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(17, 45, 49, 0.24);
  content: "";
  height: 17px;
  left: 3px;
  position: absolute;
  top: 2.5px;
  transition: transform 150ms ease;
  width: 17px;
}

.switch input:checked + span {
  background: var(--teal);
}

.switch input:checked + span::after {
  transform: translateX(15px);
}

.switch input:disabled + span {
  opacity: 0.45;
}

.switch input:focus-visible + span {
  outline: 3px solid rgba(14, 116, 109, 0.28);
  outline-offset: 2px;
}

.field-label {
  display: block;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin: 12px 0 6px;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  content: "";
  height: 6px;
  pointer-events: none;
  position: absolute;
  right: 13px;
  top: 14px;
  transform: rotate(45deg);
  width: 6px;
}

.select-wrap select,
.filter-text-input,
.number-pair input {
  appearance: none;
  background: #fff;
  border: 1px solid #cbd5d1;
  border-radius: 7px;
  font-size: 11px;
  height: 40px;
  padding: 0 32px 0 10px;
  width: 100%;
}

.filter-text-input {
  padding-right: 10px;
}

.field-help {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.export-button {
  background: #eaf2ef;
  border: 1px solid #b8cbc5;
  border-radius: 7px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 850;
  min-height: 40px;
  padding: 0 13px;
}

.primary-action,
.secondary-action {
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.primary-action {
  background: var(--teal);
  border: 1px solid var(--teal);
  color: #fff;
  margin-top: 16px;
}

.secondary-action {
  background: #fff;
  border: 1px solid #c3d0cc;
  color: var(--teal-dark);
  margin-top: 9px;
}

.secondary-action--compact {
  min-height: 36px;
}

.secondary-action:disabled {
  opacity: 0.52;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 9px;
  min-height: 44px;
}

.checkbox-row--filter {
  margin-top: 10px;
}

.checkbox-row input {
  accent-color: var(--teal);
  height: 17px;
  width: 17px;
}

.checkbox-row strong,
.checkbox-row small {
  display: block;
}

.checkbox-row strong {
  font-size: 10px;
}

.checkbox-row small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 2px;
}

.number-pair {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.number-pair label {
  display: grid;
  font-size: 8px;
  font-weight: 800;
  gap: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.number-pair input {
  padding: 0 10px;
}

.analytics-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  padding: 14px 0 12px;
}

.analytics-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  margin: 4px 0 0;
}

.analytics-summary {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.analytics-summary article {
  background: #f1f5f2;
  border: 1px solid #dbe3df;
  border-radius: 8px;
  min-height: 70px;
  padding: 10px;
}

.analytics-summary span,
.analytics-summary strong {
  display: block;
}

.analytics-summary span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.analytics-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  margin-top: 6px;
}

.analytics-note {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  margin: 9px 0 0;
}

.distribution-section,
.facility-results {
  border-top: 1px solid var(--line);
  margin-top: 17px;
  padding-top: 15px;
}

.distribution-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 92px minmax(0, 1fr) 20px;
  margin: 8px 0;
}

.distribution-row > span {
  color: var(--muted);
  font-size: 8px;
}

.distribution-row > strong {
  font-size: 9px;
  text-align: right;
}

.distribution-track {
  background: #e4ebe7;
  border-radius: 99px;
  height: 9px;
  overflow: hidden;
}

.distribution-track i {
  background: linear-gradient(90deg, var(--teal), #4aa89c);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 2px;
}

.table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 340px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  font-size: 9px;
  min-width: 720px;
  width: 100%;
}

th {
  background: #edf2ef;
  position: sticky;
  text-align: left;
  top: 0;
  z-index: 1;
}

th button {
  background: transparent;
  border: 0;
  font-size: 8px;
  font-weight: 850;
  min-height: 38px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

th[aria-sort="ascending"] button::after {
  content: " ↑";
}

th[aria-sort="descending"] button::after {
  content: " ↓";
}

td {
  border-top: 1px solid #e1e6e2;
  padding: 8px;
  vertical-align: top;
}

td small {
  color: var(--muted);
  display: block;
  font-size: 7px;
  line-height: 1.35;
  margin-top: 2px;
}

.table-facility {
  background: transparent;
  border: 0;
  color: var(--teal-dark);
  padding: 0;
  text-align: left;
}

.table-facility strong {
  font-size: 9px;
}

.facility-cards {
  display: none;
}

.methods-panel {
  padding-top: 14px;
}

.methods-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  max-height: none;
  max-width: 760px;
  overflow: visible;
  padding: 0;
  width: calc(100% - 32px);
}

.methods-dialog::backdrop {
  backdrop-filter: blur(3px);
  background: rgba(16, 45, 49, 0.58);
}

.methods-dialog__surface {
  background: var(--panel);
  border: 1px solid rgba(185, 199, 194, 0.9);
  border-radius: 14px;
  box-shadow: 0 28px 90px rgba(16, 45, 49, 0.34);
  max-height: min(86vh, 780px);
  overflow: hidden;
  position: relative;
}

.methods-dialog .methods-panel {
  max-height: min(86vh, 780px);
  overflow-y: auto;
  padding: 30px 38px 34px;
  scrollbar-color: #bcc9c5 transparent;
  scrollbar-width: thin;
}

.methods-dialog__close {
  align-items: center;
  background: #edf4f1;
  border: 1px solid #c8d7d2;
  border-radius: 50%;
  color: var(--teal-dark);
  display: flex;
  font-size: 20px;
  height: 38px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  z-index: 2;
}

.methods-dialog__close:hover {
  background: var(--teal-pale);
}

.settings-dialog {
  max-width: 560px;
}

.settings-dialog .heatmap-scale-settings {
  margin: 18px 0 0;
}

.methods-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  margin: 7px 0 8px;
}

.methods-panel h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 500;
  margin: 20px 0 7px;
}

.methods-panel h4 {
  color: var(--teal-dark);
  font-size: 10px;
  margin: 14px 0 5px;
}

.methods-panel p,
.methods-panel li {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.methods-panel ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.methods-panel dl,
.detail-grid {
  border-top: 1px solid var(--line);
  margin: 16px 0 0;
}

.methods-panel dl div,
.detail-grid div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 0.8fr 1.2fr;
  padding: 9px 0;
}

.methods-panel dt,
.detail-grid dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.methods-panel dd,
.detail-grid dd {
  font-size: 9px;
  font-weight: 750;
  margin: 0;
  overflow-wrap: anywhere;
}

.caution-card {
  background: #fff4e9;
  border: 1px solid #efd2ba;
  border-radius: 8px;
  color: #72472d;
  font-size: 9px;
  line-height: 1.55;
  margin-top: 15px;
  padding: 11px;
}

.methods-policy-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 4px;
}

.methods-panel .about-credit {
  border-top: 1px solid var(--line);
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 24px 0 0;
  padding-top: 18px;
  text-align: center;
}

.map-stage {
  background:
    linear-gradient(rgba(70, 113, 104, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 113, 104, 0.08) 1px, transparent 1px),
    #dbe8e4;
  background-size: 50px 50px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.google-map {
  inset: 0;
  position: absolute;
}

.transit-distance-heatmap-canvas {
  pointer-events: none;
  position: absolute;
}

.map-legend,
.map-controls,
.map-attribution,
.panel-open,
.map-loading {
  position: absolute;
  z-index: 5;
}

.map-controls {
  display: flex;
  flex-direction: column;
  right: 18px;
  top: 18px;
}

.map-controls button {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  font-size: 20px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.map-controls button:first-child {
  border-radius: 7px 7px 0 0;
}

.map-controls button:last-child {
  border-bottom: 0;
  border-radius: 0 0 7px 7px;
}

.map-controls .reset-control {
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.map-legend {
  background: rgba(252, 251, 247, 0.96);
  border: 1px solid rgba(185, 199, 194, 0.9);
  border-radius: 8px;
  bottom: 44px;
  box-shadow: 0 6px 22px rgba(16, 45, 49, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 18px;
  padding: 12px 14px;
}

.map-legend strong {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-legend > span {
  align-items: center;
  display: flex;
  font-size: 9px;
  gap: 9px;
}

.map-legend small {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
  max-width: 180px;
}

.distance-heatmap-key {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 7px 0;
}

.distance-heatmap-key > span {
  align-items: center;
  display: flex;
  font-size: 9px;
  gap: 9px;
}

.heatmap-gradient {
  background: linear-gradient(
    90deg,
    #198754 0% 16%,
    #86a850 24% 36%,
    #f2c94c 44% 56%,
    #dd8344 64% 76%,
    #c83c3c 84% 100%
  );
  border: 1px solid rgba(17, 45, 49, 0.22);
  border-radius: 99px;
  height: 8px;
  width: 100%;
}

.heatmap-labels {
  color: var(--muted);
  display: flex;
  font-size: 6px;
  justify-content: space-between;
}

.heatmap-labels span {
  flex: 1 1 20%;
  text-align: center;
}

.heatmap-labels strong {
  display: block;
}

.heatmap-labels strong {
  font-size: 6px;
  line-height: 1.15;
}

.heatmap-labels[data-scale-mode="meters"] strong {
  letter-spacing: 0;
  text-transform: none;
}

.heatmap-labels span:first-child {
  text-align: left;
}

.heatmap-labels span:last-child {
  text-align: right;
}

.map-attribution {
  background: rgba(255, 255, 255, 0.86);
  bottom: 28px;
  color: #50605e;
  font-size: 8px;
  padding: 4px 8px;
  right: 12px;
}

.panel-open {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: 0 8px 8px 0;
  color: #fff;
  display: flex;
  font-size: 10px;
  font-weight: 850;
  gap: 7px;
  left: 0;
  min-height: 44px;
  padding: 8px 14px 8px 9px;
  top: 18px;
}

.panel-open span {
  font-size: 21px;
}

.map-loading {
  background: var(--navy);
  border-radius: 99px;
  bottom: 22px;
  color: #fff;
  font-size: 9px;
  left: 50%;
  padding: 8px 12px;
  transform: translateX(-50%);
}

.map-marker {
  align-items: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(16, 45, 49, 0.28);
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  line-height: 1;
  transition: transform 120ms ease;
  width: 28px;
}

.map-marker:hover,
.map-marker.is-selected {
  transform: scale(1.25);
}

.map-marker.is-selected {
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.8),
    0 4px 14px rgba(16, 45, 49, 0.35);
}

.map-marker--facility {
  background: var(--orange);
  border-radius: 6px;
}

.map-marker--facility:not(.is-cluster) {
  border: 2px solid #fff;
  border-radius: 0;
  box-shadow:
    0 0 0 1px var(--orange),
    0 4px 10px rgba(16, 45, 49, 0.24);
  font-size: 0;
  height: 18px;
  transform: rotate(45deg);
  width: 18px;
}

.map-marker--facility:not(.is-cluster):hover,
.map-marker--facility:not(.is-cluster).is-selected {
  transform: rotate(45deg) scale(1.15);
}

.map-marker--facility:not(.is-cluster).is-selected {
  box-shadow:
    0 0 0 1px var(--orange),
    0 0 0 5px rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(16, 45, 49, 0.32);
}

.map-marker--transit {
  background: var(--blue);
  border-radius: 50%;
  height: 20px;
  width: 20px;
}

.map-marker.is-cluster {
  font-size: 10px;
  height: 36px;
  width: 36px;
}

.map-marker--transit.is-cluster {
  height: 36px;
  width: 36px;
}

.detail-drawer,
.stop-card {
  background: rgba(252, 251, 247, 0.99);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 45px rgba(16, 45, 49, 0.18);
  max-width: 390px;
  overflow-y: auto;
  padding: 24px;
  position: absolute;
  right: 0;
  top: 0;
  width: min(390px, 90%);
  z-index: 8;
}

.detail-drawer {
  bottom: 0;
}

.stop-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  bottom: 32px;
  top: auto;
}

.detail-drawer h2,
.stop-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.18;
  margin: 7px 34px 7px 0;
}

.detail-address {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.detail-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  height: 44px;
  position: absolute;
  right: 9px;
  top: 7px;
  width: 44px;
}

.detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.detail-actions button {
  background: #edf4f1;
  border: 1px solid #b9cbc5;
  border-radius: 7px;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 850;
  min-height: 42px;
}

.policy-page {
  background:
    radial-gradient(circle at 80% 0, #dbece7, transparent 35%),
    var(--cream);
  min-height: 100dvh;
}

.policy-shell {
  margin: 0 auto;
  max-width: 820px;
  padding: 48px 24px 80px;
}

.policy-shell > a {
  font-size: 11px;
  font-weight: 800;
}

.policy-shell article {
  background: rgba(252, 251, 247, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(16, 45, 49, 0.1);
  margin-top: 18px;
  padding: 42px;
}

.policy-shell h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 500;
  margin: 8px 0 14px;
}

.policy-shell h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  margin-top: 30px;
}

.policy-shell p,
.policy-shell li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: minmax(230px, 1fr) auto;
  }

  .topbar-actions {
    gap: 10px;
  }

  .text-button {
    font-size: 10px;
  }

  .workspace {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    min-height: 100dvh;
  }

  .topbar {
    flex-basis: 64px;
    gap: 8px;
    grid-template-columns: 1fr auto;
    padding: 9px 13px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    font-size: 7.5px;
  }

  .brand-mark {
    flex-basis: 32px;
    height: 32px;
    width: 32px;
  }

  .topbar-actions {
    gap: 6px;
    grid-column: 2;
    grid-row: 1;
  }

  .text-button {
    font-size: 8px;
    min-height: 44px;
    padding: 4px 2px;
  }

  .workspace,
  .workspace--panel-closed {
    display: flex;
    flex-direction: column-reverse;
  }

  .side-panel {
    border-right: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -16px 40px rgba(16, 45, 49, 0.16);
    flex: 0 1 52%;
    opacity: 1;
    pointer-events: auto;
    z-index: 9;
  }

  .workspace--panel-closed .side-panel {
    flex-basis: 0;
    opacity: 0;
    pointer-events: none;
  }

  .panel-heading {
    padding: 0 8px 0 10px;
  }

  .panel-content {
    padding: 2px 16px 17px;
  }

  .select-wrap select,
  .filter-text-input,
  .number-pair input,
  .heatmap-meter-grid input {
    height: 44px;
  }

  .select-wrap::after {
    top: 16px;
  }

  .heatmap-mode-options label,
  .primary-action,
  .secondary-action,
  .secondary-action--compact,
  .export-button {
    min-height: 44px;
  }

  .map-stage {
    flex: 1 1 auto;
    min-height: 270px;
  }

  .map-controls {
    right: 9px;
    top: 9px;
  }

  .map-legend {
    bottom: 22px;
    left: 9px;
    padding: 9px 11px;
  }

  .map-legend small {
    display: none;
  }

  .map-attribution {
    bottom: 20px;
    max-width: 155px;
  }

  .panel-open {
    bottom: auto;
    top: 9px;
  }

  .methods-dialog {
    width: calc(100% - 16px);
  }

  .methods-dialog__surface,
  .methods-dialog .methods-panel {
    max-height: 92vh;
  }

  .methods-dialog .methods-panel {
    padding: 25px 18px 28px;
  }

  .methods-dialog .methods-panel h2 {
    padding-right: 42px;
  }

  .methods-dialog__close {
    height: 44px;
    right: 10px;
    top: 10px;
    width: 44px;
  }

  .detail-drawer {
    border-left: 0;
    border-radius: 16px 16px 0 0;
    bottom: 0;
    box-shadow: 0 -18px 45px rgba(16, 45, 49, 0.2);
    max-height: 76%;
    max-width: none;
    top: auto;
    width: 100%;
  }

  .stop-card {
    bottom: 12px;
    left: 10px;
    max-width: none;
    right: 10px;
    width: auto;
  }

  .table-scroll {
    display: none;
  }

  .facility-cards {
    display: grid;
    gap: 8px;
  }

  .facility-cards article {
    background: #f3f6f3;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }

  .facility-cards button {
    background: transparent;
    border: 0;
    color: var(--teal-dark);
    display: grid;
    gap: 3px;
    padding: 0;
    text-align: left;
    width: 100%;
  }

  .facility-cards button strong {
    font-size: 10px;
  }

  .facility-cards button span {
    color: var(--muted);
    font-size: 8px;
  }

  .facility-cards dl {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, 1fr);
    margin: 9px 0 0;
  }

  .facility-cards dl div {
    display: block;
  }

  .facility-cards dt {
    color: var(--muted);
    font-size: 7px;
  }

  .facility-cards dd {
    font-size: 9px;
    font-weight: 800;
    margin: 3px 0 0;
  }

  .policy-shell {
    padding: 24px 14px 48px;
  }

  .policy-shell article {
    padding: 25px 20px;
  }
}

@media (max-width: 360px) {
  .map-legend {
    bottom: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
