:root {
  --paper: #f7f3ea;
  --cream: #fbf8ef;
  --ink: #111312;
  --deep: #111816;
  --muted: #59625d;
  --quiet: #858a84;
  --line: rgba(17, 19, 18, .14);
  --line-strong: rgba(17, 19, 18, .25);
  --gold: #bc8b43;
  --green: #2b765d;
  --max: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", "Avenir Next", system-ui, sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0;
  height: 3px;
  background: var(--gold);
  transform-origin: left;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 243, 234, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav-inner,
.context-inner,
.article-head-inner,
.article-shell,
.related-inner,
.article-cta-inner,
.footer-inner {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 13px; font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.brand-short { display: none; }
.nav-links { display: flex; align-items: center; gap: 24px; color: rgba(28, 32, 30, .72); font-size: 14px; }
.nav-text-link { position: relative; transition: color .2s ease; }
.nav-text-link:hover { color: var(--ink); }
.nav-text-link.is-active { color: var(--ink); font-weight: 750; }
.nav-text-link.is-active:after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 2px; background: var(--gold); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(17, 19, 18, .18);
  background: rgba(251, 248, 239, .52);
  color: #18201d;
  font: inherit;
  font-weight: 760;
}
.lang-switch svg { width: 16px; height: 16px; color: var(--gold); stroke-width: 2.15; }
.lang-short { display: none; }
.nav-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transition: transform .22s ease, background .22s ease;
}
.nav-cta:hover { transform: translateY(-2px); background: #17201d; }

.context-nav {
  position: fixed;
  top: 84px;
  left: 0;
  right: 0;
  z-index: 39;
  min-height: 50px;
  display: flex;
  align-items: center;
  color: rgba(247, 243, 234, .68);
  background: rgba(17, 24, 22, .94);
  border-bottom: 1px solid rgba(247, 243, 234, .12);
  backdrop-filter: blur(16px);
}
.context-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.context-path { min-height: 50px; display: flex; align-items: center; gap: 18px; font-size: 12px; font-weight: 700; }
.back-link { display: inline-flex; align-items: center; gap: 9px; }
.back-link:hover { color: #fff; }
.back-arrow { color: var(--gold); font-size: 17px; }
.context-divider { width: 1px; height: 18px; background: rgba(247,243,234,.22); }
.context-current { color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.context-meta { color: rgba(247,243,234,.55); font-size: 11px; font-weight: 750; text-transform: uppercase; }

.article-head {
  position: relative;
  overflow: hidden;
  padding: 204px 0 92px;
  background:
    linear-gradient(90deg, rgba(17,19,18,.045) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(rgba(17,19,18,.035) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(110deg, #fbf8ef 0%, #f4efe4 58%, #e6ebe6 100%);
}
.article-head:after { content: ""; position: absolute; top: 0; right: 0; width: 30%; height: 7px; background: var(--green); }
.article-head-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); gap: clamp(42px, 6vw, 96px); align-items: end; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.article-head h1 {
  max-width: 970px;
  margin: 30px 0 28px;
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
  font-size: clamp(48px, 5.2vw, 76px);
  line-height: .96;
  font-weight: 650;
  text-wrap: balance;
}
.article-dek { max-width: 820px; margin: 0; color: var(--muted); font-size: clamp(17px, 1.35vw, 21px); line-height: 1.55; }
.article-visual { position: relative; min-height: 410px; border: 1px solid var(--line-strong); background: var(--deep); overflow: hidden; }
.article-visual img { width: 100%; height: 100%; object-fit: cover; }
.visual-caption { position: absolute; inset: auto 0 0; padding: 16px 18px; color: #fff; background: rgba(13,17,16,.86); font-size: 11px; font-weight: 750; text-transform: uppercase; }

.article-body { background: var(--cream); border-top: 1px solid var(--line-strong); }
.article-shell { display: grid; grid-template-columns: 180px minmax(0, 760px) minmax(210px, 260px); justify-content: center; gap: clamp(34px, 5vw, 76px); padding-top: 92px; padding-bottom: 120px; }
.article-facts,
.toc { position: sticky; top: 166px; align-self: start; }
.fact { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.fact span { display: block; margin-bottom: 7px; color: var(--quiet); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.fact strong { font-size: 13px; line-height: 1.4; }
.share-link { display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-size: 12px; font-weight: 800; border: 0; padding: 0; background: transparent; cursor: pointer; }

.prose { min-width: 0; font-size: 18px; line-height: 1.78; }
.prose > :first-child { margin-top: 0; }
.prose h2,
.prose h3 { font-family: "Space Grotesk", "Manrope", system-ui, sans-serif; text-wrap: balance; scroll-margin-top: 166px; }
.prose h2 { margin: 72px 0 24px; font-size: clamp(32px, 3.3vw, 48px); line-height: 1.04; font-weight: 650; }
.prose h3 { margin: 48px 0 18px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; font-weight: 650; }
.prose p { margin: 0 0 26px; }
.prose strong { color: #151a18; font-weight: 800; }
.prose em { color: #4d5752; }
.prose ul,
.prose ol { margin: 0 0 30px; padding-left: 1.35em; }
.prose li { margin-bottom: 11px; padding-left: 7px; }
.prose blockquote { margin: 42px 0; padding: 24px 28px; border-left: 4px solid var(--gold); background: #f0eee7; font-family: "Space Grotesk", sans-serif; font-size: 21px; line-height: 1.55; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { width: 88px; height: 1px; margin: 56px 0; border: 0; background: var(--gold); }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.prose pre { max-width: 100%; overflow-x: auto; margin: 36px 0; padding: 24px; color: #e9efe9; background: var(--deep); border-left: 4px solid var(--gold); font-size: 13px; line-height: 1.6; white-space: pre; }
.prose code { font-family: "SFMono-Regular", Consolas, monospace; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 36px 0; border: 1px solid var(--line-strong); }
.prose table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.prose th,
.prose td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: #fff; background: var(--deep); }

.toc { padding-left: 24px; border-left: 1px solid var(--line-strong); }
.toc-title { display: block; margin-bottom: 18px; color: var(--quiet); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li + li { margin-top: 12px; }
.toc a { display: block; color: var(--quiet); font-size: 12px; line-height: 1.4; transition: color .2s ease, transform .2s ease; }
.toc a:hover,
.toc a.is-active { color: var(--green); transform: translateX(3px); }
.toc .toc-level-3 a { padding-left: 12px; }

.related { padding: 104px 0; color: var(--paper); background: linear-gradient(120deg, #0d1110, #16201c 64%, #2b312c); }
.related-label { color: rgba(247,243,234,.68); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.related h2 { max-width: 820px; margin: 24px 0 48px; font-family: "Space Grotesk", sans-serif; font-size: clamp(38px, 5vw, 68px); line-height: .98; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(247,243,234,.22); border-bottom: 1px solid rgba(247,243,234,.22); }
.related-card { min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border-right: 1px solid rgba(247,243,234,.18); transition: background .22s ease; }
.related-card:last-child { border-right: 0; }
.related-card:hover { background: rgba(247,243,234,.06); }
.related-card small { color: var(--gold); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.related-card strong { display: block; margin: 26px 0; font-family: "Space Grotesk", sans-serif; font-size: 25px; line-height: 1.08; }
.related-card span { color: rgba(247,243,234,.58); font-size: 12px; }

.article-cta { padding: 96px 0; background: var(--paper); }
.article-cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; }
.article-cta h2 { max-width: 870px; margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(38px, 5vw, 70px); line-height: .98; }
.cta-actions { display: flex; border: 1px solid var(--line-strong); }
.cta-actions a { min-height: 56px; display: inline-flex; align-items: center; padding: 0 22px; font-weight: 750; }
.cta-actions a:first-child { color: #fff; background: var(--ink); }
.footer { padding: 30px 0; color: rgba(247,243,234,.58); background: var(--deep); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; }

@media (max-width: 1120px) {
  .article-head-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .article-shell { grid-template-columns: minmax(0, 760px) 230px; }
  .article-facts { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .fact { margin: 0; }
}

@media (max-width: 980px) {
  .nav { height: 72px; }
  .nav-text-link { display: none; }
  .context-nav { top: 72px; }
  .article-head { padding-top: 172px; }
  .article-head-grid { grid-template-columns: 1fr; }
  .article-visual { min-height: 390px; }
  .article-shell { grid-template-columns: minmax(0, 760px); }
  .toc { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card { min-height: 220px; border-right: 0; border-bottom: 1px solid rgba(247,243,234,.18); }
  .related-card:last-child { border-bottom: 0; }
  .article-cta-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-inner,
  .context-inner,
  .article-head-inner,
  .article-shell,
  .related-inner,
  .article-cta-inner,
  .footer-inner { width: calc(100% - 32px); }
  .nav-inner { gap: 12px; }
  .brand { gap: 10px; font-size: 17px; }
  .brand-logo { width: 32px; height: 32px; }
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .nav-links { gap: 10px; }
  .lang-switch { min-width: 44px; padding: 0 11px; justify-content: center; }
  .lang-label { display: none; }
  .lang-short { display: inline; font-weight: 820; }
  .nav-cta { min-height: 44px; padding: 0 14px; font-size: 13px; }
  .context-meta { display: none; }
  .context-path { width: 100%; justify-content: space-between; }
  .context-divider { margin-left: auto; }
  .article-head { padding: 164px 0 64px; }
  .article-head h1 { font-size: clamp(42px, 12.4vw, 58px); }
  .article-visual { min-height: 260px; }
  .article-shell { padding-top: 60px; padding-bottom: 84px; }
  .article-facts { grid-template-columns: repeat(2, 1fr); }
  .prose { font-size: 17px; line-height: 1.72; }
  .prose h2 { margin-top: 58px; }
  .prose blockquote { margin: 34px 0; padding: 20px; font-size: 19px; }
  .related,
  .article-cta { padding: 78px 0; }
  .cta-actions { width: 100%; display: grid; }
  .cta-actions a { justify-content: center; }
  .footer-inner { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
