:root {
  --ink: #0f1e2e;
  --navy: #123a5a;
  --blue: #1f6fb2;
  --coral: #e4573d;
  --sand: #f7f2e8;
  --paper: #ffffff;
  --muted: #5c6b7a;
  --line: #dde3e8;
  --success: #1e7a4c;
  --warning: #a15c00;
  --soft-blue: #eaf1f8;
  --soft-coral: #fbeae5;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 30px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; }
.logo-text { font-size: 18px; font-weight: 500; color: var(--navy); letter-spacing: -.02em; }
.logo-text strong { font-weight: 700; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 14px; font-weight: 500; color: #31465a; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 9px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 600; font-size: 14.5px;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 10px 24px rgba(18, 58, 90, .16); }
.btn-primary:hover { background: #0d2e48; }
.btn-accent { background: var(--coral); color: #fff; }
.btn-accent:hover { background: #d94a32; }
.btn-ghost { background: transparent; border-color: rgba(18, 58, 90, .22); color: var(--navy); }
.btn-ghost:hover { background: rgba(18, 58, 90, .04); }
.btn-light { background: #fff; color: var(--navy); }
.btn-sm { min-height: 42px; padding: 0 15px; font-size: 13.5px; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); padding-top: 26px;
}
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs span[aria-current="page"] { color: #33475b; }

/* Article hero */
.article-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sand) 0%, #fbf8f2 100%);
  border-bottom: 1px solid var(--line);
  padding-bottom: 52px;
}
.article-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(18, 58, 90, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 900px; }
.kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral); margin: 22px 0 14px;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.04; letter-spacing: -.035em; font-weight: 600;
  margin: 0 0 20px;
}
.dek {
  font-size: 19px; line-height: 1.6; color: #435466;
  max-width: 790px; margin: 0 0 22px;
}
.byline {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.byline strong { color: var(--navy); font-weight: 600; }
.byline .sep { width: 4px; height: 4px; border-radius: 50%; background: #aab7c3; }

/* Layout */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "main aside";
  gap: 52px; padding: 54px 0 80px;
}
.article-main { grid-area: main; min-width: 0; }
.article-aside { grid-area: aside; min-width: 0; }

/* TOC */
.toc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 19px; position: sticky; top: 96px;
}
.toc-card h2 {
  font-family: var(--font-body); font-size: 11px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); margin: 0 0 12px;
}
.toc-card ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc-card li { counter-increment: toc; margin-bottom: 7px; }
.toc-card a {
  display: flex; gap: 8px; font-size: 12.5px; line-height: 1.45; color: #3d5062;
  padding: 3px 0;
}
.toc-card a::before {
  content: counter(toc, decimal-leading-zero); color: #9aa8b5; font-size: 10px;
  font-weight: 600; padding-top: 2px; min-width: 16px;
}
.toc-card a:hover { color: var(--blue); }
.side-cta {
  margin-top: 14px; background: var(--navy); color: #fff;
  border-radius: 14px; padding: 19px; position: sticky; top: 360px;
}
.side-cta p { font-size: 12.5px; color: rgba(255,255,255,.74); line-height: 1.55; margin: 0 0 13px; }
.side-cta strong { display: block; font-size: 15px; margin-bottom: 5px; color: #fff; }
.side-cta .btn { width: 100%; }
.side-cta .small { font-size: 10.5px; color: rgba(255,255,255,.5); margin-top: 9px; }

/* Article typography */
.article-main p { font-size: 17px; line-height: 1.75; color: #33475b; margin: 0 0 18px; }
.article-main .lead { font-size: 19px; line-height: 1.7; color: #2d4052; }
.article-main h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.1; letter-spacing: -.03em; font-weight: 600;
  margin: 52px 0 16px; scroll-margin-top: 100px;
}
.article-main h3 {
  font-size: 20px; line-height: 1.3; letter-spacing: -.015em;
  margin: 28px 0 9px; scroll-margin-top: 100px;
}
.article-main h2 + p, .article-main h3 + p { margin-top: 0; }
.article-main strong { color: var(--ink); }
.article-main a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article-main a:hover { color: var(--navy); }
.article-main ul, .article-main ol { margin: 0 0 18px; padding-left: 22px; }
.article-main li { font-size: 16.5px; line-height: 1.7; color: #33475b; margin-bottom: 7px; }
.article-main li::marker { color: var(--coral); }
.article-main hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* Callouts */
.callout {
  border-radius: 12px; padding: 17px 19px; margin: 24px 0;
  font-size: 15px; line-height: 1.65; color: #33475b;
}
.callout p:last-child { margin-bottom: 0; }
.callout-blue { background: #f1f7fc; border: 1px solid #cfe0ef; }
.callout-coral { background: #fff8f5; border: 1px solid #f0d5ce; color: #6b4a43; }
.callout-green { background: #f0f8f2; border: 1px solid #c9e5d2; color: #24583a; }
.callout strong { color: inherit; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 22px 0 26px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 620px; background: #fff; }
caption {
  caption-side: top; text-align: left; font-size: 11px; color: var(--muted);
  padding: 9px 13px; background: #f7f9fb; border-bottom: 1px solid var(--line);
}
th, td {
  text-align: left; padding: 10px 13px; border-bottom: 1px solid #eef2f5;
  font-size: 13.5px; line-height: 1.55; vertical-align: top;
}
th { background: #f7f9fb; color: var(--navy); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); }

/* Step list */
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.steps-list > li {
  position: relative; padding: 0 0 24px 54px; margin: 0; border-left: 2px solid #e3eaf0;
}
.steps-list > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps-list > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -18px; top: 0; width: 34px; height: 34px;
  border-radius: 50%; background: var(--sand); color: var(--navy);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1px solid #e2d9c9;
}
.steps-list h3 { margin: 0 0 6px; font-size: 18px; }
.steps-list p { margin: 0 0 8px; font-size: 15px; }
.steps-list .step-meta {
  font-size: 11.5px; color: var(--muted); background: #f7f9fb;
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; display: inline-block;
}

/* Diagram */
.cycle-diagram {
  background: #fbfcfd; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin: 26px 0;
}
.cycle-track { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.cycle-node {
  flex: 1 1 150px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; min-width: 0;
}
.cycle-node span {
  display: inline-block; font-size: 9px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--coral); font-weight: 700; margin-bottom: 5px;
}
.cycle-node strong { display: block; font-size: 13px; line-height: 1.3; margin-bottom: 3px; }
.cycle-node p { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 0; }
.cycle-arrow { display: grid; place-items: center; color: #b8c5d2; font-size: 16px; }

/* CTA band */
.cta-band {
  background: var(--navy); color: #fff; border-radius: 16px;
  padding: 26px 28px; margin: 38px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-band h3 { color: #fff; margin: 0 0 5px; font-size: 21px; }
.cta-band p { color: rgba(255,255,255,.72); margin: 0; font-size: 13.5px; max-width: 540px; }
.cta-band .btn { flex-shrink: 0; }

/* Checklist */
.checklist-card {
  background: var(--sand); border: 1px solid #e6dccb; border-radius: 14px;
  padding: 22px; margin: 26px 0;
}
.checklist-card h3 { margin: 0 0 7px; font-size: 18px; }
.checklist-card p { font-size: 14px; color: #4b5d6d; margin: 0 0 14px; }
.checklist-card ul { list-style: none; padding: 0; margin: 0 0 18px; }
.checklist-card li {
  position: relative; padding-left: 24px; margin-bottom: 8px;
  font-size: 13.5px; line-height: 1.55; color: #33475b;
}
.checklist-card li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px;
  border: 1.5px solid #b6c2cc; border-radius: 3px; background: #fff;
}

/* FAQ */
.faq { margin-top: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15.5px; line-height: 1.4;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { font-size: 14.5px; color: var(--muted); line-height: 1.7; margin: 10px 0 0; }

/* Author */
.author-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: #f7f9fb; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin: 40px 0 0;
}
.author-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--soft-blue);
  color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.author-box p { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 4px 0 0; }
.author-box strong { font-size: 14px; color: var(--ink); }

/* Sources */
.sources { font-size: 13px; color: var(--muted); }
.sources li { font-size: 13px; margin-bottom: 6px; }
.sources a { word-break: break-word; }

/* Footer */
.footer { background: #0b1622; color: rgba(255,255,255,.66); padding: 46px 0 24px; font-size: 12.5px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; margin-bottom: 32px; }
.footer h4 { color: #fff; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 10px; }
.footer a { display: block; margin-bottom: 7px; color: rgba(255,255,255,.62); }
.footer a:hover { color: #fff; }
.footer .logo-text, .footer .logo-text strong { color: #fff; }
.footer-brand p { margin: 10px 0 0; max-width: 280px; line-height: 1.65; color: rgba(255,255,255,.5); }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 17px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 10.5px; color: rgba(255,255,255,.42);
}

/* Responsive */
@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr; grid-template-areas: "aside" "main";
    gap: 28px; padding-top: 34px;
  }
  .toc-card, .side-cta { position: static; }
  .side-cta { margin-top: 12px; }
  .article-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .side-cta { margin-top: 0; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-ghost { display: none; }
  .header-inner { height: 68px; }
  h1 { font-size: 39px; }
  .dek { font-size: 16.5px; }
  .article-hero { padding-bottom: 38px; }
  .article-aside { grid-template-columns: 1fr; }
  .toc-card, .side-cta { display: none; }
  .article-main p { font-size: 16px; }
  .article-main .lead { font-size: 17.5px; }
  .article-main h2 { font-size: 31px; margin-top: 42px; }
  .article-main h3 { font-size: 18.5px; }
  .article-main li { font-size: 15.5px; }
  .cta-band { padding: 21px; }
  .cta-band .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cycle-arrow { display: none; }
  .cycle-node { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
