:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --brand: #0e7490;
  --brand-dark: #155e75;
  --accent: #f59e0b;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .06);
  --maxw: 1180px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--nav-h); gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--brand); color: #fff; border-radius: 10px; font-size: .85rem; letter-spacing: .5px;
}
.brand-text { color: var(--ink); }

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 9px 14px; border-radius: 8px;
  color: var(--ink); font-weight: 500; font-size: .98rem;
}
.site-nav a:hover { background: #eef7f9; color: var(--brand-dark); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand-dark); }

.nav-toggle {
  display: none; border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; font-size: 1.3rem; line-height: 1; padding: 6px 12px; cursor: pointer; color: var(--ink);
}

/* Hero */
.hero {
  padding: 64px 20px 56px; text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(14, 116, 144, .14), transparent 60%),
    linear-gradient(180deg, #eaf5f7, var(--bg));
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); margin: 0 0 12px; letter-spacing: -.02em; }
.hero-sub { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 1.12rem; }

/* Sections */
.section { padding: 48px 20px; }
.section h2 { font-size: 1.5rem; margin: 0 0 20px; }
.page-head { padding: 44px 20px 4px; background: linear-gradient(180deg, #eef7f9, var(--bg)); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.page-head p { color: var(--muted); max-width: 700px; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0, 0, 0, .1); }
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e8f0f2; }
.card-img-placeholder {
  display: grid; place-items: center; color: #9fb6bc; font-size: 2rem; font-weight: 700;
  background: linear-gradient(135deg, #e0eef1, #f3f7f7);
}
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; }
.card-cat { display: flex; flex-wrap: wrap; gap: 6px; }
.card-title { font-size: 1.12rem; margin: 0; line-height: 1.35; }
.card-desc { margin: 0; color: var(--muted); font-size: .95rem; }
.card-more { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--brand-dark); }

/* Badges & chips */
.badge {
  display: inline-block; background: #e6f4f7; color: var(--brand-dark);
  padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  text-transform: capitalize;
}
.badge:hover { background: #cfeaf0; text-decoration: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px;
  color: var(--ink); font-weight: 600; font-size: .95rem; text-transform: capitalize;
}
.chip span { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
.chip:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
.chip-lg { padding: 12px 20px; font-size: 1.02rem; }

/* Article */
.post { padding-bottom: 60px; }
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 18px 0 6px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { margin-inline: 6px; }
.post-header { max-width: 800px; margin: 0 auto; padding: 22px 0 10px; }
.post-header h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 14px 0; letter-spacing: -.02em; }
.post-desc { font-size: 1.12rem; color: var(--muted); margin: 0 0 14px; }
.post-meta { display: flex; gap: 10px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.post-hero { max-width: 1000px; margin: 12px auto 0; border-radius: var(--radius); overflow: hidden; }
.post-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.post-layout { max-width: var(--maxw); margin: 28px auto 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 34px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-size: .9rem; }
.toc summary { cursor: pointer; font-weight: 700; }
.toc nav > ul, .toc ul { margin: 10px 0 0; padding-left: 18px; list-style: none; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--brand-dark); }

.post-body { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .post-body { padding: 22px 20px; } }
.post-body h2 { font-size: 1.6rem; margin: 2em 0 .6em; padding-top: .4em; border-top: 1px solid var(--border); }
.post-body h2:first-child { border-top: 0; margin-top: .2em; }
.post-body h3 { font-size: 1.22rem; margin: 1.5em 0 .4em; }
.post-body p { margin: 0 0 1.05em; }
.post-body blockquote {
  margin: 1.4em 0; padding: 12px 18px; border-left: 4px solid var(--brand);
  background: #f2f8fa; border-radius: 0 10px 10px 0; color: #334155; font-style: italic;
}
.post-body blockquote p { margin: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; vertical-align: top; }
.post-body th { background: #eef7f9; color: var(--brand-dark); font-weight: 700; }
.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 22px; }
.post-body li { margin: 4px 0; }

/* FAQ */
.faq { margin-top: 40px; }
.faq h2 { border-top: 0; font-size: 1.5rem; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin: 10px 0; overflow: hidden; background: #fbfcfc; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style-position: inside; }
.faq-item[open] summary { background: #eef7f9; }
.faq-item p { margin: 0; padding: 4px 18px 16px; color: #334155; }

/* Partners / affiliates */
.partners-inline { margin-top: 40px; padding-top: 6px; }
.partners-inline h2 { border-top: 0; font-size: 1.4rem; }
.disclosure-note { font-size: .82rem; color: var(--muted); margin: 0 0 14px; }
.realtor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.realtor-card {
  display: flex; flex-direction: column; gap: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.realtor-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); }
.realtor-type { align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.realtor-name { font-size: 1.05rem; margin: 0; line-height: 1.3; color: var(--ink); }
.realtor-note { margin: 0; color: var(--muted); font-size: .88rem; }
.realtor-meta { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 2px 0 0; padding: 0; }
.realtor-meta li { background: #f1f5f5; border-radius: 6px; padding: 2px 8px; font-size: .75rem; color: var(--muted); }
.realtor-cta { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--brand-dark); }

/* Buttons */
.btn {
  display: inline-block; background: var(--brand); color: #fff; font-weight: 600;
  padding: 12px 22px; border-radius: 10px; margin: 6px 8px 6px 0;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand-dark); border: 1px solid var(--brand); }

/* 404 */
.notfound { text-align: center; padding: 90px 20px; }
.notfound h1 { font-size: clamp(4rem, 16vw, 8rem); margin: 0; color: var(--brand); letter-spacing: -.04em; }
.notfound .chip-row, .notfound .btn-row { justify-content: center; margin-top: 22px; }

/* Footer */
.site-footer { background: #10343d; color: #d7e6ea; margin-top: 60px; }
.site-footer a { color: #bfe3ea; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 44px 0 26px; }
.footer-grid h3, .footer-grid h4 { color: #fff; margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid p { margin: 0; color: #b7d3d9; }
.affiliate-disclosure { font-size: .78rem; color: #8fb3bb; border-top: 1px solid #245662; padding: 16px 0; }
.copyright { font-size: .82rem; color: #8fb3bb; padding-bottom: 28px; margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .post-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--surface); border-bottom: 1px solid var(--border);
    display: none; padding: 10px 20px 18px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px 10px; }
}