/* ============================================================
   Orbisica — design system v3 ("editorial premium")
   Type: Fraunces (display) · Source Serif 4 (prose) · Inter (UI)
   Light + dark, RTL-aware, no framework.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #faf9f7;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --ink: #15171c;
  --ink-2: #4b5158;
  --ink-3: #7e858f;
  --line: #e8e4dc;
  --line-strong: #d8d2c7;
  --accent: #0e6e5c;
  --accent-ink: #0a5245;
  --accent-soft: #e7f2ef;
  --gold: #a97b23;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20, 22, 26, .05), 0 1px 1px rgba(20, 22, 26, .04);
  --shadow-2: 0 10px 30px -12px rgba(20, 22, 26, .18), 0 2px 6px rgba(20, 22, 26, .05);
  --shadow-3: 0 24px 60px -24px rgba(20, 22, 26, .30);
  --shell: 1180px;
  --shell-narrow: 760px;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-prose: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Arabic typography: dedicated families (Fraunces/Source Serif have no Arabic glyphs) */
[dir="rtl"] {
  --font-display: 'IBM Plex Sans Arabic', 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-ui: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
  --font-prose: 'Noto Naskh Arabic', 'IBM Plex Sans Arabic', Georgia, serif;
}
[dir="rtl"] body { font-size: 16.5px; }
[dir="rtl"] .prose { font-size: 18.5px; line-height: 1.95; }
[dir="rtl"] .hero-title { letter-spacing: 0; font-weight: 700; line-height: 1.3; }
[dir="rtl"] .card-title, [dir="rtl"] .row-title, [dir="rtl"] .prose-h2 { letter-spacing: 0; }
[dir="rtl"] .toc a::before { content: counter(toc) ". "; }

[data-theme="dark"] {
  --bg: #0d0f12;
  --bg-elev: #14171c;
  --surface: #16191f;
  --surface-2: #1b1f26;
  --ink: #eceef1;
  --ink-2: #a9b0ba;
  --ink-3: #7b838e;
  --line: #242931;
  --line-strong: #303741;
  --accent: #57d2b4;
  --accent-ink: #8ee7cf;
  --accent-soft: #12241f;
  --gold: #d9b061;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 12px 34px -14px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
  --shadow-3: 0 28px 70px -26px rgba(0, 0, 0, .8);
}

/* respect the system preference when the reader has not chosen a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f12;
    --bg-elev: #14171c;
    --surface: #16191f;
    --surface-2: #1b1f26;
    --ink: #eceef1;
    --ink-2: #a9b0ba;
    --ink-3: #7b838e;
    --line: #242931;
    --line-strong: #303741;
    --accent: #57d2b4;
    --accent-ink: #8ee7cf;
    --accent-soft: #12241f;
    --gold: #d9b061;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 12px 34px -14px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
    --shadow-3: 0 28px 70px -26px rgba(0, 0, 0, .8);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: #fff; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.shell-wide { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.shell-narrow { max-width: var(--shell-narrow); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; inset-inline-start: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 100; }
.skip-link:focus { inset-inline-start: 12px; top: 12px; }

/* reading progress (scroll-driven where supported) */
.progress { position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; z-index: 60; background: transparent; }
@supports (animation-timeline: scroll()) {
  .progress::before { content: ""; display: block; height: 100%; background: var(--accent);
    transform-origin: 0 50%; transform: scaleX(0); animation: progress-grow linear both; animation-timeline: scroll(root); }
  [dir="rtl"] .progress::before { transform-origin: 100% 50%; }
  @keyframes progress-grow { to { transform: scaleX(1); } }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-block-end: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand:hover { color: inherit; }
.brand-mark { color: var(--accent); font-size: 15px; transform: translateY(-1px); }
.brand-name { color: var(--ink); }
.main-nav { display: flex; gap: 2px; margin-inline-start: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 8px 12px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap; transition: background .18s var(--ease), color .18s var(--ease);
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.header-search { position: relative; display: flex; align-items: center; }
.header-search input {
  width: 230px; padding: 9px 36px 9px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13.5px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), width .25s var(--ease);
}
[dir="rtl"] .header-search input { padding: 9px 14px 9px 36px; }
.header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); width: 290px; }
.header-search .search-mark { position: absolute; inset-inline-end: 13px; color: var(--ink-3); font-size: 15px; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer;
  font-size: 15px; transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.lang-toggle:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 74px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 620px; z-index: -1;
  background:
    radial-gradient(48% 62% at 18% 8%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 62%),
    radial-gradient(40% 55% at 86% 0%, color-mix(in srgb, var(--gold) 9%, transparent) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.kicker .rule { width: 26px; height: 2px; background: currentColor; display: inline-block; border-radius: 2px; }
[dir="rtl"] .kicker { letter-spacing: 0; }
.hero-title { font-size: clamp(38px, 5.1vw, 62px); font-weight: 640; letter-spacing: -.028em; margin: 0 0 18px; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: 17.5px; line-height: 1.65; color: var(--ink-2); max-width: 54ch; margin: 0 0 26px; }
.hero-search { display: flex; gap: 10px; max-width: 520px; }
.hero-search input {
  flex: 1 1 auto; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; box-shadow: var(--shadow-1);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--accent); color: #fff; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-1); transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:hover { background: var(--accent-ink); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.hero-cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* live stats strip */
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-stats .stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stats .stat b { font-family: var(--font-display); font-size: 26px; font-weight: 640; letter-spacing: -.02em; }
.hero-stats .stat span { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.hero-stats .stat.accent b { color: var(--accent); }

.hero-figure { position: relative; margin: 0; }
.hero-figure img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-3);
}
.hero-figure figcaption {
  position: absolute; inset-inline: 14px; bottom: 14px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, #0b0d10 68%, transparent); color: #f3f5f7; font-size: 12.5px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.hero-figure figcaption a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sections ---------- */
.sec { padding: 54px 0; }
.sec-tight { padding: 34px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 26px; }
.sec-title { font-size: 28px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.sec-title .rule { width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.sec-sub { color: var(--ink-2); font-size: 15.5px; max-width: 62ch; margin: 8px 0 0; }
.sec-link { font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.sec-link::after { content: " →"; }
[dir="rtl"] .sec-link::after { content: " ←"; }

/* ---------- featured cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card:hover .card-title a { color: var(--accent); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.035); }
.card-media .card-cat {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px; padding: 5px 11px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, #0b0d10 62%, transparent); color: #fff; font-size: 11.5px; font-weight: 600; letter-spacing: .05em;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1 1 auto; }
.card-title { font-size: 21px; line-height: 1.24; letter-spacing: -.02em; }
.card-title a { color: var(--ink); transition: color .18s var(--ease); }
.card-excerpt { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.card-meta .dot { opacity: .55; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-weight: 650; letter-spacing: .01em;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); white-space: nowrap;
}
.badge::before { content: "✓"; font-size: 10.5px; }
.badge-plain { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.badge-plain::before { content: none; }

/* ---------- topic tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; display: flex; align-items: flex-end; min-height: 168px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform .5s var(--ease), opacity .3s var(--ease); }
.tile:hover img { transform: scale(1.05); opacity: 1; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 10, 13, .82) 6%, rgba(8, 10, 13, .22) 55%, rgba(8, 10, 13, .06)); }
.tile-body { position: relative; z-index: 1; padding: 16px 18px; color: #fff; }
.tile-name { font-family: var(--font-display); font-size: 19px; font-weight: 620; letter-spacing: -.015em; }
.tile-count { font-size: 12.5px; opacity: .82; }
.tile.no-img::after { background: linear-gradient(to top, color-mix(in srgb, var(--accent) 88%, #000) 0%, color-mix(in srgb, var(--accent) 62%, #000) 100%); }

/* ---------- latest list ---------- */
.list-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line); transition: background .16s var(--ease);
}
.row:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.row-thumb { width: 76px; height: 54px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; }
.row-title { font-family: var(--font-display); font-size: 18.5px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 4px; }
.row-title a { color: var(--ink); }
.row-title a:hover { color: var(--accent); }
.row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.row-cta { font-size: 13px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity .18s var(--ease); white-space: nowrap; }
.row:hover .row-cta { opacity: 1; }

/* ---------- trust band ---------- */
.trust { background: var(--surface); border-block: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; padding: 46px 0; }
.trust-item { display: flex; flex-direction: column; gap: 8px; }
.trust-num {
  width: 34px; height: 34px; border-radius: var(--radius-pill); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.trust-item h3 { font-size: 19px; letter-spacing: -.015em; }
.trust-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }

/* ---------- page head (index/category/search) ---------- */
.page-head { padding: 44px 0 8px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs [aria-current] { color: var(--ink-2); }
.page-title { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.028em; }
.dek { color: var(--ink-2); font-size: 17px; max-width: 66ch; margin: 12px 0 0; }

/* ---------- article ---------- */
.article { padding-bottom: 40px; }
.masthead { padding: 40px 0 0; }
.masthead-inner { max-width: var(--shell); }
.article-title { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.03em; margin: 0 0 14px; }
.dek-lead { font-family: var(--font-prose); font-size: 19.5px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; margin: 0 0 22px; }
.byline-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3);
  padding: 14px 0 22px; border-bottom: 1px solid var(--line);
}
.byline-meta .dot { opacity: .5; }
.masthead-media { margin: 26px 0 0; }
.masthead-media img { width: 100%; max-height: 620px; object-fit: cover; border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-2); }
.masthead-media figcaption { font-size: 12.5px; color: var(--ink-3); padding: 10px 4px 0; }
.credit, .lic { color: var(--ink-3); }

.article-grid { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 48px; padding-top: 34px; align-items: start; }
.rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 26px; max-height: calc(100vh - 100px); overflow: auto; padding-inline-end: 4px; }
.rail-title { font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: block; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2);
  border-inline-start: 2px solid transparent; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.toc a::before { content: counter(toc) ". "; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.toc a.active { color: var(--accent-ink); background: var(--accent-soft); border-inline-start-color: var(--accent); font-weight: 600; }
.facts-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); }
.facts { margin: 0; display: flex; flex-direction: column; }
.fact-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.fact-row:last-child { border-bottom: 0; }
.fact-row dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.fact-row dd { margin: 0; font-size: 14px; line-height: 1.5; }
.fact-row .as-of { display: inline-block; margin-inline-start: 6px; font-size: 11px; color: var(--gold); }
.fact-src { font-size: 11px; vertical-align: super; color: var(--accent); font-weight: 600; margin-inline-start: 4px; }

.content-col { max-width: 720px; min-width: 0; }
.summary-lead {
  font-family: var(--font-prose); font-size: 20px; line-height: 1.62; color: var(--ink);
  border-inline-start: 3px solid var(--accent); padding-inline-start: 18px; margin: 0 0 34px;
}
.prose-sec { margin-bottom: 42px; scroll-margin-top: 90px; }
.prose-h2 { display: flex; align-items: baseline; gap: 12px; font-size: 27px; letter-spacing: -.022em; margin: 0 0 18px; }
.prose-h2 .h-rule { width: 20px; height: 2px; background: var(--accent); border-radius: 2px; flex: none; transform: translateY(-6px); }
.prose { font-family: var(--font-prose); font-size: 18px; line-height: 1.78; color: var(--ink); }
.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--font-display); font-size: 3.35em; line-height: .82;
  padding-inline-end: 10px; padding-block-start: 5px; color: var(--accent); font-weight: 620;
}
[dir="rtl"] .prose > p:first-of-type::first-letter { float: right; }
.prose h3 { font-size: 21px; margin: 1.4em 0 .5em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
sup.cite { font-family: var(--font-ui); font-size: .58em; font-weight: 650; line-height: 0; }
sup.cite a {
  display: inline-block; padding: 1px 6px; margin-inline-start: 4px; border-radius: 6px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent-ink); text-decoration: none; vertical-align: super;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
sup.cite a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }

.callout {
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px; margin: 26px 0; box-shadow: var(--shadow-1);
}
.callout-label { font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.callout p { font-family: var(--font-prose); font-size: 17px; line-height: 1.7; margin: 0 0 .7em; }
.callout p:last-child { margin-bottom: 0; }
.quoteblock { display: flex; flex-direction: column; gap: 18px; margin: 26px 0; }
.quoteblock blockquote {
  margin: 0; padding: 18px 22px; background: var(--surface-2); border-radius: var(--radius);
  border-inline-start: 3px solid var(--gold); font-family: var(--font-prose);
}
.quoteblock blockquote p { font-size: 17.5px; line-height: 1.7; margin: 0 0 8px; }
.quoteblock cite { font-family: var(--font-ui); font-size: 12.5px; font-style: normal; color: var(--ink-3); }
.table-wrap { margin: 26px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.table-wrap table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 14px; }
.table-wrap th { text-align: start; padding: 12px 14px; background: var(--surface-2); font-weight: 650; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.table-wrap td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table-note { padding: 10px 14px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); }

.timeline { position: relative; margin: 26px 0; padding-inline-start: 26px; }
.timeline::before { content: ""; position: absolute; inset-block: 6px; inset-inline-start: 6px; width: 1.5px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 25%, var(--line))); }
.t-item { position: relative; padding: 0 0 22px; }
.t-item::before { content: ""; position: absolute; inset-inline-start: -26px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2.5px solid var(--accent); }
.t-date { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent-ink); text-transform: uppercase; margin-bottom: 3px; }
.t-body h4 { font-size: 17.5px; margin: 0 0 4px; letter-spacing: -.01em; }
.t-body p { font-family: var(--font-prose); font-size: 16px; line-height: 1.65; color: var(--ink-2); margin: 0; }

.faq { display: flex; flex-direction: column; gap: 8px; margin: 22px 0; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; cursor: pointer;
  padding: 15px 18px; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { color: var(--accent); font-family: var(--font-ui); font-size: 20px; transition: transform .2s var(--ease); flex: none; }
.faq-item[open] .faq-mark { transform: rotate(45deg); }
.faq-item p { font-family: var(--font-prose); font-size: 16.5px; line-height: 1.7; color: var(--ink-2); padding: 0 18px 18px; margin: 0; }

.inline-media { margin: 30px 0; }
.inline-media img { border-radius: var(--radius); box-shadow: var(--shadow-2); }
.inline-media figcaption { font-size: 12.5px; color: var(--ink-3); padding-top: 10px; }

.sources-sec { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 12px; }
.sources-intro { color: var(--ink-2); font-size: 14.5px; max-width: 70ch; }
.sources { list-style: none; counter-reset: src; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.sources li:target { background: var(--accent-soft); border-radius: var(--radius-sm); }
.sources .src-n { font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--radius-pill); width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.src-title { font-weight: 600; font-size: 15px; display: block; }
.src-meta { display: inline-block; font-size: 12px; color: var(--ink-3); margin-inline-end: 10px; }
.tier { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--line); }
.tier-primary { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 20%, transparent); }

.related-sec { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 40px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.related-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.related-card h3 { font-size: 17px; letter-spacing: -.015em; }
.related-card .kicker { margin: 0; font-size: 10.5px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line-strong); font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.chip:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, transparent); transform: translateY(-1px); }
.chip-kind { color: var(--ink-3); font-size: 12px; }
.aliases { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.alias-tag { font-size: 12.5px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: var(--radius-pill); }

.kgraph { margin: 22px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-1); }
.kgraph svg { width: 100%; height: auto; }
.kedge { stroke: var(--line-strong); stroke-width: 1; }
.kedge-label { font-family: var(--font-ui); font-size: 8.5px; fill: var(--ink-3); text-anchor: middle; }
.knode circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.knode.subj circle { fill: var(--accent); }
.klabel { font-family: var(--font-ui); font-size: 9.5px; fill: var(--ink-2); text-anchor: middle; }

.dym { color: var(--ink-2); }
.dym a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.empty { color: var(--ink-3); font-size: 15px; padding: 26px 0; }
.q { color: var(--ink-2); font-weight: 400; }
.mini-head { font-size: 17px; margin: 26px 0 10px; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 52px 0 34px; }
.footer-grid h4 { font-family: var(--font-ui); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.footer-grid p { color: var(--ink-2); font-size: 14px; line-height: 1.65; margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 12px; }
.footer-blurb { max-width: 44ch; }
.footer-base { border-top: 1px solid var(--line); padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.footer-base a { color: var(--ink-2); }
.footer-base a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero { padding: 48px 0 26px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-figure { order: -1; }
  .hero-figure img { aspect-ratio: 16 / 9; }
  .card-grid, .tile-grid, .trust-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: 1fr; gap: 26px; }
  .rail { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .rail > * { flex: 1 1 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .shell, .shell-wide, .shell-narrow { padding: 0 18px; }
  .header-inner { height: 58px; gap: 12px; }
  .main-nav { display: none; }
  .header-search input { width: 150px; }
  .header-search input:focus { width: 180px; }
  .hero-title { font-size: clamp(32px, 9vw, 42px); }
  .hero-search { flex-direction: column; }
  .card-grid, .card-grid.two, .tile-grid, .trust-grid, .related-grid, .footer-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 60px minmax(0, 1fr); }
  .row-thumb { width: 60px; height: 44px; }
  .row-cta { display: none; }
  .prose { font-size: 17px; }
  .prose-h2 { font-size: 23px; }
  .article-title { font-size: clamp(28px, 8vw, 36px); }
  .sec { padding: 40px 0; }
}
@media print {
  .site-header, .site-footer, .rail, .progress, .related-sec { display: none; }
  .article-grid { display: block; }
}

/* ---------- trust pages (About / Editorial / Sources / Corrections) ---------- */
.trust-nav { border-block: 1px solid var(--line); background: var(--surface-2); }
.trust-nav .shell { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-block: 12px; }
.trust-nav a {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 4px 0; border-bottom: 2px solid transparent; text-decoration: none;
}
.trust-nav a:hover { color: var(--ink); }
.trust-nav a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.trust-shell { max-width: var(--shell-narrow); margin: 0 auto; padding: 0 24px; }
.trust-sec { padding: 26px 0; }
.trust-sec h2 { font-size: 21px; letter-spacing: -.01em; margin: 0 0 10px; }
.trust-sec p { font-size: 16.5px; line-height: 1.75; color: var(--ink-2); margin: 0 0 14px; max-width: 68ch; }
.trust-sec p:last-child { margin-bottom: 0; }
.trust-sec a { color: var(--accent-ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.footer-links a { font-size: 13px; color: var(--ink-3); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 720px) {
  .trust-sec { padding: 20px 0; }
  .trust-sec h2 { font-size: 19px; }
  .trust-sec p { font-size: 16px; }
}

/* ---------- review/preview banner (only rendered when REVIEW_BUILD is set) ---------- */
.review-banner {
  position: sticky; top: 0; z-index: 200;
  background: #b45309; color: #fff;
  font-size: 13px; line-height: 1.4; text-align: center;
  padding: 8px 16px; letter-spacing: .01em;
}
.review-banner code { background: rgba(0,0,0,.22); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
