:root {
  --white: #FFFFFF;
  --off: #F6F6F6;
  --ink: #111111;
  --ink-soft: #333333;
  --ink-muted: #777777;
  --magenta: #D946EF;
  --violet: #8B5CF6;
  --indigo: #6366F1;
  --sky: #38BDF8;
  --teal: #14B8A6;
  --emerald: #10B981;
  --green: #22C55E;
  --amber: #F59E0B;
  --orange: #F97316;
  --rose: #F43F5E;
  --pink: #EC4899;
  --f-serif: 'Source Serif 4', Georgia, serif;
  --f-sans: 'DM Sans', system-ui, sans-serif;
  --max: 1100px;
  --content: 720px;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--f-sans); font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* ── Nav (dark, like V16) ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding: 0 48px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-logo {
  font-family: var(--f-serif); font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
  display: flex; align-items: center; gap: 4px;
  text-decoration: none;
}
.nav-logo .spark {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-spark { width: 40px; height: 40px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.nav-links a:hover { color: rgba(255,255,255,0.9); }
.nav-links a.active { color: #fff; }
.nav-rss {
  display: flex; align-items: center;
  color: rgba(255,255,255,0.35) !important;
  transition: color 0.2s;
}
.nav-rss:hover { color: var(--violet) !important; }

/* ── Breadcrumb (white section) ── */
.breadcrumb {
  padding: 16px 48px;
  font-size: 13px; color: var(--ink-muted);
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.breadcrumb a { color: var(--ink-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb span { margin: 0 6px; }

/* ── Article Header (off-white section) ── */
.article-header-section {
  background: var(--off);
  padding: 32px 48px 28px;
  overflow: visible;
}
.article-header-inner {
  max-width: var(--content); margin: 0 auto;
  position: relative;
}
.article-hero-spark {
  position: absolute; right: calc(100% + 32px); top: 0;
  width: 140px; height: 140px; opacity: 0.6;
}
@media (max-width: 1100px) {
  .article-hero-spark { display: none; }
}
.article-header-text { }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.type-badge {
  display: inline-block; padding: 4px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  color: #fff;
}
.article-date { font-size: 14px; color: var(--ink-muted); }
.article-title {
  font-family: var(--f-serif); font-size: clamp(28px, 5vw, 44px);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.02em;
  color: var(--ink);
}
.article-excerpt {
  font-family: var(--f-serif); font-size: 20px; font-weight: 400;
  font-style: italic; line-height: 1.5; color: var(--ink-soft);
  margin-top: 16px; max-width: 640px;
}

/* ── Article Content (white section) ── */
.article-content-section {
  background: var(--white);
  padding: 48px 48px 64px;
}
.article-content-inner {
  max-width: var(--content); margin: 0 auto;
}
.article-content p { margin-bottom: 1.4em; color: var(--ink-soft); line-height: 1.8; }
.article-content p:first-child { color: var(--ink-soft); }
.article-content strong { color: var(--ink); font-weight: 600; }
.article-content em { font-style: italic; }
.article-content h2 {
  font-family: var(--f-serif); font-size: 24px; font-weight: 700;
  margin: 2em 0 0.8em; color: var(--ink);
}
.article-content h3 {
  font-family: var(--f-serif); font-size: 20px; font-weight: 600;
  margin: 1.5em 0 0.6em; color: var(--ink);
}
.article-content a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--magenta); }
.article-content blockquote {
  border-left: 3px solid var(--violet);
  padding: 8px 0 8px 20px; margin: 1.5em 0;
  color: var(--ink-soft); font-style: italic;
}
.article-content ul, .article-content ol {
  margin: 1em 0; padding-left: 1.4em; color: var(--ink-soft);
}
.article-content li { margin-bottom: 0.5em; }

/* ── Article Footer (off-white section) ── */
.article-footer-section {
  background: var(--white);
  padding: 32px 48px 48px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.article-footer-inner {
  max-width: var(--content); margin: 0 auto;
}
.article-source { font-size: 14px; color: var(--ink-muted); margin-bottom: 16px; }
.article-source a { color: var(--violet); text-decoration: none; }
.article-source a:hover { text-decoration: underline; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.article-tags .tag {
  display: inline-block; padding: 4px 12px; font-size: 12px; font-weight: 500;
  border-radius: 20px; background: var(--white); border: 1px solid rgba(0,0,0,0.08);
  color: var(--ink-soft); transition: border-color 0.2s;
}
.article-tags .tag:hover { border-color: var(--violet); color: var(--violet); }
.article-share { display: flex; gap: 12px; }
.article-share a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  border-radius: 8px; background: var(--white); border: 1px solid rgba(0,0,0,0.08);
  color: var(--ink-soft); text-decoration: none; transition: all 0.2s;
}
.article-share a:hover, .share-copy:hover { border-color: var(--violet); color: var(--violet); }
.share-copy {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  border-radius: 8px; background: var(--white); border: 1px solid rgba(0,0,0,0.08);
  color: var(--ink-soft); cursor: pointer; font-family: var(--f-sans); transition: all 0.2s;
}

/* ── Prev/Next Nav (white section) ── */
.article-nav-section {
  background: var(--white);
  padding: 48px 48px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  max-width: var(--content); margin: 0 auto;
}
.article-nav a {
  display: block; text-decoration: none;
}
.article-nav .nav-label { font-size: 12px; color: var(--violet); margin-bottom: 8px; font-weight: 500; }
.article-nav .nav-title {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 12px 16px; border-radius: 8px; background: var(--off);
  border: 1px solid rgba(0,0,0,0.04); transition: border-color 0.2s;
}
.article-nav a:hover .nav-title { border-color: var(--violet); }
.article-nav .nav-next { text-align: right; }

/* ── Related Insights (off-white section) ── */
.related-section {
  background: var(--off);
  padding: 56px 48px 64px;
}
.related-inner {
  max-width: var(--max); margin: 0 auto;
}
.related-section h2 {
  font-family: var(--f-serif); font-size: 22px; font-weight: 700;
  margin-bottom: 24px; color: var(--ink);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  display: block; padding: 24px; border-radius: 12px;
  background: var(--white); border: 1px solid rgba(0,0,0,0.06);
  text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.related-card .rc-type {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 6px;
}
.related-card .rc-date { font-size: 12px; color: var(--ink-muted); margin-bottom: 6px; }
.related-card .rc-title { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 8px; }
.related-card .rc-excerpt { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ── Site Footer (white) ── */
.site-footer {
  padding: 20px 48px;
  border-top: none;
  background: var(--ink);
  color: rgba(255,255,255,0.5);
}
.site-footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.site-footer-brand {
  display: flex; align-items: center; gap: 10px;
}
.site-footer-brand svg { width: 64px; height: 64px; flex-shrink: 0; }
.site-footer-brand-name {
  font-family: var(--f-serif); font-size: 20px; font-weight: 700;
  color: #fff; letter-spacing: -0.02em;
}
.site-footer-brand-name .spark {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.site-footer-left { font-size: 13px; color: var(--ink-muted); }
.site-footer-links { display: flex; gap: 24px; }
.site-footer-links a { font-size: 13px; color: rgba(255,255,255,0.35); transition: color 0.2s; }
.site-footer-links a:hover { color: rgba(255,255,255,0.7); }
.site-footer-left { color: rgba(255,255,255,0.25); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .breadcrumb { padding: 12px 20px; }
  .article-header-section { padding: 40px 20px 32px; }
  .article-content-section { padding: 32px 20px 48px; }
  .article-footer-section { padding: 24px 20px 40px; }
  .article-nav-section { padding: 32px 20px; }
  .article-nav { grid-template-columns: 1fr; }
  .related-section { padding: 40px 20px 48px; }
  .related-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 24px 20px; }
  .site-footer-inner { flex-direction: column; gap: 12px; text-align: center; align-items: center; }
  .article-share { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .nav-links a:not(.active) { display: none; }
}

/* ── Index Page ── */
/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding: 0 48px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-logo {
  font-family: var(--f-serif); font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
  display: flex; align-items: center; gap: 4px; text-decoration: none;
}
.nav-logo .spark {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-spark { width: 40px; height: 40px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.nav-links a:hover { color: rgba(255,255,255,0.9); }
.nav-links a.active { color: #fff; }
.nav-tagline {
  font-family: var(--f-sans); font-size: 14px; font-weight: 400;
  color: rgba(255,255,255,0.35); letter-spacing: 0.02em;
  white-space: nowrap; margin-left: 12px;
}
.nav-logo { align-items: flex-end; }
@media (max-width: 768px) { .nav-tagline { display: none; } }

/* ── Hero Header (off-white) ── */
.index-hero {
  background: var(--off);
  padding: 64px 48px 48px;
}
.index-hero-inner {
  max-width: var(--max); margin: 0 auto;
  position: relative;
}
.index-hero-spark {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 160px; height: 160px; opacity: 0.7;
}
.index-hero-text { max-width: 700px; }
@media (max-width: 768px) {
  .index-hero-spark { position: static; transform: none; width: 120px; height: 120px; margin: 0 auto 24px; }
}
.index-hero .sec-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 16px;
}
.index-hero h1 {
  font-family: var(--f-serif); font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 16px; max-width: 700px;
}
.index-hero p {
  font-size: 18px; color: var(--ink-soft); max-width: 600px; line-height: 1.7;
}
.index-hero .rss-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 13px; font-weight: 500; color: var(--violet);
}
.index-hero .rss-link:hover { text-decoration: underline; }

/* ── Tag Filter (white) ── */
.tag-filter-section {
  background: var(--white);
  padding: 24px 48px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.tag-filter-inner { max-width: var(--max); margin: 0 auto; }
.tag-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-btn {
  padding: 6px 16px; font-size: 13px; font-weight: 500;
  border-radius: 20px; background: var(--off); border: 1px solid rgba(0,0,0,0.06);
  color: var(--ink-soft); cursor: pointer; transition: all 0.2s; font-family: var(--f-sans);
}
.tag-btn:hover { border-color: var(--violet); color: var(--violet); }
.tag-btn.active {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  color: #fff; border-color: transparent;
}
.tag-btn.tag-hidden { display: none; }
.tag-btn.tag-more {
  background: transparent; border: 1px dashed rgba(0,0,0,0.15);
  color: var(--violet); font-weight: 600;
}
.tag-btn.tag-more:hover { border-color: var(--violet); background: rgba(139,92,246,0.05); }

/* ── Insights Grid (alternating sections built via JS) ── */
.insights-list {
  padding: 40px 48px 64px;
  background: var(--white);
}
.insights-list-inner { max-width: var(--max); margin: 0 auto; }
.insight-card {
  display: grid; grid-template-columns: 1fr auto; gap: 20px;
  padding: 28px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
  align-items: start; transition: opacity 0.3s;
}
.insight-card:first-child { padding-top: 0; }
.insight-card:last-child { border-bottom: none; }
.ic-body {}
.ic-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ic-type {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet);
}
.ic-date { font-size: 13px; color: var(--ink-muted); }
.ic-title {
  font-family: var(--f-serif); font-size: 22px; font-weight: 700;
  line-height: 1.3; color: var(--ink); margin-bottom: 8px;
  transition: color 0.2s;
}
.insight-card:hover .ic-title { color: var(--violet); }
.ic-excerpt { font-size: 15px; color: var(--ink-soft); line-height: 1.6; max-width: 640px; }
.ic-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ic-tags .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 12px;
  background: var(--off); color: var(--ink-muted);
}
.ic-arrow {
  font-size: 20px; color: var(--ink-muted); padding-top: 8px;
  transition: color 0.2s, transform 0.2s;
}
.insight-card:hover .ic-arrow { color: var(--violet); transform: translateX(4px); }
.insight-card a { text-decoration: none; color: inherit; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--ink-muted); font-size: 16px;
}

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 32px 0 8px; border-top: 1px solid rgba(0,0,0,0.06); margin-top: 16px;
}
.pag-btn {
  font-size: 14px; font-weight: 500; color: var(--violet);
  text-decoration: none; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--violet); transition: all 0.2s;
}
.pag-btn:hover { background: var(--violet); color: #fff; }
.pag-info { font-size: 13px; color: var(--ink-muted); }

/* ── Footer ── */
.site-footer {
  padding: 20px 48px;
  border-top: none;
  background: var(--ink);
  color: rgba(255,255,255,0.5);
}
.site-footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.site-footer-brand {
  display: flex; align-items: center; gap: 10px;
}
.site-footer-brand svg { width: 64px; height: 64px; flex-shrink: 0; }
.site-footer-brand-name {
  font-family: var(--f-serif); font-size: 20px; font-weight: 700;
  color: #fff; letter-spacing: -0.02em;
}
.site-footer-brand-name .spark {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.site-footer-left { font-size: 13px; color: rgba(255,255,255,0.25); }
.site-footer-links { display: flex; gap: 24px; }
.site-footer-links a { font-size: 13px; color: rgba(255,255,255,0.35); transition: color 0.2s; }
.site-footer-links a:hover { color: rgba(255,255,255,0.7); }