:root {
  --bg: #f5fbff;
  --surface: #ffffff;
  --surface-strong: #e8f5fb;
  --ink: #123142;
  --muted: #4f6a78;
  --primary: #0369a1;
  --primary-strong: #024f79;
  --accent: #168c63;
  --line: #cfe3ee;
  --warn: #a16207;
  --shadow: 0 18px 55px rgba(2, 79, 121, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--primary-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(22, 140, 99, 0.5);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary-strong);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 251, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: min(720px, calc(100vh - 68px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 44px 0 26px;
}

.hero-media {
  min-height: 430px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(3, 105, 161, 0.18), rgba(22, 140, 99, 0.14)),
    linear-gradient(180deg, #ffffff, #dff2fb);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.house-visual {
  position: relative;
  width: min(78%, 430px);
  aspect-ratio: 1 / 0.78;
}

.sun,
.roof,
.home-body,
.door,
.window,
.shield {
  position: absolute;
  display: block;
}

.sun {
  width: 72px;
  height: 72px;
  right: 6%;
  top: 2%;
  border-radius: 50%;
  background: #f7c948;
  box-shadow: 0 0 0 16px rgba(247, 201, 72, 0.18);
}

.roof {
  left: 4%;
  top: 28%;
  width: 72%;
  height: 30%;
  background: #244b5f;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.home-body {
  left: 14%;
  bottom: 10%;
  width: 52%;
  height: 42%;
  background: #ffffff;
  border: 4px solid #244b5f;
  border-radius: 0 0 var(--radius) var(--radius);
}

.door {
  left: 34%;
  bottom: 10%;
  width: 13%;
  height: 28%;
  background: #168c63;
  border-radius: 6px 6px 0 0;
}

.window {
  width: 42px;
  height: 34px;
  bottom: 28%;
  background: #d4f1fb;
  border: 3px solid #244b5f;
  border-radius: 6px;
}

.window-one {
  left: 20%;
}

.window-two {
  left: 51%;
}

.shield {
  right: 7%;
  bottom: 7%;
  width: 33%;
  height: 48%;
  background: #168c63;
  clip-path: polygon(50% 0, 92% 14%, 86% 70%, 50% 100%, 14% 70%, 8% 14%);
  box-shadow: 0 18px 35px rgba(22, 140, 99, 0.2);
}

.shield::after {
  content: "";
  position: absolute;
  left: 32%;
  top: 28%;
  width: 34%;
  height: 18%;
  border-left: 8px solid #fff;
  border-bottom: 8px solid #fff;
  transform: rotate(-45deg);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

h3 {
  margin-top: 32px;
  font-size: 1.35rem;
}

.lede {
  max-width: 640px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-row span {
  padding: 7px 10px;
  color: var(--primary-strong);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 18px;
  color: #617582;
  text-align: center;
  background: repeating-linear-gradient(45deg, #ffffff, #ffffff 12px, #f1f7fa 12px, #f1f7fa 24px);
  border: 1px dashed #9bb6c5;
  border-radius: var(--radius);
}

.ad-slot span {
  display: block;
  color: #556b77;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot p {
  margin: 4px 0 0;
}

.ad-top {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 42px;
}

.content-grid,
.article-layout,
.comparison,
.faq,
.policy-band,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: stretch;
}

.calculator-panel,
.results-panel,
.rail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calculator-panel {
  padding: clamp(22px, 4vw, 38px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading p {
  color: var(--muted);
}

.calculator {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid #b9d0dc;
  border-radius: var(--radius);
}

.input-prefix {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  background: #fbfdff;
  border: 1px solid #b9d0dc;
  border-radius: var(--radius);
  overflow: hidden;
}

.input-prefix span {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  font-weight: 800;
  background: #e9f6fb;
}

.input-prefix input {
  border: 0;
  border-radius: 0;
}

input[type="range"] {
  accent-color: var(--primary);
}

output {
  color: var(--muted);
  font-weight: 700;
}

.results-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 28px;
}

.premium-number {
  margin: 8px 0 12px;
  color: var(--primary-strong);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
}

.result-note {
  color: var(--muted);
}

.meter {
  height: 12px;
  margin: 20px 0;
  overflow: hidden;
  background: #e5f0f5;
  border-radius: 999px;
}

.meter span {
  display: block;
  width: 44%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: inherit;
  transition: width 180ms ease;
}

.result-list {
  padding-left: 20px;
  color: var(--muted);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  color: #ffffff;
  background: var(--accent);
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  color: #ffffff;
  background: #0f7652;
  transform: translateY(-1px);
}

.wide-band {
  margin: 64px 0;
  background: #0e3b53;
}

.stat-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  color: #ffffff;
}

.stat-grid div {
  padding: 30px;
  background: rgba(255, 255, 255, 0.06);
}

.stat-value {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
}

.stat-grid p {
  max-width: 26ch;
  margin: 8px 0 0;
  color: #d5eaf2;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
}

.guide-content {
  max-width: 760px;
}

.guide-content p,
.faq p,
.policy-band p {
  color: var(--muted);
}

.in-article {
  margin: 30px 0;
}

.checklist {
  margin-top: 36px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.checklist label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f7fbfd;
  border-radius: var(--radius);
  cursor: pointer;
}

.side-rail {
  display: grid;
  gap: 20px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.rail-card {
  padding: 22px;
}

.rail-card h2 {
  font-size: 1.15rem;
}

.rail-card a {
  display: block;
  margin-top: 14px;
  font-weight: 700;
}

.sidebar-ad {
  min-height: 280px;
}

.comparison,
.faq,
.policy-band {
  margin-top: 68px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--primary-strong);
  background: #eaf6fb;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:last-child td {
  border-bottom: 0;
}

.faq {
  max-width: 860px;
}

details {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

summary {
  min-height: 54px;
  padding: 16px 18px;
  font-weight: 800;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 18px 18px;
}

.policy-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.policy-band h2 {
  font-size: 1.3rem;
}

.site-footer {
  padding: 44px 0 58px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 6px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.footer-links a {
  font-weight: 800;
}

.simple-page {
  width: min(840px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 92px) 0;
}

.simple-page h1 {
  max-width: 12ch;
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.simple-page h2 {
  margin-top: 34px;
  font-size: 1.45rem;
}

.simple-page p {
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}

.contact-list a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero,
  .content-grid,
  .article-layout,
  .policy-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 330px;
    order: 2;
  }

  .results-panel,
  .side-rail {
    position: static;
  }

  .article-layout {
    gap: 28px;
  }

  .side-rail {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    min-height: auto;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    gap: 24px;
    padding-top: 28px;
  }

  h1 {
    max-width: 11ch;
  }

  .calculator,
  .stat-grid,
  .checklist-grid,
  .side-rail {
    grid-template-columns: 1fr;
  }

  .stat-grid div {
    padding: 24px;
  }

  .checklist {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
