:root {
  --navy: #102c46;
  --navy-deep: #081d31;
  --ink: #17324a;
  --muted: #617283;
  --line: #d8e2e8;
  --paper: #f7faf9;
  --white: #ffffff;
  --green: #1b9a70;
  --green-dark: #087456;
  --mint: #dff3e9;
  --sand: #f5eddf;
  --link: #087456;
  --measure: 1180px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, monospace;
  color-scheme: light;
}

html[data-theme="dark"], html.dark {
  --navy: #9edfc4;
  --navy-deep: #061525;
  --ink: #e8f1f4;
  --muted: #a7bac4;
  --line: #294152;
  --paper: #0b1e2e;
  --white: #102c46;
  --green: #67d5aa;
  --green-dark: #9edfc4;
  --mint: #163d3c;
  --sand: #3b3428;
  --link: #82e5ba;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  position: relative;
  z-index: 5;
  backdrop-filter: blur(14px);
}
.header-inner, .page-wrap, .footer-inner { width: min(var(--measure), calc(100% - 3rem)); margin-inline: auto; }
.header-inner { min-height: 5.5rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--navy); text-decoration: none; flex: 0 0 auto; }
.brand-mark { width: 2.7rem; height: 2.7rem; }
.wordmark { font: 700 1.45rem/1 var(--font-display); letter-spacing: -.045em; }
.wordmark em { color: var(--green); font-style: normal; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: .25rem .95rem; padding: 0; margin: 0; list-style: none; }
.primary-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--green-dark); }
.header-actions { display: flex; align-items: center; gap: .65rem; }
[data-theme-toggle], .menu-toggle { color: var(--navy); background: transparent; border: 1px solid var(--line); border-radius: 999px; width: 2.5rem; height: 2.5rem; }
[data-theme-toggle] { font-size: 1.1rem; }
.menu-toggle { display: none; }

.hero { background: var(--navy-deep); color: #f4fbf9; padding: clamp(4rem, 8vw, 7.25rem) 0 4.5rem; position: relative; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0 0 0 48%; background: linear-gradient(110deg, var(--navy-deep) 6%, transparent 60%), url('https://imagedelivery.net/W0Tyu0H3jD0178dqoxnJSA/788e6a88-3772-4cf5-57b4-f94f87901a00/public') center/cover; opacity: .42; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .93fr) minmax(18rem, .72fr); align-items: end; gap: 4rem; }
.eyebrow, .section-kicker { color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 700; }
.hero h1 { max-width: 11ch; margin: .8rem 0 1.2rem; color: #fff; font: 600 clamp(3.2rem, 7vw, 6.4rem)/.94 var(--font-display); letter-spacing: -.065em; }
.hero-intro { max-width: 32rem; color: #c9dbe1; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .72rem 1.15rem; border: 1px solid transparent; border-radius: .45rem; background: var(--green); color: #072a26; text-decoration: none; font-weight: 700; }
.button:hover { background: #8ee4bd; color: #072a26; }
.button.ghost { border-color: #7d9aa7; color: #fff; background: transparent; }
.button.ghost:hover { border-color: var(--green); color: #fff; }
.hero-search { background: rgba(255,255,255,.08); border: 1px solid rgba(201,219,225,.35); padding: 1.2rem; border-radius: .7rem; }
.hero .side-links { border-color: var(--green); }
.hero .side-links h2, .hero .side-links a { color: #d6e8e7; }

.hero-search label { display: block; font-weight: 700; margin-bottom: .6rem; }
.search-row { display: flex; gap: .5rem; }
.search-row input, .search-field, .newsletter input, .calc-input { width: 100%; border: 1px solid var(--line); border-radius: .4rem; background: var(--white); color: var(--ink); padding: .78rem .85rem; }
.hero-search input { border: 0; min-width: 0; }
.hero-search button { border: 0; border-radius: .4rem; padding: 0 1rem; background: var(--green); color: #072a26; font-weight: 700; }
.autocomplete { list-style: none; padding: 0; margin: .45rem 0 0; }
.autocomplete li a { display: block; color: #d6e8e7; padding: .25rem 0; text-decoration: none; font-size: .9rem; }
.autocomplete li a:hover { color: #8ee4bd; }

.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section h2, .page-intro h1 { color: var(--navy); font: 600 clamp(2rem, 4vw, 3.2rem)/1.02 var(--font-display); letter-spacing: -.055em; margin: .45rem 0 0; }
.section-header p { max-width: 31rem; color: var(--muted); margin: 0; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; gap: 1.2rem; }
.story-card { background: var(--white); border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; display: flex; flex-direction: column; }
.story-image { display: block; position: relative; aspect-ratio: 1.55 / 1; overflow: hidden; background: var(--mint); }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-card-body { padding: 1.25rem; }
.story-meta { display: flex; flex-wrap: wrap; gap: .45rem .7rem; align-items: center; color: var(--muted); font-size: .78rem; font-weight: 600; }
.category-label { color: var(--green-dark); text-transform: uppercase; letter-spacing: .08em; }
.story-card h3 { font: 600 1.35rem/1.1 var(--font-display); margin: .75rem 0 .55rem; letter-spacing: -.035em; }
.story-card h3 a { color: var(--navy); text-decoration: none; }
.story-card p { color: var(--muted); margin: 0; }
.empty-state { border: 1px dashed var(--line); border-radius: .5rem; padding: 1.4rem; color: var(--muted); }

.topic-band { background: var(--mint); }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .8rem; }
.topic-tile { background: var(--paper); color: var(--navy); border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line)); min-height: 8.7rem; padding: 1.15rem; text-decoration: none; border-radius: .5rem; transition: transform .2s ease, border-color .2s ease; }
.topic-tile:hover { transform: translateY(-3px); border-color: var(--green); }
.topic-icon { width: 2rem; height: 2rem; color: var(--green-dark); margin-bottom: .8rem; }
.topic-tile strong { display: block; font: 600 1.08rem var(--font-display); }
.topic-tile span { display: block; color: var(--muted); font-size: .88rem; margin-top: .2rem; }

.featured-guide { background: var(--sand); }
.guide-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.guide-image { aspect-ratio: 1.2 / 1; overflow: hidden; border-radius: .7rem; }
.guide-image img { width: 100%; height: 100%; object-fit: cover; }
.guide-copy h2 { max-width: 12ch; }
.guide-copy p { color: var(--muted); max-width: 34rem; }
.check-list { padding: 0; list-style: none; margin: 1.5rem 0; }
.check-list li { margin: .7rem 0; padding-left: 1.7rem; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green-dark); font-weight: 700; }

.tools-strip { background: var(--navy); color: #f1f8f7; }
.tools-strip h2 { color: #fff; }
.tools-strip .section-kicker { color: #8ee4bd; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.tool-card { border: 1px solid #456275; padding: 1.35rem; border-radius: .55rem; }
.tool-card strong { display: block; font: 600 1.25rem var(--font-display); }
.tool-card p { color: #bfd1d5; margin: .4rem 0 1rem; }
.tool-card a { color: #8ee4bd; font-weight: 700; }

.newsletter { background: var(--green); color: #082b28; }
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.newsletter h2 { color: #082b28; font-size: 2rem; }
.newsletter p { max-width: 32rem; margin: 0; }
.newsletter-form { display: flex; gap: .5rem; min-width: min(100%, 26rem); }
.newsletter-form input { border: 0; }
.newsletter-form button { border: 1px solid #082b28; background: #082b28; color: #fff; border-radius: .4rem; padding: 0 1rem; font-weight: 700; }
.form-status { font-weight: 600; margin-top: .7rem; }

.page-intro { padding: 4.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-intro p { max-width: 45rem; color: var(--muted); font-size: 1.15rem; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 2rem; align-items: start; }
.rail-layout:has([data-side-links][hidden]) { grid-template-columns: minmax(0, 1fr); }
[data-side-links][hidden] { display: none; }
.side-links { border-left: 2px solid var(--green); padding-left: 1rem; position: sticky; top: 1.5rem; }
.home-rail { margin-block: 0 2rem; }
.home-rail > .home-rail-spacer { min-height: 1px; }
.side-links h2 { font: 600 1rem var(--font-display); color: var(--navy); margin: 0 0 .8rem; }
.side-links ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; }
.side-links li + li { margin-top: .65rem; }
.side-links a { color: var(--muted); }
.archive-tools { display: flex; gap: .75rem; flex-wrap: wrap; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.archive-tools form { flex: 1 1 18rem; }
.filter-list { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.filter-list a { border: 1px solid var(--line); border-radius: 999px; color: var(--ink); padding: .35rem .7rem; text-decoration: none; font-size: .85rem; }
.archive-results { padding-top: 1.6rem; }

.content-band { padding: 3rem; border-radius: .75rem; background: var(--white); border: 1px solid var(--line); }
.content-band h2 { margin-top: 0; }
.content-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.mini-table { width: 100%; border-collapse: collapse; margin-top: 1.2rem; }
.mini-table th, .mini-table td { padding: .75rem .4rem; border-bottom: 1px solid var(--line); text-align: left; }
.mini-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .65fr); gap: 1.25rem; align-items: start; }
.calculator { background: var(--white); border: 1px solid var(--line); border-radius: .7rem; padding: 1.5rem; }
.calculator h2 { margin-top: 0; }
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.calc-field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.calc-result { padding: 1.25rem; border-radius: .5rem; background: var(--mint); margin-top: 1rem; }
.calc-result strong { display: block; font: 600 2.2rem/1 var(--font-display); color: var(--green-dark); }
.calc-note { color: var(--muted); font-size: .9rem; }
.tool-explainer { padding: 1.5rem; background: var(--navy); color: #deedee; border-radius: .7rem; }
.tool-explainer h2 { color: #fff; margin-top: 0; }
.tool-explainer li + li { margin-top: .8rem; }

.article-shell { padding: 3.5rem 0 5rem; }
.byline { display: flex; gap: .8rem; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .8rem 0; margin-bottom: 1.8rem; }
.byline[hidden] { display: none; }
.byline img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }
.article-header h1 { font: 600 clamp(2.3rem, 5vw, 4.5rem)/.98 var(--font-display); color: var(--navy); max-width: 17ch; letter-spacing: -.06em; }
.article-deck { color: var(--muted); font-size: 1.2rem; max-width: 42rem; }
.article-cover { max-height: 32rem; width: 100%; object-fit: cover; border-radius: .7rem; margin: 2rem 0; }
.prose { max-width: 46rem; }
.prose p, .prose li { font-size: 1.13rem; line-height: 1.72; }
.prose h2 { color: var(--navy); font: 600 2rem/1.1 var(--font-display); margin-top: 2.4rem; }
.prose h3 { color: var(--navy); font: 600 1.35rem/1.2 var(--font-display); margin-top: 2rem; }
.prose a { color: var(--link); font-weight: 600; }

.site-footer { background: var(--navy-deep); color: #bbd0d5; padding: 3rem 0 1.4rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-brand { color: #fff; }
.footer-brand .wordmark { color: #fff; }
.site-footer h2 { color: #fff; font: 600 1rem var(--font-display); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: .4rem; }
.site-footer a { color: #bbd0d5; }
.footer-bottom { border-top: 1px solid #2d4857; margin-top: 2rem; padding-top: 1rem; font-size: .85rem; display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 850px) {
  .header-inner, .page-wrap, .footer-inner { width: min(var(--measure), calc(100% - 2rem)); }
  .header-inner { gap: 1rem; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); }
  .primary-nav a { display: block; padding: .65rem; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .hero-grid, .guide-grid, .calculator-layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero::after { inset: 42% 0 0; background: linear-gradient(180deg, var(--navy-deep) 4%, transparent 80%), url('https://imagedelivery.net/W0Tyu0H3jD0178dqoxnJSA/788e6a88-3772-4cf5-57b4-f94f87901a00/public') center/cover; }
  .hero h1 { max-width: 12ch; }
  .tools-grid { grid-template-columns: 1fr; }
  .newsletter-inner, .newsletter-form { display: grid; }
  .newsletter-form button { min-height: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .header-inner { min-height: 4.8rem; }
  .wordmark { font-size: 1.22rem; }
  .brand-mark { width: 2.4rem; height: 2.4rem; }
  .hero { padding-top: 3.5rem; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4.7rem); }
  .section-header { display: block; }
  .section-header p { margin-top: .8rem; }
  .content-columns, .calc-grid { grid-template-columns: 1fr; }
  .content-band { padding: 1.3rem; }
  .rail-layout { display: block; }
  .side-links { position: static; margin-top: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

