
/* ── Article layout ── */
.article-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
}
.article-main { min-width: 0; }
.article-sidebar { position: sticky; top: 78px; }

/* ── Hero image ── */
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin-bottom: 40px;
  display: block;
  border: 1px solid var(--border);
}
.article-hero-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: -32px;
  margin-bottom: 40px;
}

/* ── Article header ── */
.article-header { margin-bottom: 32px; }
.article-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-breadcrumb a { color: var(--muted); text-decoration: none; }
.article-breadcrumb a:hover { color: var(--blue); }
.article-breadcrumb .sep { opacity: 0.5; }

.article-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.article-meta-icon { opacity: 0.7; }

/* ── Article body typography ── */
.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text2);
}
.article-body > * + * { margin-top: 1.4em; }

.article-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.3;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--border);
}
.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
.article-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.article-body p { margin: 0; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body em { font-style: italic; }

.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--blue-hi); }

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
}
.article-body li + li { margin-top: 0.35em; }
.article-body li { color: var(--text2); }

/* ── Article tables ── */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 1.6em 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.article-body th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border2);
}
.article-body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: var(--surface); }

/* ── Blockquote / callout ── */
.article-body blockquote {
  border-left: 4px solid var(--green);
  background: var(--green-lt);
  padding: 14px 18px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 1.6em 0;
  color: var(--text2);
  font-size: 15px;
}
.article-body blockquote p { margin: 0; }

/* ── Figures / images ── */
.article-body figure {
  margin: 1.8em 0;
}
.article-body figure img {
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: block;
}
.article-body figcaption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ── Inline code ── */
.article-body code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text);
}

/* ── Affiliate slot ── */
.affiliate-slot {
  margin: 2em 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  text-align: center;
}

/* ── Sidebar: TOC ── */
.sidebar-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.sidebar-toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc-counter;
}
.sidebar-toc li {
  counter-increment: toc-counter;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sidebar-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  opacity: 0.8;
  flex-shrink: 0;
}
.sidebar-toc a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.12s;
}
.sidebar-toc a:hover { color: var(--blue); text-decoration: none; }

/* ── Sidebar: data callout ── */
.sidebar-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  font-size: 13px;
}
.sidebar-callout-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green);
  margin-bottom: 10px;
}
.sidebar-callout p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.sidebar-callout a {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.sidebar-callout a:hover { text-decoration: underline; }

/* ── Articles index page ── */
.articles-index {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}
.articles-index-header {
  margin-bottom: 40px;
}
.articles-index-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.articles-index-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}
.articles-index-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
}
.article-card {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: none;
}
.article-card:hover { text-decoration: none; }
.article-card:hover .article-card-title { color: var(--blue); }
.article-card-thumb {
  width: 200px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: block;
  background: var(--surface2);
}
.article-card-thumb-placeholder {
  width: 200px;
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.article-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.article-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 8px;
  transition: color 0.12s;
}
.article-card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.article-card-read {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .article-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px 60px;
  }
  .article-sidebar { position: static; }
}
@media (max-width: 600px) {
  .article-title { font-size: 22px; }
  .article-body { font-size: 15px; }
  .article-card { grid-template-columns: 1fr; }
  .article-card-thumb,
  .article-card-thumb-placeholder { width: 100%; }
  .articles-index { padding: 32px 16px 60px; }
}
