:root {
  --navy: #0f2a3d;
  --navy-light: #16405c;
  --teal: #1f7a6c;
  --teal-light: #279482;
  --sand: #f7f3ec;
  --cream: #fffdf9;
  --ink: #1c2b30;
  --muted: #5a6b70;
  --border: #e4ddd0;
  --radius: 10px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Announcement banner */
.announcement-banner {
  background: var(--teal);
  color: #fff;
  padding: 11px 0;
  font-size: 0.9rem;
  text-align: center;
}
.announcement-banner a { color: rgba(255,255,255,0.85); text-decoration: underline; }

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.logo span { color: #7fd6c4; }
.logo:hover { text-decoration: none; }

.site-nav > ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  color: #dce8ea;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; }

.site-nav .has-dropdown { position: relative; }

.dropdown-toggle {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #dce8ea;
  cursor: pointer;
}
.dropdown-toggle:hover { color: #fff; }

.dropdown {
  display: none;
  list-style: none;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 10px 0;
  min-width: 200px;
  z-index: 10;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown { display: block; }
.dropdown li a {
  display: block;
  color: var(--ink);
  padding: 8px 16px;
}
.dropdown li a:hover { background: var(--sand); color: var(--ink); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, var(--teal) 130%);
  color: #fff;
  padding: 64px 0 56px;
}
.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 14px;
  max-width: 720px;
  line-height: 1.2;
}
.hero p.lead {
  font-size: 1.15rem;
  color: #dce8ea;
  max-width: 620px;
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: #7fd6c4;
  color: var(--navy);
}
.btn-primary:hover { background: #63c9b4; text-decoration: none; }
.btn-outline {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  background: transparent;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

/* Sections */
.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }
.section h2 {
  font-size: 1.7rem;
  margin: 0 0 8px;
}
.section .section-intro {
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 32px;
}
.section-alt { background: var(--cream); }

/* Cards / grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.grid--3col {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
  .grid--3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid--3col { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-top: 0; margin-bottom: 8px; font-size: 1.1rem; }
.card p { color: var(--muted); margin-bottom: 14px; }
.card .btn { padding: 8px 16px; font-size: 0.85rem; }
.card-footer { display: flex; align-items: center; gap: 12px; }

/* Price tier pill */
.price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  cursor: default;
  position: relative;
  user-select: none;
  flex-shrink: 0;
}
.price-pill--1 { background: #2fa36a; }
.price-pill--2 { background: #7ab940; }
.price-pill--3 { background: #d4a417; }
.price-pill--4 { background: #e07039; }
.price-pill--5 { background: #c5334a; }

.price-pill::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 20;
}
.price-pill::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--navy);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 20;
}
.price-pill:hover::after,
.price-pill:hover::before,
.price-pill:focus::after,
.price-pill:focus::before { opacity: 1; }

/* Price legend */
.price-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  max-width: 320px;
}
.price-legend__bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #2fa36a, #7ab940, #d4a417, #e07039, #c5334a);
}
.price-legend__label {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Page header for inner pages */
.page-header {
  background: var(--navy);
  color: #fff;
  padding: 40px 0;
}
.page-header--photo {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 64px 0;
}
.page-header--photo .photo-credit {
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}
.page-header--photo .photo-credit a { color: rgba(255,255,255,0.4); }
.page-header h1 { margin: 0 0 8px; font-size: 2rem; }
.page-header p { color: #cfe0e2; margin: 0; max-width: 640px; }

.breadcrumb {
  font-size: 0.85rem;
  color: #bcd;
  margin-bottom: 10px;
}
.breadcrumb a { color: #bcd; }

/* Prose content */
.prose { max-width: 720px; }
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

/* Fact box */
.fact-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.fact-box h4 { margin-top: 0; }
.fact-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.fact-box dt { font-weight: 600; color: var(--navy); }
.fact-box dd { margin: 0; color: var(--muted); }

/* Form */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--sand);
}
.form-row textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert-success { background: #e3f5ef; color: #14503f; border: 1px solid #b7e3d3; }
.alert-error { background: #fbe9e7; color: #8a2f22; border: 1px solid #f3c3ba; }

/* Valuation tool */
.val-result { max-width: 560px; }

.val-range-box {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
}
.val-range-label {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: #cfe0e2;
}
.val-range {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.val-range__price {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #7fd6c4;
}
.val-range__sep {
  font-size: 1.1rem;
  color: #8fa2a6;
}
.val-disclaimer {
  margin: 0;
  font-size: 0.82rem;
  color: #8fa2a6;
  line-height: 1.5;
}

@keyframes val-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
.btn--loading {
  animation: val-pulse 1.2s ease-in-out infinite;
  cursor: default;
}

/* Ad slot placeholders */
.ad-slot {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #b9c9cc;
  padding: 40px 0 30px;
  margin-top: 60px;
  font-size: 0.88rem;
}
.site-footer a { color: #dce8ea; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.footer-cols h5 {
  color: #fff;
  margin: 0 0 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  font-size: 0.8rem;
  color: #8fa2a6;
}



/* Subscribe popup */
.sub-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.sub-popup.is-open { display: flex; }
.sub-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,42,61,0.72);
}
.sub-popup__box {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}
.sub-popup__box h3 { margin: 0 0 4px; font-size: 1.25rem; }
.sub-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
}
.sub-popup__close:hover { color: var(--ink); }

/* Blog listing */
.blog-list { max-width: 720px; }
.blog-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.blog-card:first-child { padding-top: 0; }
.blog-card__meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.blog-card__title { margin: 0 0 10px; font-size: 1.25rem; }
.blog-card__title a { color: var(--ink); }
.blog-card__title a:hover { color: var(--teal); text-decoration: none; }
.blog-card__excerpt { color: var(--muted); margin: 0 0 12px; }
.blog-card__read { font-size: 0.9rem; font-weight: 600; color: var(--teal); }
.blog-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 28px; }
.blog-pagination { display: flex; align-items: center; gap: 12px; padding-top: 32px; max-width: 720px; }
.blog-pagination__info { font-size: 0.85rem; color: var(--muted); margin: 0 auto; }

/* Related areas (cross-links on guide pages) */
.related-areas {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related-areas h3 {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.related-areas__grid { display: flex; flex-wrap: wrap; gap: 8px; }
.related-areas__link {
  display: inline-block;
  padding: 6px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--teal);
  font-weight: 500;
}
.related-areas__link:hover {
  background: #fff;
  border-color: var(--teal);
  text-decoration: none;
}

/* Blog post CTA strip */
.section--cta { background: var(--navy); }
.blog-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0; }
.blog-cta__heading { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; color: #fff; }
.blog-cta__sub { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.btn-light { background: #fff; color: var(--navy) !important; white-space: nowrap; flex-shrink: 0; }
.btn-light:hover { background: #e8f4f6; text-decoration: none; }

/* Post prev/next navigation */
.post-nav { display: flex; justify-content: space-between; gap: 16px; max-width: 720px; margin: 0 auto; padding: 28px 0; border-top: 1px solid var(--border); }
.post-nav__link { display: flex; flex-direction: column; gap: 4px; max-width: 45%; text-decoration: none; }
.post-nav__link--older { text-align: right; margin-left: auto; }
.post-nav__dir { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.post-nav__title { font-size: 0.9rem; color: var(--teal); line-height: 1.4; }
.post-nav__link:hover .post-nav__title { text-decoration: underline; }

@media (max-width: 600px) {
  .blog-cta { flex-direction: column; align-items: flex-start; }
  .post-nav { flex-direction: column; gap: 20px; }
  .post-nav__link, .post-nav__link--older { max-width: 100%; text-align: left; margin-left: 0; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; order: 3; }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .site-nav > ul > li { border-top: 1px solid rgba(255,255,255,0.07); }
  .site-nav a,
  .dropdown-toggle { display: block; padding: 10px 0; }
  .dropdown {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 4px 0;
    min-width: auto;
    margin-bottom: 4px;
  }
  .dropdown li a { color: #dce8ea; padding: 8px 16px; }
  .dropdown li a:hover { background: rgba(255,255,255,0.08); color: #fff; }
}
