:root {
  --bg: #f7f4ea;
  --bg-alt: #fffdf8;
  --text: #1a1c1f;
  --muted: #566074;
  --brand: #0f7b6c;
  --brand-2: #f58f3d;
  --accent: #12253f;
  --card: #ffffff;
  --border: #dbe2e8;
  --ok: #0c8a53;
  --shadow: 0 20px 48px rgba(16, 28, 46, 0.12);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(15, 123, 108, 0.14), transparent 38%),
    radial-gradient(circle at 85% 8%, rgba(245, 143, 61, 0.17), transparent 32%),
    linear-gradient(180deg, #fdfaf2 0%, #f8f6ef 52%, #f7f4ea 100%);
  font-family: "Public Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 999;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 252, 244, 0.84);
  border-bottom: 1px solid rgba(18, 37, 63, 0.12);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}

.main-nav a {
  display: inline-flex;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.875rem;
  white-space: nowrap;
  color: var(--accent);
  transition: transform 220ms ease, background 220ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  text-decoration: none;
  background: #edf4ff;
  transform: translateY(-1px);
}

.main-nav a.is-active {
  background: #d7eee9;
  color: #0a463d;
  font-weight: 600;
}

.hero {
  padding: 72px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e5f5ef;
  color: #0a463d;
  border: 1px solid #b4dccf;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.15rem);
}

h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.lead {
  font-size: 1.09rem;
  color: var(--muted);
  max-width: 68ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 600;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0f7b6c, #0b6458);
  color: #fff;
  box-shadow: 0 12px 26px rgba(15, 123, 108, 0.34);
}

.btn-secondary {
  background: #fff;
  border-color: #d6e2f0;
  color: var(--accent);
}

.hero-card {
  background: linear-gradient(155deg, #12253f 0%, #1f3f69 58%, #2f5d8c 100%);
  border-radius: var(--radius);
  color: #eef4ff;
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -58px -58px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(245, 143, 61, 0.28);
}

.hero-card ul {
  margin: 14px 0 0;
  padding-left: 16px;
}

.hero-card li {
  margin-bottom: 8px;
}

.section {
  padding: 28px 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(25, 46, 82, 0.08);
}

.card p {
  margin-top: 8px;
  color: var(--muted);
}

.card .jump {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calc-link {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.calc-link:hover,
.calc-link:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #b4c9ea;
  box-shadow: 0 12px 24px rgba(19, 39, 70, 0.12);
}

.calc-link strong {
  display: block;
  margin-bottom: 4px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.calc-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.calc-form {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 26px rgba(22, 38, 62, 0.1);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.field input[type="range"] {
  padding: 4px 0;
  border: none;
  background: transparent;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #c1d9ff;
  outline-offset: 1px;
}

.result-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  margin: 8px 0;
}

.result-bar {
  height: 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 99px;
  margin: 6px 0 14px;
  overflow: hidden;
}

.result-bar-fill {
  height: 100%;
  background: #69d2b7;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.calc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-result {
  background: linear-gradient(170deg, #112743 0%, #1d426b 100%);
  color: #e9f2ff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.calc-result h2 {
  font-size: 1.3rem;
}

.result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(240, 246, 255, 0.22);
  padding-top: 10px;
  margin-top: 10px;
}

.result-line strong {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.12rem;
}

.calc-note {
  margin-top: 10px;
  color: #d8e8ff;
  font-size: 0.95rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #1d6058;
  font-weight: 700;
  margin-bottom: 6px;
}

.path-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.path-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.inline-check {
  color: var(--ok);
  font-weight: 700;
}

.breadcrumbs {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 20px 0 10px;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 8px;
}

.breadcrumbs li:last-child::after {
  content: "";
}

.page-head {
  padding: 26px 0 14px;
}

.list-links {
  margin: 14px 0 0;
  padding-left: 18px;
}

.list-links li {
  margin-bottom: 8px;
}

.links-band {
  background: #f0f6ff;
  border-top: 1px solid #d7e6fb;
  border-bottom: 1px solid #d7e6fb;
  margin-top: 36px;
}

.links-band .wrap {
  padding-top: 18px;
  padding-bottom: 20px;
}

.links-band ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
}

.links-band a {
  display: inline-flex;
  background: #fff;
  border: 1px solid #d7e2f4;
  border-radius: 999px;
  padding: 8px 12px;
}

/* ── Ad slots ──────────────────────────────────────────── */
.ad-slot {
  display: block;
  width: 100%;
  text-align: center;
  overflow: hidden;
  background: transparent;
}

/* Leaderboard (728×90) — used below page-head */
.ad-slot-leaderboard {
  min-height: 100px;
  margin: 0 0 28px;
}

/* Rectangle (300×250) — highest CPM format, placed after calc result */
.ad-slot-rectangle {
  min-height: 280px;
  margin: 28px auto;
  max-width: 336px;
}
.ad-slot-rectangle ins.adsbygoogle {
  width: 300px;
  height: 250px;
}

/* Banner — used before links-band */
.ad-slot-banner {
  min-height: 92px;
  margin: 28px 0 0;
}

/* Prevent layout shift while ad loads */
.ad-slot ins.adsbygoogle {
  display: block;
}

/* Sticky bottom banner — always-visible, high impression share */
.ad-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #fff;
  border-top: 1px solid #dbe2e8;
  text-align: center;
  padding: 4px 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
}
.ad-sticky-bottom .ad-close {
  position: absolute;
  top: 4px;
  right: 10px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #566074;
  background: transparent;
  border: none;
  padding: 2px 6px;
  line-height: 1;
}
.ad-sticky-bottom.hidden { display: none; }

.site-footer {
  background: #0f1f35;
  color: #dfe7f6;
  margin-top: 38px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  padding: 26px 0 30px;
}

.foot-grid a {
  color: #f2f6ff;
}

.foot-grid ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 560ms ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 70ms;
}

.reveal:nth-child(3) {
  animation-delay: 140ms;
}

.reveal:nth-child(4) {
  animation-delay: 210ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .foot-grid,
  .calc-grid,
  .calc-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.open {
    display: block;
    padding-bottom: 12px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav a {
    padding: 10px;
  }
}
