:root {
  --bg: #0f0f0f;
  --surface: #181817;
  --surface-2: #22211f;
  --paper: #f3ede2;
  --paper-soft: #d7ccbb;
  --muted: #a99d8a;
  --gold: #c9a227;
  --gold-soft: #e7c65f;
  --green: #24483b;
  --line: rgba(201, 162, 39, .22);
  --line-strong: rgba(201, 162, 39, .45);
  --wa: #1a7a42;
  --content: 760px;
  --wide: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.article-body [id], .hub-grid [id], main > [id] { scroll-margin-top: 6rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper-soft);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .18;
  background-image: radial-gradient(circle at 20% 15%, rgba(201, 162, 39, .16), transparent 23%), radial-gradient(circle at 80% 65%, rgba(36, 72, 59, .35), transparent 27%);
}
a { color: var(--gold-soft); text-underline-offset: .2em; }
a:hover { color: var(--paper); }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 4px; }

.container { width: min(calc(100% - 3rem), var(--wide)); margin-inline: auto; }
.reading { width: min(calc(100% - 3rem), var(--content)); margin-inline: auto; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: .75rem 1rem;
  background: var(--paper);
  color: #0f0f0f;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 15, 15, .94);
  backdrop-filter: blur(14px);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  color: var(--paper);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.32rem;
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-soft); }
.nav-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .9rem 2rem;
  border: 0;
  border-radius: 4px;
  background: var(--gold);
  color: #0f0f0f;
  line-height: 1.9;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.nav-links a.nav-cta { color: #0f0f0f; font-size: .9rem; font-weight: 700; letter-spacing: .08em; }
.nav-links a.nav-cta:hover {
  border-color: var(--gold-soft);
  background: var(--gold-soft);
  color: #0f0f0f;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 162, 39, .35);
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
.mobile-menu-toggle svg { width: 22px; height: 22px; }
.mobile-menu-toggle:hover { border-color: var(--gold); color: var(--gold-soft); }
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 5rem 1.5rem;
  background: rgba(15, 15, 15, .98);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--paper);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.7rem, 8vw, 2.25rem);
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { color: var(--gold-soft); }
.mobile-nav a.nav-cta {
  width: min(100%, 320px);
  margin-top: .5rem;
  color: #0f0f0f;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: .84rem;
}
.mobile-nav a.nav-cta:hover { color: #0f0f0f; }
.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}
.mobile-menu-close:hover { border-color: var(--gold); color: var(--gold-soft); }
body.mobile-menu-open { overflow: hidden; }

.breadcrumbs {
  padding-top: 2rem;
  color: var(--muted);
  font-size: .82rem;
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: .55rem; color: #685f52; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }

.article-hero { padding: clamp(3.5rem, 8vw, 7.5rem) 0 3.5rem; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, h3 { color: var(--paper); font-family: "DM Serif Display", Georgia, serif; font-weight: 400; line-height: 1.14; text-wrap: balance; }
h1 { max-width: 960px; margin: 0; font-size: clamp(2.75rem, 7vw, 5.7rem); letter-spacing: -.025em; }
.dek { max-width: 780px; margin: 1.5rem 0 0; color: var(--paper-soft); font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.65; }
.article-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-top: 1.6rem; color: var(--muted); font-size: .83rem; }
.article-meta span + span { position: relative; }
.article-meta span + span::before { content: "·"; position: absolute; left: -.78rem; }

.hero-figure { width: min(calc(100% - 3rem), var(--wide)); margin: 0 auto 4rem; }
.hero-figure img { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); object-fit: cover; }
figcaption { margin-top: .7rem; color: var(--muted); font-size: .76rem; line-height: 1.5; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: clamp(3rem, 7vw, 6rem); width: min(calc(100% - 3rem), var(--wide)); margin-inline: auto; align-items: start; }
.article-body { min-width: 0; max-width: var(--content); }
.article-body > :first-child { margin-top: 0; }
.article-body p, .article-body li { color: var(--paper-soft); }
.article-body p { margin: 1.2rem 0; }
.article-body h2 { margin: 4rem 0 1.2rem; padding-top: .5rem; font-size: clamp(2rem, 4vw, 3rem); }
.article-body h3 { margin: 2.5rem 0 .8rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.article-body ul, .article-body ol { padding-left: 1.35rem; }
.article-body li { margin: .65rem 0; padding-left: .25rem; }
.article-body strong { color: var(--paper); }
.article-body hr { margin: 4rem 0; border: 0; border-top: 1px solid var(--line); }
.article-body blockquote {
  margin: 2.5rem 0;
  padding: 1.4rem 1.5rem;
  border-left: 3px solid var(--gold);
  background: rgba(201, 162, 39, .07);
  color: var(--paper);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.25rem;
}

.toc { position: sticky; top: 96px; padding: 1.25rem 0 1.25rem 1.25rem; border-left: 1px solid var(--line); }
.toc-title { margin: 0 0 .8rem; color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: .6rem 0; line-height: 1.45; }
.toc a { color: var(--muted); font-size: .82rem; text-decoration: none; }
.toc a:hover { color: var(--paper); }

.answer-box, .note, .warning, .source-box, .cta-box {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.answer-box { border-top: 3px solid var(--gold); }
.answer-box h2, .answer-box h3, .note h3, .warning h3, .source-box h2, .source-box h3 { margin-top: 0; padding-top: 0; }
.answer-box p:last-child, .note p:last-child, .warning p:last-child, .source-box p:last-child { margin-bottom: 0; }
.note { border-left: 3px solid var(--green); }
.warning { border-left: 3px solid #a7623c; }
.kicker { color: var(--gold); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.steps { margin: 2rem 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; margin: 0; padding: 1.4rem 0 1.4rem 3.8rem; border-top: 1px solid var(--line); counter-increment: steps; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.25rem;
  color: var(--gold);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.45rem;
}

.checklist { margin: 2rem 0; padding: 0; list-style: none; }
.checklist li { position: relative; margin: 0; padding: .9rem 0 .9rem 2rem; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "□"; position: absolute; left: 0; color: var(--gold); font-size: 1.2rem; }

.table-wrap { margin: 2rem 0; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: rgba(201, 162, 39, .09); color: var(--paper); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
td { color: var(--paper-soft); font-size: .94rem; }
tr:last-child td { border-bottom: 0; }

.source-list { padding-left: 1.15rem; }
.source-list li { font-size: .9rem; }
.disclaimer { color: var(--muted); font-size: .83rem; }

.cta-box { margin-top: 4rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: linear-gradient(145deg, rgba(201, 162, 39, .12), rgba(36, 72, 59, .18)); }
.reading.cta-box { margin: 4rem auto 0; }
.cta-box h2 { margin: 0 0 .8rem; padding: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: .8rem;
  padding: .9rem 2rem;
  border-radius: 4px;
  background: var(--gold);
  color: #0f0f0f;
  line-height: 1.9;
  cursor: pointer;
  border: 0;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { background: var(--gold-soft); color: #0f0f0f; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201, 162, 39, .35); }
.button-secondary { margin-left: .6rem; border: 1px solid var(--line-strong); background: transparent; color: var(--paper); }
.button-secondary:hover { border-color: var(--gold); background: rgba(201, 162, 39, .1); color: var(--paper); box-shadow: none; }
.button-group { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.button-group .button { margin: 0; }

.related { margin-top: 5rem; padding: 5rem 0; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  min-height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.card, .hub-card { transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.card:hover, .card:focus-within, .hub-card:hover, .hub-card:focus-within {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-3px);
}
.card .kicker { display: block; margin-bottom: .65rem; }
.card h3 { margin: 0 0 .65rem; font-size: 1.4rem; }
.card h3 a { color: var(--paper); text-decoration: none; }
.card p { margin: 0; color: var(--muted); font-size: .88rem; }

.hub-hero { padding: clamp(4rem, 9vw, 8rem) 0 4rem; border-bottom: 1px solid var(--line); }
.hub-intro { max-width: 760px; }
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; padding: 4rem 0; }
.hub-card { display: flex; flex-direction: column; min-height: 320px; padding: 2rem; border: 1px solid var(--line); background: var(--surface); }
.hub-card .number { color: var(--gold); font-family: "DM Serif Display", Georgia, serif; font-size: 2rem; opacity: .7; }
.hub-card h2 { margin: auto 0 .8rem; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.hub-card h2 a { color: var(--paper); text-decoration: none; }
.hub-card p { margin: 0; color: var(--muted); }
.hub-card .read { display: inline-block; margin-top: 1rem; font-size: .8rem; font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }

.site-footer { margin-top: 5rem; padding: 3.5rem 0 2rem; border-top: 1px solid var(--line); background: #090909; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-title { margin: 0 0 .7rem; color: var(--paper); font-family: "DM Serif Display", Georgia, serif; font-size: 1.3rem; }
.footer-copy, .footer-links a, .footer-links span { color: var(--muted); font-size: .86rem; }
.footer-links { display: grid; gap: .45rem; }
.footer-links a { text-decoration: none; }
.footer-links > span:first-child,
.footer-grid > div:not(:first-child) > .footer-title {
  margin: 0 0 .35rem;
  color: var(--gold);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }

.wa-float {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.4rem;
  border-radius: 4px;
  background: var(--wa);
  color: #fff;
  line-height: 1.9;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.wa-float svg { flex-shrink: 0; }

@media (max-width: 900px) {
  .article-layout { display: block; }
  .toc { position: static; margin-bottom: 2.5rem; padding: 1.25rem; border: 1px solid var(--line); }
  .article-body { max-width: none; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .container, .reading, .hero-figure, .article-layout { width: min(calc(100% - 3rem), var(--wide)); }
  .nav { min-height: 62px; }
  .nav-links a:not(.nav-cta) { display: none; }
  html.has-mobile-nav .site-header .nav-links { display: none; }
  html.has-mobile-nav .mobile-menu-toggle { display: inline-flex; }
  .article-hero { padding-top: 3rem; }
  .article-meta { display: grid; gap: .2rem; }
  .article-meta span + span::before { display: none; }
  .hub-grid, .footer-grid { grid-template-columns: 1fr; }
  .hub-card { min-height: 260px; }
  .button, .button-secondary { display: flex; justify-content: center; margin-left: 0; }
  .button-secondary { margin-top: .6rem; }
  .button-group { display: grid; }
  .button-group .button-secondary { margin-top: 0; }
  .wa-float .wa-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-cta, .button, .card, .hub-card, .wa-float { transition: none; }
  .nav-links a.nav-cta:hover, .button:hover, .card:hover, .card:focus-within, .hub-card:hover, .hub-card:focus-within, .wa-float:hover { transform: none; }
}

@media print {
  body { background: #fff; color: #111; font-size: 11pt; }
  body::before, .site-header, .breadcrumbs, .toc, .wa-float, .related, .site-footer, .cta-box { display: none !important; }
  .article-hero { padding: 0 0 1rem; }
  .article-layout, .hero-figure { width: 100%; display: block; }
  .article-body { max-width: none; }
  h1, h2, h3, .article-body strong { color: #111; }
  .article-body p, .article-body li, .dek, .article-meta { color: #222; }
  a { color: #111; text-decoration: underline; }
  .answer-box, .note, .warning, .source-box { background: #fff; border-color: #777; break-inside: avoid; }
  .checklist li { border-color: #bbb; }
}
