/* Factograf 1.0 — the encyclopedia, made readable.
   System: cool paper, white cards (r 20–32, soft shadow), one coral accent,
   Alegreya for display, Onest for reading and UI. */
:root {
  --paper: #F1F3F6;
  --card: #FFFFFF;
  --ink: #12141A;
  --ink-2: #3A3F4B;
  --muted: #6B7280;
  --line: rgba(18, 20, 26, .08);
  --accent: #FF5A36;
  --accent-soft: #FFE9E3;
  --accent-ink: #FFFFFF;
  --deep: #161A23;
  --deep-ink: #F4F5F7;
  --mark: #FFE3D9;
  --shadow: 0 1px 2px rgba(16, 22, 34, .04), 0 18px 40px -18px rgba(16, 22, 34, .18);
  --shadow-lift: 0 2px 4px rgba(16, 22, 34, .05), 0 28px 60px -20px rgba(16, 22, 34, .28);
  --r-xl: 32px; --r-l: 24px; --r-m: 18px; --r-s: 12px;
  --display: 'Alegreya', 'Iowan Old Style', Georgia, serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --e-display: cubic-bezier(.16, 1, .3, 1);
  --e-body: cubic-bezier(.25, .46, .45, .94);
  --e-ui: cubic-bezier(.4, 0, .2, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1015; --card: #171A21; --ink: #EEF0F4; --ink-2: #C9CDD6; --muted: #8C93A1;
    --line: rgba(255, 255, 255, .08); --accent: #FF6B4A; --accent-soft: #3A1F18; --deep: #F1F2F5; --deep-ink: #12141A; --mark: #4A2519;
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -18px rgba(0, 0, 0, .6);
    --shadow-lift: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 28px 60px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { --paper: #0E1015; --card: #171A21; --ink: #EEF0F4; --ink-2: #C9CDD6; --muted: #8C93A1; --line: rgba(255,255,255,.08); --accent: #FF6B4A; --accent-soft: #3A1F18; --deep: #F1F2F5; --deep-ink: #12141A; --mark: #4A2519; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- reading progress ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
[dir="rtl"] .progress i { transform-origin: 100% 50%; }
body:not(.p-article) .progress { display: none; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter); background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); transition: box-shadow .3s var(--e-ui); }
.bar.scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 750 21px/1 var(--text); letter-spacing: -.035em; }
.brand .mark { width: 32px; height: 32px; }
.brand:hover .mark path:first-of-type { stroke-dashoffset: 0; }
.bar-search { position: relative; flex: 1; max-width: 520px; margin-inline-start: 18px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); color: var(--muted); }
.bar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.bar-search:focus-within { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.p-home .bar-search { visibility: hidden; }
.edition { position: relative; margin-inline-start: auto; }
.edition summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; font-weight: 650; font-size: 14px; letter-spacing: .02em; }
.edition summary::-webkit-details-marker { display: none; }
.edition .pop { position: absolute; inset-inline-end: 0; top: 56px; width: min(560px, calc(100vw - 32px)); padding: 20px; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); animation: pop .32s var(--e-display); }
.pop-h { margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: background .2s var(--e-ui), color .2s var(--e-ui), transform .2s var(--e-ui); }
.pill:hover { background: var(--accent-soft); transform: translateY(-1px); }
.pill.on { background: var(--ink); color: var(--card); }
.pill[hidden] { display: none; }
.pills.big .pill { min-height: 48px; padding: 0 22px; font-size: 16px; background: var(--card); box-shadow: var(--shadow); }
.pills.big .pill.on { background: var(--ink); }

/* ---------- suggestions ---------- */
.sug { position: absolute; inset-inline: 0; top: calc(100% + 10px); margin: 0; padding: 8px; list-style: none; background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-lift); z-index: 70; animation: pop .28s var(--e-display); max-height: 70vh; overflow: auto; }
.sug li a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.sug li a:hover, .sug li a[aria-selected="true"] { background: var(--paper); }
.sug img, .sug .ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--paper); flex: none; }
.sug b { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.sug small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }

/* ---------- article cover ---------- */
.article { padding: 0 var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(20px, 4vw, 48px) 0 clamp(24px, 3vw, 40px); }
.cover.no-hero { grid-template-columns: 1fr; }
.cover.portrait { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.cover-text { padding-bottom: 8px; }
.desc { display: inline-block; margin: 0 0 22px; padding: 8px 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 14.5px; font-weight: 550; color: var(--ink-2); max-width: 100%; }
.desc::first-letter { text-transform: uppercase; }
.title { margin: 0; font: 700 clamp(46px, 6.6vw, 104px)/.92 var(--display); letter-spacing: -.028em; text-wrap: balance; hyphens: auto; overflow-wrap: anywhere; }
.title span { display: block; }
.title.t-s { font-size: clamp(64px, 11.5vw, 184px); line-height: .86; letter-spacing: -.035em; }
.title.t-l { font-size: clamp(40px, 5vw, 76px); line-height: .98; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.meta a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; border-bottom: 1.5px solid var(--line); }
.meta a:hover { color: var(--ink); border-color: var(--accent); }
.meta svg { width: 16px; height: 16px; }
.cover-img { margin: 0; position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--card); box-shadow: var(--shadow-lift); aspect-ratio: 4 / 3; max-height: 72vh; }
.cover.portrait .cover-img { aspect-ratio: 4 / 5; }
.cover-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1100px) {
  /* the cover picture runs off the right edge of the page */
  .cover:not(.no-hero):not(.portrait) .cover-img { margin-inline-end: calc(-1 * var(--gutter) - max(0px, (100vw - var(--max) - 2 * var(--gutter)) / 2)); border-start-end-radius: 0; border-end-end-radius: 0; aspect-ratio: auto; height: min(640px, 70vh); }
}

/* ---------- facts bento ---------- */
.kicker { margin: 0 0 18px; font: 700 13px/1 var(--text); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.facts { margin: clamp(8px, 2vw, 24px) 0 0; }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 118px; padding: 20px 22px; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); }
.fact-l { font-size: 13.5px; font-weight: 550; color: var(--muted); }
.fact-l::first-letter, .fact-v::first-letter { text-transform: uppercase; }
.fact-v { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.fact.big { grid-row: span 2; min-height: 248px; }
.fact.big .fact-v { font: 700 clamp(34px, 3.6vw, 54px)/1 var(--display); letter-spacing: -.02em; }
.fact.hot { background: var(--accent); color: var(--accent-ink); box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--accent) 70%, transparent); }
.fact.hot .fact-l { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.fact.ink { background: var(--deep); color: var(--deep-ink); }
.fact.ink .fact-l { color: color-mix(in srgb, var(--deep-ink) 64%, transparent); }
.card-drawer { margin-top: 12px; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); }
.card-drawer summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 18px 22px; font-weight: 600; font-size: 15px; }
.card-drawer summary::-webkit-details-marker { display: none; }
.card-drawer summary::after { content: ''; margin-inline-start: auto; width: 10px; height: 10px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .3s var(--e-ui); }
.card-drawer[open] summary::after { transform: rotate(225deg); }
.card-drawer summary b { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.card-drawer dl { margin: 0; padding: 0 22px 22px; columns: 2 320px; column-gap: 32px; }
.card-drawer dl div { break-inside: avoid; display: grid; grid-template-columns: 38% 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.card-drawer dt { color: var(--muted); }
.card-drawer dd { margin: 0; }

/* ---------- reading grid ---------- */
.read { display: grid; grid-template-columns: 250px minmax(0, 720px); gap: clamp(32px, 5vw, 88px); justify-content: center; margin-top: clamp(40px, 6vw, 80px); }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 116px); overflow: auto; padding: 22px 12px 18px 18px; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); scrollbar-width: thin; }
.toc-h { margin: 0 0 10px 6px; font: 700 12px/1 var(--text); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a { position: relative; display: block; padding: 8px 10px 9px; border-radius: 10px; text-decoration: none; font-size: 14.5px; line-height: 1.3; color: var(--ink-2); transition: background .2s var(--e-ui), color .2s var(--e-ui); }
.toc a:hover { background: var(--paper); color: var(--ink); }
.toc a i { position: absolute; inset: auto 10px 3px; height: 2px; border-radius: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); opacity: 0; transition: opacity .25s var(--e-ui); }
.toc a.on { color: var(--ink); font-weight: 600; background: var(--paper); }
.toc a.on i { opacity: 1; }
.toc-top { display: inline-flex !important; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px !important; color: var(--muted) !important; }
.toc-top svg { width: 15px; height: 15px; }

.chapter { padding-bottom: 12px; }
.chapter + .chapter { margin-top: clamp(40px, 5vw, 64px); }
.chapter > h2 { margin: 0 0 22px; font: 700 clamp(32px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.prose { font-size: 18px; line-height: 1.72; color: var(--ink); overflow-wrap: break-word; }
.prose p { margin: 0; }
/* paragraphs and blocks are separated by exactly one empty line (= one line of text) */
/* :not(:first-child) outranks `.prose p { margin: 0 }` — a paragraph after a list, quote or table keeps its empty line */
.prose > :not(:first-child), .prose p + p { margin-top: 1.72em; margin-top: 1lh; }
.prose > h3:not(:first-child) { margin-top: 1.9em; }
.prose .lead { font-size: clamp(20px, 1.8vw, 23px); line-height: 1.58; font-weight: 450; letter-spacing: -.008em; }
.intro .prose .lead.dc::first-letter { float: left; margin: .06em .1em 0 0; font: 800 3.35em/.8 var(--display); color: var(--accent); }
[dir="rtl"] .intro .prose .lead.dc::first-letter { float: right; margin: .06em 0 0 .1em; }
.prose h3 { margin: 1.9em 0 .4em; font: 700 24px/1.2 var(--display); letter-spacing: -.01em; }
.prose a { color: inherit; text-decoration: none; background: linear-gradient(var(--accent-soft), var(--accent-soft)) no-repeat 0 100% / 100% .16em; transition: background-size .25s var(--e-ui); border-radius: 2px; }
.prose a:hover { background-size: 100% 100%; }
.prose ul, .prose ol { padding-inline-start: 1.25em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose .cols { columns: 2 220px; column-gap: 32px; }
.prose .cols li { break-inside: avoid; }
.prose dl dt { font-weight: 650; margin-top: .6em; }
.prose dl dd { margin: 0; }
.prose .hatnote { font-size: 14.5px; color: var(--muted); padding: 10px 16px; border-radius: var(--r-s); background: var(--card); }
.prose .hatnote a { background: none; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.prose blockquote, .prose .pull { margin: 1.6em 0; padding: 26px 30px; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); font: 500 21px/1.5 var(--display); font-style: italic; }
.prose sup, .prose sub { line-height: 0; }
.prose img { display: inline-block; vertical-align: middle; }
.tbl { overflow-x: auto; margin: 1.5em 0; border-radius: var(--r-m); background: var(--card); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.45; }
.tbl th, .tbl td { padding: 10px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl th { font-weight: 650; background: color-mix(in srgb, var(--paper) 60%, var(--card)); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl caption { padding: 12px 14px 4px; text-align: start; font-weight: 650; }
/* tables fold behind a button and open over the blurred page */
.js .prose .tbl { display: none; }
.prose h3.has-tbtn { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; row-gap: 10px; }
.tbl-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 8px; }
.tbl-name { font: 700 19px/1.25 var(--display); letter-spacing: -.005em; color: var(--ink); }
.tbtn { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font: 600 14px/1 var(--text); letter-spacing: 0; cursor: pointer; white-space: nowrap; transition: box-shadow .25s var(--e-ui), translate .25s var(--e-ui), background .2s var(--e-ui); }
.tbtn svg { width: 18px; height: 18px; color: var(--accent); }
.tbtn small { font: 500 13px/1 var(--text); color: var(--muted); }
.tbtn:hover { box-shadow: var(--shadow-lift); translate: 0 -1px; }
.tbtn:active { translate: 0 0; transition-duration: .08s; }
.tview { position: fixed; inset: var(--bar-h, 0px) 0 0; z-index: 48; width: 100%; height: auto; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 3vw, 40px); border: 0; background: transparent; display: none; place-items: center; overflow: hidden; }
.tview[open] { display: grid; }
.tview-panel { display: flex; flex-direction: column; width: fit-content; min-width: min(420px, 100%); max-width: 100%; max-height: 100%; background: var(--card); border-radius: var(--r-l); box-shadow: 0 2px 6px rgba(16, 22, 34, .06), 0 40px 90px -30px rgba(16, 22, 34, .45); overflow: hidden; transform-origin: var(--ox, 50%) var(--oy, 50%); animation: tv-in .55s var(--e-display) both; }
.tview-head { display: flex; align-items: center; gap: 16px; padding: 18px 18px 14px 24px; border-bottom: 1px solid var(--line); }
.tview-head div { display: grid; gap: 3px; margin-inline-end: auto; min-width: 0; }
.tview-t { font: 700 22px/1.2 var(--display); letter-spacing: -.01em; }
.tview-m { font-size: 13px; color: var(--muted); }
.tview-x { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border: 0; border-radius: 50%; background: var(--paper); cursor: pointer; transition: background .2s var(--e-ui), rotate .3s var(--e-display); }
.tview-x:hover { background: var(--accent-soft); rotate: 90deg; }
.tview-body { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tview-body:focus-visible { outline-offset: -3px; }
.tview-body table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; max-width: min(1400px, 92vw); font-size: 15px; line-height: 1.5; }
.tview-body th, .tview-body td { padding: 11px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 64px; max-width: 460px; }
.tview-body th { font-weight: 650; background: color-mix(in srgb, var(--paper) 55%, var(--card)); }
.tview-body tr:first-child th { position: sticky; top: 0; z-index: 1; box-shadow: 0 1px 0 var(--line); }
.tview-body tr:last-child td { border-bottom: 0; }
.tview-body a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.tview-body a:hover { text-decoration-color: var(--accent); }
.tview-body img { display: inline-block; vertical-align: middle; }
.tview.out .tview-panel { animation: tv-out .26s var(--e-ui) both; }
@keyframes tv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tv-in { from { opacity: 0; scale: .9; translate: 0 18px; } 40% { opacity: 1; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes tv-out { to { opacity: 0; scale: .96; translate: 0 10px; } }
@keyframes tv-up { from { translate: 0 100%; } to { translate: 0 0; } }
@keyframes tv-down { to { translate: 0 100%; } }
html.tview-lock { overflow: hidden; }
/* veil: blurs the page under the top bar — the bar with search and menu stays sharp and usable */
.veil { position: fixed; inset: var(--bar-h, 0px) 0 0; z-index: 47; display: none; background: color-mix(in srgb, var(--paper) 42%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.veil.on { display: block; animation: tv-fade .45s var(--e-ui) both; }
.veil.out { animation: tv-fade .24s var(--e-ui) reverse both; }

/* photo viewer — same veil as the table view, picture as large as the screen allows */
.zoomable { cursor: zoom-in; }
.pview { position: fixed; inset: var(--bar-h, 0px) 0 0; z-index: 48; width: 100%; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; display: none; overflow: hidden; }
.pview[open] { display: block; }
.pview-fig { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px clamp(76px, 7vw, 120px) 24px; cursor: zoom-out; }
.pview-img { display: block; max-width: 100%; max-height: calc(100svh - var(--bar-h, 0px) - 120px); width: auto; height: auto; border-radius: 18px; background: var(--card); box-shadow: 0 2px 6px rgba(16, 22, 34, .08), 0 40px 90px -30px rgba(16, 22, 34, .5); cursor: default; }
.pview-cap { display: flex; align-items: baseline; gap: 12px; max-width: min(760px, 100%); padding: 10px 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.45; color: var(--ink-2); cursor: default; }
.pview-cap[hidden] { display: none; }
.pview-n { flex: none; font-weight: 650; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pview-n:empty { display: none; }
.pview-x, .pview-b { position: absolute; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; transition: background .2s var(--e-ui), rotate .3s var(--e-display), scale .2s var(--e-ui); }
.pview-x { top: 16px; inset-inline-end: 16px; }
.pview-x:hover { background: var(--accent-soft); rotate: 90deg; }
.pview-b { top: 50%; margin-top: -24px; }
.pview-b.prev { inset-inline-start: 16px; }
.pview-b.next { inset-inline-end: 16px; }
.pview-b:hover { scale: 1.07; background: var(--ink); color: var(--card); }
[dir="rtl"] .pview-b svg { transform: scaleX(-1); }
.pview.single .pview-b { display: none; }
.pview.out .pview-fig { animation: pv-out .24s var(--e-ui) both; }
@keyframes pv-out { to { opacity: 0; transform: scale(.97); } }
@media (max-width: 760px) {
  .pview-fig { padding: 64px 0 76px; gap: 10px; }
  .pview-img { border-radius: 0; max-height: calc(100svh - var(--bar-h, 0px) - 190px); }
  .pview-cap { margin: 0 12px; font-size: 13.5px; }
  .pview-b { top: auto; bottom: 16px; margin-top: 0; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .pview.out .pview-fig { animation: none !important; } }
@media (max-width: 760px) {
  .tview { padding: 0; place-items: end stretch; }
  .tview-panel { width: 100%; min-width: 0; max-height: 92svh; border-radius: var(--r-l) var(--r-l) 0 0; animation-name: tv-up; }
  .tview.out .tview-panel { animation-name: tv-down; }
  .tview-body table { max-width: none; font-size: 14.5px; }
  .tview-body th, .tview-body td { max-width: 72vw; }
  .tview-t { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .tview-panel, .veil { animation: none !important; } }
.note { padding: 14px 18px; border-radius: var(--r-m); background: var(--accent-soft); font-weight: 550; }

/* chapter pictures */
.plate { margin: 0 0 28px; }
.plate img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); }
.plate.tall img { max-height: 620px; width: auto; max-width: 100%; }
.plate figcaption, .strip figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.strip { margin: 0 0 30px; }
.strip-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 12px 30px; margin: -6px -12px -18px; scroll-padding-inline: 12px; overscroll-behavior-x: contain; }
.strip-track::-webkit-scrollbar { display: none; }
.strip-track figure { flex: none; margin: 0; width: min(420px, 78%); scroll-snap-align: start; }
.strip-track img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); }
.strip-nav { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.strip-count { margin-inline-end: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.rbtn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); cursor: pointer; transition: transform .2s var(--e-ui), background .2s var(--e-ui); }
.rbtn:hover { transform: scale(1.06); background: var(--ink); color: var(--card); }
.rbtn:disabled { opacity: .35; pointer-events: none; }
[dir="rtl"] .rbtn svg { transform: scaleX(-1); }

/* ---------- read next / languages ---------- */
.next, .langs { margin: clamp(64px, 8vw, 112px) 0 0; }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 250px; padding: 20px; border-radius: var(--r-l); overflow: hidden; text-decoration: none; background: var(--deep); color: #fff; box-shadow: var(--shadow); isolation: isolate; transition: box-shadow .35s var(--e-ui), translate .35s var(--e-ui); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: scale .8s var(--e-display); }
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 12, 18, 0) 38%, rgba(10, 12, 18, .78)); }
.tile:hover { box-shadow: var(--shadow-lift); translate: 0 -3px; }
.tile:hover img { scale: 1.05; }
.tile.plain { background: var(--card); color: var(--ink); }
.tile.plain::after { display: none; }
.tile-t { font: 700 23px/1.08 var(--display); letter-spacing: -.01em; }
.tile-d { margin-top: 6px; font-size: 13.5px; line-height: 1.35; opacity: .82; }
.tile-d::first-letter { text-transform: uppercase; }
.langs-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.langs-head .kicker { margin: 0; }
.lang-filter { margin-inline-start: auto; height: 42px; width: min(280px, 100%); padding: 0 16px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 16px; outline: 0; }
.lang-filter:focus { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.langs .pill { background: var(--card); }
.langs .pill.on { background: var(--ink); color: var(--card); }
.credit { margin: 56px 0 0; font-size: 13.5px; color: var(--muted); }
.credit a { color: inherit; }

/* ---------- peek card ---------- */
.peek { position: fixed; z-index: 80; width: 340px; padding: 0 0 16px; background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-lift); overflow: hidden; pointer-events: auto; opacity: 0; translate: 0 6px; scale: .98; transition: opacity .18s var(--e-ui), translate .32s var(--e-display), scale .32s var(--e-display); }
.peek.on { opacity: 1; translate: 0 0; scale: 1; }
.peek img { width: 100%; height: 170px; object-fit: cover; }
.peek b { display: block; padding: 14px 18px 0; font: 700 21px/1.12 var(--display); }
.peek small { display: block; padding: 3px 18px 0; color: var(--muted); font-size: 13px; }
.peek p { margin: 8px 18px 0; font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- home ---------- */
.home { padding: 0 var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; min-height: min(760px, calc(100vh - 80px)); padding: 12px 0 40px; }
.hero-h { margin: 0 0 36px; overflow-wrap: break-word; hyphens: auto; font: 700 clamp(50px, 6.8vw, 112px)/.9 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.big-search { position: relative; display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 8px 0 24px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow-lift); color: var(--muted); max-width: 640px; }
.big-search > svg { width: 24px; height: 24px; }
.big-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 19px; color: var(--ink); }
.big-search:focus-within { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-lift); }
.go { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 16px; cursor: pointer; transition: transform .2s var(--e-ui), box-shadow .2s var(--e-ui); }
.go:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px var(--accent); }
.go svg { width: 18px; height: 18px; transition: translate .25s var(--e-display); }
.go:hover svg { translate: 3px 0; }
.hero-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; max-width: 640px; }
.hero-langs .pill { background: var(--card); box-shadow: var(--shadow); min-height: 36px; font-size: 14px; }
.hero-langs .pill.on { background: var(--ink); }
.hero-pic { position: relative; margin: 0; margin-inline-end: calc(-1 * var(--gutter) - max(0px, (100vw - var(--max) - 2 * var(--gutter)) / 2)); height: min(700px, calc(100vh - 120px)); border-radius: var(--r-xl) 0 0 var(--r-xl); overflow: hidden; background: var(--deep); box-shadow: var(--shadow-lift); }
[dir="rtl"] .hero-pic { border-radius: 0 var(--r-xl) var(--r-xl) 0; }
.hero-pic img { width: 100%; height: 100%; object-fit: cover; }
.hero-pic figcaption { position: absolute; inset: auto 20px 20px 20px; max-width: 520px; padding: 16px 20px; border-radius: var(--r-m); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.hero-pic figcaption b { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.hero-pic figcaption span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.feature { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 460px; margin-top: 24px; border-radius: var(--r-xl); overflow: hidden; background: var(--deep); color: var(--deep-ink); text-decoration: none; box-shadow: var(--shadow-lift); }
.feature img { width: 100%; height: 100%; object-fit: cover; transition: scale 1s var(--e-display); }
.feature:hover img { scale: 1.03; }
.feature-text { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(24px, 3.5vw, 48px); }
.badge { align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.feature h2 { margin: 22px 0 8px; font: 700 clamp(38px, 4.4vw, 68px)/.94 var(--display); letter-spacing: -.025em; }
.feature-d { margin: 0 0 16px; opacity: .7; font-size: 15px; }
.feature-d::first-letter { text-transform: uppercase; }
.feature-x { margin: 0; font-size: 16.5px; line-height: 1.6; opacity: .92; }
.block { margin-top: clamp(64px, 8vw, 104px); }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; gap: 14px; }
.bento .tile { min-height: 0; }
.bento .tile.wide { grid-column: span 2; grid-row: span 2; }
.bento .tile.wide .tile-t { font-size: clamp(30px, 3vw, 44px); }
.views { position: absolute; top: 14px; inset-inline-start: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: #12141A; font-size: 12.5px; font-weight: 650; }
.views svg { width: 15px; height: 15px; }
.tile.plain .views { background: var(--paper); color: var(--ink); }
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.news-i { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); text-decoration: none; transition: box-shadow .3s var(--e-ui); }
.news-i:hover { box-shadow: var(--shadow-lift); }
.news-i img { width: 96px; height: 96px; border-radius: var(--r-s); object-fit: cover; flex: none; }
.news-i p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.days { gap: 14px; margin: -8px calc(-1 * var(--gutter)) -28px; padding: 8px var(--gutter) 40px; scroll-padding-inline: var(--gutter); }
.day { flex: none; width: 300px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: var(--r-l); overflow: hidden; background: var(--card); box-shadow: var(--shadow); text-decoration: none; }
.day img { width: 100%; height: 170px; object-fit: cover; }
.day .year { padding: 18px 20px 0; font: 800 40px/1 var(--display); color: var(--accent); letter-spacing: -.02em; }
.day p { margin: 8px 20px 20px; font-size: 15px; line-height: 1.5; }

/* ---------- search / dead ends ---------- */
.results { max-width: 880px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 0; min-height: 60vh; }
.res-h { margin: 0 0 32px; font: 700 clamp(34px, 4.4vw, 58px)/1 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.res { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.res a { display: flex; gap: 22px; align-items: center; justify-content: space-between; padding: 22px 24px; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); text-decoration: none; transition: box-shadow .3s var(--e-ui), translate .3s var(--e-ui); }
.res a:hover { box-shadow: var(--shadow-lift); translate: 0 -2px; }
.res img { width: 104px; height: 104px; object-fit: cover; border-radius: var(--r-m); flex: none; }
.res-t { display: block; font: 700 25px/1.1 var(--display); }
.res-d { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.res-s { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.res-s mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { font-size: 18px; color: var(--muted); }

/* ---------- footer ---------- */
.foot { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; margin-top: clamp(80px, 10vw, 140px); padding: 32px var(--gutter) 48px; border-top: 1px solid var(--line); font-size: 14px; }
.foot p { margin: 0; }
.foot .muted { margin-inline-start: auto; color: var(--muted); }

/* ---------- motion ---------- */
@keyframes pop { from { opacity: 0; translate: 0 -6px; scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
.js [data-intro] { opacity: 0; translate: 0 26px; transition: opacity .7s var(--e-body), translate 1s var(--e-display); transition-delay: calc(var(--i, 0) * 90ms + 60ms); }
.js .title[data-intro], .js .hero-h[data-intro] { translate: 0 0; clip-path: inset(-.2em -100vw 100% -100vw); opacity: 1; transition: clip-path 1.1s var(--e-display); transition-delay: 120ms; }
.js .title[data-intro] span, .js .hero-h[data-intro] span { translate: 0 .5em; transition: translate 1.1s var(--e-display); transition-delay: 120ms; }
.js .cover-img[data-intro] img, .js .hero-pic[data-intro] img { scale: 1.12; transition: scale 1.8s var(--e-display); }
.js .cover-img[data-intro], .js .hero-pic[data-intro] { translate: 0 0; clip-path: inset(0 0 0 100% round var(--r-xl)); opacity: 1; transition: clip-path 1.2s var(--e-display) .18s; }
.is-ready [data-intro] { opacity: 1; translate: 0 0; }
.is-ready .title[data-intro], .is-ready .hero-h[data-intro] { clip-path: inset(-.2em -100vw -.3em -100vw); }
.is-ready .title[data-intro] span, .is-ready .hero-h[data-intro] span { translate: 0 0; }
.is-ready .cover-img[data-intro], .is-ready .hero-pic[data-intro] { clip-path: inset(0 0 0 0 round var(--r-xl)); }
@media (min-width: 1100px) { .is-ready .cover:not(.no-hero):not(.portrait) .cover-img[data-intro], .is-ready .hero-pic[data-intro] { clip-path: inset(0 0 0 0 round var(--r-xl) 0 0 var(--r-xl)); } }
.is-ready .cover-img[data-intro] img, .is-ready .hero-pic[data-intro] img { scale: 1; }
.js [data-reveal] { opacity: 0; translate: 0 34px; transition: opacity .6s var(--e-body), translate .9s var(--e-display); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }
.fact.big .fact-v small { margin-inline-start: .18em; font: 600 .42em/1 var(--text); letter-spacing: 0; opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-intro], .js [data-reveal], .js .title[data-intro] span, .js .hero-h[data-intro] span, .js .cover-img[data-intro] img, .js .hero-pic[data-intro] img { translate: 0 0 !important; scale: 1 !important; transition: opacity .3s linear !important; }
  .js .title[data-intro], .js .hero-h[data-intro], .js .cover-img[data-intro], .js .hero-pic[data-intro] { clip-path: none !important; }
  .tile img, .feature img { transition: none; }
}

/* ---------- narrow ---------- */
@media (max-width: 1099px) {
  .read { grid-template-columns: minmax(0, 720px); }
  .toc { display: none; }
  .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-pic { margin-inline-end: 0; border-radius: var(--r-xl); height: 440px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { gap: 10px; padding-block: 10px; }
  .brand span { display: none; }
  .bar-search { margin-inline-start: 0; height: 44px; padding: 0 14px; }
  .p-home .bar-search { display: none; }
  .p-home .brand span { display: inline; }
  .edition summary { height: 44px; padding: 0 13px; }
  .edition summary span { display: none; }
  .cover, .cover.portrait { grid-template-columns: 1fr; gap: 22px; padding-top: 12px; }
  .cover-img { order: -1; margin-inline: calc(-1 * var(--gutter) + 6px); border-radius: var(--r-l); aspect-ratio: 4 / 3; max-height: 62vh; }
  .cover.portrait .cover-img { aspect-ratio: 4 / 4.4; }
  .title, .title.t-l { font-size: clamp(38px, 11vw, 56px); }
  .title.t-s { font-size: clamp(56px, 18vw, 96px); }
  .meta { margin-top: 18px; gap: 6px 16px; font-size: 13.5px; }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fact { min-height: 104px; padding: 16px; border-radius: var(--r-m); }
  .fact.big { grid-row: auto; min-height: 150px; }
  .fact-v { font-size: 16px; }
  .fact.big .fact-v { font-size: 32px; }
  .card-drawer dl div { grid-template-columns: 1fr; gap: 2px; }
  .read { margin-top: 44px; }
  .prose { font-size: 17px; line-height: 1.7; }
  .chapter > h2 { font-size: 32px; }
  .strip-track img { height: 230px; }
  .strip-track figure { width: 84%; }
  .rbtn { display: none; }
  .next-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 190px; padding: 16px; border-radius: var(--r-m); }
  .tile-t { font-size: 19px; }
  .hero { padding-top: 16px; gap: 28px; }
  .hero-h { margin-bottom: 24px; font-size: clamp(44px, 13vw, 64px); }
  .big-search { height: 60px; padding-inline-start: 18px; }
  .big-search input { font-size: 17px; }
  .go { height: 46px; padding: 0 16px; }
  .go span, .go { font-size: 0; gap: 0; }
  .go svg { width: 20px; height: 20px; }
  .hero-langs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scrollbar-width: none; }
  .hero-langs .pill { flex: none; }
  .hero-pic { height: 340px; border-radius: var(--r-l); }
  .feature { grid-template-columns: 1fr; min-height: 0; border-radius: var(--r-l); }
  .feature img { height: 240px; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; gap: 10px; }
  .news { grid-template-columns: 1fr; }
  .day { width: 250px; }
  .res a { padding: 16px; gap: 14px; }
  .res img { width: 72px; height: 72px; }
  .res-t { font-size: 21px; }
  .foot .muted { margin-inline-start: 0; }
  .peek { display: none; }
}
