/* ---------------------------------------------------------------------------
 * blog.css — the ONE stylesheet for every post under /blog/ and /en/blog/.
 *
 * Until 2026-09-14 each post carried its own inline <style>, 90 to 160 lines,
 * and 56 posts had drifted into 21 different versions: three visual families
 * and eight one-off components. Oli asked for one design. This file is it.
 *
 * Rules that keep it that way (scripts/check-site-shell.py enforces them):
 *   - a post links /assets/site.css and /assets/blog.css and has NO <style>
 *   - a post uses only the classes defined here (see CANONICAL_CLASSES)
 *
 * The reference look is the IMSE post of 2026-09-07, the newest one Oli had
 * accepted. Component variants (the tip callout, the cite on a quote, the
 * yes/no cells in a table) were folded in from the posts that had them, so
 * nothing that existed lost its meaning; it only lost its private CSS.
 *
 * site.css deliberately defines no tokens (it was written to ride on each
 * page's own :root), so the tokens, the reset and the body font live here.
 * They are the exact values every post carried inline.
 * --------------------------------------------------------------------------- */

:root {
  --brand:       #fddd00;
  --brand-deep:  #f4c800;
  --brand-soft:  #fff9c4;
  --ink:         #0f1113;
  --ink-soft:    #353a42;
  --ink-muted:   #6a7280;
  --paper:       #ffffff;
  --paper-soft:  #f6f6f4;
  --card:        #ffffff;
  --line:        #e7e5e0;
  --accent:      #f8bbd9;
  --sage:        #7fa896;
  --sage-soft:   #e6f0eb;
  --ok:          #1f7a4a;
  --warn:        #8a6010;
  --bad:         #b1361e;
  --bad-soft:    #fdecea;
  --radius:      20px;
  --shadow-sm:   0 2px 10px rgba(15, 17, 19, 0.04);
  --shadow-md:   0 10px 32px rgba(15, 17, 19, 0.08);
}

/* ---- base: the reset and body every post used to carry inline ----------- */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 600; text-decoration: none; }
*:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 3px; }

/* ---- layout -------------------------------------------------------------- */

.article-wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.breadcrumb { padding: 24px 0 0; font-size: 13px; color: var(--ink-muted); }
.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: none; }

.article-header { padding: 32px 0 24px; }
.article-header .eyebrow { display: inline-block; background: var(--brand-soft); color: var(--ink); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 18px; }
.article-header h1 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); margin-bottom: 18px; }
.article-meta { display: flex; gap: 18px; align-items: center; font-size: 14px; color: var(--ink-muted); flex-wrap: wrap; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-muted); }
.article-meta a { color: var(--ink); font-weight: 600; }

/* ---- running text -------------------------------------------------------- */

.article-body { padding: 24px 0 56px; font-size: 17px; }
.article-body > p { margin-bottom: 22px; color: var(--ink-soft); }
.article-body > p strong { color: var(--ink); }
.article-body h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 44px 0 16px; line-height: 1.25; }
.article-body h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 28px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 22px 22px; color: var(--ink-soft); }
.article-body li { margin-bottom: 10px; line-height: 1.65; }
.article-body li strong { color: var(--ink); }
.article-body hr { border: none; height: 1px; background: var(--line); margin: 44px 0; }
.article-body img { border-radius: 14px; }
.article-body figure { margin: 24px 0; }
.article-body figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 8px; }
.article-body sup { font-size: 11px; line-height: 0; }
.article-body .last-reviewed { font-size: 14px; color: var(--ink-muted); font-style: italic; }

/* ---- Réponse rapide / Quick answer: the first block of every post --------
 * Oli's pick on 2026-09-14: the yellow line, not the green box. Label inline,
 * text in italics, no background. Reads as the answer, not as a card. */

.tldr { border-left: 4px solid var(--brand-deep); padding: 2px 0 2px 22px; margin: 24px 0 32px; }
.tldr h2 { display: inline; font-size: 17px; font-weight: 700; font-style: italic; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0; }
.tldr h2::after { content: " : "; }
.tldr h2 + p { display: inline; }
.tldr p { font-size: 17px; font-style: italic; color: var(--ink-soft); line-height: 1.7; margin: 0 0 10px; }
.tldr p:last-child { margin-bottom: 0; }
.tldr strong { color: var(--ink); }
.tldr .last-reviewed { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-muted); }

/* ---- callout: one box for asides. `.tip` is the yellow variant ----------- */

.callout { background: var(--sage-soft); border: 1px solid var(--sage); border-radius: 14px; padding: 20px 22px; margin: 28px 0; }
.callout.tip { background: var(--brand-soft); border-color: var(--brand); }
.callout.warn { background: var(--bad-soft); border-color: var(--bad); }
.callout h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.callout p { margin-bottom: 8px; color: var(--ink-soft); font-size: 15px; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }
.callout ul, .callout ol { margin: 8px 0 0 18px; font-size: 15px; }

/* ---- quote: a real quotation from a source ------------------------------- */

.article-body blockquote { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 22px 0; color: var(--ink); font-style: normal; }
.article-body blockquote p { margin-bottom: 8px; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote cite { display: block; font-size: 13px; color: var(--ink-soft); font-style: normal; margin-top: 8px; }

/* ---- table: one style, wrapped so the radius clips ----------------------- */

.article-body .table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; margin: 24px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-body th, .article-body td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body th { background: var(--paper-soft); font-weight: 700; color: var(--ink); font-size: 13px; }
.article-body tr:last-child td { border-bottom: none; }
.article-body td:first-child { font-weight: 600; color: var(--ink); }
.article-body td .src { display: block; font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.article-body td.amt { color: var(--ok); font-weight: 700; }
.article-body td.yes { color: var(--ok); font-weight: 600; }
.article-body td.no { color: var(--bad); font-weight: 600; }
.article-body td.partial { color: var(--warn); font-weight: 600; }

/* ---- steps: numbered cards (how-to guides, obligations, timelines) ------- */

.steps { list-style: none; counter-reset: step; margin: 24px 0 !important; padding: 0; }
.steps > li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px 26px 86px; margin: 0 0 14px; position: relative; color: var(--ink-soft); font-size: 15px; }
.steps > li::before { content: counter(step); position: absolute; left: 28px; top: 26px; width: 38px; height: 38px; background: var(--ink); color: var(--paper); border-radius: 50%; font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps > li h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.steps > li p { margin: 0 0 8px; line-height: 1.65; }
.steps > li p:last-child { margin-bottom: 0; }
.steps > li ul, .steps > li ol { margin: 8px 0 0 18px; }
.steps > li .callout { margin: 14px 0 0; }
@media (max-width: 480px) {
  .steps > li { padding: 22px 20px 22px 66px; }
  .steps > li::before { left: 18px; top: 22px; width: 32px; height: 32px; font-size: 15px; }
}

/* ---- checklist ----------------------------------------------------------- */

.checklist { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; margin: 24px 0; }
.checklist h3 { margin-top: 0; }
.checklist ul { list-style: none; margin: 0; }
.checklist li { padding-left: 28px; position: relative; margin-bottom: 12px; color: var(--ink-soft); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--sage); font-weight: 800; font-size: 18px; }

/* ---- card: a titled block that is not an aside (protocols, actions) ------ */

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; margin: 20px 0; }
.card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.card p { font-size: 15px; color: var(--ink-soft); margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { margin: 8px 0 0 18px; font-size: 15px; }
.card .tag { margin-bottom: 12px; }

/* ---- stat rows inside a card: big number, short sentence ----------------- */

.stat-row { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 14px; }
.stat-row:last-child { margin-bottom: 0; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.04em; line-height: 1; min-width: 70px; }
.stat-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
.stat-desc strong { color: var(--ink); font-weight: 600; }

/* ---- tag: a small pill (risk level, alternative, category) --------------- */

.tag { display: inline-block; background: var(--sage-soft); color: var(--sage); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.tag.warn { background: var(--bad-soft); color: var(--bad); }

/* ---- mockup: a rendered example of something the product sends ---------- */

.mockup { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 28px 0; font-size: 15px; }
.mockup .mockup-header { background: var(--paper-soft); padding: 18px 24px; border-bottom: 1px solid var(--line); }
.mockup .mockup-header .from { font-weight: 600; color: var(--ink); font-size: 13px; }
.mockup .mockup-header .subject { font-size: 16px; font-weight: 800; color: var(--ink); margin-top: 4px; }
.mockup .mockup-body { padding: 24px; }
.mockup .section-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.mockup .section-content { background: var(--paper-soft); border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.mockup .section-content strong { color: var(--ink); }
.mockup .mockup-footer { border-top: 1px solid var(--line); padding: 14px 24px; font-size: 12px; color: var(--ink-muted); }

/* ---- FAQ ----------------------------------------------------------------- */

.faq { padding: 24px 0 48px; border-top: 1px solid var(--line); margin-top: 32px; }
.faq h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 24px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-size: 16px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--brand-deep); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 22px 20px; font-size: 15px; color: var(--ink-soft); line-height: 1.7; }
.faq-item .faq-answer p { margin-bottom: 10px; }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ---- sources ------------------------------------------------------------- */

.sources { background: var(--paper-soft); border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; margin: 32px 0; }
.sources h2 { font-size: 18px; margin: 0 0 14px; color: var(--ink); }
.sources ol { margin: 0 0 0 20px; font-size: 13px; color: var(--ink-soft); }
.sources li { margin-bottom: 8px; line-height: 1.6; }
.sources li a { word-break: break-all; }

/* ---- CTA ----------------------------------------------------------------- */

.article-cta { background: var(--brand-soft); border-radius: 24px; padding: 32px; margin: 40px 0; text-align: center; }
.article-cta h3 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 12px; }
.article-cta p { color: var(--ink-soft); margin: 0 auto 22px; max-width: 520px; }
.article-cta .btn { display: inline-flex; gap: 8px; padding: 14px 28px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; text-decoration: none; }
.article-cta .btn:hover { background: var(--brand); color: var(--ink); }

/* ---- related posts ------------------------------------------------------- */

.related-posts { padding: 48px 0 0; }
.related-posts h2 { font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 28px; }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.related-card { display: block; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; }
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); text-decoration: none; }
.related-card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.4; }
