:root {
  --bg: #070b17;
  --bg-soft: #10172a;
  --text: #e5ecff;
  --muted: #9fb0d7;
  --accent: #68b5ff;
  --accent-strong: #2a8dff;
  --glass: rgba(15, 22, 40, 0.62);
  --border: rgba(156, 181, 255, 0.22);
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #1e2952 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, #1e405f 0%, transparent 45%),
    linear-gradient(135deg, #05070f 0%, #0c1324 45%, #070b17 100%);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}
.orb-1 { width: 280px; height: 280px; background: #2d80ff; top: -80px; left: -70px; }
.orb-2 { width: 260px; height: 260px; background: #20c5ba; right: -90px; top: 280px; }

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
  position: relative;
  z-index: 2;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.site-header {
  width: min(1160px, calc(100% - 2rem));
  margin: 1rem auto 0;
  position: sticky;
  top: 0.75rem;
  z-index: 10;
}

.site-header-inner {
  padding: 0.85rem 1rem 0.9rem;
  background: linear-gradient(100deg, rgba(6, 18, 52, 0.9), rgba(9, 32, 82, 0.88));
  border: 1px solid rgba(138, 171, 245, 0.28);
  border-radius: 26px;
  backdrop-filter: blur(10px);
}

.site-logo-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.site-logo {
  display: block;
  width: min(100%, 630px);
  height: clamp(46px, 6.5vw, 92px);
  object-fit: contain;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding: 0.55rem;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(8, 18, 48, 0.84), rgba(8, 25, 64, 0.74));
  border: 1px solid rgba(138, 171, 245, 0.24);
}

@media (max-width: 720px) {
  .nav-links {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-inline: 0.6rem;
  }

  .info-section.glass {
    padding: 0.85rem;
  }
}

.nav-links a {
  flex: 0 1 auto;
  white-space: nowrap;
  text-decoration: none;
  color: #b8c8ec;
  font-weight: 500;
  padding: 0.5rem 0.92rem;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: 0.25s ease;
  text-align: center;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: linear-gradient(160deg, rgba(75, 140, 220, 0.52), rgba(37, 87, 170, 0.4));
  border-color: rgba(114, 191, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(167, 220, 255, 0.28), 0 0 10px rgba(67, 163, 255, 0.25);
}

.hero {
  padding: 2rem;
  margin-bottom: 1.2rem;
}

.hero-landing {
  background-image: linear-gradient(130deg, rgba(76, 134, 255, 0.18), rgba(24, 210, 201, 0.12));
}

.hero.compact { padding: 1.6rem; }

.hero-cta-group {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1 { margin: 0.4rem 0 0.7rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { margin-top: 0; }

.hero p { margin-bottom: 0; color: var(--muted); max-width: 70ch; }

.info-section {
  margin-bottom: 1.2rem;
}

.info-section.glass {
  padding: 1rem;
}

.feature-grid,
.steps-grid {
  margin-top: 1rem;
}

.feature-card,
.step-card {
  height: 100%;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 17, 33, 0.6);
  padding: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(131, 201, 255, 0.45);
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.input-group span {
  color: #bfd0f7;
  font-size: 0.88rem;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(180, 203, 255, 0.28);
  background: rgba(12, 18, 36, 0.7);
  color: var(--text);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(104, 181, 255, 0.35);
  border-color: var(--accent);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.deals-grid,
.content-grid,
.steps-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1rem;
}

.card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.42);
  border-color: rgba(131, 201, 255, 0.4);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.price {
  margin: 0.5rem 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.score-pill {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.84rem;
  margin-bottom: 0.8rem;
}

.deal-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.deal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.watch-toggle.is-active {
  border-color: rgba(104, 181, 255, 0.65);
  background: rgba(104, 181, 255, 0.2);
  color: #fff;
}


.deal-signals .score-pill {
  margin-bottom: 0;
}

.score-good {
  background: rgba(46, 255, 139, 0.16);
  border: 1px solid rgba(85, 255, 167, 0.45);
  color: #7dffc0;
}

.score-amber {
  background: rgba(255, 193, 77, 0.16);
  border: 1px solid rgba(255, 193, 77, 0.45);
  color: #ffd38d;
}

.score-risk {
  background: rgba(255, 104, 104, 0.16);
  border: 1px solid rgba(255, 122, 122, 0.45);
  color: #ffb3b3;
}

.score-heat {
  background: rgba(255, 154, 76, 0.16);
  border: 1px solid rgba(255, 162, 101, 0.4);
  color: #ffc89f;
}

.score-confidence {
  background: rgba(104, 181, 255, 0.16);
  border: 1px solid rgba(104, 181, 255, 0.45);
  color: #a7d5ff;
}

.condition-light {
  background: rgba(83, 217, 144, 0.16);
  border: 1px solid rgba(83, 217, 144, 0.42);
  color: #8cf3b7;
}

.condition-medium {
  background: rgba(255, 193, 77, 0.16);
  border: 1px solid rgba(255, 193, 77, 0.4);
  color: #ffd28a;
}

.condition-heavy {
  background: rgba(255, 104, 104, 0.15);
  border: 1px solid rgba(255, 122, 122, 0.42);
  color: #ffb0b0;
}

.buyer-insight {
  margin: 0.2rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 204, 255, 0.22);
  background: rgba(9, 16, 30, 0.48);
}

.buyer-insight p {
  margin: 0;
  color: #d6e3ff;
  font-size: 0.83rem;
}

.buyer-insight p + p {
  margin-top: 0.35rem;
}

.btn-primary,
.btn-secondary {
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(180, 203, 255, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.text-link {
  color: #a8d4ff;
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  color: #d5ebff;
}

.load-more-wrap {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}

.tool-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.tool-form {
  display: grid;
  gap: 0.8rem;
}

.result-panel {
  border: 1px solid rgba(169, 196, 255, 0.28);
  background: rgba(15, 22, 43, 0.55);
  border-radius: 12px;
  padding: 1rem;
}

.result-panel p {
  font-size: 2rem;
  margin: 0.2rem 0;
  font-weight: 700;
}

.mortgage-providers-section {
  margin-top: 1.2rem;
  padding: 1rem;
}

.provider-search-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 1rem 0 0.75rem;
}

.providers-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.provider-card {
  padding: 1rem;
  border: 1px solid rgba(169, 196, 255, 0.22);
}

.provider-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.provider-card h3 {
  margin: 0;
}

.list {
  padding-left: 1.1rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(156, 181, 255, 0.22);
  padding: 1.5rem 0 2rem;
  background: rgba(5, 8, 18, 0.55);
}

.footer-inner {
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-inner nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-inner a {
  color: #c6d7ff;
  text-decoration: none;
}

.footer-inner a:hover {
  color: #fff;
}

@media (min-width: 760px) {
  .site-logo-link {
    margin-bottom: 0.8rem;
  }

  .filters {
    grid-template-columns: 2fr 1fr;
    align-items: end;
  }

  .tool-card {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .provider-search-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: end;
  }
}

.templates-page {
  display: grid;
  gap: 1.2rem;
}

.templates-hero {
  background-image: linear-gradient(130deg, rgba(37, 99, 235, 0.25), rgba(15, 23, 42, 0.55));
}

.templates-featured-wrap,
.template-category {
  padding: 1rem;
}

.template-categories {
  display: grid;
  gap: 1rem;
}

.templates-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.template-card {
  padding: 1rem;
  border: 1px solid rgba(169, 196, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(8, 13, 28, 0.72);
  display: grid;
  gap: 0.85rem;
}

.template-card-head {
  display: flex;
  gap: 0.75rem;
}

.template-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.template-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.template-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.template-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  border: 1px solid rgba(169, 196, 255, 0.35);
  color: #d9e8ff;
  background: rgba(17, 24, 39, 0.7);
}

.template-badge.highlight {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  color: #c7dcff;
}

.template-card p {
  margin: 0;
}

.template-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.template-actions .btn-primary,
.template-actions .btn-secondary {
  flex: 1;
  min-width: 120px;
}

.template-modal {
  width: min(980px, 96vw);
  border: 1px solid rgba(169, 196, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(6, 10, 22, 0.96);
  padding: 0;
  color: var(--text);
}

.template-modal::backdrop {
  background: rgba(2, 6, 23, 0.72);
}

.template-modal-inner {
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.template-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.template-modal-head h3 {
  margin: 0;
}

.template-preview-frame {
  width: 100%;
  height: min(76vh, 760px);
  border: 1px solid rgba(169, 196, 255, 0.25);
  border-radius: 12px;
  background: #fff;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.social-links a {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #95a7d3;
  border: 1px solid rgba(149, 167, 211, 0.35);
  background: rgba(11, 18, 35, 0.72);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  color: var(--accent);
  border-color: rgba(104, 181, 255, 0.8);
  transform: translateY(-1px);
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  padding: 1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(6, 10, 21, 0.95);
  border: 1px solid rgba(156, 181, 255, 0.32);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.cookie-banner p {
  margin: 0;
  color: #d5e2ff;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-actions button {
  min-width: 88px;
}

.cookie-deny {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(180, 203, 255, 0.32);
}

.privacy-page {
  display: grid;
  gap: 1rem;
}

.privacy-section {
  padding: 1.25rem;
}

.privacy-section h2 {
  margin-top: 0;
}

.privacy-consent-reset button {
  margin-top: 0.5rem;
}

@media (max-width: 760px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions button {
    flex: 1;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    width: 100%;
    justify-content: space-between;
  }
}

.map-page {
  display: grid;
  gap: 1.1rem;
}

.map-shell,
.map-results-section {
  padding: 1rem;
}

.map-head {
  align-items: center;
}

#clearCityFilter {
  visibility: hidden;
}

.investment-map {
  width: 100%;
  height: min(62vh, 520px);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(144, 189, 255, 0.25);
  overflow: hidden;
  margin-top: 0.8rem;
}

.leaflet-container {
  background: #0a1324;
}

.map-marker {
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 0 8px currentColor);
}

.map-marker:hover,
.map-marker-active {
  filter: drop-shadow(0 0 14px currentColor);
}

.map-tooltip {
  background: rgba(9, 14, 28, 0.92);
  border: 1px solid rgba(109, 171, 255, 0.55);
  color: var(--text);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.map-tooltip::before {
  border-top-color: rgba(109, 171, 255, 0.55);
}

.map-deal-card {
  animation: fadeInUp 0.25s ease;
}

.map-deal-actions {
  margin-top: 0.8rem;
}

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