/* ════════════════════════════════════════════════════════════════════════
   Company blog (closeflow.ca/blog) - public article + index styles.
   Pairs with templates/blog_public/*.html and api/_company_blog.md_to_html
   (.cb-prose dialect). Tokens only (no raw hex - ds-audit R7 applies to new
   css files). Site chrome (header/footer) comes from site-chrome.css.
   ════════════════════════════════════════════════════════════════════════ */

.cb-body {
  background: var(--cf-bg-warm, var(--bg));
  color: var(--cf-text, var(--text));
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.cb-main { max-width: 720px; margin: 0 auto; padding: 48px 22px 72px; }

.cb-preview-banner {
  margin-bottom: 24px; padding: 10px 14px; border-radius: 10px;
  background: var(--warning-bg, var(--cf-accent-tint));
  color: var(--warning, var(--cf-accent));
  font-size: 13px; font-weight: 600; text-align: center;
}

/* ── Article head ── */
.cb-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cf-accent, var(--accent)); margin-bottom: 14px;
}
.cb-eyebrow a { color: inherit; text-decoration: none; }
.cb-eyebrow a:hover { text-decoration: underline; }
.cb-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(30px, 6vw, 42px); font-weight: 600; letter-spacing: -.015em;
  line-height: 1.15; margin: 0 0 16px;
}
.cb-byline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13.5px; color: var(--cf-gray-600, var(--muted)); margin-bottom: 28px;
}
.cb-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ── Hero + inline figures ── */
.cb-hero { margin: 0 0 30px; }
.cb-hero img, .cb-fig img.cb-img {
  width: 100%; height: auto; border-radius: 14px; display: block;
  border: 1px solid var(--cf-border-subtle, var(--border));
}
.cb-fig { margin: 26px 0; }
.cb-cap {
  margin-top: 8px; font-size: 12px; color: var(--cf-gray-400, var(--muted));
  text-align: center;
}

/* ── Prose ── */
.cb-prose { font-size: 16.5px; line-height: 1.75; }
.cb-prose p { margin: 0 0 18px; }
.cb-prose h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 26px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25;
  margin: 38px 0 14px;
}
.cb-prose h3 {
  font-size: 19px; font-weight: 650; line-height: 1.3; margin: 28px 0 10px;
}
.cb-prose h4 { font-size: 16px; font-weight: 650; margin: 22px 0 8px; }
.cb-prose ul, .cb-prose ol { margin: 0 0 18px; padding-left: 26px; }
.cb-prose li { margin-bottom: 8px; }
.cb-prose a { color: var(--cf-accent, var(--accent)); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.cb-prose blockquote {
  margin: 24px 0; padding: 14px 18px; border-left: 3px solid var(--cf-accent, var(--accent));
  background: var(--cf-accent-tint, var(--card)); border-radius: 0 10px 10px 0;
  font-size: 15.5px; color: var(--cf-text-secondary, var(--text));
}
.cb-prose strong { font-weight: 650; }

/* Tables: wide comparison content scrolls inside its own container on phones
   (the app-wide horizontal-overflow rule) - the page never scrolls sideways. */
.cb-table-wrap {
  margin: 24px 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--cf-border, var(--border)); border-radius: 12px;
}
.cb-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.cb-table th {
  text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
  color: var(--cf-gray-600, var(--muted));
  background: var(--cf-bg, var(--card));
  border-bottom: 1px solid var(--cf-border, var(--border));
}
.cb-table td {
  padding: 11px 14px; vertical-align: top; line-height: 1.55;
  border-bottom: 1px solid var(--cf-border-subtle, var(--border));
  background: var(--cf-bg, var(--card));
}
.cb-table tbody tr:last-child td { border-bottom: 0; }

/* ── FAQ ── */
.cb-faq { margin-top: 44px; padding-top: 8px; }
.cb-faq h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 26px; font-weight: 600; margin: 0 0 18px;
}
.cb-faq-item {
  padding: 16px 18px; margin-bottom: 12px; border-radius: 12px;
  background: var(--cf-bg, var(--card)); border: 1px solid var(--cf-border-subtle, var(--border));
}
.cb-faq-q { font-size: 15.5px; font-weight: 650; margin: 0 0 8px; }
.cb-faq-a { font-size: 14.5px; line-height: 1.65; margin: 0; color: var(--cf-text-secondary, var(--text)); }

/* ── Sources ── */
.cb-sources { margin-top: 40px; font-size: 13.5px; color: var(--cf-gray-600, var(--muted)); }
.cb-sources h2 { font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }
.cb-sources ul { margin: 0; padding-left: 20px; }
.cb-sources li { margin-bottom: 6px; }
.cb-sources a { color: var(--cf-accent, var(--accent)); }
.cb-src-date { color: var(--cf-gray-400, var(--muted)); }

/* ── Related ── */
.cb-related { margin-top: 56px; border-top: 1px solid var(--cf-border, var(--border)); padding-top: 32px; }
.cb-related h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px; font-weight: 600; margin: 0 0 18px;
}
.cb-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .cb-rel-grid { grid-template-columns: minmax(0, 1fr); } }
.cb-rel-card {
  display: block; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden;
  background: var(--cf-bg, var(--card)); border: 1px solid var(--cf-border-subtle, var(--border));
}
.cb-rel-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.cb-rel-body { padding: 12px 14px 14px; }
.cb-rel-title { font-size: 14px; font-weight: 650; line-height: 1.35; margin-bottom: 6px; }
.cb-rel-sub {
  font-size: 12.5px; line-height: 1.5; color: var(--cf-gray-600, var(--muted));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Index page ── */
.cb-index-head { text-align: center; margin-bottom: 40px; }
.cb-index-sub {
  max-width: 520px; margin: 0 auto; font-size: 15.5px; line-height: 1.65;
  color: var(--cf-gray-600, var(--muted));
}
.cb-index-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.cb-card {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0;
  text-decoration: none; color: inherit; border-radius: 14px; overflow: hidden;
  background: var(--cf-bg, var(--card)); border: 1px solid var(--cf-border-subtle, var(--border));
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cb-card:hover { border-color: var(--cf-accent, var(--accent)); box-shadow: 0 8px 26px rgba(30,25,20,.07); }
.cb-card-img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; display: block; }
.cb-card-body { padding: 18px 20px; }
.cb-card-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 8px;
}
.cb-card-sub { font-size: 14px; line-height: 1.6; color: var(--cf-gray-600, var(--muted)); margin: 0 0 12px; }
.cb-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--cf-gray-400, var(--muted));
}
@media (max-width: 640px) {
  .cb-card { grid-template-columns: minmax(0, 1fr); }
  .cb-card-img { height: 170px; min-height: 0; }
}
.cb-index-empty { text-align: center; color: var(--cf-gray-600, var(--muted)); }
