/* HouseData redesign — design system from docs/redesign.html */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0A2540;
  --primary-light: #1E3A5F;
  --accent: #00D4AA;
  --accent-dark: #00B894;
  --warning: #F59E0B;
  --error: #EF4444;
  --bg: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --shadow: rgba(0, 0, 0, 0.08);
  --green: #10B981;
  --amber: #F59E0B;
  --red: #EF4444;
  --surface: #FFFFFF;
  --surface2: #F8FAFC;
  --glass: #FFFFFF;
  --muted: #64748B;
  --page-bg: #F8FAFC;

  /* Typography tokens */
  --label-sm: 0.72rem;
  --label-xs: 0.68rem;
  --label-spacing: 0.06em;
  --heading-lg: 1.1rem;
  --heading-md: 1.05rem;
  --body-sm: 0.85rem;
  --body-xs: 0.8rem;
  --meta-sm: 0.78rem;

  /* EPC band colours */
  --epc-a: #008054; --epc-b: #19b24b; --epc-c: #8dc63f;
  --epc-d: #ffcc00; --epc-e: #f7941d; --epc-f: #ed1c24; --epc-g: #e10600;
}

[data-theme="dark"] {
  --primary: #E2E8F0;
  --primary-light: #94A3B8;
  --accent: #00D4AA;
  --accent-dark: #00B894;
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.25);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --surface: #1e293b;
  --surface2: #0f172a;
  --glass: rgba(255, 255, 255, 0.05);
  --muted: #94a3b8;
  --page-bg: #0b1220;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.2;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-content, .search-section, .stat-card, .value-card,
  .data-card, .address-card { animation: none !important; opacity: 1; }
}

/* Navigation */
.site-nav,
nav.redesign-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .site-nav,
[data-theme="dark"] nav.redesign-nav {
  background: rgba(15, 23, 42, 0.92);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo,
.logo-redesign,
.site-title.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.logo::before,
.logo-redesign::before,
.logo-text::before {
  content: '◆';
  color: var(--accent);
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a, .nav-links button {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

[data-theme="light"] .nav-links a,
[data-theme="light"] .nav-links button {
  color: #1E293B;
  font-weight: 600;
}

.nav-links a::after,
.nav-links button::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links button:hover::after { width: 100%; }
.nav-links a:hover,
.nav-links button:hover { color: var(--accent); }
.nav-links a:focus,
.nav-links button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Active nav link */
.nav-links a.nav-active { color: var(--accent); }
.nav-links a.nav-active::after { width: 100%; }

/* Hamburger (mobile only) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 102;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav search icon link */
.nav-link-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link-icon[hidden] { display: none; }

.nav-link-icon svg { flex-shrink: 0; }

.cta-button {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}

.cta-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
}

/* Hero */
.hero-redesign {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-redesign h1,
.hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--primary);
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-redesign p,
.hero-content p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Search */
.search-section {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  box-shadow: 0 8px 32px var(--shadow);
  max-width: 640px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
  border: 1px solid var(--border);
}

.search-input-group {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.1rem 1.25rem;
  padding-right: 420px;
  font-size: 1.05rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s ease;
  background: var(--bg);
  color: var(--text);
}

@media (min-width: 821px) and (max-width: 1024px) {
  .search-input {
    padding-right: 360px;
  }
}

@media (min-width: 641px) and (max-width: 820px) {
  .search-input {
    padding-right: 340px;
  }
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.search-input::placeholder { color: var(--text-light); }

.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 1rem;
  white-space: nowrap;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 5;
}

[data-theme="dark"] .search-button {
  box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3);
}

.search-button:hover {
  background: var(--accent-dark);
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
}

.search-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.search-button:active {
  transform: translateY(-50%) scale(0.98);
}

.quick-search {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-search-tag {
  padding: 0.4rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
  font-family: inherit;
}

[data-theme="dark"] .quick-search-tag {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.15);
}

.quick-search-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.quick-search-tag:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quick-search-tag:active {
  transform: translateY(0);
}

/* Stats grid & cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow);
}

.stat-card:hover::before { transform: scaleY(1); }

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Fraunces', serif;
}

/* Data sections */
.data-sections { display: grid; gap: 1.5rem; }

.data-card {
  background: var(--bg-secondary);
  padding: 1.75rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
}

.data-card h3, .data-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.data-card h3::before, .data-card h4::before {
  content: '◆';
  color: var(--accent);
  font-size: 0.9rem;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.data-item {
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.data-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.data-item-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.data-item-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* EPC rating */
.epc-rating, .rating-sm, .dash-rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Fraunces', serif;
}

.epc-a, .rating-a { background: #1B8355; }
.epc-b, .rating-b { background: #2AA664; }
.epc-c, .rating-c { background: #81C34C; }
.epc-d, .rating-d { background: #F7B92C; color: #1a1a1a; }
.epc-e, .rating-e { background: #F18929; }
.epc-f, .rating-f { background: #E95235; }
.epc-g, .rating-g { background: #D52D36; }

/* Tables */
.price-history-table,
.price-paid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.price-history-table thead,
.price-paid-table thead { background: var(--bg); }

.price-history-table th,
.price-history-table td,
.price-paid-table th,
.price-paid-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.price-history-table th,
.price-paid-table th {
  font-weight: 600;
  color: var(--text-light);
  font-size: var(--label-sm);
  text-transform: uppercase;
  letter-spacing: var(--label-spacing);
}

.price-history-table tr:hover,
.price-paid-table tbody tr:hover { background: var(--bg); }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge.success { background: #D1FAE5; color: #065F46; }
.badge.warning { background: #FEF3C7; color: #92400E; }
.badge.danger { background: #FEE2E2; color: #991B1B; }
.badge.info { background: #DBEAFE; color: #1E40AF; }

[data-theme="dark"] .badge.success { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }
[data-theme="dark"] .badge.warning { background: rgba(245, 158, 11, 0.25); color: #fcd34d; }
[data-theme="dark"] .badge.danger { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.action-button {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.action-button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* Value cards (landing) */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem auto 2rem;
}
.value-grid-three-cols {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.value-layer-label {
  grid-column: 1 / -1;
  font-size: var(--label-sm);
  text-transform: uppercase;
  letter-spacing: var(--label-spacing);
  color: var(--text-light);
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.value-layer-label:first-of-type { margin-top: 0; }

.value-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.value-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.value-card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 212, 170, 0.12);
}

.value-card strong { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 0.25rem; }
.value-card span { font-size: 0.85rem; color: var(--text-light); display: block; line-height: 1.5; }
.value-card-feature { text-align: left; align-items: flex-start; }
.value-card-feature .value-card-icon { margin-bottom: 0.75rem; }
@media (max-width: 768px) {
  .value-grid-three-cols { grid-template-columns: 1fr !important; }
}

/* Address grid (results) */
.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.address-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  box-shadow: 0 4px 16px var(--shadow);
}

.address-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--shadow);
}

.address-card .card-address,
.address-card .card-address {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.3;
  font-family: 'Fraunces', serif;
}

.address-card .card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px var(--shadow);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title { font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 600; margin: 0; color: var(--primary); }

.modal-close {
  background: var(--bg);
  color: var(--text-light);
  padding: 0.4rem 0.6rem;
  font-size: 1.25rem;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover { color: var(--text); border-color: var(--accent); }

.modal-body { padding: 0; overflow-y: auto; }

.modal-body.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.5rem;
}

@media (max-width: 700px) { .modal-body.dashboard-grid { grid-template-columns: 1fr; } }

.modal-body.dashboard-grid .grid-full { grid-column: 1 / -1; }

.modal-section.card-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.modal-section h4 {
  font-family: 'Fraunces', serif;
  font-size: var(--label-sm);
  text-transform: uppercase;
  letter-spacing: var(--label-spacing);
  color: var(--text-light);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

[data-theme="dark"] .modal-cta {
  background: rgba(0, 212, 170, 0.08);
  border-color: rgba(0, 212, 170, 0.6);
}

.modal-cta:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.modal-cta:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-cta:active {
  transform: translateY(0);
}

.landing-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
}

.landing-footer a { color: var(--accent); text-decoration: none; }
.landing-footer a:hover { text-decoration: underline; }

/* Quick-search label */
.quick-search-label {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
  align-self: center;
}

/* Landing stats bar */
.landing-stats-bar {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  max-width: 640px;
  margin: 1.5rem auto 0;
  padding: 1rem 0 0;
}

.landing-stat {
  text-align: center;
}

.landing-stat strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.landing-stat span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

/* Trust strip */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  margin-top: 2rem;
}

.trust-strip-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  font-weight: 600;
  margin-right: 0.25rem;
}

.trust-strip-source {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.7;
}

.trust-strip-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
}

/* Landing section headings */
.landing-page h2 {
  font-family: 'Fraunces', serif;
  color: var(--primary);
}
[data-theme="dark"] .landing-page h2 { color: var(--text); }
.landing-page .section-sub {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* How it works */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.how-step {
  text-align: center;
  padding: 1.25rem;
}

.how-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.how-step strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.how-step span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .how-it-works-grid { grid-template-columns: 1fr; gap: 1rem; }
  .landing-stats-bar { gap: 1.5rem; }
}

/* Dashboard preview */
.dashboard-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px var(--shadow);
}

.preview-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.preview-mockup {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.preview-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.preview-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}

.preview-card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.preview-card-value {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.preview-card-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.preview-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  font-style: italic;
}

@media (max-width: 640px) {
  .preview-row { grid-template-columns: repeat(2, 1fr); }
}

/* Bottom CTA */
.bottom-cta {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--primary);
  border-radius: 16px;
  color: #fff;
}

[data-theme="dark"] .bottom-cta {
  background: var(--surface);
  border: 1px solid var(--border);
}

.bottom-cta h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

[data-theme="dark"] .bottom-cta h2 { color: var(--text); }

.bottom-cta p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .bottom-cta p { color: var(--text-light); }

.bottom-cta .cta-button {
  font-size: 1.05rem;
  padding: 0.85rem 2rem;
}

/* Full footer */
.landing-footer-full {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 2rem 1.5rem 1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-col strong {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem !important;
}

.footer-col p,
.footer-col span {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 960px;
  margin: 1.25rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.25rem; }
  .trust-strip { gap: 0.35rem; }
  .trust-strip-source { font-size: 0.75rem; }
}

/* Register / save card (dashboard) */
.register-card {
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  max-width: 420px;
  box-shadow: 0 4px 20px var(--shadow);
}

.register-card h3 { font-family: 'Fraunces', serif; margin: 0 0 1rem; font-size: 1.25rem; color: var(--primary); }
.register-card label { display: block; font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.25rem; }
.register-card input, .register-card select {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.register-card input:focus, .register-card select:focus {
  outline: none;
  border-color: var(--accent);
}

.register-card button[type="submit"], .register-card button[type="button"] {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.register-card button:hover { filter: brightness(1.05); }
.register-card .err { color: var(--red); font-size: 0.9rem; margin-bottom: 0.5rem; }
.register-card .success { color: var(--green); font-size: 0.95rem; margin-top: 0.5rem; }

/* Loading */
.loading { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; color: var(--text-light); }

/* Source badge */
.source-badge { font-size: 0.75rem; color: var(--text-light); margin-top: 0.5rem; }
.source-badge::before { content: 'Source: '; }

/* Theme toggle & profile */
.theme-toggle {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  font-weight: 600;
}

[data-theme="light"] .theme-toggle {
  color: #1E293B;
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-wrap { position: relative; }

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .profile-btn {
  color: #1E293B;
  background: #F8FAFC;
  border-color: #CBD5E1;
}

[data-theme="light"] .profile-btn svg {
  stroke: #1E293B;
}

.profile-btn:hover { border-color: var(--accent); color: var(--accent); }
.profile-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 0.5rem 0;
  z-index: 1001;
}

.profile-dropdown[hidden] { display: none; }

.profile-item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.5rem 1rem;
  text-decoration: none;
  box-sizing: border-box;
}

.profile-item:hover { background: var(--bg); color: var(--accent); }

.profile-item.user-email {
  color: var(--text-light);
  font-size: 0.8rem;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-right { display: flex; align-items: center; gap: 0.75rem; }

/* Responsive */
@media (max-width: 968px) {
  .hero-redesign h1, .hero-content h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  [data-theme="dark"] .nav-links {
    background: rgba(15, 23, 42, 0.98);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button {
    padding: 0.75rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
    text-align: left;
  }
  .nav-links a::after, .nav-links button::after { display: none; }
  .nav-links .profile-wrap { width: 100%; }
  .nav-links .profile-dropdown {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }
  .nav-links .cta-button {
    margin-top: 0.5rem;
    text-align: center;
  }
  .nav-container { padding: 0 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
  .search-section { padding: 1.5rem 1.25rem; }
  .search-button {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    max-width: 45%;
  }
  .search-input {
    padding-right: calc(45% + 24px);
  }
}

@media (max-width: 480px) {
  .search-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .search-button {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
  }
  .search-button:hover {
    transform: scale(1.02);
  }
  .search-button:active {
    transform: scale(0.98);
  }
  .search-input {
    padding: 1rem 1.25rem;
    padding-right: 1.25rem;
  }
}
