/* The blog, guides and About page (built by scripts/build-site.tsx). They sit inside the landing page's
   header and footer and use its tokens (cf.css) and font, so every public page reads as one site. */

.cf-site {
  --cf-max: 1180px;
  --cf-text: 760px;
  color: var(--cf-ink);
  background: #fff;
  font-family: Inter, sans-serif;
  padding: 56px 0 96px;
}
.cf-wrap { width: 100%; max-width: var(--cf-max); margin: 0 auto; padding: 0 24px; }
.cf-site a { color: inherit; }
.cf-meta { font-size: 14px; color: var(--cf-muted); }
.cf-eyebrow { font-size: 14px; font-weight: 500; color: var(--cf-accent); text-transform: uppercase; letter-spacing: .06em; }
.cf-lead { margin: 16px 0 0; font-size: 18px; line-height: 1.55; color: var(--cf-muted); max-width: 640px; }

.cf-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  background: var(--cf-ink); color: #fff !important; font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.cf-btn:hover { background: #2a2a2d; transform: translateY(-1px); }

/* ---------------------------------------------------------------- index */
.cf-page-head { max-width: 760px; margin-bottom: 48px; }
.cf-page-head h1, .cf-post-head h1 {
  margin: 12px 0 0; font-size: 48px; line-height: 1.08; font-weight: 500; letter-spacing: -1.6px;
}
.cf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cf-card {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--cf-line); border-radius: 12px;
  background: #fff; text-decoration: none; transition: box-shadow .2s ease, transform .2s ease;
}
.cf-card:hover { box-shadow: 0 10px 30px rgba(11, 11, 12, .08); transform: translateY(-2px); }
.cf-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--cf-soft); display: block; }
.cf-card-body { padding: 18px 20px 22px; }
.cf-card-title { margin-top: 8px; font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -.4px; }
.cf-card-text {
  margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--cf-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------------------------------------------------------- guide */
.cf-post { max-width: calc(var(--cf-text) + 48px); }
.cf-crumbs { font-size: 14px; color: var(--cf-muted); }
.cf-crumbs a { text-decoration: none; }
.cf-crumbs a:hover { color: var(--cf-ink); }
.cf-crumbs > span:last-child > span { display: none; }
.cf-post-head h1 { font-size: 44px; }
.cf-post-head .cf-meta { margin-top: 16px; }
.cf-cover { width: 100%; height: auto; margin: 32px 0 8px; border-radius: 12px; background: var(--cf-soft); display: block; }

.cf-article { font-size: 17px; line-height: 1.7; color: #26262a; }
.cf-article > * + * { margin-top: 18px; }
.cf-article h2 { margin-top: 44px; font-size: 30px; line-height: 1.2; font-weight: 500; letter-spacing: -.8px; color: var(--cf-ink); scroll-margin-top: 96px; }
.cf-article h3 { margin-top: 32px; font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -.4px; color: var(--cf-ink); scroll-margin-top: 96px; }
.cf-article p, .cf-article li { color: #26262a; }
.cf-article ul, .cf-article ol { padding-left: 22px; }
.cf-article li + li { margin-top: 6px; }
.cf-article a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(11, 11, 12, .35); }
.cf-article a:hover { text-decoration-color: var(--cf-accent); }
.cf-article strong { color: var(--cf-ink); font-weight: 600; }
.cf-article code { padding: 1px 6px; border-radius: 6px; background: var(--cf-soft); font-size: .9em; }
.cf-article blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--cf-accent); color: var(--cf-muted); }
.cf-article hr { border: 0; border-top: 1px solid var(--cf-line); margin: 36px 0; }

.cf-answer, .cf-box { padding: 20px 22px; border-radius: 12px; }
.cf-answer { margin-top: 32px; background: var(--cf-soft); border-left: 3px solid var(--cf-accent); }
.cf-box { border: 1px solid var(--cf-line); }
.cf-box-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--cf-muted); margin-bottom: 8px; }
.cf-answer p { margin: 0; font-size: 18px; color: var(--cf-ink); }
.cf-box ul, .cf-box ol { margin: 0; }
.cf-toc a { text-decoration: none; }

.cf-table-wrap { overflow-x: auto; border: 1px solid var(--cf-line); border-radius: 12px; }
.cf-article table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.cf-article th, .cf-article td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--cf-line); }
.cf-article tr:last-child th, .cf-article tr:last-child td { border-bottom: 0; }
.cf-article thead th { background: var(--cf-soft); font-weight: 600; color: var(--cf-ink); }
.cf-article tbody th { font-weight: 600; color: var(--cf-ink); width: 30%; }

/* Charts and numbers from src/content/blog-data.ts */
.cf-chart, .cf-stats, .cf-ba { margin: 28px 0; padding: 22px; border: 1px solid var(--cf-line); border-radius: 12px; background: #fff; }
.cf-chart-title { font-size: 18px; font-weight: 600; color: var(--cf-ink); }
.cf-chart-sub { margin-top: 2px; font-size: 14px; color: var(--cf-muted); }
.cf-bars { margin-top: 16px; display: grid; gap: 10px; }
.cf-bar-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; align-items: center; gap: 12px; font-size: 15px; }
.cf-bar-label { color: var(--cf-ink); }
.cf-bar-track { height: 12px; border-radius: 999px; background: var(--cf-soft); overflow: hidden; }
.cf-bar-fill { height: 100%; border-radius: 999px; background: #c9c6c1; }
.cf-bar-fill.is-top { background: var(--cf-accent); }
.cf-bar-value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--cf-ink); white-space: nowrap; }
.cf-bar-note { margin-left: 6px; font-weight: 400; color: var(--cf-muted); }
.cf-chart-foot { margin-top: 16px; display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--cf-muted); }
.cf-chart-source { font-size: 12px; color: var(--cf-muted); }
.cf-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.cf-stat-value { font-size: 36px; font-weight: 500; letter-spacing: -1px; color: var(--cf-ink); }
.cf-stat-label { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--cf-muted); }
.cf-stats .cf-chart-source { margin-top: 14px; }

.cf-callout { padding: 16px 20px; border-radius: 12px; background: var(--cf-soft); }
.cf-callout.is-warn { background: var(--cf-warn); }
.cf-callout-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--cf-ink); }
.cf-callout-body { margin-top: 6px; }
.cf-callout-body > *:first-child { margin-top: 0; }
.cf-callout-body > *:last-child { margin-bottom: 0; }

.cf-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf-ba-col { padding: 14px 16px; border-radius: 10px; background: var(--cf-del); }
.cf-ba-col.is-after { background: var(--cf-add); }
.cf-ba-col p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; }
.cf-ba-tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--cf-del-ink); }
.cf-ba-col.is-after .cf-ba-tag { color: var(--cf-add-ink); }
.cf-ba figcaption { grid-column: 1 / -1; }

.cf-tryit {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 0;
  padding: 22px 24px; border-radius: 12px; background: var(--cf-ink); color: #fff;
}
.cf-tryit p { margin: 4px 0 0; color: rgba(255, 255, 255, .72); font-size: 15px; }
.cf-tryit-title { font-size: 18px; font-weight: 600; color: #fff; }
.cf-tryit .cf-btn { background: #fff; color: var(--cf-ink) !important; flex: none; }
.cf-tryit .cf-btn:hover { background: #ebe9e6; }

.cf-faq { margin-top: 44px; }
.cf-faq details, .cf-article > details { border-bottom: 1px solid var(--cf-line); padding: 14px 0; }
.cf-article summary { cursor: pointer; font-weight: 600; color: var(--cf-ink); list-style: none; }
.cf-article summary::-webkit-details-marker { display: none; }
.cf-article summary::after { content: "+"; float: right; color: var(--cf-muted); font-weight: 400; }
.cf-article details[open] summary::after { content: "−"; }
.cf-article details p { margin: 10px 0 0; }
.cf-byline { margin-top: 40px; }

.cf-end-cta { margin-top: 56px; padding: 40px 32px; border-radius: 16px; background: var(--cf-soft); text-align: center; }
.cf-end-cta h2 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 500; letter-spacing: -1px; }
.cf-end-cta p { margin: 12px auto 24px; max-width: 520px; color: var(--cf-muted); }
.cf-end-cta .cf-meta { margin-top: 14px; }

.cf-related { margin-top: 88px; }
.cf-related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cf-related-head h2 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -1px; }
.cf-related-head a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; text-decoration: none; }

@media screen and (max-width: 991px) {
  .cf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 767px) {
  .cf-site { padding: 32px 0 64px; }
  .cf-wrap { padding: 0 16px; }
  .cf-page-head h1, .cf-post-head h1 { font-size: 34px; letter-spacing: -1px; }
  .cf-grid { grid-template-columns: 1fr; }
  .cf-article { font-size: 16px; }
  .cf-article h2 { font-size: 25px; }
  .cf-bar-row { grid-template-columns: 1fr auto; }
  .cf-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .cf-ba { grid-template-columns: 1fr; }
  .cf-tryit { flex-direction: column; align-items: flex-start; }
  .cf-end-cta { padding: 32px 20px; }
  .cf-end-cta h2, .cf-related-head h2 { font-size: 26px; }
}
