*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #fff;
  color: #1f1b2e;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

:root {
  --purple:       #A886CD;
  --purple-d:     #8a69b8;
  --purple-x:     #7a5f9e;
  --dark:         #1e1b2e;
  --dark2:        #15121f;
  --cream:        #f7f2e9;
  --cream-d:      #ece5d6;
  --text:         #15121f;
  --muted:        #6b7280;
  --border:       #e8e4f0;
  --bg-soft:      #f7f6fb;
}

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--purple-x);
}
h1, h2, h3, h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; color: var(--dark); }
em.serif { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--purple-x); letter-spacing: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14.5px; font-weight: 700;
  padding: 13px 22px; border-radius: 50px;
  border: none; transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-d); transform: translateY(-1px); }
.btn:active { transform: scale(0.96); }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  transition: box-shadow 0.25s;
}
.nav.is-scrolled { box-shadow: 0 6px 28px rgba(15,12,25,0.08); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo { font-weight: 800; font-size: 17px; letter-spacing: 4.5px; color: var(--dark); white-space: nowrap; }
.nav__right { display: flex; align-items: center; gap: 32px; }
.nav__links { display: flex; gap: 28px; list-style: none; }
.nav__links a { font-size: 14.5px; font-weight: 600; color: var(--dark); transition: color 0.2s; }
.nav__links a:hover { color: var(--purple-x); }
.nav__links a.is-active { color: var(--purple-x); }
.nav__cta { font-size: 14px; padding: 10px 20px; }
.burger { display: none; background: transparent; border: none; width: 40px; height: 40px; }
.burger span, .burger span::before, .burger span::after {
  content: ''; display: block; width: 22px; height: 2px; background: var(--dark);
}
.burger span::before { transform: translateY(-7px); }
.burger span::after  { transform: translateY(5px); }
@media (max-width: 900px) {
  .nav__right { display: none; }
  .burger { display: block; }
}

/* ══════════════ READING PROGRESS BAR ══════════════ */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 200;
  pointer-events: none;
}
.progress__bar {
  height: 100%; width: 0%;
  background: var(--purple);
  transition: width 0.15s linear;
}

/* ══════════════ ARTICLE HERO ══════════════ */
.article-hero {
  background: var(--cream);
  padding: 32px 0 70px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--cream-d);
}
.article-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: transparent;
}
.article-hero::after {
  content: ''; position: absolute;
  right: -150px; top: -100px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  opacity: 0.16;
  pointer-events: none;
}

.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.5px;
  margin: 18px 0 32px;
}
.crumbs a { color: var(--muted); transition: color 0.2s; }
.crumbs a:hover { color: var(--purple-x); }
.crumbs__sep { opacity: 0.4; }
.crumbs__current { color: var(--dark); }

.article-hero__inner {
  max-width: 880px;
  position: relative; z-index: 1;
}
.article-hero__cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--purple-x);
  letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px;
}
.article-hero__cat::after {
  content: ''; width: 36px; height: 1px; background: var(--purple);
}
.article-hero__title {
  font-size: clamp(40px, 5.6vw, 72px);
  letter-spacing: -0.032em;
  line-height: 1.02;
  margin-bottom: 28px;
  text-wrap: balance;
}
.article-hero__deck {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: #4a4754;
  max-width: 720px;
  margin-bottom: 36px;
  letter-spacing: 0.005em;
}
.article-hero__meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.5px;
}
.article-hero__meta strong { color: var(--dark); font-weight: 500; }
.article-hero__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: 0.5; }
.article-hero__meta-tag {
  padding: 4px 10px; border-radius: 50px;
  background: rgba(168,134,205,0.12);
  border: 1px solid rgba(168,134,205,0.25);
  color: var(--purple-x);
  font-weight: 500;
}

/* ══════════════ ARTICLE BODY LAYOUT ══════════════ */
.article-shell {
  padding: 64px 0 80px;
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 48px;
  align-items: start;
}

/* ── TOC sidebar ── */
.toc {
  position: sticky; top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}
.toc::-webkit-scrollbar { width: 4px; }
.toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.toc__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--muted);
  letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex; flex-direction: column; gap: 12px;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
  transition: color 0.2s;
  padding: 4px 0;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--purple-x);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.toc a:hover { color: var(--dark); }
.toc a.is-active {
  color: var(--dark);
  font-weight: 600;
}
.toc a.is-active::before { color: var(--purple); font-weight: 600; }

/* ── Right rail: share / save ── */
.rail {
  position: sticky; top: 96px;
  align-self: start;
  display: flex; flex-direction: column; gap: 24px;
}
.rail__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--muted);
  letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 4px;
}
.rail__group {
  display: flex; flex-direction: column; gap: 8px;
}
.rail__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 12.5px; font-weight: 600;
  color: var(--dark);
  transition: all 0.18s;
  cursor: pointer;
  width: max-content;
}
.rail__btn:hover { border-color: var(--purple); color: var(--purple-x); }
.rail__btn svg { color: var(--muted); transition: color 0.18s; }
.rail__btn:hover svg { color: var(--purple-x); }
.rail__stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.3px;
}
.rail__stat strong { color: var(--dark); font-weight: 500; }

/* ── PROSE ── */
.prose {
  max-width: 680px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.72;
  color: #2d2a3d;
}
.prose > * + * { margin-top: 1.4em; }
.prose p {
  font-family: 'DM Sans', sans-serif;
}
.prose p:first-of-type::first-letter {
  font-family: 'Instrument Serif', serif;
  font-size: 4.4em;
  float: left;
  line-height: 0.82;
  padding: 6px 12px 0 0;
  color: var(--purple-x);
  font-weight: 400;
}
.prose strong { color: var(--dark); font-weight: 700; }
.prose a {
  color: var(--purple-x);
  text-decoration: underline;
  text-decoration-color: rgba(168,134,205,0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.prose a:hover { color: var(--dark); text-decoration-color: var(--purple); }
.prose h2 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.024em;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  scroll-margin-top: 96px;
}
.prose h2 .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--purple);
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}
.prose h3 {
  font-size: 22px;
  margin-top: 1.7em;
  margin-bottom: 0.4em;
}
.prose ul, .prose ol {
  padding-left: 26px;
  display: flex; flex-direction: column; gap: 10px;
}
.prose li::marker { color: var(--purple); }
.prose ul.checks {
  list-style: none; padding-left: 0;
}
.prose ul.checks li {
  position: relative; padding-left: 32px;
}
.prose ul.checks li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--purple);
}
.prose ul.checks li::after {
  content: ''; position: absolute; left: 5px; top: 18px;
  width: 8px; height: 4px;
  border-left: 1.8px solid var(--purple-x);
  border-bottom: 1.8px solid var(--purple-x);
  transform: rotate(-45deg);
}

/* Pull quote */
.pull {
  margin: 2.4em -8px;
  padding: 0 0 0 28px;
  border-left: 3px solid var(--purple);
}
.pull p {
  font-family: 'Instrument Serif', serif !important;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.3;
  color: var(--dark);
  font-style: italic;
}
.pull p::first-letter {
  font-size: 1em !important; float: none !important; padding: 0 !important; color: inherit !important;
}
.pull cite {
  display: block;
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-style: normal;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* Callout */
.callout {
  margin: 2em 0;
  padding: 24px 26px;
  background: var(--cream);
  border-radius: 14px;
  border-left: 3px solid var(--purple);
  display: grid; grid-template-columns: 28px 1fr;
  gap: 16px;
  font-size: 15px;
  line-height: 1.6;
}
.callout__icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 17px; font-style: italic;
  flex-shrink: 0;
}
.callout__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600; color: var(--dark);
  margin-bottom: 4px; font-size: 15px;
  letter-spacing: -0.01em;
}
.callout p { font-family: 'DM Sans', sans-serif; font-size: 15px; }
.callout p::first-letter { font-size: 1em !important; float: none !important; padding: 0 !important; color: inherit !important; }

/* Inline image / figure */
.fig {
  margin: 2.4em -40px;
}
.fig__media {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-d) 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.fig__media::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,27,46,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,27,46,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.fig__media image-slot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Article lead image */
.lead-image {
  max-width: 1100px;
  margin: -40px auto 0;
  padding: 0 28px;
}
.lead-image__media {
  aspect-ratio: 16/7;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(15,12,25,0.12);
}
.lead-image image-slot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
@media (max-width: 880px) {
  .lead-image { margin-top: -20px; padding: 0 16px; }
  .lead-image__media { aspect-ratio: 4/3; border-radius: 14px; }
}
.fig__cap {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

/* Data table */
.data-table {
  margin: 2em 0;
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.data-table th, .data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: var(--bg-soft);
}
.data-table td:first-child { font-weight: 600; color: var(--dark); }
.data-table .tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 50px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.data-table .tag--gone {
  color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca;
}
.data-table .tag--new {
  color: var(--purple-x); background: rgba(168,134,205,0.12); border: 1px solid rgba(168,134,205,0.3);
}
.data-table .tag--same {
  color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border);
}

/* Key takeaways box */
.takeaways {
  margin: 0 0 56px;
  padding: 28px 32px;
  background: var(--dark);
  color: #fff;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.takeaways::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 90% 10%, rgba(168,134,205,0.2) 0%, transparent 60%);
  pointer-events: none;
}
.takeaways__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--purple);
  letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.takeaways h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px; color: #fff;
  margin-bottom: 18px;
  letter-spacing: -0.018em;
  position: relative; z-index: 1;
}
.takeaways ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 1;
}
.takeaways li {
  display: flex; gap: 14px;
  font-size: 14.5px; line-height: 1.55;
  color: rgba(255,255,255,0.78);
}
.takeaways li::before {
  content: '—';
  color: var(--purple);
  font-weight: 500;
  flex-shrink: 0;
}

/* ── Inline CTA at end ── */
.end-cta {
  margin: 64px auto 0;
  max-width: 680px;
  padding: 36px 36px 40px;
  background: var(--cream);
  border-radius: 18px;
  border: 1px solid var(--cream-d);
  text-align: left;
}
.end-cta .eyebrow { margin-bottom: 12px; }
.end-cta h3 {
  font-size: 26px; margin-bottom: 12px;
}
.end-cta p {
  color: #4a4754; font-size: 15.5px;
  line-height: 1.6; margin-bottom: 22px;
}

@media (max-width: 1140px) {
  .article-shell { grid-template-columns: 200px 1fr; }
  .rail { display: none; }
}
@media (max-width: 880px) {
  .article-shell {
    grid-template-columns: 1fr;
    padding: 40px 0 60px;
  }
  .toc { display: none; }
  .fig { margin-left: 0; margin-right: 0; }
}

/* ══════════════ KEEP READING ══════════════ */
.keep-reading {
  background: var(--cream);
  padding: 70px 0;
  position: relative;
  border-top: 1px solid var(--cream-d);
}
.keep-reading::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: transparent;
}
.keep-reading__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px; gap: 24px; flex-wrap: wrap;
}
.keep-reading__head h2 { font-size: 32px; }
.keep-reading__view {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--purple-x);
  letter-spacing: 0.5px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap 0.2s;
}
.keep-reading__view:hover { gap: 11px; }

.next-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.next-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 28px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.next-card:hover {
  transform: translateY(-3px);
  border-color: var(--purple);
  box-shadow: 0 14px 30px rgba(15,12,25,0.07);
}
.next-card__cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--purple-x);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 12px;
}
.next-card__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 19px; font-weight: 600;
  line-height: 1.25; letter-spacing: -0.018em;
  margin-bottom: 10px;
  color: var(--dark);
  flex: 1;
}
.next-card__time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.4px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.next-card__cta {
  color: var(--purple-x); font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  transition: gap 0.2s;
}
@media (max-width: 880px) { .next-grid { grid-template-columns: 1fr; } }

/* ══════════════ FOOTER ══════════════ */
footer {
  background: var(--dark2);
  color: rgba(255,255,255,0.6);
  padding: 56px 0 28px;
}
.footer__inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand { max-width: 320px; }
.footer__brand-name { font-size: 18px; font-weight: 800; letter-spacing: 4px; color: #fff; margin-bottom: 12px; }
.footer__brand p { font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.5); }
.footer__cols { display: flex; gap: 50px; flex-wrap: wrap; }
.footer__col-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: rgba(255,255,255,0.72); font-size: 14px; }
.footer__col a:hover { color: var(--purple); }
.footer__legal {
  padding-top: 22px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255,255,255,0.38);
}
