/* TraffiClimb blog component CSS v2.0 — DRAFT, not deployed.
 * Scope: ONLY descendants of .tc-blog. WordPress owns header, H1, author, footer and SEO.
 * Visual basis: TraffiClimb Blog Visual Guidelines v1.0 (red #B22222 + neutral).
 * No website dark-mode assumption: this is a light-first design.
 */
.tc-blog {
  --tc-brand: #B22222;
  --tc-brand-hover: #7F1D1D;
  --tc-ink: #18181B;
  --tc-ink-soft: #52525B;
  --tc-muted: #666670;
  --tc-border: #DFE0E4;
  --tc-surface: #FFFFFF;
  --tc-surface-soft: #F5F5F7;
  --tc-surface-tint: #FAF6F6;
  --tc-code-bg: #202025;
  --tc-code-ink: #F3F3F5;
  --tc-warning-bg: #FFF8E7;
  --tc-warning-border: #B46A13;
  --tc-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tc-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px clamp(16px, 3.3vw, 40px) 76px;
  color: var(--tc-ink);
  background: var(--tc-surface);
  color-scheme: light;
  font: 400 17px/1.75 var(--tc-font);
  overflow-wrap: break-word;
}
.tc-blog *, .tc-blog *::before, .tc-blog *::after { box-sizing: border-box; }
/* WordPress theme may use generic section padding and alternating striped backgrounds.
 * Reset them ONLY inside the blog root, before styling intentional components. */
.tc-blog > section {
  position: static;
  isolation: auto;
  display: block;
  padding: 0;
  margin: 0 0 44px;
  min-height: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}
.tc-blog > section::before, .tc-blog > section::after {
  content: none;
  display: none;
  background: none;
}
.tc-blog :is(h2,h3,h4,p,ul,ol,blockquote,figure,pre,table) { max-width: 100%; }
.tc-blog h2, .tc-blog h3, .tc-blog h4 {
  color: var(--tc-ink);
  font-family: var(--tc-font);
  letter-spacing: -.025em;
  text-wrap: pretty;
}
.tc-blog h2 { font-size: clamp(26px,2.6vw,34px); font-weight: 750; line-height: 1.2; margin: 0 0 18px; }
.tc-blog h3 { font-size: clamp(20px,2vw,24px); font-weight: 700; line-height: 1.35; margin: 32px 0 12px; }
.tc-blog p { margin: 0 0 18px; }
.tc-blog .tc-lead { font-size: clamp(18px,1.8vw,20px); line-height: 1.62; color: #2D2D2D; }
.tc-blog strong { color: var(--tc-ink); font-weight: 700; }
.tc-blog a { color: var(--tc-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.tc-blog a:hover { color: var(--tc-brand-hover); }
.tc-blog :focus-visible { outline: 2px solid var(--tc-brand); outline-offset: 4px; }
.tc-blog :is(ul,ol) { margin: 14px 0 24px; padding-left: 1.6em; background: none; border: 0; }
.tc-blog li { margin: 7px 0; }
.tc-blog li::marker { color: var(--tc-brand); }
.tc-blog blockquote { margin: 26px 0; padding: 17px 22px; background: var(--tc-surface-soft); border-left: 3px solid var(--tc-brand); border-radius: 0 18px 18px 0; color: var(--tc-ink-soft); }
.tc-blog blockquote p:last-child { margin-bottom: 0; }
.tc-blog :is(code,pre,kbd) { font-family: var(--tc-mono); }
.tc-blog :not(pre)>code { background: var(--tc-surface-soft); color: var(--tc-brand-hover); border: 1px solid var(--tc-border); border-radius: 5px; padding: .1em .35em; font-size: .86em; overflow-wrap: anywhere; }
.tc-blog pre.tc-code { padding: 20px 22px; margin: 22px 0; font: 400 14px/1.65 var(--tc-mono); color: var(--tc-code-ink); background: var(--tc-code-bg); border: 1px solid #393940; border-radius: 16px; overflow-x: auto; white-space: pre; tab-size: 2; }
.tc-blog pre.tc-code code { font: inherit; color: inherit; background: none; padding: 0; border: 0; }
/* Special modules — only intentional components receive cards */
.tc-blog > section.tc-takeaways { background: var(--tc-surface-tint); border: 1px solid #ECDCDC; border-left: 4px solid var(--tc-brand); border-radius: 16px; padding: 22px 25px; margin: 18px 0 46px; }
.tc-blog .tc-takeaways h2 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
.tc-blog .tc-takeaways ul { margin: 0; }
.tc-blog aside.tc-notice { border: 1px solid #ECDCDC; border-left: 4px solid var(--tc-brand); border-radius: 0 14px 14px 0; padding: 18px 20px; background: var(--tc-surface-tint); margin: 20px 0 26px; }
.tc-blog aside.tc-notice--warning { border-color: #F0DAB0; border-left-color: var(--tc-warning-border); background: var(--tc-warning-bg); }
.tc-blog aside.tc-notice p:last-child { margin: 0; }
/* Tables */
.tc-blog .tc-table-wrap { display: block; width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--tc-border); border-radius: 14px; margin: 24px 0 30px; -webkit-overflow-scrolling: touch; }
.tc-blog .tc-table-wrap table { width: 100%; min-width: 580px; margin: 0; border: 0; border-collapse: collapse; border-spacing: 0; font: 400 15px/1.55 var(--tc-font); color: var(--tc-ink); background: #fff; }
.tc-blog .tc-table-wrap :is(th,td) { text-align: left; vertical-align: top; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--tc-border); background: transparent; color: inherit; }
.tc-blog .tc-table-wrap th { font-weight: 700; font-size: 13px; letter-spacing: .025em; color: #fff; background: #25252A; }
.tc-blog .tc-table-wrap tbody tr:nth-child(even) { background: #F7F7F8; }
.tc-blog .tc-table-wrap tbody tr:last-child td { border-bottom: 0; }
.tc-blog .tc-table-wrap tbody tr:hover { background: #F9EFEF; }
.tc-blog .tc-table-wrap caption { text-align: left; padding: 12px 15px; color: var(--tc-muted); font-size: 13px; caption-side: bottom; }
/* Figures and Mermaid */
.tc-blog figure { margin: 28px 0; }
.tc-blog figure img { display: block; width: 100%; height: auto; border-radius: 15px; }
.tc-blog figcaption { margin: 0 0 12px; color: var(--tc-ink-soft); font-size: 14px; line-height: 1.5; }
.tc-blog .tc-mermaid-container { padding: 18px 16px; border: 1px solid var(--tc-border); border-radius: 16px; background: var(--tc-surface-soft); max-width: 100%; overflow-x: auto; }
.tc-blog .tc-mermaid-source { margin: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; background: none; color: var(--tc-ink-soft); }
.tc-blog .tc-mermaid-source[hidden] { display: none; }
.tc-blog .tc-mermaid-output { display: none; min-width: 265px; }
.tc-blog .tc-mermaid-output.is-ready { display: block; }
.tc-blog .tc-mermaid-output svg { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; }
.tc-blog .tc-mermaid-status { margin: 10px 0 0; color: var(--tc-muted); font-size: 13px; }
/* FAQ, references and CTA */
.tc-blog > section.tc-faq { padding: 0; margin-top: 50px; }
.tc-blog .tc-faq details { margin: 12px 0; padding: 0; border: 1px solid var(--tc-border); border-radius: 14px; overflow: hidden; background: var(--tc-surface); }
.tc-blog .tc-faq details[open] { border-color: #D7B5B5; }
.tc-blog .tc-faq summary { display: list-item; cursor: pointer; padding: 15px 20px; font-weight: 700; color: var(--tc-ink); background: var(--tc-surface); }
.tc-blog .tc-faq summary::marker { color: var(--tc-brand); }
.tc-blog .tc-faq .tc-faq-answer { padding: 0 20px 16px; color: var(--tc-ink-soft); }
.tc-blog .tc-faq .tc-faq-answer p:last-child { margin-bottom: 0; }
.tc-blog > section.tc-cta { padding: 30px clamp(22px,4vw,38px); border: 0; border-radius: 22px; background: linear-gradient(135deg,#242429 0%,#36363D 100%); color: #F3F3F5; margin: 46px 0 52px; }
.tc-blog .tc-cta h2 { color: #FFFFFF; font-size: clamp(23px,2vw,28px); margin: 0 0 12px; }
.tc-blog .tc-cta p { color: #E6E6E9; max-width: 650px; }
.tc-blog a.tc-button { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 10px 23px; border-radius: 10px; font-weight: 700; font-size: 15px; background: var(--tc-brand); border: 1px solid #C94040; color: #fff; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.tc-blog a.tc-button:hover { background: var(--tc-brand-hover); color: #fff; transform: translateY(-1px); }
.tc-blog > section.tc-references { border-top: 1px solid var(--tc-border); padding: 26px 0 0; margin: 46px 0 0; }
.tc-blog .tc-references h2 { font-size: 24px; }
.tc-blog .tc-references :is(li,p) { font-size: 14px; line-height: 1.65; color: var(--tc-ink-soft); }
@media (max-width: 680px) {
  .tc-blog { padding: 18px 16px 56px; font-size: 16px; }
  .tc-blog > section { margin-bottom: 36px; }
  .tc-blog h2 { font-size: clamp(24px,6vw,29px); }
  .tc-blog h3 { font-size: 20px; }
  .tc-blog > section.tc-takeaways { padding: 18px 20px; }
  .tc-blog > section.tc-cta { padding: 26px 22px; }
  .tc-blog .tc-table-wrap :is(td,th) { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-blog a.tc-button { transition: none; transform: none; }
}
@media print {
  .tc-blog { max-width: none; padding: 0; color: #111; background: #fff; }
  .tc-blog .tc-cta { display: none; }
  .tc-blog .tc-table-wrap { overflow: visible; }
  .tc-blog .tc-table-wrap table { min-width: 0; }
  .tc-blog a { color: #222; text-decoration: underline; }
  .tc-blog pre.tc-code { color: #111; background: #F5F5F7; border-color: #bbb; }
}
