.button,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 22px;
  text-decoration: none;
  font-weight: 900;
  transition:
    transform var(--dur-fast) var(--ease-responsive),
    background var(--dur-fast) var(--ease-responsive),
    border-color var(--dur-fast) var(--ease-responsive),
    color var(--dur-fast) var(--ease-responsive),
    box-shadow var(--dur-fast) var(--ease-responsive);
}

.button:hover,
.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16, 42, 86, 0.14);
}

.button-primary {
  color: #fff;
  background: var(--stasher-blue);
  box-shadow: 0 14px 34px rgba(21, 112, 239, 0.22);
}

.button-secondary {
  color: var(--stasher-navy);
  border-color: rgba(16, 42, 86, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.button-light {
  color: var(--stasher-navy);
  background: #fff;
}

.button-small {
  min-height: 36px;
  padding: 0 13px;
  color: var(--stasher-navy);
  border-color: var(--line);
  background: #fff;
  font-size: 0.84rem;
}

.pill {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.pill.is-active,
.pill[aria-pressed="true"] {
  color: #fff;
  border-color: var(--stasher-blue);
  background: var(--stasher-blue);
}

.metric-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.metric-switcher .pill {
  min-height: 38px;
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.metric-switcher .pill.is-active {
  color: var(--stasher-navy);
  background: var(--stasher-blue-100);
}

/* .spectrum-row layout is owned by css/spectrum.css. Only .weight-row keeps
   the legacy grid card here. */
.weight-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(16, 42, 86, 0.09);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  transition:
    transform var(--dur-base) var(--ease-stately),
    box-shadow var(--dur-base) var(--ease-stately),
    border-color var(--dur-fast) var(--ease-responsive),
    opacity var(--dur-fast) var(--ease-responsive);
}

.weight-row.is-selected {
  border-color: rgba(21, 112, 239, 0.7);
  box-shadow: 0 0 0 4px rgba(21, 112, 239, 0.12), 0 18px 44px rgba(16, 42, 86, 0.13);
}

.weight-row:hover,
.weight-row:focus-visible {
  border-color: rgba(21, 112, 239, 0.5);
  box-shadow: 0 12px 34px rgba(16, 42, 86, 0.1);
  transform: translateY(-2px);
}

.spectrum-rank,
.weight-rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: var(--stasher-navy);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 900;
}

.spectrum-main,
.weight-main { min-width: 0; }
.spectrum-main strong,
.weight-main strong { display: block; color: var(--ink); font-size: 1.08rem; line-height: 1.15; }
.spectrum-main span,
.weight-main span { color: var(--muted); font-size: 0.88rem; }
.spectrum-score,
.weight-score { font-family: var(--font-mono); font-weight: 900; color: var(--stasher-blue); }
.weight-delta { color: var(--muted); font-size: 0.82rem; font-weight: 800; }

.fingerprint {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.fingerprint i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: var(--stasher-blue-100);
}

.fingerprint i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--siren), var(--warm), var(--stasher-blue));
}

.slider-control {
  display: grid;
  gap: 8px;
  min-height: 72px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(16, 42, 86, 0.08);
}

.slider-control:last-child { border-bottom: 0; }
.slider-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 900; }
.slider-head span:last-child { color: var(--stasher-blue); font-family: var(--font-mono); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 44px;
  background: transparent;
  touch-action: none;
  cursor: grab;
}
input[type="range"]:active { cursor: grabbing; }

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-sky) var(--fill, 50%), rgba(15,27,51,0.10) var(--fill, 50%));
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(15,27,51,0.10);
}
input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--brand-sky);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-sky);
  margin-top: -8px;
  box-shadow: 0 4px 14px rgba(46,123,232,0.30);
  transition: transform var(--dur-fast, 180ms) var(--ease-responsive, ease), box-shadow var(--dur-fast, 180ms) var(--ease-responsive, ease);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-sky);
  box-shadow: 0 4px 14px rgba(46,123,232,0.30);
  transition: transform var(--dur-fast, 180ms) var(--ease-responsive, ease), box-shadow var(--dur-fast, 180ms) var(--ease-responsive, ease);
}
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow: 0 0 0 8px rgba(46,123,232,0.18), 0 4px 14px rgba(46,123,232,0.30);
}
input[type="range"]:active::-moz-range-thumb,
input[type="range"]:focus-visible::-moz-range-thumb {
  transform: scale(1.12);
  box-shadow: 0 0 0 8px rgba(46,123,232,0.18), 0 4px 14px rgba(46,123,232,0.30);
}

.city-hit,
.driver-hit {
  fill: transparent;
  pointer-events: all;
}

.table-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.table-city-button {
  all: unset;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(21, 112, 239, 0.35);
  text-underline-offset: 3px;
}

.search-results {
  display: none;
  position: relative;
  z-index: 10;
  margin: -8px 0 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  list-style: none;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.search-results.is-open { display: grid; }
.search-results [role="option"] {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.search-results [role="option"]:hover,
.search-results [role="option"].is-active { background: var(--stasher-blue-50); }

.quiz-question h3 { margin-bottom: 12px; }
.quiz-options { display: grid; gap: 10px; margin-top: 24px; }
.quiz-option {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  transition:
    border-color var(--dur-fast) var(--ease-responsive),
    box-shadow var(--dur-fast) var(--ease-responsive),
    transform var(--dur-fast) var(--ease-responsive);
}
.quiz-option:hover {
  border-color: var(--stasher-blue);
  box-shadow: 0 10px 26px rgba(16, 42, 86, 0.10);
  transform: translateY(-1px);
}
.quiz-progress { color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; font-weight: 900; }

.table-toolbar { margin-bottom: 14px; }
.table-wrap { max-height: 720px; overflow: auto; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 880px; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid rgba(16, 42, 86, 0.08); text-align: left; }
th { position: sticky; top: 0; z-index: 1; color: var(--ink); background: var(--stasher-blue-50); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
th button { all: unset; cursor: pointer; font-weight: 900; }
td { color: var(--muted); font-size: 0.93rem; }
td:first-child, td:nth-child(2) { color: var(--ink); font-weight: 900; }

.dot-label { font-size: 11px; fill: var(--ink); font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.globe-section .dot-label { fill: #fff; stroke: rgba(8, 16, 32, 0.85); }

@media (max-width: 920px) {
  .metric-switcher { justify-content: flex-start; }
}
