/* Sagepar — shared article styles */
:root {
  --navy:        #242240;
  --navy-light:  #474361;
  --navy-deep:   #1C1A36;
  --accent:      #975415;
  --accent-glow: #D08536;
  --accent-bg:   #EFE6DC;
  --accent-dim:  #864A12;
  --text:        #2A2A3A;
  --muted:       #5B5A6E;
  --muted-light: #76758A;
  --text-on-dark: #EFEAE3;
  --muted-on-dark: rgba(239,234,227,.55);
  --bg:          #FAF7F2;
  --bg-alt:      #F3EDE5;
  --bg-warm:     #EFE6DC;
  --border:      #E5DED3;
  --border-dark: rgba(255,245,230,.09);
  --green:       #509944;
  --spring:      cubic-bezier(0.32, 0.72, 0, 1);
  --dur-fast:    200ms;
  --dur-mid:     400ms;
  --dur-slow:    700ms;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: 80px;
}

/* ── Nav ──────────────────────────────────────────────── */
nav {
  background: rgba(28,26,54,.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-dark);
  padding: .75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 1100px;
  border-radius: 60px;
  z-index: 100;
}
.logo {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: 1.65rem;
  line-height: 1;
  text-transform: lowercase;
  color: #fff;
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  color: var(--muted-on-dark);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: color var(--dur-fast) ease;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: var(--accent-glow); }
.nav-cta {
  background: #fff;
  color: var(--navy-deep);
  padding: .5rem 1.35rem;
  border-radius: 60px;
  text-decoration: none;
  font-weight: 700;
  font-size: .825rem;
  transition: all .3s var(--spring);
  letter-spacing: -0.01em;
}
.nav-cta:hover {
  background: var(--accent-glow);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Article Layout ──────────────────────────────────── */
.article-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
}

/* Sidebar TOC */
.toc-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 0 .5rem;
}
.toc-label {
  text-transform: uppercase;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .78rem;
  line-height: 1.45;
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}
.toc-list a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
  display: block;
  padding: .1rem 0;
}
.toc-list a:hover,
.toc-list a.active {
  color: var(--accent);
}
.toc-list .toc-l2 { padding-left: 1rem; font-size: .74rem; color: var(--muted-light); }

/* Main article */
.article {
  max-width: 720px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: .78rem;
  color: var(--muted-light);
}
.article-category {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .65rem;
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: 20px;
}
.article-meta .sep { color: var(--border); }

.article h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
.article-lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2.5rem;
  border-left: 3px solid var(--accent-glow);
  padding-left: 1.25rem;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-glow), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
}
.byline-info { display: flex; flex-direction: column; }
.byline-name { font-size: .85rem; font-weight: 700; color: var(--navy); }
.byline-role { font-size: .75rem; color: var(--muted-light); }

.article h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--navy);
  margin: 3rem 0 1rem;
  scroll-margin-top: 100px;
}
.article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2rem 0 .75rem;
  letter-spacing: -0.015em;
  scroll-margin-top: 100px;
}
.article p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.2rem;
}
.article strong { color: var(--navy); font-weight: 700; }
.article em { font-style: italic; }
.article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(151,84,21,.3);
  text-underline-offset: 3px;
  transition: all var(--dur-fast) ease;
}
.article a:hover {
  color: var(--accent-dim);
  text-decoration-color: var(--accent);
}

.article ul, .article ol {
  margin: 0 0 1.5rem 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
}
.article li { margin-bottom: .6rem; }
.article li::marker { color: var(--accent); }

/* Callout box — for definitions, quick facts */
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.callout-label {
  text-transform: uppercase;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .5rem;
}
.callout p { font-size: .95rem; margin: 0; }
.callout p + p { margin-top: .6rem; }

/* Data table — for comparative content */
.data-table {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border-collapse: collapse;
  font-size: .88rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.data-table th,
.data-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table thead th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--navy);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-alt); }

/* Pull quote */
.pullquote {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--navy);
  margin: 2rem 0;
  padding: 1rem 0 1rem 2rem;
  border-left: 4px solid var(--accent-glow);
  font-style: italic;
}

/* Image figure */
figure {
  margin: 2rem 0;
}
figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}
figcaption {
  font-size: .8rem;
  color: var(--muted-light);
  margin-top: .65rem;
  text-align: center;
  font-style: italic;
}

/* Inline CTA — mid-article */
.article-cta {
  background: var(--navy-deep);
  color: #fff;
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(208,133,54,.12) 0%, transparent 70%);
  pointer-events: none;
}
.article-cta h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 .5rem;
  position: relative;
}
.article-cta p {
  color: var(--muted-on-dark);
  font-size: .9rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.article-cta a.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  color: var(--navy-deep);
  padding: .7rem 1.4rem;
  border-radius: 60px;
  text-decoration: none;
  font-weight: 700;
  font-size: .85rem;
  transition: all .3s var(--spring);
  position: relative;
}
.article-cta a.btn:hover {
  background: var(--accent-glow);
  color: #fff;
  transform: translateY(-1px);
}

/* FAQ block at end of article */
.faq-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.faq-section h2 { margin-top: 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: .6rem;
  overflow: hidden;
  background: #fff;
}
.faq-item:hover { box-shadow: 0 2px 10px rgba(28,26,54,.04); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q::after {
  content: '+';
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform .3s var(--spring);
}
.faq-item.open .faq-q::after { content: '\2212'; }
.faq-a {
  padding: 0 1.2rem 1.1rem;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--muted);
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* Related articles */
.related-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.related-section h2 {
  margin-top: 0;
  font-size: 1.35rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.related-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all .3s var(--spring);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.related-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28,26,54,.05);
}
.related-card .category {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.related-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin: 0;
}
.related-card p {
  font-size: .82rem;
  color: var(--muted-light);
  line-height: 1.55;
  margin: 0;
}

/* Final CTA after article */
.article-end-cta {
  background: var(--navy-deep);
  color: #fff;
  padding: 5rem 2rem;
  text-align: center;
  margin-top: 5rem;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.article-end-cta::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(208,133,54,.1) 0%, transparent 70%);
  pointer-events: none;
}
.article-end-cta-label {
  text-transform: uppercase;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-glow);
  margin-bottom: 1rem;
  position: relative;
}
.article-end-cta h2 {
  color: #fff;
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 700px;
  margin: 0 auto 1rem;
  position: relative;
}
.article-end-cta p {
  color: var(--muted-on-dark);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 2rem;
  position: relative;
}
.article-end-cta a.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  color: var(--navy-deep);
  padding: .95rem 2.25rem;
  border-radius: 60px;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  transition: all .3s var(--spring);
  position: relative;
}
.article-end-cta a.btn:hover {
  background: var(--accent-glow);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(208,133,54,.3);
}

/* ── Articles index page ──────────────────────────────── */
.articles-hero {
  padding: 6rem 2rem 4rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  text-align: center;
}
.articles-hero-label {
  text-transform: uppercase;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.articles-hero h1 {
  font-size: clamp(2.25rem, 1.8rem + 2.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--navy);
  max-width: 780px;
  margin: 0 auto 1.25rem;
}
.articles-hero h1 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.articles-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

.filter-bar {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 0 2rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: .5rem 1.1rem;
  border-radius: 60px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur-fast) ease;
}
.filter-chip:hover { border-color: var(--accent-glow); color: var(--accent); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.articles-grid-section {
  padding: 4rem 2rem 6rem;
}
.articles-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  text-decoration: none;
  color: var(--text);
  transition: all .3s var(--spring);
  display: flex;
  flex-direction: column;
  gap: .7rem;
  position: relative;
}
.article-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(28,26,54,.06);
}
.article-card .category {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.015em;
}
.article-card p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.article-card .meta {
  margin-top: auto;
  padding-top: 1rem;
  font-size: .72rem;
  color: var(--muted-light);
  display: flex;
  gap: .8rem;
  align-items: center;
}
.article-card .meta .dot {
  width: 3px; height: 3px;
  background: var(--muted-light);
  border-radius: 50%;
}
.article-card.featured {
  grid-column: span 3;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  border-color: var(--accent);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.article-card.featured::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(208,133,54,.12) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 14px;
}
.article-card.featured .category { color: var(--accent-glow); position: relative; }
.article-card.featured h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem);
  color: #fff;
  line-height: 1.15;
  position: relative;
}
.article-card.featured p {
  color: var(--muted-on-dark);
  font-size: 1rem;
  position: relative;
}
.article-card.featured .meta { color: var(--muted-on-dark); position: relative; }
.article-card.featured .meta .dot { background: var(--muted-on-dark); }
.article-card.featured .read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent-glow);
  font-size: .85rem;
  font-weight: 700;
  margin-top: .75rem;
  position: relative;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  background: var(--navy-deep);
  color: var(--muted-on-dark);
  padding: 3.5rem 2rem 2rem;
  border-top: 1px solid var(--border-dark);
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand .logo { font-size: 1.5rem; display: inline-block; margin-bottom: .75rem; }
.footer-brand p {
  color: var(--muted-on-dark);
  font-size: .82rem;
  line-height: 1.6;
  max-width: 300px;
}
.footer-col h4 {
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col a {
  color: var(--muted-on-dark);
  text-decoration: none;
  font-size: .85rem;
  transition: color var(--dur-fast) ease;
}
.footer-col a:hover { color: var(--accent-glow); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-dark);
  font-size: .75rem;
  color: var(--muted-on-dark);
  text-align: center;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .article-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1.25rem 4rem;
  }
  .toc-sidebar {
    display: none;
  }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card.featured {
    grid-column: span 2;
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  nav { top: 8px; width: calc(100% - 1rem); padding: .6rem 1.15rem; }
  .nav-link { display: none; }
  body { padding-top: 70px; }
  .articles-hero { padding: 4rem 1.25rem 3rem; }
  .articles-grid-section { padding: 2.5rem 1.25rem 4rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-card.featured { grid-column: span 1; }
  .article h1 { font-size: 2rem; }
  .article-lede { font-size: 1.05rem; }
  .article-end-cta { padding: 3rem 1.5rem; margin-top: 3rem; border-radius: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .article-cta { padding: 1.5rem; }
}
