*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0A0A0A;
  --border: rgba(255,255,255,.14);
  --border-soft: rgba(255,255,255,.085);
  --text: #F2F9FE;
  --muted: rgba(242,249,254,.62);
  --dim: rgba(242,249,254,.42);
  --accent: #F1A16F;
  --panel: rgba(14,14,13,.62);
}

html {
  scroll-behavior: smooth;
  background: #070707;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 78% 8%, rgba(221,104,54,.30), transparent 19rem),
    radial-gradient(circle at 88% 22%, rgba(56,128,111,.28), transparent 21rem),
    linear-gradient(180deg, #050505 0%, #0A0A0A 55%, #070707 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.page { position: relative; overflow-x: clip; }

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .30;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.15) 0 1px, transparent 1.5px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  mask-image: linear-gradient(to bottom, #000, #000 58%, transparent);
}

.container { width: min(100% - 48px, 1180px); margin: 0 auto; }

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(10,10,10,.76), rgba(10,10,10,0));
  backdrop-filter: blur(18px);
}

.nav-inner {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 3px; width: fit-content; }
.brand img { display: block; width: 132px; height: auto; }
.brand small {
  color: rgba(242,249,254,.54);
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -.04em;
  transform: translateY(1px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a { white-space: nowrap; transition: color .18s ease; }
.nav-links a:hover { color: var(--text); }

.nav-return {
  color: var(--text);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  padding: 13px 18px;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.nav-toggle span { display: grid; gap: 4px; width: 16px; }
.nav-toggle i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

.nav.is-open .nav-toggle i:first-child { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle i:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle i:last-child { transform: translateY(-6px) rotate(-45deg); }

/* ── Article hero — 2-col layout ─────────────────── */
.article-hero { padding: 64px 0 0; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 36px;
  color: var(--dim);
  font-size: 13px;
}

.breadcrumbs a { transition: color .18s ease; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: rgba(242,249,254,.28); }

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 52px;
  align-items: center;
}

.hero-text { display: flex; flex-direction: column; gap: 18px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: rgba(242,249,254,.75);
  font-size: 13px;
  font-weight: 600;
}

.kicker svg { width: 14px; height: 14px; color: var(--accent); }

h1 {
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -.05em;
  font-weight: 400;
  text-wrap: balance;
}

.dek {
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  max-width: 560px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--dim);
  font-size: 13px;
  padding-top: 4px;
}

.hero-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 24px 72px rgba(0,0,0,.38);
}

/* keep old .hero-image selector working for any article not yet updated */
.hero-image {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  margin-top: 40px;
  box-shadow: 0 24px 72px rgba(0,0,0,.38);
}

/* ── Article shell ────────────────────────────────── */
.article-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px) 180px;
  gap: 54px;
  align-items: start;
  padding: 52px 0 96px;
}

.side {
  position: sticky;
  top: 112px;
  align-self: start;
  display: grid;
  gap: 24px;
  color: var(--dim);
  font-size: 14px;
}

.toc {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.toc-title, .side-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(242,249,254,.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.toc-title svg, .side-title svg { width: 14px; height: 14px; color: var(--accent); }

.toc a {
  color: var(--dim);
  line-height: 1.35;
  padding-left: 10px;
  border-left: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.toc a:hover { color: var(--text); }

.toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ── Sidebar CTA ──────────────────────────────────── */
.side-cta {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  transition: border-color .18s ease, background .18s ease;
}

.side-cta:hover {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

.side-cta .side-title {
  display: block;
  color: var(--text);
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.24;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.side-cta .side-title svg { display: none; }
.side-cta p { color: rgba(242,249,254,.52); font-size: 13px; line-height: 1.5; }

.side-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(209,92,45,.6);
  border-radius: 999px;
  background: linear-gradient(135deg, #E46E35, #C95324);
  color: #fff;
  padding: 11px 16px;
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
  transition: transform .18s ease;
  box-shadow: 0 12px 32px rgba(201,83,36,.22);
}

.side-cta a:hover { transform: translateY(-1px); }

/* ── Article body ─────────────────────────────────── */
.article-body {
  max-width: 720px;
  color: rgba(242,249,254,.78);
  font-size: 19px;
  line-height: 1.82;
}

.article-body section {
  scroll-margin-top: 120px;
  padding-top: 58px;
}

.article-body section:first-child { padding-top: 0; }

.article-body h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 400;
}

.article-body h3 {
  margin: 48px 0 18px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
}

.article-body p + p { margin-top: 28px; }

.article-body ul {
  margin: 28px 0 10px 1.1em;
  display: grid;
  gap: 16px;
}

.article-body li::marker { color: var(--accent); }

.note {
  margin: 42px 0 0;
  padding: 22px 0 22px 22px;
  border-left: 1px solid rgba(241,161,111,.48);
  color: var(--text);
}

/* ── Right rail ───────────────────────────────────── */
.right-rail {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 14px;
  color: var(--dim);
  font-size: 13px;
}

/* ── Related / bottom ─────────────────────────────── */
.related {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--border-soft);
}

.article-body section.related { padding-top: 0; }

.share-article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 24px 28px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}

.related .share-article h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.related .share-article p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 12px 20px;
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.share-button:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
}

.share-button svg { width: 16px; height: 16px; }

/* ── Final CTA ────────────────────────────────────── */
.final-cta {
  margin-top: 0;
  padding: 32px 36px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  background: rgba(255,255,255,.025);
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 0% 0%, rgba(255,255,255,.04), transparent 55%);
  pointer-events: none;
}

.final-cta:hover {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.038);
}

.final-cta h2 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.final-cta p {
  max-width: 560px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.final-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  border: 1px solid rgba(241,161,111,.48);
  border-radius: 999px;
  background: linear-gradient(135deg, #E46E35, #C95324);
  color: #fff;
  padding: 12px 22px;
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.1;
  transition: transform .18s ease;
  box-shadow: 0 12px 32px rgba(201,83,36,.22);
}

.final-cta a:hover { transform: translateY(-1px); }

.related h2 {
  margin: 0 0 24px;
  font-size: 32px;
  letter-spacing: -.04em;
}

.related .final-cta + h2 { margin-top: 52px; }

.related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.related-card { color: var(--muted); transition: color .18s ease; }
.related-card:hover { color: var(--text); }

.related-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: transform .22s ease, opacity .22s ease;
}

.related-card:hover img { transform: translateY(-2px); opacity: .9; }

.related-card span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: rgba(242,249,254,.65);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 8px;
}

.related-card strong {
  display: block;
  color: var(--text);
  font-family: "Host Grotesk", "Inter", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.02em;
}

/* ── Footer ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 30px 0;
  color: var(--dim);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1040px) {
  .article-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 34px; }
  .right-rail { display: none; }
}

@media (max-width: 820px) {
  .hero-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-cover { aspect-ratio: 16 / 9; border-radius: 16px; }
  .article-shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-width: 720px; }
  .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .toc-title { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 32px, 1180px); }
  .nav-inner { height: 74px; padding: 0; align-items: center; flex-direction: row; position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: calc(100% - 4px);
    left: 16px;
    right: 16px;
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(10,10,10,.94);
    box-shadow: 0 22px 56px rgba(0,0,0,.36);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-links a { padding: 11px 12px; border-radius: 12px; white-space: normal; }
  .nav-links a:hover { background: rgba(255,255,255,.05); }
  .nav-return { justify-content: center; margin-top: 6px; padding: 12px 14px; }
  .brand img { width: 118px; }
  .brand small { font-size: 16px; }
  .article-hero { padding-top: 44px; }
  .breadcrumbs { margin-bottom: 28px; }
  h1 { font-size: 32px; letter-spacing: -.04em; }
  .dek { font-size: 16px; }
  .article-body { font-size: 17px; line-height: 1.75; }
  .article-body section { padding-top: 46px; }
  .toc { grid-template-columns: 1fr; }
  .related-list { grid-template-columns: 1fr; gap: 28px; }
  .related { margin-top: 48px; padding-top: 26px; }
  .share-article { align-items: flex-start; flex-direction: column; padding: 20px; }
  .share-button { width: 100%; }
  .final-cta { padding: 22px 20px; }
  .related .final-cta + h2 { margin-top: 46px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
