/* ========================================================================
   LandScout - Design System
   Dynamic single-color theming via js/theme.js
   Color variables (--bg-*, --text-*, --accent-*, etc.) are set at runtime.
   Fallback values below match the default dark theme (hue ~213, light blue).
   ======================================================================== */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Legacy aliases ─────────────────────────────────────────────────
     These map old pine/cedar/slate/stone names to theme variables so
     that any code still referencing them continues to work.
     The actual values are overwritten at runtime by theme.js.            */
  --pine-900:  var(--bg-primary,   hsl(213, 10%, 9%));
  --pine-800:  var(--bg-secondary, hsl(213, 10%, 13%));
  --pine-700:  var(--border,       hsl(213, 8%,  22%));
  --pine-600:  var(--bg-hover,     hsl(213, 10%, 18%));
  --pine-500:  var(--border-focus, hsl(213, 40%, 45%));
  --cedar-500: var(--accent-dim,   hsla(213, 70%, 58%, 0.12));
  --cedar-400: var(--accent,       hsl(213, 70%, 58%));
  --cedar-300: var(--accent-hover, hsl(213, 70%, 66%));
  --slate-700: var(--tooltip-bg,   hsl(213, 8%,  20%));
  --slate-500: var(--text-muted,   hsl(213, 3%,  50%));
  --slate-300: var(--text-secondary, hsl(213, 3%, 70%));
  --stone-100: var(--text-primary, hsl(213, 3%,  94%));
  --stone-200: var(--text-primary, hsl(213, 3%,  94%));
  --rust-500:  var(--danger,       hsl(6,   70%, 58%));
  --water-500: var(--accent,       hsl(213, 70%, 58%));

  /* Semantic dots - fixed regardless of theme */
  --green-dot:  #4ade80;
  --yellow-dot: #facc15;
  --red-dot:    #f87171;

  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  --space-xs: 4px;  --space-sm: 8px;  --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--pine-900);
  color: var(--stone-100);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track, var(--pine-900)); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb, var(--pine-700)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover, var(--pine-600)); }

/* ========================================================================
   HEADER
   ======================================================================== */
.ls-header {
  background: linear-gradient(180deg, var(--header-gradient-start, hsl(213, 10%, 6%)) 0%, var(--header-gradient-end, var(--pine-900)) 100%);
  border-bottom: 1px solid var(--pine-700);
  padding: var(--space-md) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.ls-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.ls-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ls-header__icon {
  width: 36px; height: 36px;
  background: var(--cedar-400);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.ls-header__title {
  font-family: var(--font-heading);
  font-weight: 800; font-size: 20px;
  color: var(--stone-200);
  letter-spacing: -0.5px;
}

.ls-header__tagline {
  font-size: 11px; color: var(--slate-500);
  font-weight: 500; text-transform: uppercase; letter-spacing: 1px;
}

.ls-free-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--free-badge-start, #4ade80), var(--free-badge-end, #22c55e));
  color: var(--free-badge-text, #052e16);
  font-family: var(--font-heading);
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 1px;
}

.ls-header__nav {
  display: flex; gap: var(--space-xs);
}

.ls-nav-btn {
  background: transparent;
  border: 1px solid var(--pine-700);
  color: var(--slate-300);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition-fast);
  display: flex; align-items: center; gap: 6px;
}

.ls-nav-btn:hover {
  background: var(--pine-800);
  border-color: var(--pine-600);
  color: var(--stone-100);
}

.ls-nav-btn .badge {
  background: var(--badge-bg, var(--cedar-400)); color: var(--badge-text, #000);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
}

/* ========================================================================
   MAP HERO
   ======================================================================== */
.ls-map-hero {
  width: 100%;
  max-height: 50vh;
  min-height: 300px;
  background: var(--map-bg, hsl(213, 10%, 6%));
  border-bottom: 1px solid var(--pine-700);
  position: relative;
  overflow: hidden;
}

.ls-map-hero svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ls-map-hero .state-path {
  fill: var(--map-state, var(--pine-700));
  stroke: var(--map-stroke, var(--pine-900));
  stroke-width: 0.8px;
  cursor: pointer;
  transition: fill var(--transition-fast);
}

.ls-map-hero .state-path:hover {
  fill: var(--map-state-hover, var(--pine-600));
}

.ls-map-hero .state-path.selected {
  fill: var(--map-state-selected, var(--cedar-400));
}

.ls-map-hero .state-path.t1 { fill: var(--map-t1, hsl(213, 20%, 25%)); }
.ls-map-hero .state-path.t2 { fill: var(--map-t2, hsl(213, 15%, 28%)); }
.ls-map-hero .state-path.t1:hover { fill: var(--map-t1-hover, hsl(213, 25%, 33%)); }
.ls-map-hero .state-path.t2:hover { fill: var(--map-t1-hover, hsl(213, 20%, 36%)); }
.ls-map-hero .state-path.selected { fill: var(--map-state-selected, var(--cedar-400)) !important; }

.ls-map-hero .county-path {
  fill: var(--map-state-hover, var(--pine-600));
  stroke: var(--bg-secondary, var(--pine-800));
  stroke-width: 0.4px;
  cursor: pointer;
  transition: fill var(--transition-fast);
}

.ls-map-hero .county-path:hover {
  fill: var(--border-focus, var(--pine-500));
}

.ls-map-hero .county-path.selected {
  fill: var(--map-state-selected, var(--cedar-400));
}

.ls-map-hero .county-path.region-highlight {
  fill: var(--accent-dim, var(--cedar-500));
}

/* Map tooltip */
.ls-map-tooltip {
  position: absolute;
  background: var(--tooltip-bg, var(--slate-700));
  color: var(--tooltip-text, #f0f0f0);
  font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--radius-sm);
  pointer-events: none; opacity: 0;
  transition: opacity 100ms;
  z-index: 10;
  white-space: nowrap;
}

/* Map back button */
.ls-map-back {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--pine-800);
  border: 1px solid var(--pine-600);
  color: var(--stone-100);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius-sm);
  cursor: pointer;
  display: none;
  z-index: 10;
  transition: all var(--transition-fast);
}

.ls-map-back:hover {
  background: var(--pine-700);
  border-color: var(--cedar-400);
}

.ls-map-back.visible { display: flex; align-items: center; gap: 6px; }

/* Map instructions */
.ls-map-instructions {
  position: absolute;
  bottom: 12px; left: 50%; transform: translateX(-50%);
  background: var(--overlay-bg, hsla(213, 10%, 10%, 0.85));
  color: var(--slate-300);
  font-size: 12px; padding: 6px 16px;
  border-radius: 99px;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

/* ========================================================================
   LOCATION SUMMARY BAR (collapsed map state)
   ======================================================================== */
.ls-location-bar {
  background: var(--pine-800);
  border-bottom: 1px solid var(--pine-700);
  padding: 10px var(--space-lg);
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.ls-location-bar.visible {
  display: flex;
}

.ls-location-bar__path {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700;
  color: var(--stone-200);
  display: flex; align-items: center; gap: 8px;
}

.ls-location-bar__path .sep {
  color: var(--slate-500); font-weight: 400;
}

.ls-location-bar__change {
  background: none; border: none;
  color: var(--cedar-400); font-size: 13px;
  cursor: pointer; font-family: var(--font-body);
  text-decoration: underline;
}

.ls-location-bar__change:hover { color: var(--cedar-300); }

/* ========================================================================
   MAIN LAYOUT
   ======================================================================== */
.ls-main {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  min-height: calc(100vh - 70px);
}

.ls-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ls-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ========================================================================
   FILTERS PANEL
   ======================================================================== */
.ls-filters {
  background: var(--pine-800);
  border: 1px solid var(--pine-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ls-filters__header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--pine-700);
  display: flex; align-items: center; justify-content: space-between;
}

.ls-filters__header h2 {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700; color: var(--stone-200);
}

.ls-filters__reset {
  background: none; border: none;
  color: var(--rust-500); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
}
.ls-filters__reset:hover { color: #e07050; }

/* Quick Filters */
.ls-filters__quick {
  padding: var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-md);
}

/* Field */
.ls-field { display: flex; flex-direction: column; gap: 6px; }

.ls-field__label {
  font-size: 12px; font-weight: 600;
  color: var(--slate-300);
  text-transform: uppercase; letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
}

.ls-field__hint {
  font-size: 11px; color: var(--slate-500);
  font-weight: 400; text-transform: none; letter-spacing: 0;
}

.ls-tooltip {
  width: 14px; height: 14px;
  border-radius: 50%; background: var(--pine-700);
  color: var(--slate-500); font-size: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: help; font-weight: 700; position: relative;
}

.ls-tooltip:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--tooltip-bg, var(--slate-700)); color: var(--tooltip-text, #f0f0f0);
  font-size: 11px; font-weight: 400;
  padding: 6px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; z-index: 50;
  text-transform: none; letter-spacing: 0;
}

/* Select / Input */
.ls-select, .ls-input {
  width: 100%;
  background: var(--pine-900);
  border: 1px solid var(--pine-700);
  color: var(--stone-100);
  font-family: var(--font-body); font-size: 14px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.ls-select:focus, .ls-input:focus {
  border-color: var(--border-focus, var(--cedar-400));
  box-shadow: 0 0 0 2px var(--accent-dim, hsla(213, 70%, 58%, 0.12));
}

.ls-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.ls-select option { background: var(--pine-800); }

/* Range group */
.ls-range-group {
  display: flex; gap: var(--space-sm); align-items: center;
}
.ls-range-group .ls-input { flex: 1; text-align: center; padding: 8px 10px; }
.ls-range-group span { color: var(--slate-500); font-size: 12px; flex-shrink: 0; }

/* Budget slider */
.ls-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--pine-700); border-radius: 3px;
  outline: none; border: none; margin-top: 4px;
}
.ls-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--slider-fill, var(--cedar-400)); cursor: pointer;
  border: 3px solid var(--bg-secondary, var(--pine-800));
  box-shadow: 0 2px 4px var(--shadow-color, rgba(0,0,0,0.3));
}
.ls-slider-value {
  font-variant-numeric: tabular-nums;
  font-size: 14px; font-weight: 600;
  color: var(--cedar-300); text-align: right;
}

/* ========================================================================
   ADVANCED FILTERS
   ======================================================================== */
.ls-filters__adv-toggle {
  width: 100%;
  background: none; border: none;
  border-top: 1px solid var(--pine-700);
  color: var(--cedar-400);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 12px var(--space-lg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--transition-fast);
}
.ls-filters__adv-toggle:hover {
  background: var(--accent-dim, hsla(213, 70%, 58%, 0.05));
  color: var(--accent-hover, var(--cedar-300));
}
.ls-filters__adv-toggle .arrow {
  transition: transform var(--transition-base); font-size: 10px;
}
.ls-filters__adv-toggle.active .arrow { transform: rotate(180deg); }

.ls-filters__advanced {
  max-height: 0; overflow: hidden;
  transition: max-height var(--transition-slow);
}
.ls-filters__advanced.open { max-height: 1200px; }

.ls-filters__section {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--pine-700);
}

.ls-section-title {
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 700;
  color: var(--stone-200); margin-bottom: var(--space-sm);
  display: flex; align-items: center; gap: 8px;
}
.ls-section-title .icon { font-size: 14px; }

/* Chip toggles */
.ls-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }

.ls-chip {
  background: var(--pine-900);
  border: 1px solid var(--pine-700);
  color: var(--slate-300);
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 99px;
  cursor: pointer; user-select: none;
  transition: all var(--transition-fast);
}
.ls-chip:hover { border-color: var(--pine-600); color: var(--stone-100); }
.ls-chip.active {
  background: var(--chip-bg-active, var(--pine-600));
  border-color: var(--chip-border-active, var(--pine-500));
  color: var(--text-primary, var(--stone-100));
}

/* Search CTA */
.ls-filters__cta {
  margin: var(--space-md) var(--space-lg) var(--space-lg);
  width: calc(100% - var(--space-lg) * 2);
  padding: 14px;
  background: var(--cta-bg, var(--cedar-400)); color: var(--cta-text, hsl(213, 10%, 8%));
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  border: none; border-radius: var(--radius-md);
  cursor: pointer; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--transition-fast);
}
.ls-filters__cta:hover {
  background: var(--cta-bg-hover, var(--cedar-300));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-dim, hsla(213, 70%, 58%, 0.3));
}
.ls-filters__cta:active { transform: translateY(0); }

/* ========================================================================
   COUNTY / REGION PICKER
   ======================================================================== */
.ls-county-picker {
  background: var(--pine-800);
  border: 1px solid var(--pine-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: none;
}
.ls-county-picker.visible { display: block; }

.ls-county-picker__header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--pine-700);
}
.ls-county-picker__header h3 {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 700; color: var(--stone-200);
}

.ls-county-search {
  padding: var(--space-md) var(--space-lg) 0;
}

.ls-county-search input {
  width: 100%;
  background: var(--pine-900);
  border: 1px solid var(--pine-700);
  color: var(--stone-100);
  font-family: var(--font-body); font-size: 13px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  outline: none;
}
.ls-county-search input:focus {
  border-color: var(--cedar-400);
}
.ls-county-search input::placeholder { color: var(--slate-500); }

/* Selected counties chips */
.ls-selected-counties {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: var(--space-sm) var(--space-lg);
}

.ls-selected-chip {
  background: var(--accent-dim, hsla(213, 70%, 58%, 0.15));
  border: 1px solid var(--chip-border-active, hsla(213, 70%, 58%, 0.3));
  color: var(--accent-hover, var(--cedar-300));
  font-size: 12px; font-weight: 600;
  padding: 3px 8px 3px 10px; border-radius: 99px;
  display: flex; align-items: center; gap: 4px;
}

.ls-selected-chip__remove {
  background: none; border: none;
  color: var(--cedar-300); cursor: pointer;
  font-size: 14px; padding: 0 2px;
  line-height: 1;
}
.ls-selected-chip__remove:hover { color: var(--rust-500); }

/* Region groups */
.ls-region {
  border-top: 1px solid var(--pine-700);
}

.ls-region__header {
  padding: 10px var(--space-lg);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.ls-region__header:hover { background: rgba(255,255,255,0.02); }

.ls-region__name {
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 700; color: var(--stone-200);
  display: flex; align-items: center; gap: 8px;
}

.ls-region__desc {
  font-size: 11px; color: var(--slate-500); margin-top: 1px;
}

.ls-region__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ls-region__dot.green  { background: var(--green-dot); }
.ls-region__dot.yellow { background: var(--yellow-dot); }
.ls-region__dot.red    { background: var(--red-dot); }

.ls-region__select-btn {
  background: var(--accent-dim, hsla(213, 70%, 58%, 0.1));
  border: 1px solid var(--chip-border-active, hsla(213, 70%, 58%, 0.2));
  color: var(--accent-hover, var(--cedar-300));
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-body);
}
.ls-region__select-btn:hover {
  background: var(--chip-bg-active, hsla(213, 70%, 58%, 0.2));
  border-color: var(--accent, var(--cedar-400));
}

.ls-region__counties {
  padding: 0 var(--space-lg) var(--space-sm);
  display: none;
  flex-wrap: wrap; gap: 4px;
}
.ls-region__counties.open { display: flex; }

.ls-county-tag {
  background: var(--pine-900);
  border: 1px solid var(--pine-700);
  color: var(--slate-300);
  font-size: 11px; padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ls-county-tag:hover { border-color: var(--pine-600); color: var(--stone-100); }
.ls-county-tag.selected {
  background: var(--accent-dim, hsla(213, 70%, 58%, 0.15));
  border-color: var(--accent, var(--cedar-400));
  color: var(--accent-hover, var(--cedar-300));
}

/* ========================================================================
   STATE INFO CARD
   ======================================================================== */
.ls-state-info {
  background: var(--pine-800);
  border: 1px solid var(--pine-700);
  border-left: 4px solid var(--cedar-400);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: none;
}
.ls-state-info.visible { display: block; }

.ls-state-info__header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: var(--space-md);
}

.ls-state-info__name {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700; color: var(--stone-200);
}

.ls-state-info__rating {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
}

.ls-state-info__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-sm);
}

.ls-state-info__fact {
  background: var(--pine-900);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
}

.ls-state-info__fact-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--slate-500); font-weight: 600;
}

.ls-state-info__fact-value {
  font-variant-numeric: tabular-nums;
  font-size: 15px; font-weight: 600; color: var(--cedar-300);
}

.ls-state-info__notes {
  margin-top: var(--space-md);
  font-size: 13px; color: var(--slate-300); line-height: 1.7;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-dim, hsla(213, 70%, 58%, 0.08));
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent, var(--water-500));
}

/* ========================================================================
   FEATURED REGIONS (zero-click value)
   ======================================================================== */
.ls-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.ls-featured__card {
  background: var(--pine-800);
  border: 1px solid var(--pine-700);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ls-featured__card:hover {
  border-color: var(--pine-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-color, rgba(0,0,0,0.3));
}

.ls-featured__card-name {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700; color: var(--stone-200);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}

.ls-featured__card-desc {
  font-size: 12px; color: var(--slate-500); line-height: 1.5;
  margin-bottom: 10px;
}

.ls-featured__card-cta {
  font-size: 12px; color: var(--cedar-400); font-weight: 600;
}

/* ========================================================================
   WELCOME STATE
   ======================================================================== */
.ls-welcome {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.ls-welcome__title {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700;
  color: var(--stone-200); margin-bottom: var(--space-sm);
}

.ls-welcome__text {
  font-size: 14px; color: var(--slate-500);
  max-width: 500px; line-height: 1.7; margin-bottom: var(--space-xl);
}

/* ========================================================================
   RESULTS
   ======================================================================== */
.ls-results { display: none; }
.ls-results.visible { display: flex; flex-direction: column; gap: var(--space-md); }

.ls-results__summary {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--pine-700);
}

.ls-results__count {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 700; color: var(--stone-200);
}
.ls-results__count span { color: var(--cedar-300); }

/* Result Group */
.ls-group {
  background: var(--pine-800);
  border: 1px solid var(--pine-700);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fadeIn 0.3s ease forwards;
}

.ls-group__header {
  padding: var(--space-md) var(--space-lg);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.ls-group__header:hover { background: rgba(255,255,255,0.02); }

.ls-group__title {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700; color: var(--stone-200);
  display: flex; align-items: center; gap: 10px;
}
.ls-group__title .icon { font-size: 18px; }

.ls-group__badge {
  font-variant-numeric: tabular-nums;
  font-size: 11px; font-weight: 500;
  background: var(--pine-700); color: var(--slate-300);
  padding: 2px 8px; border-radius: 99px;
}

.ls-group__actions {
  display: flex; align-items: center; gap: var(--space-sm);
}

.ls-open-all {
  background: var(--accent-dim, hsla(213, 70%, 58%, 0.1));
  border: 1px solid var(--chip-border-active, hsla(213, 70%, 58%, 0.3));
  color: var(--accent-hover, var(--cedar-300));
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ls-open-all:hover {
  background: var(--chip-bg-active, hsla(213, 70%, 58%, 0.2));
  border-color: var(--accent, var(--cedar-400));
}

/* Result Links */
.ls-group__links {
  padding: 0 var(--space-lg) var(--space-md);
  display: flex; flex-direction: column; gap: 6px;
}
.ls-group__links.collapsed { display: none; }

.ls-link {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--pine-900); border-radius: var(--radius-sm);
  text-decoration: none; color: inherit;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.ls-link:hover {
  border-color: var(--pine-600);
  background: var(--bg-hover, hsla(213, 10%, 18%, 0.5));
}

.ls-link__info { flex: 1; min-width: 0; }

.ls-link__name {
  font-size: 13px; font-weight: 600; color: var(--stone-100);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ls-link__desc {
  font-size: 11px; color: var(--slate-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ls-link__arrow {
  color: var(--slate-500); font-size: 14px; flex-shrink: 0;
  transition: color var(--transition-fast);
}
.ls-link:hover .ls-link__arrow { color: var(--cedar-400); }

/* ========================================================================
   DRAWER (History / Guide)
   ======================================================================== */
.ls-overlay {
  position: fixed; inset: 0;
  background: var(--overlay-bg, rgba(0,0,0,0.6)); z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.ls-overlay.open { opacity: 1; pointer-events: auto; }

.ls-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 90vw;
  background: var(--pine-800);
  border-left: 1px solid var(--pine-700);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex; flex-direction: column;
}
.ls-drawer.open { transform: translateX(0); }

.ls-drawer__header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--pine-700);
  display: flex; align-items: center; justify-content: space-between;
}

.ls-drawer__title {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 700; color: var(--stone-200);
}

.ls-drawer__close {
  background: none; border: none;
  color: var(--slate-500); font-size: 20px;
  cursor: pointer; padding: 4px;
}
.ls-drawer__close:hover { color: var(--stone-100); }

.ls-drawer__body {
  flex: 1; overflow-y: auto; padding: var(--space-lg);
}

/* History items */
.ls-history-item {
  background: var(--pine-900);
  border: 1px solid var(--pine-700);
  border-radius: var(--radius-sm);
  padding: var(--space-md); margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ls-history-item:hover { border-color: var(--pine-600); }

.ls-history-item__filters {
  font-size: 13px; font-weight: 600; color: var(--stone-100); margin-bottom: 4px;
}
.ls-history-item__date {
  font-size: 11px; color: var(--slate-500);
}

/* Guide tips */
.ls-tip {
  background: var(--pine-900);
  border-radius: var(--radius-sm);
  padding: var(--space-md); margin-bottom: var(--space-md);
  border: 1px solid var(--pine-700);
}

.ls-tip__title {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 14px;
  color: var(--cedar-300); margin-bottom: 6px;
}

.ls-tip__text {
  font-size: 13px; color: var(--slate-300); line-height: 1.7;
}

/* ========================================================================
   FOOTER
   ======================================================================== */
.ls-footer {
  max-width: 1400px; margin: 0 auto;
  padding: var(--space-lg); border-top: 1px solid var(--pine-700);
  text-align: center; font-size: 12px; color: var(--slate-500);
}

/* ========================================================================
   MOBILE RESPONSIVE
   ======================================================================== */
.ls-mobile-toggle {
  display: none;
  background: var(--cta-bg, var(--cedar-400)); color: var(--cta-text, hsl(213, 10%, 8%));
  border: none; font-family: var(--font-heading);
  font-weight: 700; font-size: 14px;
  padding: 12px; border-radius: var(--radius-md);
  cursor: pointer; width: calc(100% - 32px);
  margin: var(--space-md) var(--space-md) 0;
  position: sticky; top: 62px; z-index: 50;
}

/* Mobile dropdown fallback */
.ls-mobile-state-select {
  display: none;
  padding: 0 var(--space-md);
  margin-bottom: var(--space-sm);
}

/* Mobile bottom sheet */
.ls-bottom-sheet {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  max-height: 70vh;
  background: var(--pine-800);
  border-top: 1px solid var(--pine-700);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 200;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}
.ls-bottom-sheet.open { display: block; transform: translateY(0); }

.ls-bottom-sheet__handle {
  width: 40px; height: 4px;
  background: var(--pine-600); border-radius: 2px;
  margin: 10px auto;
}

@media (max-width: 1024px) {
  .ls-main { flex-direction: column; padding: var(--space-md); }
  .ls-sidebar { width: 100%; }
  .ls-state-info__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ls-header__inner { flex-direction: column; align-items: flex-start; }
  .ls-header__nav { width: 100%; justify-content: flex-end; }
  .ls-header__tagline { display: none; }

  .ls-mobile-toggle { display: block; }
  .ls-mobile-state-select { display: block; }
  .ls-sidebar { display: none; }
  .ls-sidebar.mobile-open { display: flex; }

  .ls-map-hero { min-height: 200px; max-height: 35vh; }

  .ls-group__header { padding: var(--space-sm) var(--space-md); }
  .ls-group__links { padding: 0 var(--space-md) var(--space-sm); }

  .ls-featured { grid-template-columns: 1fr; }

  .ls-drawer { width: 100%; max-width: 100%; }
}

/* ========================================================================
   ANIMATIONS
   ======================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ls-group:nth-child(2) { animation-delay: 0.05s; }
.ls-group:nth-child(3) { animation-delay: 0.1s; }
.ls-group:nth-child(4) { animation-delay: 0.15s; }
.ls-group:nth-child(5) { animation-delay: 0.2s; }
.ls-group:nth-child(6) { animation-delay: 0.25s; }
