:root {
  --navy-950: #071526;
  --navy-900: #0b2038;
  --navy-800: #123352;
  --navy-700: #1b4663;
  --ink: #112235;
  --muted: #667583;
  --line: #d6e0e5;
  --paper: #f5f8f7;
  --white: #ffffff;
  --gold: #f4bd45;
  --gold-deep: #c98718;
  --emerald: #11866d;
  --emerald-dark: #08634f;
  --coral: #e77d5b;
  --link: #087660;
  --footer: #071526;
  --content-measure: min(1180px, calc(100% - 3rem));
  --font-display: 'Lora', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-synthesis: none;
}

html[data-theme="dark"], html.dark {
  --ink: #eef5f3;
  --muted: #a9bbb9;
  --line: #2e4658;
  --paper: #0a1929;
  --white: #10283e;
  --navy-950: #eaf3f2;
  --navy-900: #dbe9e6;
  --navy-800: #bdd0cd;
  --gold: #ffd064;
  --gold-deep: #e3a531;
  --emerald: #50c5a5;
  --emerald-dark: #70d8bc;
  --link: #68d9bd;
  --footer: #06111f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); position: relative; z-index: 5; }
.header-inner { width: var(--content-measure); min-height: 5.75rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy-950); }
.brand-mark { width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--gold); color: var(--navy-950); display: grid; place-items: center; box-shadow: 0 .3rem 0 var(--emerald); flex: 0 0 auto; }
.brand-mark svg { width: 1.65rem; height: 1.65rem; }
.brand-name { font-family: var(--font-display); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 700; letter-spacing: -.035em; }
.brand-name em { color: var(--emerald); font-style: normal; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--emerald); }
.header-controls { display: flex; align-items: center; gap: .55rem; }
[data-theme-toggle], .menu-toggle { width: 2.55rem; height: 2.55rem; border: 1px solid var(--line); color: var(--ink); background: transparent; border-radius: 50%; display: grid; place-items: center; }
[data-theme-toggle] { font-size: 1.05rem; }
.menu-toggle { display: none; }

.page-wrap { width: var(--content-measure); margin: 0 auto; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 2.7rem; align-items: start; padding: 4.5rem 0 6rem; }
.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(--gold); padding: .4rem 0 0 1rem; position: sticky; top: 1.5rem; }
.side-links h2 { margin: 0 0 1rem; color: var(--muted); font: 600 .7rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.side-links ol { list-style: none; padding: 0; margin: 0; }
.side-links li + li { margin-top: .65rem; }
.side-links a { color: var(--ink); font-size: .78rem; line-height: 1.35; text-decoration: none; }
.side-links a:hover { color: var(--emerald); }

.eyebrow { color: var(--emerald); font: 700 .7rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy-950); line-height: 1.03; letter-spacing: -.035em; }
h1 { font-size: clamp(2.8rem, 6.2vw, 5.9rem); margin: .8rem 0 1.4rem; max-width: 10ch; }
h2 { font-size: clamp(2rem, 3.7vw, 3.35rem); margin: 0 0 1rem; }
h3 { font-size: 1.45rem; margin: 0 0 .6rem; }
p { margin: 0 0 1rem; }
.lede { max-width: 38rem; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.25rem); line-height: 1.65; }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-intro p { color: var(--muted); max-width: 29rem; margin-bottom: .25rem; }

.hero { position: relative; min-height: 39rem; display: grid; align-items: end; overflow: hidden; background: var(--navy-900); color: white; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; opacity: .72; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,19,34,.96) 0%, rgba(7,25,43,.82) 45%, rgba(8,26,42,.18) 100%), linear-gradient(0deg, rgba(4,19,28,.72), transparent 55%); }
.hero-content { position: relative; z-index: 1; width: var(--content-measure); margin: 0 auto; padding: 7.5rem 0 5.5rem; }
.hero h1 { color: white; max-width: 9ch; }
.hero .lede { color: #dae7e7; max-width: 34rem; }
.hero .eyebrow { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.2rem; border: 1px solid transparent; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; transition: transform .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--navy-950); }
.btn-secondary { border-color: rgba(255,255,255,.45); color: white; }
.btn-dark { background: var(--navy-900); color: white; }
.btn-green { background: var(--emerald); color: white; }

.trust-strip { background: var(--navy-950); color: var(--paper); }
.trust-inner { width: var(--content-measure); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 1.35rem 0; }
.trust-item { display: flex; gap: .8rem; align-items: center; font-size: .82rem; }
.trust-number { color: var(--gold); font: 700 1.2rem var(--font-mono); }

.section { padding: 6rem 0; }
.section-measure { width: var(--content-measure); margin: 0 auto; }
.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.value-card { background: var(--paper); padding: 2rem; min-height: 14rem; }
.value-card .index { color: var(--gold-deep); font: 700 .75rem var(--font-mono); }
.value-card h3 { margin-top: 2.5rem; }
.value-card p { color: var(--muted); font-size: .92rem; }

.offer-band { background: var(--emerald); color: white; }
.offer-band h2 { color: white; max-width: 12ch; }
.offer-band .section-intro p { color: #d4f0e9; }
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.offer-card { background: rgba(4, 48, 40, .28); border: 1px solid rgba(255,255,255,.2); padding: 1.5rem; display: flex; flex-direction: column; min-height: 16rem; }
.offer-card strong { color: var(--gold); font: 700 .72rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.offer-card h3 { color: white; margin-top: auto; }
.offer-card p { color: #d4f0e9; font-size: .88rem; }
.offer-card a { color: white; font-size: .78rem; font-weight: 700; text-decoration: none; }

.news-section { background: #e9f0ee; }
html[data-theme="dark"] .news-section, html.dark .news-section { background: #10283a; }
.news-grid, .archive-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; gap: 1.35rem; }
.story-card { background: var(--paper); border: 1px solid var(--line); min-width: 0; }
.story-image { display: block; position: relative; aspect-ratio: 1.55; overflow: hidden; background: var(--navy-800); }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-card > div:not(.story-image), .story-card > p, .story-card > h3, .story-card > a:not(.story-image) { margin-left: 1.15rem; margin-right: 1.15rem; }
.story-meta { display: flex; gap: .5rem .75rem; flex-wrap: wrap; align-items: center; color: var(--muted); font: 700 .67rem var(--font-mono); letter-spacing: .07em; text-transform: uppercase; }
.story-card .story-meta { margin-top: 1rem; }
.category-label { color: var(--emerald); }
.story-card h3 { font-size: 1.25rem; line-height: 1.12; margin-top: .65rem; }
.story-card h3 a { text-decoration: none; }
.story-card p { color: var(--muted); font-size: .88rem; }
.empty-state { color: var(--muted); }

.split-promo { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); min-height: 30rem; background: var(--navy-900); color: white; }
.split-promo figure { margin: 0; min-height: 20rem; overflow: hidden; }
.split-promo figure img { width: 100%; height: 100%; object-fit: cover; }
.split-copy { padding: clamp(2.5rem, 6vw, 5rem); align-self: center; }
.split-copy h2 { color: white; max-width: 11ch; }
.split-copy p { color: #c4d7d8; max-width: 32rem; }
.check-list { padding: 0; margin: 1.5rem 0 2rem; list-style: none; display: grid; gap: .8rem; }
.check-list li { display: flex; align-items: start; gap: .65rem; color: #e4eeed; font-size: .92rem; }
.check-list li::before { content: '✓'; color: var(--gold); font-weight: 700; }

.cta-section { padding: 5rem 0 6rem; }
.cta-card { background: var(--gold); padding: clamp(2.4rem, 6vw, 5rem); display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.cta-card h2 { max-width: 12ch; }
.cta-card p { max-width: 27rem; color: #60451a; }

.page-hero { padding: 5.5rem 0 4rem; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--paper), color-mix(in srgb, var(--gold) 12%, var(--paper))); }
.page-hero h1 { max-width: 12ch; }
.page-hero .lede { max-width: 42rem; }
.article-hero { padding-bottom: 3rem; }

.archive-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.archive-search { display: flex; flex: 1 1 20rem; max-width: 32rem; }
.archive-search input { width: 100%; min-height: 3rem; padding: .7rem 1rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 0; }
.filter-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-list a { border: 1px solid var(--line); padding: .5rem .8rem; color: var(--muted); font-size: .75rem; text-decoration: none; }
.filter-list a:hover { color: var(--emerald); border-color: var(--emerald); }
.archive-results { margin-top: 2rem; }
.archive-results .story-card { display: grid; grid-template-columns: minmax(9rem, .32fr) minmax(0, .68fr); }
.archive-results .story-image { aspect-ratio: 1.35; }
.archive-results .story-card > div:not(.story-image), .archive-results .story-card > p, .archive-results .story-card > h3, .archive-results .story-card > a:not(.story-image) { margin-left: 1.25rem; margin-right: 1.25rem; }

.feature-table { border-top: 1px solid var(--line); }
.table-row { display: grid; grid-template-columns: 1.1fr .9fr 1.5fr auto; gap: 1rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.table-row strong { font-family: var(--font-display); font-size: 1.2rem; }
.table-row span { color: var(--muted); font-size: .82rem; }
.badge { width: fit-content; padding: .35rem .55rem; background: color-mix(in srgb, var(--emerald) 14%, transparent); color: var(--emerald-dark); font: 700 .65rem var(--font-mono); text-transform: uppercase; }

.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.info-card { border: 1px solid var(--line); padding: 1.7rem; }
.info-card p { color: var(--muted); font-size: .93rem; }
.info-card a, .prose a { color: var(--link); text-decoration-thickness: .1em; text-underline-offset: .15em; }
.callout { border-left: 4px solid var(--gold); padding: 1.4rem 1.6rem; background: color-mix(in srgb, var(--gold) 14%, var(--paper)); margin: 2rem 0; }
.callout p:last-child { margin-bottom: 0; }

.byline { display: flex; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: 1rem 0 1.5rem; margin-bottom: 2rem; }
.byline[hidden] { display: none; }
.byline img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; background: var(--line); }
.byline strong { display: block; }
.byline p { color: var(--muted); font-size: .8rem; margin: .2rem 0 0; }
#article-content { max-width: 50rem; }
.article-header h1 { max-width: 16ch; font-size: clamp(2.7rem, 5vw, 5.2rem); }
.article-deck { color: var(--muted); font-size: 1.15rem; max-width: 42rem; }
.article-cover { margin: 2rem 0 3rem; aspect-ratio: 1.9; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-family: var(--font-body); }
.prose p, .prose li { color: var(--ink); font-size: 1.05rem; line-height: 1.85; }
.prose p { margin: 0 0 1.5rem; }
.prose h2 { font-size: 2rem; margin: 3rem 0 1rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }

.site-footer { background: var(--footer); color: #dce9e7; padding: 3rem 0; }
.footer-inner { width: var(--content-measure); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; align-items: start; }
.footer-brand .brand { color: white; }
.footer-brand p { color: #a9bbb9; max-width: 19rem; font-size: .85rem; margin-top: 1rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.footer-nav a { color: #dce9e7; font-size: .78rem; text-decoration: none; }
.footer-note { width: var(--content-measure); margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); color: #a9bbb9; font-size: .73rem; }

@media (max-width: 800px) {
  .header-inner { min-height: 4.8rem; }
  .menu-toggle { display: grid; }
  .site-nav { display: none; position: absolute; top: 4.8rem; left: 0; right: 0; padding: 1.25rem var(--content-measure); background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: start; }
  .site-nav.is-open { display: flex; }
  .rail-layout { grid-template-columns: minmax(0, 1fr); padding-top: 3rem; }
  .side-links { position: static; order: 2; }
  .trust-inner, .value-grid, .offer-grid, .info-grid { grid-template-columns: 1fr; }
  .trust-inner { gap: 1rem; }
  .section-intro, .cta-card, .footer-inner { align-items: start; flex-direction: column; }
  .section-intro { display: flex; }
  .split-promo { grid-template-columns: 1fr; }
  .split-promo figure { min-height: 18rem; }
  .table-row { grid-template-columns: 1fr 1fr; }
  .table-row .btn { grid-column: 2; grid-row: 1 / span 2; }
  .archive-results .story-card { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  :root { --content-measure: min(100% - 2rem, 1180px); }
  h1 { font-size: clamp(2.7rem, 14vw, 4rem); }
  .hero { min-height: 37rem; }
  .hero-content { padding: 6rem 0 3.5rem; }
  .section { padding: 4rem 0; }
  .page-hero { padding: 4rem 0 3rem; }
  .table-row { display: flex; flex-wrap: wrap; }
  .table-row .btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
