﻿/* ── LAYOUT ── */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 120px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 72px;
  align-items: start;
}

/* ── ARTICLE HERO ── */
.article-hero {
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark2) 100%);
  border-radius: 28px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 48px;
  margin-bottom: 52px;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, oklch(0.55 0.22 280 / 0.5), transparent 65%);
}
.hero-art {
  position: absolute;
  right: 56px; bottom: 40px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.h-bar {
  width: 42px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to top, oklch(0.55 0.22 280 / 0.6), oklch(0.65 0.22 280));
}
.h-bar.accent { background: linear-gradient(to top, var(--accent-orange), oklch(0.8 0.18 50)); }
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 580px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.55);
  margin-bottom: 20px;
}
.hero-tag::before {
  content: '';
  width: 20px; height: 1.5px;
  background: oklch(1 0 0 / 0.35);
}
.article-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: white;
  text-wrap: pretty;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}
.av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), oklch(0.6 0.24 310));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.hero-author-name { font-size: 14px; font-weight: 600; color: white; }
.hero-author-role { font-size: 12px; color: oklch(1 0 0 / 0.5); margin-top: 1px; }
.hero-divider { width: 1px; height: 32px; background: oklch(1 0 0 / 0.2); }
.hero-stats { display: flex; gap: 24px; }
.hstat { text-align: center; }
.hstat-n { font-size: 13px; font-weight: 700; color: white; }
.hstat-l { font-size: 11px; color: oklch(1 0 0 / 0.45); margin-top: 2px; }

/* ── ARTICLE BODY ── */
.article-body { min-width: 0; }

.lede {
  font-size: 20px;
  color: var(--ink);
  line-height: 1.7;
  font-weight: 500;
  margin-bottom: 36px;
  text-wrap: pretty;
  border-left: 3px solid var(--brand);
  padding-left: 24px;
}

.article-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin: 52px 0 18px;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 32px 0 12px;
}
.article-body p {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.8;
  margin-bottom: 22px;
  text-wrap: pretty;
}
.article-body p strong { color: var(--ink); font-weight: 700; }

/* ── PULLQUOTE ── */
.pullquote {
  background: var(--brand-soft);
  border-radius: 18px;
  padding: 32px 36px;
  margin: 40px 0;
  position: relative;
}
.pullquote::before {
  content: '"';
  font-family: 'Fraunces', serif;
  font-size: 80px;
  color: var(--brand);
  opacity: 0.25;
  position: absolute;
  top: 8px; left: 24px;
  line-height: 1;
}
.pullquote p {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: -0.015em;
  margin-bottom: 0;
  padding-left: 20px;
}

/* ── DATA CARD ── */
.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0;
}
.data-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
}
.data-card .dc-n {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.data-card .dc-n span { color: var(--brand); }
.data-card .dc-l { font-size: 12px; color: var(--ink3); margin-top: 6px; font-weight: 500; }
.data-card .dc-d { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 100px; margin-top: 8px; display: inline-block; }
.dc-up { background: oklch(0.92 0.08 145); color: oklch(0.4 0.15 145); }
.dc-down { background: oklch(0.94 0.06 10); color: oklch(0.4 0.15 10); }

/* ── TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 36px 0;
  font-size: 14px;
}
.data-table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink3);
  border-bottom: 2px solid var(--border);
}
.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink2);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-soft); }
.data-table td:first-child { font-weight: 600; color: var(--ink); }
.td-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.up { background: oklch(0.92 0.08 145); color: oklch(0.38 0.15 145); }
.dn { background: oklch(0.94 0.06 10); color: oklch(0.4 0.15 10); }
.flat { background: var(--bg-softer); color: var(--ink3); }

/* ── MINI BAR CHART ── */
.chart-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin: 36px 0;
}
.chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bc-row { display: flex; align-items: center; gap: 12px; }
.bc-label { font-size: 13px; font-weight: 600; color: var(--ink); min-width: 90px; }
.bc-track { flex: 1; height: 28px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.bc-bar { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; font-size: 12px; font-weight: 700; color: white; transition: width 1.2s cubic-bezier(.22,1,.36,1); }
.bc-val { font-size: 13px; font-weight: 700; color: var(--ink2); min-width: 48px; text-align: right; }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 44px 0;
}

/* ── TAG LIST ── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
}
.tag-chip {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  transition: all .2s;
}
.tag-chip:hover { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.toc {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 16px;
}
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.toc ul a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all .2s;
}
.toc ul a:hover { color: var(--brand); background: var(--brand-soft); }
.toc ul a.active { color: var(--brand); font-weight: 700; background: var(--brand-soft); }
.toc ul .sub a { padding-left: 20px; font-size: 12px; color: var(--ink3); }
.toc ul .sub a:hover { color: var(--brand); }

.sidebar-cta {
  background: var(--dark);
  border-radius: 18px;
  padding: 28px 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.sidebar-cta::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(0.55 0.22 280 / 0.5), transparent 70%);
}
.sidebar-cta h4 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  position: relative;
}
.sidebar-cta p {
  font-size: 13px;
  color: oklch(1 0 0 / 0.55);
  line-height: 1.55;
  margin-bottom: 18px;
  position: relative;
}
.sidebar-cta .btn { position: relative; width: 100%; justify-content: center; }

.sidebar-share {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 24px;
}
.share-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin-bottom: 14px; }
.share-btns { display: flex; gap: 8px; }
.share-btn {
  flex: 1; padding: 10px 0; border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent; color: var(--ink2); cursor: pointer;
  font-size: 13px; font-weight: 600;
  font-family: inherit; transition: all .2s;
  text-align: center;
}
.share-btn:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--ink2); }

/* ── RELATED ── */
.related {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 120px;
}
.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.related-head h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rel-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.rel-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px oklch(0.25 0.1 280 / 0.2); }
.rel-thumb {
  aspect-ratio: 16/9;
  display: grid; place-items: center;
  font-family: 'Fraunces', serif;
  font-size: 56px;
  color: white;
}
.rel-body { padding: 20px; }
.rel-body .tag { margin-bottom: 8px; }
.rel-body h4 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); text-wrap: pretty; }
.rel-body .meta { font-size: 12px; color: var(--ink3); margin-top: 10px; }

@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { position: static; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .data-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .article-layout, .related { padding-left: 18px; padding-right: 18px; }
  .related-grid, .data-grid { grid-template-columns: 1fr; }
  .article-hero { padding: 22px; }
  .hero-art { display: none; }
  .article-back { margin-left: 18px; margin-right: 18px; }
  .article-content { padding: 0 18px; }
}

.article-content { max-width: 720px; margin: 0 auto 80px; padding: 0 24px; }
.article-content img { max-width: 100%; height: auto; border-radius: 16px; margin: 24px 0; }
.article-content p { font-size: 17px; line-height: 1.7; color: var(--ink2); margin-bottom: 18px; }
.article-back { display: inline-flex; margin: 120px 48px 24px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.article-back:hover { color: var(--brand); }
