/* Dathent public blog. Self-contained: tokens + nav/footer/lang/theme chrome are
   copied 1:1 from legal.css so the blog header/footer/logo match the landing and
   the legal pages exactly. Below the chrome are the blog-only content styles
   (index grid + article reader + tables). */

:root {
  --grad-cyan: #4FC3FF;
  --grad-purple: #7A5BFF;
  --grad-magenta: #E455CF;
  --grad-accent: linear-gradient(135deg, #4FC3FF 0%, #7A5BFF 55%, #E455CF 100%);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-heading: 'Lora', Georgia, serif;
  --font-mono: 'Lora', Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* blog-only supplementary tokens legal.css doesn't define */
  --accent-2: #9B82FF;
  --border-glow: rgba(122,91,255,0.40);
  --shadow-card: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lift: 0 24px 50px -16px rgba(0,0,0,.55);
  --maxw: 1180px;
}
:root, [data-theme="dark"] {
  --bg: #050609; --bg-2: #0a0b11; --panel: #0e0f17; --panel-2: #14151f;
  --border: rgba(255,255,255,0.06); --border-2: rgba(255,255,255,0.12); --border-3: rgba(255,255,255,0.20);
  --text: #ededf2; --text-2: #a8a8b4; --text-3: #6b6b78; --text-4: #4a4a55;
  --accent: #7A5BFF; --accent-soft: rgba(122,91,255,0.16); --accent-soft-2: rgba(122,91,255,0.30);
}
[data-theme="light"] {
  --bg: #f7f6f2; --bg-2: #ffffff; --panel: rgba(255,255,255,0.85); --panel-2: #ffffff;
  --border: rgba(10,10,20,0.07); --border-2: rgba(10,10,20,0.14); --border-3: rgba(10,10,20,0.24);
  --text: #0c0c14; --text-2: #4b4b56; --text-3: #7a7a85; --text-4: #9c9ca6;
  --accent: #5B47F0; --accent-soft: rgba(91,71,240,0.10); --accent-soft-2: rgba(91,71,240,0.22);
  --accent-2: #4A38D0; --border-glow: rgba(91,71,240,0.32);
  --shadow-card: 0 1px 3px rgba(20,18,30,.06); --shadow-lift: 0 24px 50px -16px rgba(20,18,30,.16);
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important;scroll-behavior:auto!important}
  .reveal{opacity:1!important;transform:none!important}
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; transition: background 360ms var(--ease); }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.6; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.container, .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; }

/* ===========================================================================
   Chrome — 1:1 with the landing topbar/footer (index.html), so the blog feels
   like the same site: floating pill topbar, 10-language switcher, mono footer.
   =========================================================================== */
body { padding-top: 84px; }  /* clear the fixed floating topbar */

.topbar { position: fixed; top: 16px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; pointer-events: none; }
.topbar-inner {
  pointer-events: auto; max-width: 1180px; width: calc(100% - 40px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 9px 9px 9px 18px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 999px;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background 360ms var(--ease), border-color 360ms var(--ease);
}
[data-theme="light"] .topbar-inner { box-shadow: 0 1px 2px rgba(15,15,30,0.04), 0 8px 24px -8px rgba(15,15,30,0.06); }
[data-theme="dark"] .topbar-inner { box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 16px 40px -16px rgba(0,0,0,0.5); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); }
.brand-mark { width: 26px; height: 26px; background: url("/assets/dathent-logo.png") center/contain no-repeat; filter: drop-shadow(0 0 8px rgba(122,91,255,0.4)); flex-shrink: 0; }
.brand-text { display: inline-flex; align-items: baseline; gap: 0; letter-spacing: -0.02em; }
.brand-text-ai { font-family: var(--font-heading); font-style: italic; font-weight: 400; color: var(--accent); margin-left: 1px; letter-spacing: -0.02em; }
.nav-links { display: inline-flex; align-items: center; gap: 26px; font-size: 13px; color: var(--text-2); }
.nav-links a { transition: color 140ms; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.topbar-right { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 980px) { .nav-links, .topbar-right .btn-secondary { display: none; } }

/* Buttons (landing) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; height: 38px; border-radius: 999px; border: 1px solid transparent; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text); background: transparent; cursor: pointer; white-space: nowrap; transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.btn svg { width: 14px; height: 14px; }
.btn-primary { position: relative; isolation: isolate; background: linear-gradient(135deg, #4FC3FF 0%, #7A5BFF 50%, #E455CF 100%); color: #fff; border-color: rgba(255,255,255,0.12); box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 10px 28px -10px rgba(122,91,255,0.55); }
.btn-primary::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)); pointer-events: none; z-index: 1; }
.btn-primary::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; background: linear-gradient(135deg, #4FC3FF 0%, #7A5BFF 50%, #E455CF 100%); z-index: -1; filter: blur(14px); opacity: 0.35; transition: opacity 240ms var(--ease); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,0.14) inset, 0 16px 40px -10px rgba(122,91,255,0.7); }
.btn-primary:hover::after { opacity: 0.55; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: var(--bg-2); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { border-color: var(--border-3); }

/* Theme toggle (identical to landing) */
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); }
.theme-toggle button { width: 28px; height: 28px; border-radius: 999px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 160ms var(--ease), color 160ms var(--ease); }
.theme-toggle button svg { width: 14px; height: 14px; display: block; flex-shrink: 0; }
.theme-toggle button.is-active { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft-2); }

/* ---------- Language picker (1:1 with landing) ---------- */
.lang-dd { position: relative; }
.lang-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; height: 32px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; color: var(--text); cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 500; transition: background 140ms, border-color 140ms; }
.lang-trigger:hover { border-color: var(--border-3); }
.lang-trigger .flag { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-2); padding: 2px 5px; background: transparent; border: 1px solid var(--border-2); border-radius: 4px; }
.lang-trigger svg.caret { width: 11px; height: 11px; color: var(--text-3); transition: transform 160ms; }
.lang-dd.is-open .lang-trigger svg.caret { transform: rotate(180deg); }
.lang-panel { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 6px; background: var(--panel); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5); opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none; transition: opacity 140ms var(--ease), transform 140ms var(--ease); z-index: 60; max-height: 360px; overflow-y: auto; backdrop-filter: blur(20px); }
.lang-dd.is-open .lang-panel { opacity: 1; transform: none; pointer-events: auto; }
.lang-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; background: transparent; border: 0; cursor: pointer; font-family: inherit; color: var(--text); font-size: 13px; text-align: left; transition: background 100ms; text-decoration: none; }
.lang-option:hover { background: var(--bg-2); }
.lang-option .lo-code { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-2); padding: 2px 5px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; min-width: 32px; text-align: center; flex-shrink: 0; }
.lang-option .lo-name { flex: 1; }
.lang-option .lo-check { width: 14px; height: 14px; color: var(--accent); opacity: 0; flex-shrink: 0; }
.lang-option.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.lang-option.is-active .lo-code { background: var(--accent-soft-2); border-color: transparent; color: var(--accent); }
.lang-option.is-active .lo-check { opacity: 1; }
.lang-option.is-soon { opacity: 0.7; cursor: default; pointer-events: none; }
.lang-option.is-soon::after { content: 'soon'; margin-left: 4px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding: 1px 5px; background: var(--bg-2); border-radius: 3px; }

/* Mobile: strip topbar blur so the fixed bottom-sheet anchors to the viewport */
@media (max-width: 1024px) {
  .topbar-inner { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .lang-panel { position: fixed !important; top: auto !important; bottom: 12px !important; left: 12px !important; right: 12px !important; width: auto; min-width: 0; max-width: 420px; margin: 0 auto; max-height: 70vh; transform: translateY(20px) scale(1); padding: 12px; border-radius: 18px; box-shadow: 0 -2px 6px rgba(15,15,30,0.04), 0 -16px 60px -10px rgba(15,15,30,0.25); z-index: 80; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-2); border: 1px solid var(--border-2); }
  .lang-dd.is-open .lang-panel { transform: translateY(0) scale(1) !important; }
  .lang-option { padding: 10px 12px; font-size: 13.5px; }
  .lang-option .lo-code { font-size: 11px; padding: 3px 7px; min-width: 36px; }
}

/* Phones: the floating pill can't fit lang + theme + a wide CTA — drop the theme
   toggle, tighten gaps, and compact the Launch button so it never overflows. */
@media (max-width: 560px) {
  .topbar-inner { gap: 10px; padding: 7px 7px 7px 14px; }
  .theme-toggle { display: none; }
  .btn-primary { padding: 0 14px; height: 34px; }
  .btn-primary svg { display: none; }
}
@media (max-width: 380px) { .brand-text { display: none; } } /* logo-only on the narrowest screens */

/* ---------- Footer (1:1 with landing) ---------- */
.footer { padding: 32px 0 40px; border-top: 1px solid var(--border); margin-top: 60px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }
.footer-row a { color: var(--text-3); text-decoration: none; }
.footer-row a:hover { color: var(--text); }
.footer-links { display: inline-flex; gap: 18px; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) { .footer { padding: 24px 0 32px; } .footer-row { font-size: 10px; gap: 12px; } }
@media (max-width: 600px) { .footer-links { gap: 14px; font-size: 10px; } }

/* reading progress (article) */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad-accent); z-index: 90; transition: width .1s linear; }

/* ===== index hero ===== */
.bhero { padding: 34px 0 30px; border-bottom: 1px solid var(--border); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); background: var(--accent-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; }
.bhero h1 { font-family: var(--font-heading); font-weight: 500; font-size: clamp(36px,4.5vw,54px); line-height: 1.05; letter-spacing: -0.025em; margin: 16px 0 0; max-width: 680px; }
.bhero h1 em { font-style: italic; color: var(--accent); }
.bhero p { font-size: 17px; color: var(--text-2); margin: 14px 0 0; max-width: 520px; }

/* filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 9px; padding: 26px 0 30px; position: sticky; top: 90px; z-index: 40; background: linear-gradient(to bottom, var(--bg) 70%, transparent); }
.chip { height: 34px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s var(--ease); display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.chip:hover { border-color: var(--border-3); color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .ct { font-size: 11px; opacity: .6; }

/* featured lead */
.lead { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--panel); margin-bottom: 30px; color: var(--text); transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.lead:hover { border-color: var(--border-glow); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.lead-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.lead-body { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.feat-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; height: 25px; padding: 0 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); font-weight: 500; margin: 16px 0 0; display: flex; align-items: center; gap: 8px; }
.meta .dot { width: 3px; height: 3px; border-radius: 999px; background: var(--text-3); }
.lead-body h2 { font-family: var(--font-heading); font-weight: 500; font-size: 30px; line-height: 1.12; letter-spacing: -0.02em; margin: 11px 0 0; }
.lead-body .ex { font-size: 15px; color: var(--text-2); margin: 13px 0 0; max-width: 420px; }
.readmore { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--accent); }
.readmore svg { transition: transform .2s var(--ease); }
.lead:hover .readmore svg { transform: translateX(3px); }

/* tile grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px,1fr)); gap: 22px; padding-bottom: 60px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card .cover { aspect-ratio: 16/9; position: relative; overflow: hidden; }
.card-body { padding: 17px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card .meta { margin-top: 0; }
.card h3 { font-family: var(--font-heading); font-weight: 500; font-size: 20px; line-height: 1.22; letter-spacing: -0.015em; margin: 10px 0 0; color: var(--text); }
.card .ex { font-size: 13.5px; color: var(--text-2); margin: 9px 0 0; flex: 1; }
/* Clamp card title + excerpt to a fixed number of lines so longer translations
   (DE/UK/RU run longer than EN) don't stretch the cards. Text-only — layout unchanged. */
.card h3, .card .ex, .lead-body h2, .lead-body .ex { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 { -webkit-line-clamp: 2; line-clamp: 2; }
.card .ex { -webkit-line-clamp: 2; line-clamp: 2; } /* keeps flex:1 from the rule above (footers stay aligned) */
.lead-body h2 { -webkit-line-clamp: 3; line-clamp: 3; }
.lead-body .ex { -webkit-line-clamp: 2; line-clamp: 2; }
.card .foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.card .foot .by { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.card .foot .arr { margin-left: auto; color: var(--accent); display: inline-flex; transition: transform .2s var(--ease); }
.card:hover .foot .arr { transform: translateX(3px); }

/* real cover images + gradient fallbacks */
.cover img, .lead-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb { position: absolute; inset: 0; }
.c1 { background: radial-gradient(circle at 25% 25%, rgba(122,91,255,.45), transparent 60%), linear-gradient(135deg,#15131f,#1b1730); }
.c2 { background: radial-gradient(circle at 70% 30%, rgba(79,195,255,.4), transparent 60%), linear-gradient(135deg,#0f1922,#13202b); }
.c3 { background: radial-gradient(circle at 40% 70%, rgba(228,85,207,.4), transparent 60%), linear-gradient(135deg,#1f1320,#1a1228); }
.c4 { background: radial-gradient(circle at 60% 40%, rgba(122,91,255,.35), transparent 60%), linear-gradient(135deg,#141320,#181626); }
.c5 { background: radial-gradient(circle at 30% 50%, rgba(79,195,255,.32), transparent 55%), radial-gradient(circle at 80% 70%, rgba(228,85,207,.3), transparent 55%), linear-gradient(135deg,#121119,#16151f); }
.c6 { background: radial-gradient(circle at 50% 30%, rgba(155,130,255,.4), transparent 60%), linear-gradient(135deg,#15131f,#19172a); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.empty { padding: 80px 0 100px; text-align: center; }
.empty .em-logo { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; background: var(--grad-accent); display: flex; align-items: center; justify-content: center; color: #fff; }
.empty h2 { font-family: var(--font-heading); font-weight: 500; font-size: 26px; margin: 22px 0 0; }
.empty p { color: var(--text-2); margin: 10px 0 0; }

/* ===== article: reading column + sticky TOC ===== */
.layout { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr minmax(0,720px) 1fr; gap: 0; }
.reading { grid-column: 2; }
.toc-col { grid-column: 3; padding-left: 40px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); margin: 30px 0 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text-2); }
.breadcrumb .sep { color: var(--border-3); }
.breadcrumb .cur { color: var(--text-2); }
.art-head { padding: 22px 0 8px; }
.cat-pill { display: inline-flex; align-items: center; height: 25px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.reading h1 { font-family: var(--font-heading); font-weight: 500; font-size: clamp(32px,4vw,44px); line-height: 1.08; letter-spacing: -0.025em; margin: 16px 0 0; }
.art-meta { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 13px; color: var(--text-3); margin: 18px 0 0; flex-wrap: wrap; }
.art-meta .av { width: 26px; height: 26px; border-radius: 999px; background: var(--grad-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; font-family: var(--font-sans); }
.art-meta .dot { width: 3px; height: 3px; border-radius: 999px; background: var(--text-3); }
figure.hero { margin: 26px 0 0; }
figure.hero .cover { aspect-ratio: 16/8; border-radius: 16px; overflow: hidden; position: relative; border: 1px solid var(--border); }
figcaption { font-family: var(--font-heading); font-style: italic; font-size: 12.5px; color: var(--text-3); margin-top: 9px; text-align: center; }

/* long-form body */
.body { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.body>*:first-child { margin-top: 0; }
.body p { margin: 18px 0 0; }
.body>p:first-of-type { font-size: 18px; line-height: 1.6; color: var(--text); margin: 24px 0 0; }
/* A lead PARAGRAPH block renders as <p class="lead"> inside .body — it must NOT inherit
   the index featured-card .lead (a grid card with border/background). Reset to a clean
   large-intro paragraph. */
.body p.lead { display: block; grid-template-columns: none; border: 0; border-radius: 0; background: none; padding: 0; overflow: visible; margin: 24px 0 0; font-size: 18.5px; line-height: 1.6; font-weight: 500; color: var(--text); }
.body p.lead:hover { transform: none; box-shadow: none; border-color: transparent; }
.body h2 { font-family: var(--font-heading); font-weight: 500; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); margin: 42px 0 0; scroll-margin-top: 90px; }
.body h3 { font-family: var(--font-heading); font-weight: 500; font-size: 20px; color: var(--text); margin: 28px 0 0; scroll-margin-top: 90px; }
.body h4 { font-weight: 700; font-size: 16px; color: var(--text); margin: 22px 0 0; }
.body strong { color: var(--text); font-weight: 600; }
.body em { font-style: italic; }
.body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border-3); }
.body ul, .body ol { margin: 16px 0 0; padding-left: 22px; }
.body li { margin: 8px 0 0; }
.body li::marker { color: var(--accent); }
.body blockquote { margin: 28px 0 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--font-heading); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--text); }
.body code { font-family: ui-monospace, 'SF Mono', monospace; font-size: 13.5px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--accent-2); }
.body pre { margin: 22px 0 0; padding: 16px 18px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; overflow: auto; }
.body pre code { background: none; border: 0; padding: 0; font-size: 13px; color: var(--text-2); }
.body hr { margin: 34px 0 0; border: 0; border-top: 1px solid var(--border); }
.body img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); margin: 30px 0 0; }
.body figure { margin: 30px 0 0; }
.body figure img { margin: 0; }

/* data tables */
.table-wrap { margin: 26px 0 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.body table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.body table th, .body table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.body table thead th { background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.body table tbody tr:last-child td { border-bottom: 0; }
.body table tbody tr:hover { background: var(--panel-2); }
.body table td { color: var(--text-2); }
.body table td.num, .body table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== rich blocks (rendered from the composer) ===== */
.body figure.b-fig { margin: 30px 0 0; }
.body figure.b-fig img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--border); }
.body figure.b-fig.wide { width: min(960px, 92vw); margin-left: 50%; transform: translateX(-50%); }
.body figure.b-fig.left img { max-width: 62%; }

.body .b-callout { display: flex; gap: 12px; margin: 26px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.body .b-callout .ic { flex-shrink: 0; }
.body .b-callout .ic svg { width: 20px; height: 20px; display: block; }
.body .b-callout .ct strong, .body .b-callout .ct b { color: var(--text); }
.body .b-callout.info { background: rgba(79,195,255,.10); border-color: rgba(79,195,255,.30); }
.body .b-callout.info .ic { color: #4FC3FF; }
.body .b-callout.tip { background: rgba(91,191,181,.10); border-color: rgba(91,191,181,.30); }
.body .b-callout.tip .ic { color: #5BBFB5; }
.body .b-callout.warn { background: rgba(212,165,63,.12); border-color: rgba(212,165,63,.35); }
.body .b-callout.warn .ic { color: #D4A53F; }

.body .b-chart { margin: 30px 0 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.body .b-chart .bc-title { font-family: var(--font-heading); font-size: 16px; color: var(--text); margin-bottom: 12px; }
.body .b-chart .bc-svg { width: 100%; height: auto; }
.body .b-chart .bc-lbl { fill: var(--text-3); font-size: 12px; font-family: var(--font-sans); }
.body .b-chart .bc-val { fill: var(--text-2); font-size: 12px; font-weight: 600; font-family: var(--font-sans); }
.body .b-chart .bc-donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.body .b-chart .bc-donut svg { width: 160px; height: 160px; flex-shrink: 0; }
.body .b-chart .bc-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; min-width: 160px; }
.body .b-chart .bc-legend li { display: flex; align-items: center; gap: 9px; color: var(--text-2); }
.body .b-chart .bc-legend .sw { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.body .b-chart .bc-legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }

.body .b-embed { margin: 28px 0 0; }
.body .b-embed iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; background: var(--panel-2); display: block; }
.body .b-embed.link a { display: inline-flex; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--accent); }

.body .b-feat { margin: 32px 0 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.body .b-feat .media { position: relative; aspect-ratio: 16/10; }
.body .b-feat .media img { width: 100%; height: 100%; object-fit: cover; }
.body .b-feat .media .tag { position: absolute; top: 10px; left: 10px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: rgba(0,0,0,.5); color: #fff; }
.body .b-feat .fbody { padding: 24px 26px; display: flex; flex-direction: column; justify-content: center; }
.body .b-feat .eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.body .b-feat h4 { font-family: var(--font-heading); font-weight: 500; font-size: 20px; color: var(--text); margin: 8px 0 0; }
.body .b-feat p { font-size: 14px; color: var(--text-2); margin: 8px 0 0; line-height: 1.55; }
.body .b-feat .try { align-self: flex-start; margin-top: 18px; display: inline-flex; align-items: center; padding: 9px 17px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: filter .15s; }
.body .b-feat .try:hover { filter: brightness(1.08); }
@media (max-width: 640px) { .body .b-feat { grid-template-columns: 1fr; } }

.body .b-form { margin: 32px 0 0; padding: 24px 26px; border: 1px solid var(--border-2); border-radius: 16px; background: var(--panel); }
.body .b-form .bf-head h4 { font-family: var(--font-heading); font-weight: 500; font-size: 20px; color: var(--text); margin: 0; }
.body .b-form .bf-head p { font-size: 14.5px; color: var(--text-2); margin: 8px 0 0; }
.body .b-form .bf-form { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.body .b-form input { flex: 1; min-width: 220px; padding: 11px 14px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg-2); color: var(--text); font-family: inherit; font-size: 14px; }
.body .b-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.body .b-form button { padding: 11px 22px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.body .b-form .bf-done { margin-top: 12px; color: #5BBFB5; font-size: 14px; font-weight: 500; }

/* sticky TOC */
.toc { position: sticky; top: 90px; }
.toc .h { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 13px; }
.toc a { display: block; font-size: 13.5px; color: var(--text-2); padding: 6px 0 6px 12px; border-left: 2px solid transparent; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc a.sub { padding-left: 24px; font-size: 12.5px; }

/* article footer + share */
.art-foot { margin: 46px 0 0; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.art-foot .sh-l { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.share { display: flex; gap: 9px; }
.share a, .share button.sh-copy { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.share a:hover, .share button.sh-copy:hover { border-color: var(--border-glow); color: var(--text); transform: translateY(-2px); }
.share button.sh-copy { position: relative; padding: 0; }
.share button.sh-copy.ok { color: var(--accent); border-color: var(--accent); }
.share button.sh-copy.ok::after { content: "Copied!"; position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.art-foot .bk { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }

/* related */
.related { padding: 40px 0 60px; }
.related .rh { font-family: var(--font-heading); font-weight: 500; font-size: 22px; margin: 0 0 20px; }
.rel-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.rel { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.rel:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.rel .rc { aspect-ratio: 16/9; position: relative; overflow: hidden; }
.rel .rb { padding: 13px 15px 16px; }
.rel .rm { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.rel h4 { font-family: var(--font-heading); font-weight: 500; font-size: 15.5px; line-height: 1.25; margin: 7px 0 0; color: var(--text); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; display: block; }
  .reading { max-width: 720px; margin: 0 auto; }
  .toc-col { display: none; }
}
@media (max-width: 720px) {
  .lead { grid-template-columns: 1fr; } .lead-cover { aspect-ratio: 16/9; }
}
@media (max-width: 640px) { .rel-grid { grid-template-columns: 1fr; } }

/* ===== new data blocks: stat (hero KPI row) + sources (citations) + faq (accordion) ===== */
.body .b-stat { margin: 34px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.body .b-stat .st { background: var(--panel); padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.body .b-stat .st .v { font-family: var(--font-heading); font-weight: 500; font-size: clamp(34px, 5vw, 42px); line-height: 1; letter-spacing: -0.025em; color: var(--accent); font-variant-numeric: tabular-nums; }
.body .b-stat .st .l { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.45; color: var(--text-3); }
.body .b-stat .st .n { font-family: var(--font-heading); font-style: italic; font-size: 12.5px; line-height: 1.4; color: var(--text-4); }
@media (max-width: 560px) { .body .b-stat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 380px) { .body .b-stat { grid-template-columns: 1fr; } }

.body .b-sources { margin: 42px 0 0; padding: 22px 24px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.body .b-sources .sh { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 2px; }
.body .b-sources ol { list-style: none; margin: 0; padding: 0; counter-reset: src; }
.body .b-sources li { counter-increment: src; display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.body .b-sources li::before { content: counter(src, decimal-leading-zero); flex-shrink: 0; min-width: 22px; font-family: var(--font-mono); font-size: 12px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.body .b-sources li > a, .body .b-sources li > .src-plain { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.body .b-sources a { text-decoration: none; }
.body .b-sources .ti { font-size: 14.5px; line-height: 1.45; color: var(--text); transition: color .15s var(--ease); }
.body .b-sources a:hover .ti { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border-3); }
.body .b-sources .dom { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); word-break: break-word; }

.body .b-faq { margin: 30px 0 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--panel); }
.body .b-faq-item { border-top: 1px solid var(--border); }
.body .b-faq-item:first-child { border-top: 0; }
.body .b-faq-item > summary { list-style: none; cursor: pointer; padding: 16px 20px; font-family: var(--font-heading); font-size: 17px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 12px; scroll-margin-top: 90px; }
.body .b-faq-item > summary::-webkit-details-marker { display: none; }
.body .b-faq-item > summary::after { content: "+"; font-family: var(--font-mono); font-size: 18px; color: var(--accent); flex-shrink: 0; }
.body .b-faq-item[open] > summary::after { content: "\2212"; }
.body .b-faq-a { padding: 0 20px 18px; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.body .b-faq-a > *:first-child { margin-top: 0; }
