/* ── 2 fois blog styles ───────────────────────────────────────
   Loaded only on /blog routes (via a head slot). Builds on the shared
   design tokens declared in landing.css :root. Covers the index grid,
   the featured card, and the article reading experience, with RTL and
   responsive rules. */

/* Index hero spacing */
.blog-hero { padding-bottom: 24px; }

.blog-index { padding-top: 32px; }

/* Featured story */
.blog-featured {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm);
  margin-bottom: 40px; transition: box-shadow .25s, transform .25s;
}
.blog-featured:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.blog-featured-cover { position: relative; min-height: 100%; }
.blog-featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured-body { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.blog-featured-body h2 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.blog-featured-body p { color: var(--muted); font-size: 16px; }

/* Post grid + cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--sh-sm); transition: box-shadow .25s, transform .25s;
}
.post-card:hover { box-shadow: var(--sh-md); transform: translateY(-4px); }
.post-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--primary-pale); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 1; }
.post-body h3 { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.post-body p { color: var(--muted); font-size: 14.5px; flex: 1; }

/* Tags + meta */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-tag {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; color: var(--accent);
  background: var(--accent-pale); padding: 5px 12px; border-radius: 100px;
}
.post-tag-hot { color: var(--primary); background: var(--primary-pale); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.post-more { font-size: 14px; font-weight: 700; color: var(--primary); }

/* ── Article ─────────────────────────────────────────────── */
.article-hero { padding: 104px 0 64px; }
.article { max-width: 760px; margin: 0 auto; }
.crumb { margin-bottom: 18px; }
.crumb a { color: var(--primary); font-size: 14px; font-weight: 700; }
.article h1 { font-size: 40px; line-height: 1.14; font-weight: 800; letter-spacing: -.025em; margin: 12px 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.article-updated { color: var(--success); font-weight: 600; }
.article-cover { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 36px; box-shadow: var(--sh-sm); aspect-ratio: 16 / 9; background: var(--primary-pale); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Article prose */
.article-body { font-size: 17.5px; line-height: 1.75; color: #2a2a3c; }
.article-body > p { margin: 0 0 22px; }
.article-body h2 { font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; margin: 44px 0 16px; color: var(--fg); }
.article-body h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; color: var(--fg); }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-inline-start: 24px; }
.article-body li { margin: 0 0 10px; }
.article-body li::marker { color: var(--primary); }
.article-body a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--primary-dark); }
.article-body strong { font-weight: 700; color: var(--fg); }
.article-body blockquote {
  margin: 28px 0; padding: 18px 24px; border-inline-start: 4px solid var(--primary);
  background: var(--primary-pale); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 18px; font-style: italic; color: var(--fg);
}
.article-body img { border-radius: var(--r-md); margin: 24px 0; }

/* Tables in prose */
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.article-body th, .article-body td { text-align: start; padding: 12px 14px; border: 1px solid var(--border); vertical-align: top; }
.article-body thead th { background: var(--primary-pale); color: var(--fg); font-weight: 700; }
.article-body tbody tr:nth-child(even) { background: rgba(0,0,0,.02); }
.article-body td:first-child, .article-body th:first-child { font-weight: 600; }

/* FAQ */
.article-faq { margin: 44px 0 8px; }
.article-faq h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.article-faq dl { border-top: 1px solid var(--border); }
.faq-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.article-faq dt { font-weight: 700; font-size: 17px; color: var(--fg); margin-bottom: 8px; }
.article-faq dd { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* Sources */
.article-sources { margin: 36px 0 8px; padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); }
.article-sources h2 { font-size: 18px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.article-sources ul { margin: 0; padding-inline-start: 20px; }
.article-sources li { margin: 0 0 8px; font-size: 14.5px; }
.article-sources a { color: var(--accent); font-weight: 600; word-break: break-word; }

/* In-article CTA */
.article-cta {
  margin: 44px 0 8px; padding: 34px; border-radius: var(--r-lg); text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
}
.article-cta h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.article-cta p { color: rgba(255,255,255,.9); margin-bottom: 20px; }

/* Related */
.related { max-width: 1120px; margin: 56px auto 0; }
.related-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 22px; }
.related-grid { grid-template-columns: repeat(2, 1fr); }

/* ── RTL ─────────────────────────────────────────────────── */
html[dir="rtl"] .blog-featured-body,
html[dir="rtl"] .post-body,
html[dir="rtl"] .article { text-align: right; }
html[dir="rtl"] .article-cta { text-align: center; }
html[dir="rtl"] .article-body blockquote { border-radius: var(--r-sm) 0 0 var(--r-sm); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-cover { aspect-ratio: 16 / 9; }
  .blog-featured-body { padding: 28px; }
  .blog-featured-body h2 { font-size: 25px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .post-grid, .related-grid { grid-template-columns: 1fr; }
  .article-hero { padding: 92px 0 48px; }
  .article h1 { font-size: 30px; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 23px; }
  .article-cta { padding: 26px; }
  .article-body table { display: block; overflow-x: auto; white-space: nowrap; }
}
