/* Blog index and scoped article template; global shell stays in base/nav/footer. */
.tc-page .page-wrapper { padding-top: 0; }
.tc-blog-index, .tc-blog-article { position: relative; z-index: 1; }
.tc-blog-index h1 { font-family: var(--tc-font-body) !important; }
.tc-lede {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--tc-ink-2);
  line-height: 1.55;
  max-width: 52ch;
  margin: 0;
}
.tc-kicker {
  font-family: var(--tc-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--tc-ink-3);
  font-weight: 400;
  display: inline-block;
}
.tc-kicker .tc-n { color: var(--tc-accent); }
.tc-btn-ink { background: var(--tc-ink); color: var(--tc-canvas); }
.tc-btn-ink:hover { transform: translateY(-2px); }
.tc-hero { position: relative; overflow: clip; }
.tc-hero .tc-kicker { margin-bottom: 28px; }
.tc-hero .tc-lede { margin-bottom: 40px; }
/* Blog card: the handoff's inline card styles, plus the hover its transition implies
   (the prototype declares the transition but never a :hover — this follows its
   sibling card hovers, e.g. .value-card/.product-card: lift + brighter rule). */
.tc-blog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--tc-card);
  border: 1px solid var(--tc-line);
  border-radius: 20px;
  text-decoration: none;
  color: var(--tc-ink);
  transition: border-color 200ms, transform 200ms;
}
.tc-blog-card:hover { transform: translateY(-6px); border-color: var(--tc-line-2); }
@media (prefers-reduced-motion: reduce) {
  .tc-blog-card:hover { transform: none; }
}
.tc-blog-newsletter { max-width: 420px; margin: 0 auto; }
.tc-blog-newsletter-row { display: flex; gap: 8px; }
.tc-blog-newsletter-row input { min-width: 0; line-height: normal; }
.tc-article-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(103,68,218,.15);
  color: #6744da;
  border: 1px solid rgba(103,68,218,.25);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/*
 * Article template. The handoff article renders its inline template block on top of
 * style.css's generic .article-* rules; this is that cascade resolved into one set, so
 * the TOC's 1px column rule + 2px per-link rule and the header's bottom rule are the
 * prototype's own (measured), not a merge accident.
 */
.tc-article-header {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.tc-article-badge-row { margin-bottom: 12px; }
.tc-article-header h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 820px;
  margin: 12px 0 0;
}
.tc-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 56px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 60px;
  align-items: start;
}
.tc-article-layout.tc-article-layout-solo { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.tc-article-body { max-width: 820px; min-width: 0; }
.tc-article-toc {
  position: sticky;
  top: 80px;
  align-self: start;
  border-left: 1px solid var(--border);
  padding: 8px 0 8px 16px;
  font-size: 13px;
}
.tc-article-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.tc-article-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  line-height: 1.6;
}
.tc-article-toc-list a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.tc-article-toc-list a.tc-active { color: var(--tc-accent, #6744da); font-weight: 700; border-left-color: var(--accent); }
.tc-article-toc-list a.tc-toc-h3 { padding-left: 12px; font-size: 12px; }
@media (max-width: 900px) {
  .tc-article-layout { grid-template-columns: 1fr; }
  .tc-article-toc { display: none; }
}
/* Must precede the callouts below: .tldr p shrinks it to 15.5px at equal specificity. */
.tc-article-body p { font-size: 16px; }
.tc-article-body ul,
.tc-article-body ol { margin: 0 0 20px 24px; }
.tc-article-body li { font-size: 16px; line-height: 1.8; margin-bottom: 8px; }
.tc-article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
:where(.tc-article-body) .tldr {background:rgba(103,68,218,.08);border:1px solid rgba(103,68,218,.25);border-left:3px solid #6744da;border-radius:12px;padding:18px 22px;margin:0 0 26px}
:where(.tc-article-body) .tldr p {font-size:15.5px;color:var(--text-secondary);margin:0;line-height:1.7}
:where(.tc-article-body) .tldr b {color:var(--text-primary)}
:where(.tc-article-body) .keytake {background:rgba(34,211,238,.08);border:1px solid rgba(34,211,238,.25);border-left:3px solid #22d3ee;border-radius:10px;padding:14px 18px;font-size:14.5px;color:var(--text-secondary);margin:18px 0;line-height:1.7}
:where(.tc-article-body) .keytake b {color:var(--text-primary)}
:where(.tc-article-body) .pitfall {background:rgba(220,80,80,.07);border:1px solid rgba(220,80,80,.25);border-left:3px solid #dc5050;border-radius:10px;padding:14px 18px;font-size:14.5px;color:var(--text-secondary);margin:18px 0;line-height:1.7}
:where(.tc-article-body) .pitfall b {color:#dc5050}
:where(.tc-article-body) .deep-dive {background:linear-gradient(135deg,rgba(103,68,218,.06),rgba(34,211,238,.06));border:1px solid var(--border);border-radius:12px;padding:18px 22px;margin:26px 0;font-size:14.5px}
:where(.tc-article-body) .deep-dive a {color:var(--tc-accent,#6744da);font-weight:700}
:where(.tc-article-body) table.btab {width:100%;border-collapse:collapse;margin:18px 0;font-size:14px}
:where(.tc-article-body) table.btab th,
:where(.tc-article-body) table.btab td {border:1px solid var(--border);padding:10px 12px;text-align:left;vertical-align:top;color:var(--text-secondary)}
:where(.tc-article-body) table.btab th {background:var(--bg-card);color:var(--text-primary);font-weight:700}
:where(.tc-article-body) .article-figure {margin:26px 0;border:1px solid var(--border);border-radius:12px;padding:18px;background:var(--bg-card)}
:where(.tc-article-body) .article-figure svg {width:100%;height:auto;display:block}
:where(.tc-article-body) .article-figure figcaption {font-size:13px;color:var(--text-secondary);margin-top:10px;line-height:1.55;font-style:italic}
:where(.tc-article-body) .fig-box {fill:rgba(103,68,218,.06);stroke:#6744da;stroke-width:1.5}
:where(.tc-article-body) .fig-accent {fill:rgba(34,211,238,.12);stroke:#22d3ee;stroke-width:1.5}
:where(.tc-article-body) .fig-warn {fill:rgba(220,80,80,.06);stroke:#dc5050;stroke-width:1.5}
:where(.tc-article-body) .fig-label {font-family:sans-serif;font-size:13px;font-weight:700;fill:#111}
:where(.tc-article-body) .fig-sub {font-family:sans-serif;font-size:11px;fill:#555}
:where(.tc-article-body) .fig-arrow {stroke:#6744da;stroke-width:2;fill:none}
:where(.tc-article-body) .fq {padding:18px 0;border-bottom:1px solid var(--border)}
:where(.tc-article-body) .fq h3 {font-size:17px;font-weight:700;margin:0 0 8px;color:var(--text-primary)}
:where(.tc-article-body) .fq p {color:var(--text-secondary);margin:0 0 8px;line-height:1.7}
.tc-article-body h2 {font-size:26px;margin:44px 0 14px;font-weight:800;scroll-margin-top:80px}
.tc-article-body h3 {font-size:19px;margin:26px 0 10px;font-weight:700}
.tc-article-body p {line-height:1.75;margin:0 0 14px;color:var(--text-secondary)}
.tc-article-body ul,
.tc-article-body ol {color:var(--text-secondary);line-height:1.75}
:where(.tc-article-body) pre {background:var(--bg-card);border:1px solid var(--border);padding:14px 16px;border-radius:8px;overflow-x:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;line-height:1.55;color:var(--text-secondary)}
:where(.tc-article-body) code {background:var(--bg-card);border:1px solid var(--border);padding:1px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
/* Match the template's base reset, which runs before its article-specific rules. */
.tc-article-body :where(ul, ol) { margin: 0; padding: 0; }
.tc-article-body :where(b, strong) { font-weight: 700; }
.tc-article-body [style*="italic"], .tc-article-body :is(em, i, cite, dfn, address, var) { font-style: normal !important; }
/* The source hard-codes dark SVG labels; use themed ink for readable diagrams. */
:where(.tc-article-body) .fig-label { fill: var(--tc-ink); }
:where(.tc-article-body) .fig-sub { fill: var(--tc-ink-2); }
.tc-article-body .btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: var(--tc-font-display); font-weight: 500; font-size: 15px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .tc-blog-grid { grid-template-columns: minmax(0, 1fr) !important; }
  :where(.tc-article-body) .btab { display: block; max-width: 100%; overflow-x: auto; }
  .tc-article-body :is(img, svg, video, iframe) { max-width: 100%; }
}

/* Imported inline styles use these legacy names; alias them only within the article. */
.tc-blog-article {
  --bg-card: var(--tc-card);
  --border: var(--tc-line);
  --text-primary: var(--tc-ink);
  --text-secondary: var(--tc-ink-2);
  --accent: var(--tc-accent);
  --font: var(--tc-font-body);
  --font-display: var(--tc-font-display);
}
.tc-article-body :is(h2, h3) { letter-spacing: -0.02em; }
