/* ============================================================
   HEN WLAD HOMES — Design System
   Welsh Relocation Intelligence
   ============================================================ */

:root {
  --green-dark: #1B4332;
  --green-mid: #2D6A4F;
  --green-light: #52B788;
  --green-faint: #D8F3DC;
  --red: #C41E3A;
  --red-light: #FFE5E9;
  --slate: #334155;
  --slate-mid: #64748B;
  --slate-light: #94A3B8;
  --cream: #F8F5EF;
  --cream-dark: #EDE8DF;
  --gold: #C9A84C;
  --gold-light: #FFF3CD;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #6B7280;
  --border: #E2D9C8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-lg: 16px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: var(--green-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-dragon { font-size: 26px; }

.logo-text { display: flex; flex-direction: column; }

.logo-main {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.logo-sub {
  font-size: 10px;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: white;
  background: rgba(255,255,255,0.1);
}

.compare-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}

.btn-pro {
  background: var(--gold);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
  margin-left: 8px;
  letter-spacing: 0.2px;
}

.btn-pro:hover {
  background: #d4b05a;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(201,168,76,0.4);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #2d5a3d 60%, #1a3a2a 100%);
  color: white;
  padding: 64px 0 56px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero > .container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-light);
  margin: 0 0 16px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 20px;
  color: white;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 0 28px;
  line-height: 1.65;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin-bottom: 32px;
}

.search-input {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 15px;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.search-input::placeholder { color: rgba(255,255,255,0.45); }

.search-input:focus {
  outline: none;
  border-color: var(--green-light);
  background: rgba(255,255,255,0.15);
}

.search-btn {
  padding: 12px 24px;
  background: var(--green-light);
  color: var(--green-dark);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.search-btn:hover {
  background: #5fc993;
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat-item { display: flex; flex-direction: column; }

.stat-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wales-svg {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.map-caption {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  text-align: center;
  margin: 0;
}

/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 32px 0 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.persona-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: var(--cream);
  border: 1.5px solid var(--border);
  color: var(--slate);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.pill:hover {
  border-color: var(--green-mid);
  color: var(--green-dark);
  background: var(--green-faint);
}

.pill.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: white;
}

.filter-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--slate);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--green-mid);
}

.results-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ============================================================
   LOCATION GRID
   ============================================================ */

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding-bottom: 120px;
}

.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Location Card */
.location-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.location-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-light);
}

.location-card.in-compare {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px var(--green-light);
}

.card-header {
  padding: 18px 18px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-title-area { flex: 1; }

.card-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.2;
}

.card-welsh {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 6px;
}

.card-region-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--green-faint);
  color: var(--green-dark);
}

.flood-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.flood-badge.low { background: #D1FAE5; color: #065F46; }
.flood-badge.medium { background: var(--gold-light); color: #92400E; }
.flood-badge.high { background: #FEE2E2; color: #991B1B; }

.card-stats {
  padding: 0 18px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cream);
  border-radius: 8px;
  padding: 8px 4px;
}

.card-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.card-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  margin-top: 2px;
}

/* Score bars */
.card-scores {
  padding: 12px 18px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-label {
  font-size: 11px;
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
  font-weight: 500;
}

.score-bar-track {
  flex: 1;
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.score-bar-fill.remote { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.score-bar-fill.retiree { background: linear-gradient(90deg, var(--gold), #d4b05a); }
.score-bar-fill.family { background: linear-gradient(90deg, var(--green-mid), var(--green-light)); }
.score-bar-fill.firstbuyer { background: linear-gradient(90deg, var(--red), #ef4444); }

.score-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  width: 26px;
  text-align: right;
}

/* Card footer */
.card-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-detail {
  flex: 1;
  padding: 9px 16px;
  background: var(--green-dark);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.btn-detail:hover { background: var(--green-mid); }

.btn-compare-add {
  padding: 9px 14px;
  background: white;
  color: var(--green-dark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-compare-add:hover {
  border-color: var(--green-mid);
  background: var(--green-faint);
}

.btn-compare-add.added {
  background: var(--green-faint);
  border-color: var(--green-mid);
  color: var(--green-dark);
}

/* ============================================================
   COMPARE TRAY
   ============================================================ */

.compare-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green-dark);
  color: white;
  padding: 14px 24px;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.compare-tray-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tray-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.tray-items { display: flex; gap: 10px; flex: 1; }

.tray-item {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
}

.btn-compare-go {
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.btn-compare-go:hover { background: #d4b05a; }

.btn-tray-clear {
  background: transparent;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.btn-tray-clear:hover { color: white; border-color: rgba(255,255,255,0.5); }

/* ============================================================
   COMPARE VIEW
   ============================================================ */

.view-header {
  padding: 40px 0 24px;
}

.view-header h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 8px;
}

.view-header p {
  color: var(--text-muted);
  margin: 0;
}

.empty-compare {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-compare h3 { font-family: var(--font-serif); font-size: 22px; color: var(--slate); margin: 0 0 8px; }
.empty-compare a { color: var(--green-mid); }

.compare-table-wrapper {
  overflow-x: auto;
  margin-bottom: 40px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare-table th {
  background: var(--green-dark);
  color: white;
  padding: 16px 20px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  vertical-align: top;
}

.compare-table th .th-welsh {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-style: italic;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  margin-top: 2px;
}

.compare-table th:first-child {
  background: var(--slate);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 180px;
}

.compare-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 14px;
  color: var(--text);
  vertical-align: middle;
}

.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: var(--cream); }

.compare-table td:first-child {
  font-weight: 600;
  color: var(--slate);
  font-size: 13px;
  background: var(--cream);
}

.compare-section-header td {
  background: var(--cream-dark) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted) !important;
  padding: 8px 20px !important;
}

.cell-best { background: #D1FAE5 !important; color: #065F46; font-weight: 700 !important; }
.cell-worst { background: #FEE2E2 !important; color: #991B1B; }

.score-chip {
  display: inline-block;
  background: var(--green-dark);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.flood-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.flood-chip.low { background: #D1FAE5; color: #065F46; }
.flood-chip.medium { background: var(--gold-light); color: #92400E; }
.flood-chip.high { background: #FEE2E2; color: #991B1B; }

/* ============================================================
   DETAIL VIEW
   ============================================================ */

.back-btn {
  margin: 24px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-mid);
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
  transition: gap 0.2s;
}

.back-btn:hover { gap: 10px; }

.detail-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.detail-hero::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.detail-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green-light);
  margin: 0 0 8px;
}

.detail-title {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 4px;
}

.detail-welsh {
  font-size: 16px;
  font-style: italic;
  color: rgba(255,255,255,0.5);
  margin: 0 0 16px;
}

.detail-description {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 0 0 24px;
}

.detail-highlights {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.highlight-chip {
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.detail-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.detail-section h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 14px;
}

.detail-row:last-child { border-bottom: none; }

.detail-row-label { color: var(--text-muted); }

.detail-row-value {
  font-weight: 600;
  color: var(--text);
}

.score-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.score-section h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 20px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.score-card {
  background: var(--cream);
  border-radius: 8px;
  padding: 16px;
}

.score-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.score-card-num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.score-card-num.remote { color: #3B82F6; }
.score-card-num.retiree { color: var(--gold); }
.score-card-num.family { color: var(--green-mid); }
.score-card-num.firstbuyer { color: var(--red); }

.score-card-bar {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
}

.score-card-fill {
  height: 100%;
  border-radius: 3px;
}

.score-card-fill.remote { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.score-card-fill.retiree { background: linear-gradient(90deg, var(--gold), #d4b05a); }
.score-card-fill.family { background: linear-gradient(90deg, var(--green-mid), var(--green-light)); }
.score-card-fill.firstbuyer { background: linear-gradient(90deg, var(--red), #ef4444); }

.pro-teaser {
  background: linear-gradient(135deg, var(--green-dark), #2d5a3d);
  color: white;
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pro-teaser h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 8px;
}

.pro-teaser p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin: 0;
}

.pro-teaser-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pro-feature-chip {
  background: rgba(255,255,255,0.12);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  color: rgba(255,255,255,0.8);
}

.btn-pro-cta {
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-pro-cta:hover { background: #d4b05a; }

/* ============================================================
   ABOUT VIEW
   ============================================================ */

.about-container { padding-bottom: 60px; }

.about-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.about-hero h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--green-dark);
  margin: 0 0 12px;
}

.about-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0;
  line-height: 1.65;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.about-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

.about-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 12px;
}

.about-card p, .about-card ul {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

.about-card ul {
  padding-left: 16px;
}

.about-card ul li { margin-bottom: 5px; }

.about-pro-btn {
  display: inline-block;
  margin-top: 14px;
  background: var(--green-dark);
  color: white;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.about-pro-btn:hover { background: var(--green-mid); }

.data-note {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.data-note p {
  font-size: 13px;
  color: #92400E;
  margin: 0;
  line-height: 1.65;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--cream);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

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

.modal-badge {
  display: inline-block;
  background: var(--green-dark);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--green-dark);
  margin: 0 0 6px;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 20px;
}

.modal-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-features li {
  font-size: 14px;
  color: var(--text);
  padding: 7px 12px;
  background: var(--cream);
  border-radius: 6px;
}

.modal-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}

.price-amount {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--green-dark);
}

.price-period {
  font-size: 18px;
  color: var(--text-muted);
}

.price-note {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-cta {
  width: 100%;
  padding: 14px;
  background: var(--green-dark);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
  margin-bottom: 10px;
}

.modal-cta:hover { background: var(--green-mid); }

.modal-fine {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .footer-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  color: white;
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13px;
  margin: 0 0 6px;
}

.footer-welsh {
  font-size: 12px !important;
  color: rgba(255,255,255,0.4) !important;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-cols h4 {
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 14px;
}

.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-cols li { font-size: 13px; }

.footer-cols a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-cols a:hover { color: white; }

.footer-bottom {
  padding: 16px 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12px;
  margin: 0;
}

.footer-built { color: rgba(255,255,255,0.4); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hero > .container {
    grid-template-columns: 1fr;
  }
  .hero-visual { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .filter-row { flex-direction: column; align-items: flex-start; }
  .filter-controls { width: 100%; }
  .filter-select { flex: 1; }
  .hero-stats { gap: 20px; }
  .site-nav .nav-link { display: none; }
  .site-nav .btn-pro { margin-left: 0; }
  .location-grid { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .pro-teaser { flex-direction: column; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; gap: 4px; text-align: center; }
}

/* ============================================================
   UTILITY
   ============================================================ */

.view { min-height: calc(100vh - 64px); }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-results h3 { font-family: var(--font-serif); font-size: 22px; margin: 0 0 8px; }

/* ============================================================
   AUTH MODAL
   ============================================================ */

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green-dark);
}

.auth-form-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.5;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.auth-error {
  background: var(--red-light);
  color: #991B1B;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* ============================================================
   NAV AUTH STATE
   ============================================================ */

.nav-user-email {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-pro-badge {
  background: var(--gold);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ============================================================
   HEART / SAVE BUTTON
   ============================================================ */

.btn-heart {
  background: none;
  border: 1.5px solid var(--border);
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s, transform 0.1s;
  line-height: 1;
  flex-shrink: 0;
}

.btn-heart:hover {
  color: var(--red);
  border-color: var(--red);
}

.btn-heart.saved {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-light);
}

.btn-heart:active { transform: scale(1.15); }

/* ============================================================
   CHECKOUT OPTIONS
   ============================================================ */

.checkout-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-checkout {
  padding: 14px 24px;
  background: var(--green-dark);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-checkout:hover { background: var(--green-mid); }
.btn-checkout:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-checkout-annual {
  background: var(--gold);
}
.btn-checkout-annual:hover { background: #b8943d; }

.save-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.pro-active-badge {
  background: var(--green-faint);
  color: var(--green-dark);
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--slate);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { background: var(--green-dark); }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--slate); }

/* ============================================================
   CARD FOOTER — accommodate heart button
   ============================================================ */

.card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-detail,
.btn-compare-add {
  flex: 1;
}

