/* Med Boosters blog — mirrors the main site's design tokens (daisyUI "dark"/"light" themes, Figtree). */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181c20;
  --bg2: #22262a;
  --bg3: #2c3034;
  --fg: #f0f4f8;
  --primary: #fc766a;
  --primary-fg: #ffffff;
  --accent: #00d3bb;
  --success: #17c964;
  --warning: #f5a524;
  --error: #f31260;
  --info: #14b4ff;
  --topbar: rgb(24 28 32 / 0.95);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg2: #f2f0ec;
  --bg3: #d4d0ca;
  --fg: #1a1d21;
  --primary: #fc766a;
  --primary-fg: #ffffff;
  --accent: #00a896;
  --success: #12a150;
  --warning: #c77d0a;
  --error: #d10f4f;
  --info: #0b8fd6;
  --topbar: rgb(255 255 255 / 0.95);
}

:root {
  --muted: color-mix(in oklab, var(--fg) 62%, transparent);
  --faint: color-mix(in oklab, var(--fg) 45%, transparent);
  --line: color-mix(in oklab, var(--bg3) 70%, transparent);
  --radius: 0.25rem;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
:target { scroll-margin-top: 6rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--primary-fg); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

.container { width: 100%; margin-inline: auto; padding-inline: 1rem; max-width: 90rem; }
@media (min-width: 768px) { .container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container { padding-inline: 3rem; } }
@media (min-width: 1280px) { .container { padding-inline: 4rem; } }

.text-brand-gradient {
  background: linear-gradient(to right, #fc766a 0%, #cc3c08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: 2rem; padding: 0 .85rem; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent; color: var(--fg);
  font: 500 .875rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--bg2); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 88%, black); }
.btn-outline { border-color: color-mix(in oklab, var(--fg) 35%, transparent); }
.btn-outline:hover { background: var(--fg); color: var(--bg); }
.btn-lg { height: 2.75rem; padding: 0 1.4rem; font-size: 1rem; }
.btn-icon { width: 2rem; padding: 0; }

/* ── Topbar (same pill behaviour as the main site) ───────── */
#layout-topbar {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  transition: all .25s;
  background: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#layout-topbar[data-at-top="false"] { background: var(--topbar); border-bottom: 1px solid var(--bg3); box-shadow: 0 1px 6px rgb(0 0 0 / .25); }
@media (min-width: 640px) {
  #layout-topbar[data-at-top="false"] { top: 1rem; border-radius: 9999px; border: 1px solid var(--bg3); padding-inline: 2rem; width: calc(100% - 2rem); inset-inline: 1rem; }
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: .5rem; gap: 1rem; }
.brand { font-size: 1.5rem; font-weight: 600; letter-spacing: -.05em; text-decoration: none; white-space: nowrap; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: .5rem; }
.nav-links a { display: block; padding: .4rem .75rem; border-radius: var(--radius); font-weight: 500; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--bg2); }
.nav-links a[aria-current="page"] { color: var(--primary); }
.nav-actions { display: none; align-items: center; gap: .5rem; }
.nav-toggle { display: inline-flex; }
@media (min-width: 1024px) {
  .nav-links, .nav-actions { display: flex; }
  .nav-toggle, .mobile-actions-theme { display: none; }
}
/* just above the breakpoint the full nav is tight: smaller gaps so it stays on one line */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: .4rem .5rem; font-size: .85rem; }
  .brand { font-size: 1.3rem; }
}
.mobile-menu { display: none; padding: .5rem 0 1rem; }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a { display: block; padding: .6rem .5rem; text-decoration: none; font-weight: 500; border-radius: var(--radius); }
.mobile-menu a:hover { background: var(--bg2); }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
.mobile-head { display: flex; align-items: center; gap: .5rem; }
.mobile-head-right { display: flex; align-items: center; gap: .25rem; }
@media (min-width: 1024px) { .mobile-head-right { display: none; } }
.icon { width: 1.1rem; height: 1.1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }

main { padding-top: 5.5rem; min-height: 70vh; }

/* ── Footer (same content as the main site) ──────────────── */
.site-footer { background: color-mix(in oklab, var(--bg2) 30%, transparent); border: 1px solid var(--bg2); border-radius: .75rem; margin: 1.25rem; }
.footer-inner { padding: 1.5rem; display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 640px) { .footer-inner { padding: 3rem 2rem; } }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; max-width: 90rem; margin-inline: auto; } }
.footer-brand { max-width: 24rem; }
.footer-brand .name { font-size: 1.5rem; font-weight: 500; margin: 0; }
.footer-brand .tag { color: var(--muted); font-size: .875rem; margin: .25rem 0 0; }
.footer-social { display: inline-flex; gap: .75rem; margin-top: 1.25rem; }
.footer-social a { display: flex; align-items: center; padding: .5rem; border: 1px solid var(--bg3); border-radius: var(--radius); transition: all .2s; }
.footer-social a:hover { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.footer-legal { margin-top: 1.25rem; font-size: .75rem; color: var(--faint); }
.footer-legal p { margin: .25rem 0; }
.footer-legal b { color: var(--muted); font-weight: 600; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
.footer-cols h2 { font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: 0 0 1rem; }
.footer-cols a { display: block; font-size: .875rem; margin-bottom: .6rem; text-decoration: none; transition: color .3s; }
.footer-cols a:hover { color: var(--primary); }
.copyright { text-align: center; font-size: .875rem; color: var(--muted); padding-bottom: 1rem; }

/* ── Blog index hero / headings ──────────────────────────── */
.blog-hero { padding: 2.5rem 0 1.5rem; }
.blog-hero .eyebrow { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin: 0 0 .5rem; }
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 .75rem; font-weight: 800; }
.blog-hero p.lede { color: var(--muted); font-size: 1.1rem; max-width: 42rem; margin: 0; }

.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: .4rem; }
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--faint); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; font-size: .85rem; font-weight: 500; border: 1px solid var(--bg3); border-radius: 9999px; text-decoration: none; color: var(--fg); background: transparent; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.chip small { opacity: .7; font-size: .75rem; }

/* ── Post cards ──────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; padding-block: 1rem 2rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { display: flex; flex-direction: column; background: color-mix(in oklab, var(--bg2) 55%, var(--bg)); border: 1px solid var(--bg2); border-radius: .75rem; overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--bg2), var(--bg3)); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .ph { display: grid; place-items: center; height: 100%; font-weight: 800; font-size: 1.4rem; letter-spacing: -.03em; opacity: .85; }
.card-body { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem 1.25rem 1.25rem; flex: 1; }
.card-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--primary); text-decoration: none; }
.card-title { font-size: 1.15rem; line-height: 1.3; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--primary); }
.card-excerpt { color: var(--muted); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; font-size: .8rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: .4rem .75rem; }

.card.featured { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .card.featured { flex-direction: row; }
  .card.featured .card-media { flex: 1.2; aspect-ratio: auto; min-height: 18rem; }
  .card.featured .card-body { flex: 1; justify-content: center; padding: 2rem; }
  .card.featured .card-title { font-size: 1.75rem; }
}

.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; padding-block: 1rem 3rem; }
.pagination a, .pagination span { display: inline-flex; min-width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; padding: 0 .75rem; border: 1px solid var(--bg3); border-radius: var(--radius); text-decoration: none; font-weight: 500; font-size: .9rem; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.pagination .gap { border: 0; min-width: 1rem; padding: 0; }

/* ── Article page ────────────────────────────────────────── */
/* Phones and tablets: one comfortable column. Desktop (1024px+): wide article + sticky sidebar. */
.article-wrap { max-width: 90rem; margin-inline: auto; padding: 1.5rem 1rem 3rem; }
.article { min-width: 0; max-width: 48rem; margin-inline: auto; }
.article-aside { display: none; }
@media (min-width: 768px) { .article-wrap { padding-inline: 2rem; } }
@media (min-width: 1024px) {
  .article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 3rem; padding: 2rem 3rem 4rem; align-items: start; }
  .article { max-width: none; margin-inline: 0; }
  .article-aside { display: block; }
  .aside-sticky { position: sticky; top: 6rem; display: grid; gap: 1.25rem; max-height: calc(100vh - 7rem); overflow-y: auto; scrollbar-width: thin; }
  /* the sidebar carries the contents list and the sign-up card, so the in-body copies step aside */
  .has-aside-toc .post-body .toc { display: none; }
  .article .cta-box { display: none; }
}
/* same side padding as the header (.container) so the edges line up */
@media (min-width: 1280px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr) 19rem; gap: 4.5rem; padding-inline: 4rem; }
}
@media (min-width: 1700px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr) 21rem; gap: 5rem; }
}
.aside-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 .75rem; }
.aside-toc, .aside-cta { border: 1px solid var(--bg3); border-radius: .75rem; padding: 1.1rem 1.25rem; background: color-mix(in oklab, var(--bg2) 45%, var(--bg)); }
.aside-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.aside-toc a { display: block; padding: .4rem .65rem; margin-left: -.65rem; border-left: 2px solid transparent; border-radius: 0 var(--radius) var(--radius) 0; text-decoration: none; font-size: .9rem; line-height: 1.4; color: var(--muted); transition: color .15s, background-color .15s, border-color .15s; }
.aside-toc a:hover { color: var(--fg); background: var(--bg2); }
.aside-toc a.active { color: var(--primary); border-left-color: var(--primary); background: color-mix(in oklab, var(--primary) 8%, transparent); font-weight: 600; }
.aside-cta { border-color: color-mix(in oklab, var(--primary) 45%, var(--bg3)); background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 14%, var(--bg)), var(--bg)); }
.aside-cta .aside-title { color: var(--fg); font-size: 1rem; text-transform: none; letter-spacing: -.01em; margin-bottom: .4rem; }
.aside-cta p { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.aside-cta .btn { width: 100%; height: 2.5rem; }
.article-head .card-cat { display: inline-block; margin-bottom: .75rem; }
.article-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; margin: 0 0 1rem; text-wrap: balance; }
@media (min-width: 1024px) { .article-head h1 { font-size: clamp(2.6rem, 3.4vw, 3.5rem); max-width: 22em; } }
.article-head .excerpt { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.25rem; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }
@media (min-width: 1024px) { .byline { font-size: .95rem; margin-bottom: 2rem; } .crumbs { font-size: .9rem; } }
.byline a { text-decoration: none; font-weight: 600; color: var(--fg); }
.byline a:hover { color: var(--primary); }
.byline .dot { opacity: .5; }
.hero-figure { margin: 0 0 2rem; }
.hero-figure img { width: 100%; border-radius: .75rem; display: block; border: 1px solid var(--bg2); }
@media (min-width: 1024px) { .hero-figure { margin-bottom: 2.5rem; } .hero-figure img { border-radius: 1rem; } }
.hero-figure figcaption { font-size: .8rem; color: var(--faint); margin-top: .5rem; text-align: center; }

.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--bg3); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.5rem; font-size: .9rem; color: var(--muted); }
.cta-box { margin: 3rem 0 1rem; padding: 2rem; border-radius: .75rem; border: 1px solid color-mix(in oklab, var(--primary) 45%, var(--bg3)); background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 14%, var(--bg)), var(--bg)); text-align: center; }
.cta-box h2 { margin: 0 0 .5rem; font-size: 1.5rem; letter-spacing: -.02em; }
.cta-box p { margin: 0 0 1.25rem; color: var(--muted); }
.related { max-width: 90rem; margin: 0 auto; padding: 0 1rem 2rem; }
.related h2 { font-size: 1.5rem; letter-spacing: -.02em; margin: 1rem 0 0; }
@media (min-width: 768px) { .related { padding-inline: 2rem; } }
@media (min-width: 1024px) { .related { padding-inline: 3rem; } }
@media (min-width: 1280px) { .related { padding-inline: 4rem; } }

.preview-banner { background: var(--warning); color: #150a00; text-align: center; font-weight: 600; font-size: .9rem; padding: .5rem 1rem; position: relative; z-index: 60; }

/* ── Post body typography ────────────────────────────────── */
.post-body { font-size: 1.075rem; line-height: 1.8; overflow-wrap: anywhere; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.15rem; }
.post-body h2 { font-size: 1.75rem; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; margin: 2.6rem 0 1rem; }
.post-body h3 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 700; margin: 2rem 0 .75rem; }
.post-body h4 { font-size: 1.1rem; font-weight: 700; margin: 1.6rem 0 .5rem; }
.post-body h5, .post-body h6 { font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.4rem 0 .4rem; }
.post-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body ul, .post-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.post-body li { margin: .35rem 0; }
.post-body li > p { margin: 0; }
.post-body hr, .post-body .fmge-rule, .post-body .fmge-section-divider { border: 0; border-top: 1px solid var(--bg3); margin: 2.25rem 0; height: 0; }
.post-body img { border-radius: .5rem; margin-block: .5rem; }
.post-body figure { margin: 1.5rem 0; }
.post-body figure img { margin: 0; }
.post-body figcaption { font-size: .85rem; color: var(--faint); margin-top: .4rem; }
.post-body blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--primary); color: var(--muted); font-style: italic; }
.post-body code { background: var(--bg2); padding: .1rem .35rem; border-radius: 3px; font-size: .9em; }
.post-body pre { background: var(--bg2); padding: 1rem; border-radius: .5rem; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; }
.post-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: .5rem; }
.post-body mark, .post-body .highlight, .post-body .fmge-highlight { background: color-mix(in oklab, var(--primary) 22%, transparent); color: inherit; padding: .05rem .25rem; border-radius: 3px; }
.post-body small { color: var(--muted); }
.post-body .lead { font-size: 1.05em; color: var(--fg); font-weight: 600; }
.post-body .label, .post-body .eyebrow, .post-body .fmge-eyebrow { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--primary); margin: 0 0 .4rem; }
.post-body .big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }

/* Tables */
.post-body table { width: 100%; border-collapse: collapse; margin: 0; font-size: .95rem; line-height: 1.5; }
.post-body .table-scroll, .post-body .fmge-table-scroll, .post-body .tbl-wrap, .post-body .fmge-table-wrap, .post-body .table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--bg3); border-radius: .5rem; -webkit-overflow-scrolling: touch; }
.post-body > table { display: block; overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--bg3); border-radius: .5rem; }
.post-body caption { text-align: left; padding: .75rem 1rem; font-weight: 700; caption-side: top; color: var(--muted); font-size: .85rem; }
.post-body th, .post-body td { padding: .65rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body thead th { background: var(--bg2); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.post-body tbody tr:last-child > * { border-bottom: 0; }
.post-body tbody tr:hover { background: color-mix(in oklab, var(--bg2) 50%, transparent); }
.post-body th[scope="row"] { font-weight: 600; }
.post-body .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-body .pos { color: var(--success); font-weight: 700; }
.post-body .neg { color: var(--error); font-weight: 700; }

/* Call-out style blocks that appear in the imported WordPress posts */
.post-body .answer-box, .post-body .callout, .post-body .fmge-tips, .post-body .fmge-conclusion, .post-body .fmge-focus,
.post-body .note, .post-body .deadline, .post-body .fmge-checklist, .post-body .guide-ref, .post-body .fmge-internal-link {
  margin: 1.75rem 0; padding: 1.1rem 1.35rem; border: 1px solid var(--bg3); border-left: 4px solid var(--primary); border-radius: .5rem;
  background: color-mix(in oklab, var(--bg2) 60%, var(--bg));
}
.post-body .answer-box { border-left-color: var(--accent); }
.post-body .fmge-conclusion { border-left-color: var(--success); }
.post-body .deadline { border-left-color: var(--warning); }
.post-body .answer-box > :last-child, .post-body .callout > :last-child, .post-body .fmge-tips > :last-child,
.post-body .fmge-conclusion > :last-child, .post-body .note > :last-child { margin-bottom: 0; }
.post-body .calc { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.post-body .fmge-intro { font-size: 1.2rem; line-height: 1.7; color: var(--fg); margin-bottom: 1.5rem; }
.post-body .fmge-intro p { margin: 0; }

/* Stat tiles, cards, steps */
.post-body .fmge-stats, .post-body .fmge-card-grid, .post-body .chips, .post-body .papers, .post-body .subjects { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 1.5rem 0; padding: 0; }
.post-body .fmge-stat, .post-body .fmge-card, .post-body .fmge-tier, .post-body .system, .post-body .mistake, .post-body .approach, .post-body .phase, .post-body .timeblock, .post-body .tier-head + div {
  border: 1px solid var(--bg3); border-radius: .5rem; padding: 1rem 1.1rem; background: color-mix(in oklab, var(--bg2) 55%, var(--bg));
}
.post-body .fmge-stat { text-align: center; }
.post-body .fmge-stat strong { display: block; font-size: 1.8rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--primary); }
.post-body .fmge-stat span { display: block; margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.post-body .fmge-card-grid { margin: 1.5rem 0; }
.post-body .fmge-card > :last-child, .post-body .system > :last-child, .post-body .mistake > :last-child { margin-bottom: 0; }
.post-body .fmge-steps, .post-body .steps, .post-body .fmge-timeline { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .85rem; }
.post-body .fmge-timeline-item, .post-body .step { border-left: 3px solid var(--primary); padding: .25rem 0 .25rem 1rem; }
.post-body .fmge-timeline-item > :last-child, .post-body .step > :last-child { margin-bottom: 0; }

/* TOC */
.post-body .toc { margin: 1.75rem 0; padding: 1.1rem 1.35rem; border: 1px solid var(--bg3); border-radius: .5rem; background: color-mix(in oklab, var(--bg2) 45%, var(--bg)); }
.post-body .toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 .6rem; font-weight: 700; }
.post-body .toc ol, .post-body .toc ul { margin: 0; padding-left: 1.25rem; }
.post-body .toc li { margin: .3rem 0; }
.post-body .toc a { text-decoration: none; color: var(--fg); }
.post-body .toc a:hover { color: var(--primary); }

/* FAQ accordion (imported markup is converted to <details>; it works without JavaScript) */
.post-body .fmge-faq, .post-body .fmge-faq-list, .post-body .faq, .post-body .faq-section { margin: 1.25rem 0 2rem; display: grid; gap: .65rem; }
.post-body details { border: 1px solid var(--bg3); border-radius: .5rem; background: color-mix(in oklab, var(--bg2) 45%, var(--bg)); margin: .65rem 0; }
.post-body .fmge-faq details, .post-body .fmge-faq-list details { margin: 0; }
.post-body details > summary { cursor: pointer; list-style: none; padding: .95rem 3rem .95rem 1.1rem; font-weight: 700; position: relative; line-height: 1.4; }
.post-body details > summary::-webkit-details-marker { display: none; }
.post-body details > summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--primary); transition: transform .2s; }
.post-body details[open] > summary::after { content: "–"; }
.post-body details[open] > summary { border-bottom: 1px solid var(--bg3); }
.post-body details > summary:hover { color: var(--primary); }
.post-body details > .faq-body, .post-body details > div { padding: 1rem 1.1rem 0; }
.post-body details > :last-child { margin-bottom: 0; padding-bottom: 1rem; }
.post-body details .faq-body > :last-child { margin-bottom: 0; }

/* Author box embedded by the original posts */
.post-body .author-box { display: flex; gap: 1rem; align-items: flex-start; margin: 2.25rem 0; padding: 1.25rem; border: 1px solid var(--bg3); border-radius: .75rem; background: color-mix(in oklab, var(--bg2) 55%, var(--bg)); }
.post-body .author-box .avatar, .post-body .author-box .avatar-img { flex: none; width: 3.5rem; height: 3.5rem; border-radius: 9999px; object-fit: cover; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; font-weight: 800; margin: 0; }
.post-body .author-box p { margin: 0 0 .35rem; font-size: .95rem; }
.post-body .author-box .role, .post-body .author-box .who { color: var(--muted); font-size: .85rem; }
.post-body .author-box > :last-child { margin-bottom: 0; }

/* The "Start preparing" box the original posts carry */
.post-body .fmge-cta, .post-body .cta { margin: 2.25rem 0; padding: 1.75rem; border-radius: .75rem; border: 1px solid color-mix(in oklab, var(--primary) 45%, var(--bg3)); background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 14%, var(--bg)), var(--bg)); }
.post-body .fmge-cta h2, .post-body .fmge-cta h3, .post-body .cta h2, .post-body .cta h3 { margin-top: 0; }
.post-body .fmge-cta a, .post-body .cta a.btn, .post-body .btn-row a {
  display: inline-block; background: var(--primary); color: var(--primary-fg); text-decoration: none; font-weight: 600; padding: .65rem 1.25rem; border-radius: var(--radius); margin: .25rem .5rem .25rem 0;
}
.post-body .fmge-cta a:hover { filter: brightness(.92); }
.post-body footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--bg3); font-size: .9rem; color: var(--muted); }
.post-body footer p { margin: 0; }
.post-body .hero { margin: 1.5rem 0; }
.post-body .hero img { width: 100%; border-radius: .75rem; }

/* ── Desktop sizing ──────────────────────────────────────── */
@media (min-width: 1024px) {
  .post-body { font-size: 1.15rem; line-height: 1.85; }
  .post-body h2 { font-size: 2rem; margin-top: 3rem; }
  .post-body h3 { font-size: 1.5rem; }
  .post-body table { font-size: 1rem; }
  .post-body .fmge-intro { font-size: 1.3rem; }
  .post-body .fmge-stat strong { font-size: 2.2rem; }
  .blog-hero { padding: 3.5rem 0 2rem; }
  .blog-hero p.lede { font-size: 1.25rem; }
  .grid { gap: 2rem; }
  .card-body { padding: 1.25rem 1.5rem 1.5rem; }
  .card-title { font-size: 1.25rem; }
  .card-excerpt { font-size: 1rem; }
}
@media (min-width: 1700px) {
  .post-body { font-size: 1.2rem; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .card.featured { grid-column: 1 / -1; }
}

/* ── Misc ────────────────────────────────────────────────── */
.not-found { text-align: center; padding: 5rem 1rem; }
.not-found h1 { font-size: 4rem; margin: 0; color: var(--primary); }
.not-found p { color: var(--muted); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media print {
  #layout-topbar, .site-footer, .cta-box, .related, .share { display: none !important; }
  main { padding-top: 0; }
  body { background: #fff; color: #000; }
}
