:root {
  --navy: #172033;
  --navy-2: #26344d;
  --gold: #d9a441;
  --gold-dark: #9f711e;
  --cream: #f8f3e8;
  --paper: #fffdf8;
  --ink: #222222;
  --muted: #5f6368;
  --line: #dfd5c4;
  --good: #e2f0d9;
  --good-ink: #375623;
  --warn: #fce4d6;
  --warn-ink: #9c0006;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.11);
  --radius: 20px;
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

a { color: #244f8f; }
a:hover { color: #14315d; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 1000;
  padding: 8px 12px;
  background: white;
  color: var(--navy);
}
.skip-link:focus { left: 8px; }

.site-header { background: var(--navy); color: white; }
.header-inner,
.nav-inner,
.container,
.footer-inner { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; }
.brand { color: white; text-decoration: none; font-weight: 850; font-size: 1.45rem; letter-spacing: -0.03em; }
.brand span { color: #f1d99f; }
.header-kicker { color: #f1d99f; font-size: 0.93rem; text-align: right; }
.site-nav { background: #101827; border-top: 1px solid rgba(255,255,255,0.08); }
.nav-inner { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; }
.nav-inner a { color: white; text-decoration: none; font-weight: 720; font-size: 0.9rem; padding: 8px 10px; border-radius: 8px; }
.nav-inner a:hover,
.nav-inner a[aria-current="page"] { background: rgba(217, 164, 65, 0.22); color: #ffe8b4; }

main { min-height: 65vh; }
.container { padding: 52px 0; }
.container.narrow { max-width: 830px; }
.section { padding: 34px 0; }
.section + .section { border-top: 1px solid var(--line); }

.hero {
  background: linear-gradient(135deg, #172033 0%, #26344d 65%, #31405e 100%);
  color: white;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.eyebrow { margin: 0 0 10px; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 850; font-size: 0.78rem; }
.hero .eyebrow { color: #f1d99f; }
h1, h2, h3 { color: var(--navy); line-height: 1.13; letter-spacing: -0.025em; }
.hero h1 { color: white; font-size: clamp(2.45rem, 5vw, 4.35rem); margin: 0 0 18px; max-width: 820px; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.65rem); margin: 0 0 18px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin: 0 0 14px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }
.hero p { color: #f0f2f6; font-size: 1.14rem; max-width: 720px; }
.lede { color: #3f4651; font-size: 1.14rem; max-width: 760px; }

.button-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 17px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--gold);
  color: #161616;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { color: #111; transform: translateY(-1px); box-shadow: 0 9px 24px rgba(0,0,0,0.14); }
.button.secondary { background: transparent; color: white; border-color: rgba(255,255,255,0.72); }
.button.secondary:hover { color: white; border-color: white; }
.button.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.button.small { min-height: 40px; padding: 8px 13px; font-size: 0.92rem; }

.hero-visual,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-visual { padding: 16px; transform: rotate(1deg); }
.hero-visual img { display: block; border-radius: 13px; }
.card { padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.card.soft { box-shadow: none; }
.card.featured { border: 2px solid var(--gold); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { display: flex; flex-direction: column; }
.product-card .button-row { margin-top: auto; padding-top: 12px; }
.product-card img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 13px; border: 1px solid var(--line); margin-bottom: 17px; }
.price { color: var(--navy); font-size: 1.55rem; font-weight: 850; margin: 8px 0; }
.badge { display: inline-block; width: fit-content; padding: 4px 9px; border-radius: 999px; background: #f5e3b8; color: #6e4c0e; font-size: 0.78rem; font-weight: 850; }
.badge.good { background: var(--good); color: var(--good-ink); }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--paper); padding: 25px; }
.stat strong { display: block; color: var(--navy); font-size: 1.7rem; }
.stat span { color: var(--muted); font-size: 0.93rem; }

.check-list { list-style: none; padding: 0; margin: 16px 0 0; }
.check-list li { position: relative; padding-left: 27px; margin: 9px 0; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-dark); font-weight: 900; }

.notice { border-left: 5px solid var(--gold); padding: 14px 18px; background: #fff8e6; border-radius: 8px; }
.fine-print { color: var(--muted); font-size: 0.85rem; }

.tool-shell { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 26px; align-items: start; }
.tool-shell > * { min-width: 0; }
.calculator-form fieldset { border: 0; padding: 0; margin: 0; }
.calculator-form legend { font-size: 1.2rem; font-weight: 850; color: var(--navy); margin-bottom: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--navy); font-size: 0.9rem; font-weight: 760; }
.field input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bdad91;
  border-radius: 9px;
  background: #fffaf0;
  color: #17315a;
  font: inherit;
}
.field input:focus { outline: 3px solid rgba(217,164,65,0.32); border-color: var(--gold-dark); }
.input-help { color: var(--muted); font-size: 0.77rem; }
.results { position: static; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.result { padding: 15px; border-radius: 13px; background: #f4f6fa; border: 1px solid #dfe4ed; }
.result span { display: block; color: var(--muted); font-size: 0.82rem; }
.result strong { display: block; color: var(--navy); font-size: 1.45rem; margin-top: 2px; }
.status { padding: 14px 16px; border-radius: 12px; font-weight: 850; }
.status.good { color: var(--good-ink); background: var(--good); }
.status.warn { color: var(--warn-ink); background: var(--warn); }
.scenario-table { width: 100%; border-collapse: collapse; margin: 17px 0; font-size: 0.9rem; }
.scenario-table th { text-align: left; background: var(--navy); color: white; padding: 9px; }
.scenario-table td { padding: 9px; border-bottom: 1px solid var(--line); }
.scenario-table td:not(:first-child) { text-align: right; }

.article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); }
.article h2 { margin-top: 34px; }
.article h3 { margin-top: 24px; }
.article .button-row { margin: 30px 0 10px; }
.article-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 25px; }
.toc { background: #f3f1ec; border-radius: 12px; padding: 17px 20px; }
.toc strong { color: var(--navy); }

.site-footer { background: #101827; color: #e8ebf0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 30px; padding: 36px 0; }
.site-footer a { color: #f1d99f; }
.footer-links { display: flex; gap: 10px 16px; flex-wrap: wrap; align-content: start; }
.footer-legal { color: #b9c0ca; font-size: 0.84rem; }

@media (max-width: 900px) {
  .hero .container,
  .tool-shell,
  .grid-3,
  .product-grid { grid-template-columns: 1fr; }
  .hero-visual { transform: none; max-width: 680px; }
  .results { position: static; }
}

@media (max-width: 640px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 4px; }
  .header-kicker { text-align: left; }
  .nav-inner { gap: 2px; }
  .nav-inner a { font-size: 0.82rem; padding: 7px 8px; }
  .container { padding: 36px 0; }
  .hero .container { padding-top: 44px; padding-bottom: 44px; }
  .grid-2,
  .field-grid,
  .result-grid,
  .stat-strip,
  .footer-inner { grid-template-columns: 1fr; }
  .article { border-radius: 0; border-left: 0; border-right: 0; }
}

@media print {
  .site-header, .site-nav, .site-footer, .button-row { display: none; }
  body { background: white; }
  .container { width: 100%; padding: 0; }
  .card, .article { box-shadow: none; }
}
