/* US Affordable & Creative Housing Guide — Polished Responsive Stylesheet */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-subtle: #f1efe9;
  --surface-hover: #eae7df;
  --border: #e3dfd6;
  --border-strong: #cbc6ba;
  --text: #18181b;
  --text-secondary: #3f3f46;
  --muted: #52525b;
  --primary: #eab308;
  --primary-hover: #ca8a04;
  --primary-fg: #18181b;
  --primary-text: #a16207;
  --primary-soft: rgba(234, 179, 8, 0.14);
  --primary-border: rgba(202, 138, 4, 0.34);

  --safe-text: #166534;
  --safe-bg: #ecfdf5;
  --safe-border: #bbf7d0;

  --caution-text: #c2410c;
  --caution-bg: #fff7ed;
  --caution-border: #fed7aa;

  --danger-text: #991b1b;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --info-text: #1e40af;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;

  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04), 0 1px 3px rgba(24, 24, 27, 0.03);
  --shadow-md: 0 10px 26px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 24px 56px rgba(24, 24, 27, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114;
    --surface: #16191d;
    --surface-subtle: #1e2227;
    --surface-hover: #262b32;
    --border: #2a2f36;
    --border-strong: #3c434d;
    --text: #f4f4f5;
    --text-secondary: #d4d4d8;
    --muted: #a1a1aa;
    --primary: #facc15;
    --primary-hover: #eab308;
    --primary-fg: #111111;
    --primary-text: #facc15;
    --primary-soft: rgba(250, 204, 21, 0.13);
    --primary-border: rgba(250, 204, 21, 0.36);

    --safe-text: #6ee7b7;
    --safe-bg: rgba(16, 185, 129, 0.14);
    --safe-border: rgba(16, 185, 129, 0.3);

    --caution-text: #fb923c;
    --caution-bg: rgba(249, 115, 22, 0.14);
    --caution-border: rgba(249, 115, 22, 0.32);

    --danger-text: #fca5a5;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --danger-border: rgba(239, 68, 68, 0.3);

    --info-text: #93c5fd;
    --info-bg: rgba(59, 130, 246, 0.14);
    --info-border: rgba(59, 130, 246, 0.3);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.6);
  }
}

[data-theme="dark"] {
  --bg: #0f1114;
  --surface: #16191d;
  --surface-subtle: #1e2227;
  --surface-hover: #262b32;
  --border: #2a2f36;
  --border-strong: #3c434d;
  --text: #f4f4f5;
  --text-secondary: #d4d4d8;
  --muted: #a1a1aa;
  --primary: #facc15;
  --primary-hover: #eab308;
  --primary-fg: #111111;
  --primary-text: #facc15;
  --primary-soft: rgba(250, 204, 21, 0.13);
  --primary-border: rgba(250, 204, 21, 0.36);

  --safe-text: #6ee7b7;
  --safe-bg: rgba(16, 185, 129, 0.14);
  --safe-border: rgba(16, 185, 129, 0.3);

  --caution-text: #fb923c;
  --caution-bg: rgba(249, 115, 22, 0.14);
  --caution-border: rgba(249, 115, 22, 0.32);

  --danger-text: #fca5a5;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.3);

  --info-text: #93c5fd;
  --info-bg: rgba(59, 130, 246, 0.14);
  --info-border: rgba(59, 130, 246, 0.3);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: var(--primary-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout Shell */
.page-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 14px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .page-shell {
    padding: 32px 24px 64px;
    gap: 22px;
  }
}

/* Header */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 720px) {
  .site-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.header-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin-bottom: 3px;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--text);
}

.subtitle {
  margin: 5px 0 0;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 58ch;
}

.header-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

@media (min-width: 720px) {
  .header-controls {
    display: flex;
    align-items: center;
    width: auto;
    flex-shrink: 0;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary[aria-pressed="true"],
.btn-secondary.active {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-text);
}

.btn-ghost {
  background: var(--surface);
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.btn-secondary.active .count-pill,
.btn-secondary[aria-pressed="true"] .count-pill {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.btn-link {
  border: none;
  background: transparent;
  padding: 4px 0;
  color: var(--primary-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-text {
  border: none;
  background: transparent;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}

.btn-text:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

/* Location Picker Bar */
.location-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 780px) {
  .location-bar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
  }
}

.location-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

@media (min-width: 780px) {
  .location-fields {
    max-width: 560px;
    gap: 14px;
  }
}

.location-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.location-field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.select-field {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.select-field:hover {
  border-color: var(--border-strong);
}

.location-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

@media (min-width: 780px) {
  .location-meta {
    justify-content: flex-end;
    padding-bottom: 6px;
  }
}

.location-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-text);
  white-space: nowrap;
}

.location-badge.is-regional {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.location-scope-note {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* Seasonal Safety Strip */
.winter-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 720px) {
  .winter-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
}

.winter-strip-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.winter-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
  margin-right: 8px;
  vertical-align: 1px;
}

/* Tab Navigation */
.tab-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 12px;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
  }
}

.nav-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-label-full {
  display: none;
}

.tab-label-short {
  display: inline;
}

@media (min-width: 640px) {
  .nav-tab {
    font-size: 14px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
  }

  .tab-label-full {
    display: inline;
  }

  .tab-label-short {
    display: none;
  }
}

.nav-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-tab.active {
  background: var(--primary);
  color: var(--primary-fg);
}

/* Filter Panel */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .filter-panel {
    padding: 16px 18px;
    gap: 14px;
    margin-bottom: 22px;
  }
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

@media (min-width: 860px) {
  .filter-row-secondary {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

@media (max-width: 639px) {
  .chip-rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin: 0 -2px;
    padding-left: 2px;
    padding-right: 2px;
  }

  .chip-rail::-webkit-scrollbar {
    display: none;
  }

  .chip-rail .chip,
  .chip-rail .chip-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 36px;
  }
}

.chip,
.chip-toggle {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover,
.chip-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
  font-weight: 600;
}

.chip-toggle.active,
.chip-toggle[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-text);
  font-weight: 600;
}

.search-wrap {
  position: relative;
  width: 100%;
}

@media (min-width: 860px) {
  .search-wrap {
    width: 300px;
    flex-shrink: 0;
  }
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.input-field {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.input-field::placeholder {
  color: var(--muted);
}

/* Prevent iOS Safari zoom on input/select focus on mobile */
@media (max-width: 767px) {
  .select-field {
    font-size: 16px;
    height: 44px;
  }

  .input-field {
    font-size: 16px;
    min-height: 44px;
  }
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.results-meta {
  font-size: 13.5px;
  color: var(--muted);
}

/* Options Grid & Cards */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .options-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

.option-card,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

@media (min-width: 640px) {
  .option-card,
  .card {
    padding: 20px;
  }
}

@media (hover: hover) {
  .option-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-badges,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.speed-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.badge-cat,
.pill-cat {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-text);
}

.badge-fit,
.pill-fit {
  background: var(--surface-subtle);
  color: var(--muted);
  font-weight: 500;
}

.badge-safe,
.pill-safe,
.badge-legal,
.pill-legal {
  background: var(--safe-bg);
  border-color: var(--safe-border);
  color: var(--safe-text);
}

.badge-caution,
.pill-caution,
.badge-gray,
.pill-gray {
  background: var(--caution-bg);
  border-color: var(--caution-border);
  color: var(--caution-text);
}

.badge-danger,
.badge-high-risk,
.badge-restricted,
.pill-danger,
.pill-high-risk,
.pill-restricted {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.card-heading {
  min-width: 0;
}

.card-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
}

.card-neighborhoods,
.neighborhoods {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-metrics,
.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.metric-value {
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow-wrap: break-word;
}

.card-summary {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-read,
.btn-save {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-read {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--primary-fg);
}

.btn-read:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-save {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-save:hover {
  background: var(--surface-subtle);
}

.btn-save.saved,
.btn-save[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-text);
}

.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}

/* Section Intro */
.section-intro {
  margin-bottom: 14px;
}

.section-intro h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-intro p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Split Calculator */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 860px) {
  .calc-layout {
    grid-template-columns: 5fr 7fr;
    gap: 20px;
  }
}

.calc-controls-card,
.calc-results-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

@media (min-width: 640px) {
  .calc-controls-card,
  .calc-results-card {
    padding: 22px;
    gap: 20px;
  }
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.control-head label,
.control-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.control-value {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary-text);
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
  accent-color: var(--primary);
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--primary);
  cursor: pointer;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.segmented-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.people-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 8px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.people-btn.active {
  background: var(--surface);
  color: var(--primary-text);
  box-shadow: var(--shadow-sm);
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
}

.checkbox-card input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checkbox-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
}

.checkbox-copy span {
  font-size: 12.5px;
  color: var(--muted);
}

.calc-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .calc-kpis {
    gap: 12px;
  }
}

.calc-kpi {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  min-width: 0;
}

.calc-kpi.highlight {
  background: var(--primary-soft);
  border-color: var(--primary-border);
}

.calc-kpi-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.calc-kpi-value {
  display: block;
  font-size: clamp(1.1rem, 3.6vw, 1.38rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.calc-compare-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calc-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.calc-bar-label {
  min-width: 0;
}

.calc-bar-note {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}

.calc-bar-price {
  white-space: nowrap;
  flex-shrink: 0;
}

.calc-bar-track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  overflow: hidden;
}

.calc-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--primary);
  transition: width 0.2s ease;
}

/* Directory & Links */
.directory-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.directory-contacts-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

@media (min-width: 720px) {
  .directory-contacts-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .directory-contacts-head .section-intro {
    margin-bottom: 0;
  }

  .directory-search-wrap {
    width: 300px;
  }
}

.launchpad-grid,
.contacts-grid,
.safety-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) {
  .launchpad-grid,
  .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .safety-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.launchpad-card,
.contact-card,
.safety-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.launchpad-card h3,
.contact-card h3,
.safety-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.launchpad-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.launchpad-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.launchpad-link:hover {
  border-color: var(--primary-border);
  color: var(--primary-text);
  text-decoration: none;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.contact-meta a[href^="tel:"] {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.safety-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Modal (Desktop Dialog + Mobile Bottom Sheet) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 14, 18, 0.66);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-panel {
  width: 100%;
  max-width: 720px;
  max-height: 92dvh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  border-bottom: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 640px) {
  .modal-panel {
    max-height: 88vh;
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border);
  }
}

.modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

@media (min-width: 640px) {
  .modal-header {
    padding: 16px 22px;
  }
}

.modal-header .card-top {
  justify-content: flex-start;
  gap: 6px;
}

.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.modal-close:hover {
  background: var(--surface-hover);
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 640px) {
  .modal-body {
    padding: 20px 24px 24px;
    gap: 18px;
  }
}

.modal-body h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  line-height: 1.25;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-section h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.modal-callout {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 13.5px;
  line-height: 1.5;
}

.modal-disclaimer {
  margin: 2px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Footer & Disclaimer */
.site-footer {
  margin-top: 14px;
}

.disclaimer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

@media (min-width: 640px) {
  .disclaimer-box {
    padding: 18px 22px;
  }
}

.disclaimer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.disclaimer-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--caution-bg);
  color: var(--caution-text);
  border: 1px solid var(--caution-border);
}

.disclaimer-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.disclaimer-box p {
  margin: 0;
}

.disclaimer-box strong {
  color: var(--text);
}

.disclaimer-sub {
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}

@media print {
  .header-controls,
  .location-bar,
  .tab-nav,
  .filter-panel,
  .modal-close {
    display: none !important;
  }
}


/* ==========================================================================
   AESTHETIC LAYER — warm editorial vibe (overrides earlier tokens/components)
   ========================================================================== */

:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --bg: #faf8f2;
  --surface: #ffffff;
  --surface-subtle: #f5f2ea;
  --surface-hover: #ece8db;
  --border: #ebe6d8;
  --border-strong: #d6cfbb;
  --text: #1c1a16;
  --glow: rgba(250, 204, 21, 0.26);
  --glow-2: rgba(251, 146, 60, 0.12);
  --dot: rgba(120, 100, 40, 0.16);
  --shadow-sm: 0 1px 2px rgba(60, 45, 10, 0.05), 0 2px 8px rgba(60, 45, 10, 0.04);
  --shadow-md: 0 14px 34px rgba(60, 45, 10, 0.1);
  --shadow-lg: 0 28px 64px rgba(40, 30, 5, 0.22);
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1a1815;
    --surface-subtle: #242119;
    --surface-hover: #2d2921;
    --border: #2f2b24;
    --border-strong: #433d32;
    --text: #f6f3ec;
    --glow: rgba(250, 204, 21, 0.11);
    --glow-2: rgba(251, 146, 60, 0.07);
    --dot: rgba(255, 240, 190, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.65);
  }
}

[data-theme="dark"] {
  --bg: #121110;
  --surface: #1a1815;
  --surface-subtle: #242119;
  --surface-hover: #2d2921;
  --border: #2f2b24;
  --border-strong: #433d32;
  --text: #f6f3ec;
  --glow: rgba(250, 204, 21, 0.11);
  --glow-2: rgba(251, 146, 60, 0.07);
  --dot: rgba(255, 240, 190, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.65);
}

::selection {
  background: var(--primary);
  color: var(--primary-fg);
}

/* Ambient background: soft glow + faint dot grid fading out down the page */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 560px;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(820px 380px at 12% -10%, var(--glow), transparent 65%),
    radial-gradient(640px 320px at 100% 0%, var(--glow-2), transparent 65%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 460px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

/* Header */
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #fde047, var(--primary));
  color: #18181b;
  border: none;
  box-shadow: 0 8px 20px -6px rgba(234, 179, 8, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  margin-bottom: 0;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-text);
  font-size: 11px;
  letter-spacing: 0.07em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.brand-copy h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.8vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-top: 9px;
}

.subtitle {
  font-size: 15.5px;
  margin-top: 8px;
  line-height: 1.5;
}

.header-controls .btn {
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.header-controls .btn:hover {
  border-color: var(--primary-border);
  background: var(--surface);
}

/* Location bar */
.location-bar {
  border-radius: 22px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.select-field {
  background-color: var(--surface-subtle);
  border-radius: 12px;
  border-color: var(--border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-field:hover {
  border-color: var(--primary-border);
}

.select-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

.location-badge {
  background: var(--primary);
  border-color: transparent;
  color: var(--primary-fg);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.location-badge.is-regional {
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

/* Seasonal safety strip */
.winter-strip {
  position: relative;
  padding-left: 20px;
  border-radius: 16px;
  border: 1px solid var(--primary-border);
  background: linear-gradient(90deg, var(--primary-soft), transparent 75%), var(--surface);
  box-shadow: var(--shadow-sm);
}

.winter-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.winter-badge {
  background: var(--primary);
  border-color: transparent;
  color: var(--primary-fg);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
}

.winter-strip .btn-link {
  color: var(--primary-text);
}

/* Tabs — segmented control */
.tab-nav {
  border-radius: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 5px;
}

.nav-tab {
  border-radius: 12px;
}

@media (min-width: 640px) {
  .tab-nav {
    display: inline-flex;
    align-self: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface-subtle);
  }

  .nav-tab {
    border-radius: var(--radius-pill);
    padding: 9px 20px;
  }
}

.nav-tab.active {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  box-shadow: 0 6px 14px -4px rgba(234, 179, 8, 0.65);
}

/* Filters */
.filter-panel {
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.chip,
.chip-toggle {
  background: var(--surface);
  border-color: var(--border-strong);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) {
  .chip:hover,
  .chip-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--primary-border);
  }
}

.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.chip-toggle.active,
.chip-toggle[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
}

.input-field {
  background: var(--surface-subtle);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

/* Option cards */
.option-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 20px;
  background: var(--surface);
  animation: card-rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.option-card:nth-child(2) { animation-delay: 0.04s; }
.option-card:nth-child(3) { animation-delay: 0.08s; }
.option-card:nth-child(4) { animation-delay: 0.12s; }
.option-card:nth-child(5) { animation-delay: 0.16s; }
.option-card:nth-child(6) { animation-delay: 0.2s; }

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.option-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent 75%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

@media (hover: hover) {
  .option-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
  }

  .option-card:hover::before {
    opacity: 1;
  }
}

.card-title {
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.speed-tag {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
}

.option-card .card-metrics {
  gap: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.option-card .metric-item + .metric-item {
  padding-left: 14px;
  border-left: 1px dashed var(--border-strong);
}

.option-card .metric-value {
  font-size: 16px;
  font-weight: 750;
}

.btn-read {
  border-radius: 12px;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  box-shadow: 0 6px 14px -6px rgba(234, 179, 8, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
  .btn-read:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px -8px rgba(234, 179, 8, 0.8);
  }
}

.btn-save {
  border-radius: 12px;
  background: transparent;
}

.btn-save.saved,
.btn-save[aria-pressed="true"] {
  background: var(--primary-soft);
  color: var(--primary-text);
}

/* Section headings */
.section-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 1.75rem);
  letter-spacing: -0.025em;
}

/* Calculator */
.calc-controls-card,
.calc-results-card {
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.calc-kpi {
  border-radius: 14px;
}

.calc-kpi.highlight {
  background: linear-gradient(145deg, var(--primary-soft), transparent), var(--surface);
  border-color: var(--primary-border);
}

.calc-kpi-value {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.calc-bar-track {
  height: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.calc-bar-fill {
  background: linear-gradient(90deg, #fde047, var(--primary));
}

.segmented-group {
  border-radius: 14px;
}

.people-btn.active {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  box-shadow: 0 4px 10px -3px rgba(234, 179, 8, 0.6);
}

.checkbox-card {
  border-radius: 14px;
}

/* Directory */
.launchpad-card,
.contact-card,
.safety-card {
  border-radius: 20px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) {
  .contact-card:hover,
  .launchpad-card:hover,
  .safety-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
  }
}

.launchpad-card h3,
.safety-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.015em;
}

.launchpad-link {
  border-radius: 12px;
}

.launchpad-link:hover {
  background: var(--primary-soft);
}

/* Modal */
.modal-backdrop {
  background: rgba(14, 12, 8, 0.6);
  backdrop-filter: blur(6px);
}

.modal-panel {
  border-radius: 24px 24px 0 0;
}

@media (min-width: 640px) {
  .modal-panel {
    border-radius: 24px;
  }
}

.modal-body h2 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

.modal-section h3::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--primary);
  vertical-align: middle;
}

.modal-callout {
  border-radius: 14px;
}

.modal-close {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

/* Footer disclaimer */
.disclaimer-box {
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

/* Mobile fine-tuning */
@media (max-width: 639px) {
  .brand-copy h1 {
    font-size: 1.9rem;
  }

  .location-bar {
    padding: 14px;
    border-radius: 20px;
  }

  .option-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Select polish — vertically centered text + single custom chevron
   ========================================================================== */
:root {
  --chevron-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.75L10 12.25L14.5 7.75' stroke='%2352525b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chevron-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.75L10 12.25L14.5 7.75' stroke='%23d4d4d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

[data-theme="dark"] {
  --chevron-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.75L10 12.25L14.5 7.75' stroke='%23d4d4d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.select-field {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 44px;
  padding: 0 38px 0 14px;
  line-height: 44px;
  background-image: var(--chevron-svg);
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
}

.select-field option {
  line-height: normal;
}

@media (max-width: 639px) {
  .eyebrow {
    border-radius: 14px;
    line-height: 1.3;
    padding: 5px 12px 5px 10px;
  }
}

/* ==========================================================================
   Select final: use the browser's native arrow (reliable in every webview),
   keep text centered, and give long state names room on phones.
   ========================================================================== */
.select-field {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
  background-image: none;
  height: 44px;
  line-height: normal;
  padding: 0 12px;
}

@media (max-width: 479px) {
  .location-fields {
    grid-template-columns: 1fr;
  }
}

/* Select vertical centering: symmetric padding instead of fixed height */
.select-field {
  height: auto;
  min-height: 44px;
  padding: 11px 12px;
  line-height: 1.25;
}

/* ==========================================================================
   Mobile polish: left-aligned, full-width header and calmer spacing
   ========================================================================== */
@media (max-width: 639px) {
  .page-shell {
    gap: 14px;
    padding-top: 14px;
  }

  /* Brand mark + eyebrow share row 1; title and subtitle span the full width */
  .header-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
  }

  .brand-copy {
    display: contents;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 12px;
  }

  .brand-mark svg {
    width: 24px;
    height: 24px;
  }

  .eyebrow {
    justify-self: start;
    font-size: 10.5px;
    letter-spacing: 0.05em;
    padding: 5px 11px 5px 9px;
    border-radius: 999px;
  }

  .brand-copy h1 {
    grid-column: 1 / -1;
    margin-top: 2px;
    font-size: 2rem;
    line-height: 1.1;
  }

  .subtitle {
    grid-column: 1 / -1;
    margin-top: 0;
    font-size: 15px;
  }

  /* Header buttons: compact, left-aligned instead of two stretched halves */
  .header-controls {
    display: flex;
    justify-content: flex-start;
    width: auto;
    gap: 8px;
  }

  .header-controls .btn {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 13px;
  }

  /* Location card */
  .location-bar {
    gap: 14px;
  }

  .location-meta {
    justify-content: flex-start;
    gap: 8px 12px;
    padding-top: 0;
  }

  /* Seasonal strip */
  .winter-strip {
    gap: 10px;
    padding: 14px 14px 14px 18px;
  }

  .winter-strip-text {
    font-size: 14px;
  }

  .winter-badge {
    display: inline-flex;
    margin: 0 0 6px;
  }

  .winter-strip-copy,
  #winter-strip-copy {
    display: block;
  }

  /* Section headings and cards */
  .section-intro h2 {
    font-size: 1.45rem;
  }

  .filter-panel {
    padding: 12px;
    gap: 10px;
  }

  .results-bar {
    padding-top: 8px;
  }

  .card-actions {
    gap: 10px;
  }

  .card-actions .btn-read {
    flex: 1;
  }

  .disclaimer-box {
    padding: 16px;
  }
}
