/* Sema Legacy — Blog / Article Styles */
/* Extends styles.css + lp.css — do not import those again, just link blog.css after them */

/* ── Article layout ──────────────────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr min(720px, 100%) 1fr;
  gap: 0;
  padding: 0 16px;
}
.article-layout > * { grid-column: 2; }
.article-layout > .article-wide { grid-column: 1 / -1; max-width: var(--max-w, 1080px); margin: 0 auto; width: 100%; padding: 0 16px; }

/* ── Reading progress bar ────────────────────────────────────────────────── */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; background: var(--primary, #E63946);
  width: 0%; z-index: 200; transition: width .1s linear;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: .78rem; color: rgba(240,240,244,.45); display: flex; gap: 6px;
  align-items: center; padding: 28px 0 0;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary, #E63946); }
.breadcrumb span { opacity: .35; }

/* ── Article hero ────────────────────────────────────────────────────────── */
.article-hero {
  padding: 24px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 48px;
}
.article-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--primary, #E63946); margin-bottom: 16px;
}
.article-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -.025em;
  margin-bottom: 20px; max-width: 720px;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  font-size: .8rem; color: rgba(240,240,244,.5);
}
.article-meta .sep { opacity: .3; }
.article-meta strong { color: rgba(240,240,244,.8); font-weight: 500; }
.article-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(230,57,70,.12); color: var(--primary, #E63946);
  border: 1px solid rgba(230,57,70,.25); border-radius: 20px;
  padding: 3px 12px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}

/* ── Article body ────────────────────────────────────────────────────────── */
.article-body { padding-bottom: 64px; }
.article-body h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
  margin: 52px 0 16px; color: var(--text, #F0F0F4);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600; letter-spacing: -.015em; line-height: 1.3;
  margin: 36px 0 12px; color: var(--text, #F0F0F4);
}
.article-body p {
  font-size: 1.02rem; line-height: 1.8; color: rgba(240,240,244,.85);
  margin-bottom: 20px;
}
.article-body p strong { color: var(--text, #F0F0F4); font-weight: 600; }
.article-body ul, .article-body ol {
  padding-left: 1.4em; margin: 0 0 20px;
  color: rgba(240,240,244,.85); font-size: 1.02rem; line-height: 1.8;
}
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--primary, #E63946); text-decoration: underline; text-decoration-color: rgba(230,57,70,.4); }
.article-body a:hover { text-decoration-color: var(--primary, #E63946); }
.article-body hr { border: none; border-top: 1px solid rgba(255,255,255,.07); margin: 48px 0; }

/* ── Callout boxes ───────────────────────────────────────────────────────── */
.callout {
  border-radius: 12px; padding: 20px 24px; margin: 28px 0;
  border-left: 4px solid;
}
.callout-key {
  background: rgba(230,57,70,.08); border-color: var(--primary, #E63946);
}
.callout-tip {
  background: rgba(34,197,94,.08); border-color: #22C55E;
}
.callout-warning {
  background: rgba(245,158,11,.08); border-color: #F59E0B;
}
.callout-info {
  background: rgba(99,102,241,.08); border-color: #6366F1;
}
.callout-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 8px; opacity: .7;
}
.callout-key .callout-label { color: var(--primary, #E63946); }
.callout-tip .callout-label { color: #22C55E; }
.callout-warning .callout-label { color: #F59E0B; }
.callout-info .callout-label { color: #6366F1; }
.callout p { margin: 0; font-size: .95rem; line-height: 1.7; }
.callout p + p { margin-top: 10px; }
.callout strong { color: var(--text, #F0F0F4); }

/* ── Data tables ─────────────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; margin: 28px 0; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  background: rgba(255,255,255,.05); color: rgba(240,240,244,.7);
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.04); color: rgba(240,240,244,.8); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.data-table .highlight { color: var(--primary, #E63946); font-weight: 600; }
.data-table .positive { color: #22C55E; font-weight: 600; }

/* ── Stat callout (big number) ───────────────────────────────────────────── */
.stat-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin: 32px 0;
}
.stat-item {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 20px; text-align: center;
}
.stat-item .stat-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem; font-weight: 700; color: var(--primary, #E63946);
  line-height: 1; display: block; margin-bottom: 6px;
}
.stat-item .stat-label { font-size: .8rem; color: rgba(240,240,244,.5); line-height: 1.4; }

/* ── Step list ───────────────────────────────────────────────────────────── */
.step-list { list-style: none; padding: 0; margin: 24px 0; counter-reset: steps; }
.step-list li {
  counter-increment: steps; display: flex; gap: 16px;
  align-items: flex-start; margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.step-list li:last-child { border-bottom: none; margin-bottom: 0; }
.step-list li::before {
  content: counter(steps); min-width: 32px; height: 32px;
  background: var(--primary, #E63946); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.step-list li strong { display: block; font-size: .95rem; margin-bottom: 4px; color: var(--text, #F0F0F4); }
.step-list li span { font-size: .9rem; color: rgba(240,240,244,.65); line-height: 1.6; }

/* ── Comparison list ─────────────────────────────────────────────────────── */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.pros-cons-col { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 20px; }
.pros-cons-col h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.pros-cons-col.pros h4 { color: #22C55E; }
.pros-cons-col.cons h4 { color: #F59E0B; }
.pros-cons-col ul { padding-left: 1.2em; margin: 0; }
.pros-cons-col li { font-size: .88rem; margin-bottom: 8px; color: rgba(240,240,244,.75); line-height: 1.5; }
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }

/* ── Author bio ──────────────────────────────────────────────────────────── */
.author-bio {
  display: flex; gap: 20px; align-items: flex-start;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 28px; margin: 56px 0 40px;
}
.author-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--primary, #E63946);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; color: #fff; flex-shrink: 0;
  font-family: 'Fraunces', Georgia, serif;
}
.author-bio-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.author-bio-info .author-title { font-size: .8rem; color: var(--primary, #E63946); margin-bottom: 10px; font-weight: 500; }
.author-bio-info p { font-size: .875rem; color: rgba(240,240,244,.6); line-height: 1.6; margin: 0; }
@media (max-width: 500px) { .author-bio { flex-direction: column; } }

/* ── Sources / citations ─────────────────────────────────────────────────── */
.sources-box {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; padding: 20px 24px; margin-top: 40px;
}
.sources-box h5 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(240,240,244,.4); margin-bottom: 12px;
}
.sources-box ol { padding-left: 1.2em; margin: 0; }
.sources-box li { font-size: .82rem; color: rgba(240,240,244,.4); margin-bottom: 6px; line-height: 1.5; }
.sources-box a { color: rgba(240,240,244,.4); text-decoration: underline; }
.sources-box a:hover { color: var(--primary, #E63946); }

/* ── Article CTA ─────────────────────────────────────────────────────────── */
.article-cta {
  background: linear-gradient(135deg, rgba(230,57,70,.12) 0%, rgba(230,57,70,.04) 100%);
  border: 1px solid rgba(230,57,70,.25); border-radius: 16px;
  padding: 40px; margin: 48px 0; text-align: center;
}
.article-cta h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700;
  margin-bottom: 12px; letter-spacing: -.02em;
}
.article-cta p { font-size: .95rem; color: rgba(240,240,244,.65); margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }
.article-cta .btn { display: inline-block; padding: 14px 36px; background: var(--primary, #E63946); color: #fff; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: .95rem; transition: background .15s; }
.article-cta .btn:hover { background: #F04450; text-decoration: none; }
.article-cta .sub { font-size: .78rem; color: rgba(240,240,244,.35); margin-top: 12px; margin-bottom: 0; }

/* ── Related articles ────────────────────────────────────────────────────── */
.related-articles { padding: 48px 0; border-top: 1px solid rgba(255,255,255,.07); }
.related-articles h3 {
  font-family: 'Fraunces', Georgia, serif; font-size: 1.3rem; font-weight: 700;
  margin-bottom: 24px; letter-spacing: -.02em;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.related-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 20px; text-decoration: none; color: var(--text, #F0F0F4);
  transition: border-color .2s, transform .2s;
  display: flex; flex-direction: column; gap: 8px;
}
.related-card:hover { border-color: rgba(230,57,70,.4); transform: translateY(-2px); text-decoration: none; }
.related-card .rc-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary, #E63946); font-weight: 700; }
.related-card .rc-title { font-size: .92rem; font-weight: 600; line-height: 1.4; color: var(--text, #F0F0F4); }
.related-card .rc-desc { font-size: .82rem; color: rgba(240,240,244,.5); line-height: 1.5; }

/* ── TOC (table of contents) ─────────────────────────────────────────────── */
.toc-box {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 24px; margin: 0 0 40px;
}
.toc-box h4 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(240,240,244,.4); margin-bottom: 16px;
}
.toc-box ol { padding-left: 1.2em; margin: 0; }
.toc-box li { font-size: .88rem; margin-bottom: 8px; line-height: 1.4; }
.toc-box a { color: rgba(240,240,244,.7); text-decoration: none; }
.toc-box a:hover { color: var(--primary, #E63946); }

/* ── Blog index ──────────────────────────────────────────────────────────── */
.blog-hero { padding: 80px 0 48px; text-align: center; }
.blog-hero h1 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 16px; }
.blog-hero p { font-size: 1.1rem; color: rgba(240,240,244,.6); max-width: 540px; margin: 0 auto; }
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 32px 0; }
.blog-filter-btn {
  padding: 8px 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  background: transparent; color: rgba(240,240,244,.65); font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.blog-filter-btn:hover, .blog-filter-btn.active {
  background: var(--primary, #E63946); border-color: var(--primary, #E63946); color: #fff;
}
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding-bottom: 80px; }
.blog-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px; padding: 28px; text-decoration: none; color: var(--text, #F0F0F4);
  transition: border-color .2s, transform .2s; display: flex; flex-direction: column; gap: 12px;
}
.blog-card:hover { border-color: rgba(230,57,70,.4); transform: translateY(-3px); text-decoration: none; }
.blog-card .bc-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.blog-card .bc-title { font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.blog-card .bc-desc { font-size: .875rem; color: rgba(240,240,244,.55); line-height: 1.6; flex: 1; }
.blog-card .bc-meta { font-size: .75rem; color: rgba(240,240,244,.35); display: flex; gap: 12px; align-items: center; border-top: 1px solid rgba(255,255,255,.06); padding-top: 12px; margin-top: auto; }
.blog-card .bc-pillar { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* Topic colors */
.tag-ep, .bc-ep   { color: #60A5FA; } .bg-ep   { background: rgba(96,165,250,.15); }
.tag-ss, .bc-ss   { color: #A78BFA; } .bg-ss   { background: rgba(167,139,250,.15); }
.tag-mc, .bc-mc   { color: #34D399; } .bg-mc   { background: rgba(52,211,153,.15); }
.tag-ltc, .bc-ltc { color: #F59E0B; } .bg-ltc  { background: rgba(245,158,11,.15); }
.tag-rp, .bc-rp   { color: #F97316; } .bg-rp   { background: rgba(249,115,22,.15); }
.tag-tir, .bc-tir { color: #EC4899; } .bg-tir  { background: rgba(236,72,153,.15); }
.tag-sn, .bc-sn   { color: #22D3EE; } .bg-sn   { background: rgba(34,211,238,.15); }

/* Light theme overrides */
[data-theme="light"] .breadcrumb { color: rgba(15,15,20,.45); }
[data-theme="light"] .article-hero { border-bottom-color: rgba(0,0,0,.08); }
[data-theme="light"] .article-meta { color: rgba(15,15,20,.5); }
[data-theme="light"] .article-meta strong { color: rgba(15,15,20,.8); }
[data-theme="light"] .article-body p { color: rgba(15,15,20,.82); }
[data-theme="light"] .article-body p strong { color: rgba(15,15,20,1); }
[data-theme="light"] .article-body ul,
[data-theme="light"] .article-body ol { color: rgba(15,15,20,.82); }
[data-theme="light"] .article-body hr { border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .callout-key { background: rgba(214,40,40,.06); }
[data-theme="light"] .callout-tip { background: rgba(22,163,74,.06); }
[data-theme="light"] .callout-warning { background: rgba(217,119,6,.06); }
[data-theme="light"] .callout p { color: rgba(15,15,20,.8); }
[data-theme="light"] .callout strong { color: rgba(15,15,20,1); }
[data-theme="light"] .data-table-wrap { border-color: rgba(0,0,0,.1); }
[data-theme="light"] .data-table th { background: rgba(0,0,0,.04); color: rgba(15,15,20,.6); border-bottom-color: rgba(0,0,0,.08); }
[data-theme="light"] .data-table td { color: rgba(15,15,20,.8); border-bottom-color: rgba(0,0,0,.05); }
[data-theme="light"] .data-table tr:hover td { background: rgba(0,0,0,.02); }
[data-theme="light"] .stat-item { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .stat-item .stat-label { color: rgba(15,15,20,.5); }
[data-theme="light"] .step-list li { border-bottom-color: rgba(0,0,0,.07); }
[data-theme="light"] .step-list li span { color: rgba(15,15,20,.65); }
[data-theme="light"] .pros-cons-col { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .pros-cons-col li { color: rgba(15,15,20,.75); }
[data-theme="light"] .author-bio { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .author-bio-info p { color: rgba(15,15,20,.6); }
[data-theme="light"] .sources-box { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .sources-box h5 { color: rgba(15,15,20,.4); }
[data-theme="light"] .sources-box li { color: rgba(15,15,20,.5); }
[data-theme="light"] .sources-box a { color: rgba(15,15,20,.5); }
[data-theme="light"] .article-cta { background: linear-gradient(135deg, rgba(214,40,40,.08) 0%, rgba(214,40,40,.02) 100%); border-color: rgba(214,40,40,.2); }
[data-theme="light"] .article-cta p { color: rgba(15,15,20,.65); }
[data-theme="light"] .article-cta .sub { color: rgba(15,15,20,.4); }
[data-theme="light"] .related-articles { border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .related-card { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .related-card .rc-desc { color: rgba(15,15,20,.5); }
[data-theme="light"] .toc-box { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .toc-box h4 { color: rgba(15,15,20,.4); }
[data-theme="light"] .toc-box a { color: rgba(15,15,20,.7); }
[data-theme="light"] .blog-hero p { color: rgba(15,15,20,.6); }
[data-theme="light"] .blog-filter-btn { border-color: rgba(0,0,0,.15); color: rgba(15,15,20,.6); }
[data-theme="light"] .blog-card { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .blog-card .bc-desc { color: rgba(15,15,20,.55); }
[data-theme="light"] .blog-card .bc-meta { color: rgba(15,15,20,.4); border-top-color: rgba(0,0,0,.07); }

@media (max-width: 640px) {
  .article-hero h1 { font-size: 1.7rem; }
  .related-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 28px 20px; }
}
