/* NationsRelations design system v2 — dark-first, data-first. Fonts self-hosted (SIL OFL), flags flag-icons (MIT).
   Chart colours validated with the dataviz palette checker:
   identity A/B = blue/orange (slots 1–2); closeness = violet (close) ↔ red (far apart) with a grey midpoint. */
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #090b10; --bg2: #0d1016; --card: #11151d; --card2: #161b25; --glass: rgba(17, 21, 29, .72);
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .15);
  --ink: #eef1f6; --ink2: #b3bbca; --muted: #7e879a;
  --a: #3987e5; --b: #d95926; --a-text: #3987e5; --b-text: #e0602d; --a-soft: rgba(57, 135, 229, .14); --b-soft: rgba(217, 89, 38, .14);
  --close: #9085e9; --far: #e66767; --mid: #3a3f4b;
  --grid: #222733; --axis: #383d49;
  --good: #0ca30c; --warn: #fab219;
  --glow1: rgba(57, 135, 229, .18); --glow2: rgba(217, 89, 38, .12);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --wrap: 1200px; --text: 680px; --r: 20px; --r-sm: 12px; --r-pill: 999px;
  /* spacing (4px base), motion and layers: use these instead of loose numbers */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1); --dur-1: .15s; --dur-2: .3s; --dur-3: .7s;
  --z-nav: 40; --z-pop: 100; --z-tip: 120;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f6f3; --bg2: #efefea; --card: #ffffff; --card2: #f7f7f4; --glass: rgba(255, 255, 255, .75);
    --line: rgba(11, 11, 11, .08); --line2: rgba(11, 11, 11, .16);
    --ink: #0b0b0b; --ink2: #52514e; --muted: #6b6a65;
    --a: #2a78d6; --b: #df5c28; --a-text: #2268c4; --b-text: #b5471a; --a-soft: rgba(42, 120, 214, .10); --b-soft: rgba(235, 104, 52, .10);
    --close: #6250d6; --far: #e34948; --mid: #e1e0d9;
    --grid: #e7e6e0; --axis: #c3c2b7;
    --glow1: rgba(42, 120, 214, .10); --glow2: rgba(235, 104, 52, .08);
    --shadow: 0 10px 30px rgba(20, 20, 20, .08);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f3; --bg2: #efefea; --card: #ffffff; --card2: #f7f7f4; --glass: rgba(255, 255, 255, .75);
  --line: rgba(11, 11, 11, .08); --line2: rgba(11, 11, 11, .16);
  --ink: #0b0b0b; --ink2: #52514e; --muted: #6b6a65;
  --a: #2a78d6; --b: #df5c28; --a-text: #2268c4; --b-text: #b5471a; --a-soft: rgba(42, 120, 214, .10); --b-soft: rgba(235, 104, 52, .10);
  --close: #6250d6; --far: #e34948; --mid: #e1e0d9;
  --grid: #e7e6e0; --axis: #c3c2b7;
  --glow1: rgba(42, 120, 214, .10); --glow2: rgba(235, 104, 52, .08);
  --shadow: 0 10px 30px rgba(20, 20, 20, .08);
}

@view-transition { navigation: auto; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0; color: var(--ink); font: 16px/1.6 var(--sans); background: var(--bg);
  background-image: radial-gradient(900px 500px at 8% -10%, var(--glow1), transparent 60%), radial-gradient(800px 500px at 100% 0%, var(--glow2), transparent 60%);
  background-repeat: no-repeat; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p a, .prose a, .caption a, .link { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
p a:hover, .prose a:hover, .link:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.text { max-width: var(--text); }
.muted { color: var(--muted); } .ink2 { color: var(--ink2); }
.small { font-size: 14px; }
.ca { color: var(--a-text); } .cb { color: var(--b-text); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--sans); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.25; }
h1 em, h2 em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--close); box-shadow: 0 0 12px var(--close); }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--ink2); }
p { margin: 0 0 1em; text-wrap: pretty; }
.num, .counter b, .stat .v, .pcard .idx, .gauge .num, .event b { font-variant-numeric: tabular-nums lining-nums; }
.grad { background: linear-gradient(90deg, var(--a), var(--close) 50%, var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- nav */
.preview { font-size: 12.5px; text-align: center; padding: 6px 12px; color: var(--ink2); border-bottom: 1px solid var(--line); background: var(--bg2); }
@media (max-width: 560px) { .preview { font-size: 12px; padding: 4px 12px; } .preview .pv-more { display: none; } }
.nav { position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -.03em; white-space: nowrap; }  /* the name is Latin in every language: keep the brand fonts */
.logo-mark { width: 26px; height: 18px; position: relative; }
.logo-mark i { position: absolute; top: 0; width: 18px; height: 18px; border-radius: 50%; }
.logo-mark i:first-child { left: 0; background: var(--a); } .logo-mark i:last-child { right: 0; background: var(--b); mix-blend-mode: screen; }
:root[data-theme="light"] .logo-mark i:last-child { mix-blend-mode: multiply; }
.logo span { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 20px; letter-spacing: 0; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { white-space: nowrap; font-size: 14.5px; font-weight: 500; color: var(--ink2); padding: 7px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--line); }
.nav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-btn { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font-size: 14px; cursor: pointer; }
.search-btn:hover { border-color: var(--a); color: var(--ink2); }
.search-btn kbd, kbd { margin-left: auto; font: 600 11px var(--sans); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; color: var(--ink2); }
.icon-btn:hover { color: var(--ink); border-color: var(--line2); }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu-btn { display: none; }
/* language menu: globe + the current language's own name; a panel with "Automatic" and every language, sorted by its
   name in the page's language, each also shown in its own script */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; width: auto; min-width: 38px; padding: 0 10px 0 11px; display: flex; gap: 7px; align-items: center; justify-content: center; font: 600 13.5px var(--sans); color: var(--ink2); user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.lang-menu[open] > summary { color: var(--ink); border-color: var(--a); }
.lang-now { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-btn .chev { width: 14px; height: 14px; opacity: .7; transition: transform .18s; }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-pop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; width: 440px; max-width: calc(100vw - 24px); padding: 8px; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); transform-origin: top; animation: lang-in .16s ease-out; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
.lang-head { margin: 4px 10px 8px; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lang-head:lang(ar), .lang-head:lang(fa), .lang-head:lang(ur) { letter-spacing: 0; text-transform: none; }
.lang-list { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; max-height: min(62vh, 470px); overflow-y: auto; overscroll-behavior: contain; }
.lang-item { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 7px 34px 7px 12px; padding-inline: 12px 34px; border-radius: 10px; color: var(--ink); text-align: start; }
.lang-item .ln { font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.lang-item small { font-size: 12px; line-height: 1.3; color: var(--muted); }
.lang-item .tick { position: absolute; right: 10px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--a); opacity: 0; }
html[dir=rtl] .lang-item .tick { right: auto; left: 10px; }  /* svg is forced ltr for the charts, so no logical inset here */
.lang-item:hover, .lang-item:focus-visible { background: var(--line); outline: none; }
.lang-item:focus-visible { box-shadow: inset 0 0 0 2px var(--a); }
.lang-item.is-now .ln { font-weight: 700; }
.lang-item[aria-current] { background: var(--line); }
.lang-item[aria-current] .tick { opacity: 1; }
.lang-item[aria-current] small, .lang-item:hover small, .lang-item:focus-visible small { color: var(--ink2); }  /* contrast on the tinted row */
@media (prefers-reduced-motion: reduce) { .lang-pop { animation: none; } .lang-btn .chev { transition: none; } }
@media (max-width: 520px) {
  .nav .wrap { gap: 10px; } .nav-right { gap: 6px; }
  .lang-menu > summary { width: 38px; padding: 0; } .lang-now, .lang-btn .chev { display: none; }
  .lang-pop { position: fixed; top: 70px; inset-inline: 12px; width: auto; max-width: none; }
  .lang-list { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
  .lang-item { padding-top: 6px; padding-bottom: 6px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; margin: 0; }
  .nav-links.open { display: flex; }
  .search-btn { min-width: 0; } .search-btn .lbl, .search-btn kbd { display: none; }
  .menu-btn { display: grid; }
}

/* ---------------------------------------------------------------- buttons, pills, flags */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--sans); padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: var(--bg); cursor: pointer; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--ink2); }
.btn.sm { padding: 7px 14px; font-size: 13.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--sans); border-radius: 999px; padding: 4px 11px; border: 1px solid var(--line2); color: var(--ink2); background: var(--card); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mid); }
.pill.l-very-close i, .pill.l-close i { background: var(--close); }
.pill.l-distant i, .pill.l-opposed i { background: var(--far); }
.pill.l-neutral i, .pill.l-not-computable i { background: var(--muted); }
.flag { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 1.5px var(--card), 0 0 0 2.5px var(--line2); flex: none; vertical-align: middle; }
.flag.lg { width: 44px; height: 44px; } .flag.xl { width: 88px; height: 88px; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line2), var(--shadow); }
.flags { display: inline-flex; align-items: center; } .flags .flag + .flag { margin-left: -8px; }
.flags .flag.lg + .flag.lg { margin-left: -12px; }

/* ---------------------------------------------------------------- cards and sections */
.card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; position: relative; }
a.card, .card.hover { transition: transform .2s ease, border-color .2s, box-shadow .2s; }
a.card:hover, .card.hover:hover { transform: translateY(-3px); border-color: var(--line2); box-shadow: var(--shadow); }
section.sec { padding: 72px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 6px 0 0; color: var(--ink2); max-width: 560px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-3) ease, transform var(--dur-3) var(--ease); }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- home hero */
.hero { position: relative; min-height: calc(100vh - 92px); display: flex; align-items: center; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; align-items: center; }
#globe-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 640px; justify-self: center; }
#globe { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#globe:active { cursor: grabbing; }
.globe-legend { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; gap: 14px; font-size: 12.5px; color: var(--ink2); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; backdrop-filter: blur(10px); white-space: nowrap; }
.globe-legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero { min-height: auto; padding: 40px 0; } #globe-wrap { max-width: 420px; } }
.omni { position: relative; margin-top: 28px; max-width: 560px; }
.omni-box { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); transition: border-color .2s; }
.omni-box:focus-within { border-color: var(--a); outline: 2px solid var(--a); outline-offset: 2px; }
.omni-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 17px var(--sans); padding: 10px 0; }
.omni-box input::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px var(--sans); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; background: var(--card); color: var(--ink2); transition: border-color .15s, color .15s; cursor: pointer; }
.chip:hover { border-color: var(--line2); color: var(--ink); }
.chip .flags .flag { width: 20px; height: 20px; }
.chip.plain { padding: 5px 12px; }
.counters { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.counter b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.counter span { font-size: 13px; color: var(--muted); }

/* suggestions dropdown (omni + palette) */
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; z-index: 30; max-height: 380px; overflow: auto; }
.sugg[hidden] { display: none; }
.sugg .it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.sugg .it small { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.sugg .it.on, .sugg .it:hover { background: var(--line); }
.sugg .grp { font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.ai-ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a), var(--close)); color: #fff; flex: none; }
.ai-ic .icon { width: 14px; height: 14px; }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 10, .55); backdrop-filter: blur(6px); display: grid; align-items: start; justify-items: center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-box { width: min(640px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.palette-box .omni-box { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.palette-box .sugg { position: static; border: 0; box-shadow: none; border-radius: 0; max-height: 60vh; }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- featured cards */
.pcard { display: flex; flex-direction: column; gap: 12px; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .names { font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.25; }
.pcard .hook { font-size: 14px; color: var(--ink2); line-height: 1.45; min-height: 2.9em; }
.pcard .spark { height: 44px; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.pcard .idx { font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; color: var(--ink); }
.tag { font: 700 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--b-text); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento > * { grid-column: span 2; }
.bento .w3 { grid-column: span 3; } .bento .w4 { grid-column: span 4; } .bento .w6 { grid-column: span 6; }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento > *, .bento .w3, .bento .w4 { grid-column: span 1; } .bento .w6 { grid-column: span 2; } }
@media (max-width: 640px) { .bento { grid-template-columns: minmax(0, 1fr); } .bento > *, .bento .w3, .bento .w4, .bento .w6 { grid-column: span 1; } }
.stat .k { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin: 8px 0 4px; }
.stat .d { font-size: 14px; color: var(--ink2); line-height: 1.45; }
.disc li { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.disc ol { margin: 10px 0 0; padding: 0; }
.disc li .v { margin-left: auto; color: var(--muted); font-size: 12.5px; text-align: right; }
.disc .rule { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.disc li { position: relative; }
.disc .dbar { position: absolute; inset-inline-start: 0; bottom: 3px; height: 3px; border-radius: 2px; opacity: .75; }

/* network diagram */
#network { height: 780px; position: relative; }
.net-narrow { display: none; }
@media (max-width: 700px) { .net-card, .net-legend { display: none; } .net-narrow { display: block; } }
#network svg { width: 100%; height: 100%; display: block; }
.net-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink2); margin: 0 0 10px; }
.net-legend .nk { display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-inline-end: 7px; border-radius: 2px; }
.nk.close { border-color: var(--close); } .nk.far { border-color: var(--far); } .nk.neutral { border-color: var(--muted); border-top-style: dashed; }

/* AI panel */
.ai { background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--a), var(--close), var(--b)) border-box; border: 1px solid transparent; }
.ai-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.ai-head .note { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--muted); }
.ai-text { font-size: 1.12rem; line-height: 1.6; margin: 12px 0 8px; min-height: 3.2em; }
.ai-text .cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--close); vertical-align: text-bottom; animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.ai-foot { font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ok { color: var(--good); } .warn { color: var(--warn); }
.shimmer { height: 14px; border-radius: 7px; margin: 10px 0; background: linear-gradient(90deg, var(--line) 25%, var(--line2) 50%, var(--line) 75%); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* chat */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 12px; align-items: flex-start; max-width: 860px; }
.msg.b { flex-direction: row-reverse; margin-left: auto; }
.msg .bubble { background: var(--card2); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; font-size: 15.5px; line-height: 1.55; }
.msg.a .bubble { border-top-left-radius: 6px; background: var(--a-soft); border-color: transparent; }
.msg.b .bubble { border-top-right-radius: 6px; background: var(--b-soft); border-color: transparent; }
.msg .bubble q { font-family: var(--serif); font-size: 1.22rem; line-height: 1.4; quotes: "“" "”"; }
.msg .who { display: block; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.msg .more { background: none; border: 0; padding: 0; margin-top: 6px; font-size: 12.5px; color: var(--ink2); text-decoration: underline; cursor: pointer; }
.msg.user .bubble { background: var(--card2); }
.decade-sep { align-self: center; font: 700 12px var(--sans); letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--card); }
.silence { font-size: 13px; color: var(--muted); padding: 10px 14px; border: 1px dashed var(--line2); border-radius: 14px; }
.allq { margin-top: 10px; font-size: 14px; max-height: 320px; overflow: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.allq p { margin: 0 0 8px; }
.ask-form { display: flex; gap: 10px; margin-top: 16px; }
.ask-form input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 13px 16px; color: var(--ink); font: 500 15.5px var(--sans); }
.ask-form input:focus { outline: 0; border-color: var(--a); box-shadow: 0 0 0 2px var(--a); }

/* two-column body of a pair section: conversation left, summary right; stacked on small screens */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-side { position: sticky; top: 130px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split-side { position: static; } }

/* pair hero */
.pair-hero { padding: 48px 0 20px; position: relative; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.side { display: flex; align-items: center; gap: 18px; }
.side.b { flex-direction: row-reverse; text-align: right; }
.side h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 0; }
.side .sub { font-size: 13.5px; color: var(--muted); }
.gauge { width: 240px; text-align: center; }
.gauge svg { display: block; width: 100%; overflow: visible; }
.gauge .num { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-top: 6px; }
.gauge .cap { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 820px) { .duel { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .side, .side.b { flex-direction: column; text-align: center; gap: 10px; } }
.hook { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--ink2); text-align: center; margin: 22px 0 0; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.subnav { position: sticky; top: 62px; z-index: 30; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-block: 1px solid var(--line); margin-top: 30px; }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.subnav a { white-space: nowrap; font: 600 14px var(--sans); padding: 7px 14px; border-radius: 999px; color: var(--ink2); }
.subnav a:hover, .subnav a.on { background: var(--line); color: var(--ink); }
.subnav a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.subnav-gap { flex: 1; min-width: 12px; }
.subnav .subnav-quiet { font-weight: 500; color: var(--muted); }
@media screen { .tabpanel.tab-off { display: none; } }
.tab-next { text-align: end; margin: 28px 0 0; font: 600 15px var(--sans); }
.tab-next a { display: inline-flex; gap: 6px; padding: 10px 18px; border: 1px solid var(--line2); border-radius: 999px; background: var(--card); }
.tab-next a:hover { border-color: var(--a); }

/* fingerprint */
.fp-row { display: grid; grid-template-columns: 136px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 9px 0; font-size: 14px; border-top: 1px solid var(--line); }
.fp-row:first-of-type { border-top: 0; }
.fp-row .lab { font-weight: 600; }
.fp-row .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fp-row .track { position: relative; height: 10px; background: var(--line); border-radius: 5px; }
.fp-row .track::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--axis); }
.fp-row .track i { position: absolute; top: 0; bottom: 0; border-radius: 5px; transition: left .8s cubic-bezier(.2, .8, .2, 1), width .8s cubic-bezier(.2, .8, .2, 1); }
.fp-row.off { color: var(--muted); }
.fp-w { font-weight: 500; font-size: 12px; color: var(--muted); margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
.fp-s { font-variant-numeric: tabular-nums; }
.fp-total { border-top: 2px solid var(--ink) !important; margin-top: 4px; }
.fp-total .track { visibility: hidden; }
.fp-total .lab, .fp-total .val { font-weight: 800; font-size: 15px; }
.fp-scale { display: grid; grid-template-columns: 136px minmax(0, 1fr) 44px; gap: 12px; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.fp-scale div { display: flex; justify-content: space-between; }
.why { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; margin-top: -2px; }
details.weights { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
details.weights summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.weights summary::-webkit-details-marker { display: none; }
.wrow { display: grid; grid-template-columns: 116px minmax(0, 1fr) 36px; gap: 12px; align-items: center; margin: 8px 0; }
.wrow input { width: 100%; accent-color: var(--a); }

/* charts */
.chart { position: relative; margin: 10px 0 4px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { font: 12px var(--sans); fill: var(--muted); }
.chart .axis line, .chart .axis path { stroke: var(--axis); }
.chart .grid line { stroke: var(--grid); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink2); margin: 8px 0 0; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.caption { font-size: 12.5px; color: var(--muted); margin-top: 10px; max-width: 760px; line-height: 1.5; }
.tbl-toggle { font-size: 12.5px; color: var(--ink2); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; margin-top: 6px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.dtable th, .dtable td { text-align: right; padding: 5px 8px; border-top: 1px solid var(--line); }
.dtable th:first-child, .dtable td:first-child { text-align: left; }
.dtable-wrap { max-height: 280px; overflow: auto; }
.tbl-details > summary { list-style: none; display: inline-block; } .tbl-details > summary::-webkit-details-marker { display: none; }
.pos-chart .grid { stroke: var(--grid, var(--line)); stroke-width: 1; }
.pos-chart .zero { stroke: var(--axis, var(--line2)); stroke-width: 1; stroke-dasharray: 3 3; }
.pos-chart .band { stroke: none; } .pos-chart .band-a { fill: var(--a-soft); } .pos-chart .band-b { fill: var(--b-soft); }
.pos-chart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; } .pos-chart .ln-a { stroke: var(--a); } .pos-chart .ln-b { stroke: var(--b); }
.legend .key { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-inline-end: 6px; } .key-a { background: var(--a); } .key-b { background: var(--b); }
#tip { position: absolute; pointer-events: none; z-index: 120; background: var(--card2); color: var(--ink); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13px; line-height: 1.45; padding: 9px 12px; border-radius: 12px; max-width: 300px; opacity: 0; transition: opacity .12s; }

/* events strip */
.events { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.event { scroll-snap-align: start; border-left: 2px solid var(--b); padding: 4px 0 4px 14px; }
.event b { font-size: 1.4rem; letter-spacing: -.03em; display: block; }
.event span { font-size: 14px; color: var(--ink2); line-height: 1.4; display: block; }
.event a { font-size: 12px; color: var(--muted); text-decoration: underline; }

/* keywords */
.kwr { display: grid; grid-template-columns: 100px minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: 13.5px; margin: 6px 0; }
.kwr .bar { height: 8px; border-radius: 4px; }
.kwr .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* security / memorial / matches */
.timeline-list { list-style: none; padding: 0; margin: 0; }
.timeline-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.timeline-list li b { font-variant-numeric: tabular-nums; }
.memorial { border-color: var(--line2); }
.memorial h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.6rem; letter-spacing: 0; }
.memorial table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.memorial td, .memorial th { text-align: left; padding: 8px 4px; border-top: 1px solid var(--line); }
.memorial th { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.memorial td.n { text-align: right; font-variant-numeric: tabular-nums; }
.match { min-width: 200px; }
.match .score { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; margin: 8px 0; }
.match .meta { font-size: 12.5px; color: var(--muted); }
.match.wc { background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--warn), transparent 60%) border-box; border: 1px solid transparent; }
.record { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 10px 0 6px; }
.record i { display: block; height: 100%; }

/* world */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 3px; flex-wrap: wrap; }
.seg button { font: 600 13.5px var(--sans); background: transparent; border: 0; padding: 8px 12px; border-radius: 9px; color: var(--ink2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.select { font: 600 15px var(--sans); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); }
#map path.land { stroke: var(--bg); stroke-width: .5; cursor: pointer; transition: opacity .2s; }
#map path.land:hover { stroke: var(--ink); stroke-width: 1; }
.ramp { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.ramp .bar { width: 220px; height: 8px; border-radius: 4px; }

/* play */
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.35; margin: 12px 0 20px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.opts button { display: flex; align-items: center; gap: 10px; font: 600 15px var(--sans); text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card2); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
.opts button:hover:not(:disabled) { border-color: var(--a); transform: translateY(-1px); }
.opts button.right { border-color: var(--close); background: color-mix(in srgb, var(--close) 16%, var(--card2)); }
.opts button.wrong { border-color: var(--far); background: color-mix(in srgb, var(--far) 14%, var(--card2)); }
.reveal-box { margin-top: 16px; font-size: 15px; }

/* story */
.story-hero { padding: 90px 0 40px; text-align: center; }
.story-hero h1 { max-width: 16ch; margin: 0 auto .3em; }
.story-hero .lede { max-width: 46ch; margin: 0 auto; }
.story { font-size: 1.12rem; line-height: 1.75; }
.story p, .story h2 { max-width: var(--text); margin-left: auto; margin-right: auto; }
.story h2 { margin-top: 2em; }
.story .fig { max-width: 980px; margin: 34px auto; }
.pull { max-width: 760px; margin: 36px auto; padding-left: 22px; border-left: 3px solid var(--a); font-family: var(--serif); font-style: italic; font-size: 1.7rem; line-height: 1.35; }
.pull.b { border-color: var(--b); }
.pull cite { display: block; font: 500 13px var(--sans); font-style: normal; color: var(--muted); margin-top: 10px; }
.pull .q-orig { display: block; font: italic 400 15px/1.45 var(--serif); color: var(--muted); margin-top: 10px; text-align: left; }
.mark { background: linear-gradient(transparent 60%, color-mix(in srgb, var(--close) 35%, transparent) 60%); }

/* prose pages */
.prose { max-width: var(--text); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }

footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 44px 0 70px; font-size: 14px; color: var(--ink2); }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 960px) { footer .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } footer .cols > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }
footer h4, footer .fh { font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
footer ul { list-style: none; padding: 0; margin: 0; } footer li { margin: 6px 0; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
.byline { font-size: 13.5px; color: var(--muted); }
.pitch { margin: 12px 0 6px; }
.points { list-style: none; padding: 0; margin: 4px 0 0; }
.points li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; }
.points li:first-child { border-top: 0; }
.pt-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--line); color: var(--ink2); flex: none; }
.pt-ic .icon { width: 16px; height: 16px; }
.pt-fig { display: grid; justify-items: end; align-content: start; min-width: 118px; text-align: end; }
.pt-fig b { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-fig small { font-size: 12px; color: var(--muted); }
.pt-fig .spark { width: 118px; height: 30px; margin-top: 4px; }
.pt-fig .spark svg { width: 118px; height: 30px; }
@media (max-width: 560px) { .points li { grid-template-columns: 30px minmax(0, 1fr); } .pt-fig { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; text-align: start; } .pt-fig .spark, .pt-fig .spark svg { flex-basis: 100%; width: 100%; max-width: 220px; margin: 2px 0 0; } }

/* ---------------------------------------------------------------- states: loading, empty, error */
.skeleton { position: relative; overflow: hidden; background: var(--line); border-radius: var(--r-sm); min-height: 1em; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--line2), transparent); animation: sweep 1.4s infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.skeleton.chart-sk { height: 220px; } .skeleton.line-sk { height: 14px; margin: 10px 0; } .skeleton.line-sk.short { width: 60%; }
.ds .grid3 { align-items: start; }
.empty { display: grid; justify-items: center; align-content: center; gap: var(--s3); text-align: center; padding: var(--s7) var(--s4); border: 1px dashed var(--line2); border-radius: var(--r); color: var(--ink2); }
.empty .icon { width: 28px; height: 28px; color: var(--muted); }
.empty b { color: var(--ink); font-size: 1.05rem; }
.err { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid color-mix(in srgb, var(--far) 40%, transparent); background: color-mix(in srgb, var(--far) 10%, var(--card)); border-radius: var(--r-sm); font-size: 14px; }
.err .icon { color: var(--far); }

/* 404: two circles drifting apart */
.lost { display: block; width: min(320px, 70vw); margin: 0 0 var(--s6); overflow: visible; }
.lost .la { fill: var(--a); animation: drift-a 6s ease-in-out infinite alternate; }
.lost .lb { fill: var(--b); mix-blend-mode: screen; animation: drift-b 6s ease-in-out infinite alternate; }
:root[data-theme="light"] .lost .lb { mix-blend-mode: multiply; }
@keyframes drift-a { to { transform: translateX(-26px); } }
@keyframes drift-b { to { transform: translateX(26px); } }

/* brand mark animates once on load */
.logo-mark i:first-child { animation: mark-a 1.1s var(--ease) both; }
.logo-mark i:last-child { animation: mark-b 1.1s var(--ease) both; }
@keyframes mark-a { from { transform: translateX(8px); } }
@keyframes mark-b { from { transform: translateX(-8px); } }

/* ---------------------------------------------------------------- /design (preview only) */
.ds h2 { margin-top: var(--s8); font-size: 1.6rem; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); }
.sw { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--card); font-size: 12.5px; }
.sw i { display: block; height: 56px; }
.sw span { display: block; padding: 8px 10px; color: var(--ink2); } .sw b { display: block; color: var(--ink); }
.ds .row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin: var(--s4) 0; }
.type-sample > * { margin-bottom: var(--s3); }
.scale { display: flex; align-items: end; gap: var(--s3); }
.scale i { display: block; background: var(--close); border-radius: 3px; width: 28px; }

/* ---------------------------------------------------------------- compare matrix */
.cmp-bar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s5); }
.cmp-scroll { overflow: auto; max-height: 78vh; }
table.cmp { border-collapse: separate; border-spacing: 2px; }
table.cmp th { font-weight: 500; font-size: 12.5px; color: var(--ink2); text-align: left; position: sticky; background: var(--card); z-index: 1; }
table.cmp thead th { top: 0; padding-bottom: 4px; text-align: center; }
table.cmp tbody th { left: 0; padding-right: 10px; white-space: nowrap; }
table.cmp .rn { display: flex; align-items: center; gap: 8px; } table.cmp .rn b { font-weight: 600; color: var(--ink); }
table.cmp .flag { width: 18px; height: 18px; box-shadow: none; }
table.cmp td { padding: 0; }
table.cmp .cell { display: block; width: var(--cell); height: var(--cell); border-radius: 5px; transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1); }
table.cmp .cell:hover, table.cmp .cell:focus-visible { transform: scale(1.18); box-shadow: 0 0 0 2px var(--ink); position: relative; z-index: 2; }
table.cmp td.self { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--line) 4px 5px); border-radius: 5px; }
@media (max-width: 640px) { table.cmp .rn b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }  /* flag only on screen, name still read out */

/* ---------------------------------------------------------------- time machine */
.tm { display: flex; align-items: center; gap: var(--s4); margin: var(--s4) 0 var(--s3); }
.tm input[type="range"] { flex: 1; min-width: 0; accent-color: var(--close); }
.tm output { min-width: 3.2em; text-align: right; font-weight: 700; }
.tm-read { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: start; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card2); }
.tm-year { font: 400 clamp(2.4rem, 6vw, 3.6rem)/1 var(--serif); font-style: italic; color: var(--close); }
.tm-read dl { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 6px var(--s3); margin: 0; font-size: 14.5px; }
.tm-read dt { color: var(--muted); font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.tm-read dd { margin: 0; }
@media (max-width: 640px) { .tm-read { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } }

/* ---------------------------------------------------------------- time machine */
.tm { display: flex; align-items: center; gap: var(--s4); margin: var(--s4) 0 var(--s3); }
.tm input[type="range"] { flex: 1; min-width: 0; accent-color: var(--close); }
.tm output { min-width: 3.2em; text-align: right; font-weight: 700; }
.tm-read { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: start; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card2); }
.tm-year { font: 400 clamp(2.4rem, 6vw, 3.6rem)/1 var(--serif); font-style: italic; color: var(--close); }
.tm-read dl { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 6px var(--s3); margin: 0; font-size: 14.5px; }
.tm-read dt { color: var(--muted); font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.tm-read dd { margin: 0; }
@media (max-width: 640px) { .tm-read { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } }

/* ---------------------------------------------------------------- games: daily bar, two-up options */
.daily { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: var(--s4) var(--s5); margin: var(--s5) 0 var(--s4); }
.daily-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s2); }
.dd { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.dd i { width: 10px; height: 10px; border-radius: 3px; background: var(--line2); }
.dd.ok i { background: var(--close); } .dd.no i { background: var(--far); }
.opts.duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .opts.duo { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- pair of the day */
.otd { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; padding: var(--s5) var(--s6); background: radial-gradient(500px 200px at 90% 0%, var(--b-soft), transparent), radial-gradient(500px 200px at 0% 100%, var(--a-soft), transparent), var(--card); }
.otd-names { display: flex; align-items: center; gap: var(--s4); } .otd-names h2, .otd-names h3 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2.2rem); }
.otd .hook-sm { margin: var(--s2) 0 0; font: italic 400 1.25rem var(--serif); color: var(--ink2); }
.otd-side { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.otd-side .idx { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }

/* "In short" shares a row with the fingerprint card: keep its footer at the bottom instead of leaving a gap */
#inshort { display: flex; flex-direction: column; }
#inshort .ai-foot { margin-top: auto !important; padding-top: 14px; }

/* featured pair with no index (a country with no UN votes or trade data) */
.na-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin: 6px 0 8px; }
.pcard .idx.na { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* accessibility: skip link, keyboard-reachable charts, numbers inside colour cells */
.skip { position: absolute; left: 12px; top: -64px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top var(--dur-1); }
.skip:focus { top: 12px; }
main:focus { outline: none; }
svg[tabindex]:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; border-radius: 8px; }
table.cmp .cell .cv { display: grid; place-items: center; height: 100%; font: 600 11px var(--sans); pointer-events: none; }
@media (forced-colors: active) { .skip:focus { outline: 2px solid; } table.cmp .cell { border: 1px solid; } }
.h3 { font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.25; }  /* an h2 that looks like an h3 */

/* reserve the space charts and tables will fill, so the page does not jump when they arrive */
#map { aspect-ratio: 2 / 1; }
#cmp-grid { min-height: 420px; }
#cmp-notes { min-height: 150px; }

/* page tools: copy link, QR code, print, fact sheet, cite */
.tools-bar { border-bottom: 1px solid var(--line); background: var(--bg2); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; align-items: center; }
.tool { display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--sans); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink2); cursor: pointer; text-decoration: none; transition: border-color var(--dur-1), color var(--dur-1); }
.tool:hover { border-color: var(--a); color: var(--ink); }
.tool .icon { width: 16px; height: 16px; }
.tools { padding: 6px 0; }
.tool-menu { position: relative; }
.tool-menu > summary { list-style: none; }
.tool-menu > summary::-webkit-details-marker { display: none; }
.tool-menu > summary .chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform var(--dur-1); }
.tool-menu[open] > summary { border-color: var(--a); color: var(--ink); }
.tool-menu[open] > summary .chev { transform: rotate(180deg); }
.tool-pop { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.tool-pop .tool { border: 0; border-radius: 8px; width: 100%; justify-content: flex-start; padding: 8px 10px; }
.tool-pop .tool:hover { background: var(--bg2); }
.tool-quiet { border-color: transparent; margin-inline-start: auto; }
@media (max-width: 560px) {
  .tool-quiet span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tool-quiet { padding: 6px 8px; }
}
.hero { min-height: calc(100vh - 140px); }
dialog { background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: var(--r); padding: 24px 26px; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 7, 10, .6); }
dialog h2 { font-size: 1.4rem; margin: 0 0 12px; padding-inline-end: 32px; }
.td-close { position: absolute; top: 10px; inset-inline-end: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--ink2); font-size: 22px; cursor: pointer; }
.td-close:hover { background: var(--line); }
.td-qr { display: block; width: 240px; max-width: 100%; height: auto; margin: 8px auto; background: #fff; padding: 8px; border-radius: 12px; }
.td-url { word-break: break-all; font-size: 13px; color: var(--ink2); text-align: center; }
.td-formats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.td-formats button { font: 600 13px var(--sans); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink2); cursor: pointer; }
.td-formats button[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#td-text { width: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px; resize: vertical; }

/* print: a clean light page with the address on it */
.print-only { display: none; }
@media print {
  :root, :root:not([data-theme="none"]) { color-scheme: light; --bg: #fff; --bg2: #fff; --card: #fff; --card2: #f4f4f1; --glass: #fff; --line: rgba(0, 0, 0, .18); --line2: rgba(0, 0, 0, .3); --ink: #000; --ink2: #2b2b2b; --muted: #555; --a: #1f64be; --b: #c64f1c; --a-text: #1f64be; --b-text: #a63f12; --close: #4b3bc4; --far: #c93231; --mid: #cfcfc8; --grid: #e5e5e0; --axis: #999; --glow1: transparent; --glow2: transparent; --shadow: none; }
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000; font-size: 11pt; }
  * { animation: none !important; transition: none !important; box-shadow: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  svg path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .preview, header.nav, .tools-bar, .skip, #tip, dialog, .palette, .tbl-toggle, .tm, #globe, .net-hint, .hero .btn, .chips, .ask-form, #ask, .cmp-bar, .opts, [data-open-palette], .no-print, footer .cols { display: none !important; }
  .print-only { display: block; }
  .print-head { font-size: 9pt; color: #444; border-bottom: 1px solid #999; padding-bottom: 4pt; margin-bottom: 10pt; word-break: break-all; }
  .print-foot { font-size: 8.5pt; color: #444; border-top: 1px solid #999; padding-top: 4pt; margin-top: 14pt; }
  footer { border: 0; background: none; padding: 0; }
  main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .hero, .story-hero, .pair-hero { min-height: 0; padding-top: 0; padding-bottom: 8pt; }
  .card, figure, .fig, table, blockquote, .pcard, .chart, .stat, li { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  .prose a[href^="http"]::after, .caption a[href^="http"]::after, .sources a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #555; word-break: break-all; }
  .card, .pair-hero, .stat { background: #fff !important; }
  svg, .pill, .bar, .legend i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* pair page: both countries side by side, no buttons, cards flow two to a row */
  .actions, .hook + .actions { display: none !important; }
  .duel { grid-template-columns: 1fr auto 1fr !important; justify-items: stretch !important; text-align: start !important; gap: 12pt !important; }
  .side, .side.b { flex-direction: row !important; text-align: start !important; }
  .side h1 { font-size: 22pt !important; }
  .flag.xl { width: 42pt; height: 42pt; }
  .gauge { width: 150pt; }
  .bento, .grid2, .grid3, .split { display: grid !important; grid-template-columns: 1fr 1fr !important; align-items: start !important; gap: 8pt !important; }
  .bento > *, .bento .w3, .bento .w4, .bento .w6 { grid-column: auto !important; }
  .bento .w6, .split > :only-child { grid-column: 1 / -1 !important; }
  .sec, section.sec { padding-top: 10pt !important; padding-bottom: 6pt !important; }
}

/* agreement by topic */
.topics { list-style: none; padding: 0; margin: 14px 0 4px; display: grid; gap: 11px; }
.topics li { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: center; font-size: 14px; }
.topics .tl { font-weight: 600; }
.topics .trend { display: block; margin-top: 2px; } .topics .trend .tw { white-space: nowrap; } .topics .trend b { color: var(--ink2); font-weight: 600; }
.tbar { position: relative; height: 10px; border-radius: 6px; background: var(--line); }
.tbar .rec { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--close); }
.tbar .all { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
@media (max-width: 760px) { .topics li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* code samples scroll inside their box instead of widening the page */
.prose pre { overflow-x: auto; max-width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.prose pre code { white-space: pre; background: none; padding: 0; }

/* explain this score */
.explain > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; font-size: 1.05rem; }
.explain > summary::-webkit-details-marker { display: none; }
.explain > summary::after { content: "+"; margin-inline-start: auto; font-size: 1.4rem; color: var(--muted); }
.explain[open] > summary::after { content: "−"; }
.ex-body { margin-top: 10px; }
.ex-dim { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.ex-dim h3 { display: flex; gap: 10px; align-items: baseline; margin: 0 0 6px; }
.ex-score { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.ex-steps { margin: 6px 0 8px; padding-inline-start: 20px; display: grid; gap: 5px; font-size: 14.5px; color: var(--ink2); }
.ex-note { color: var(--ink2); font-size: 14.5px; }
.explain-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; font-size: 14px; }
.explain-link .icon { width: 15px; height: 15px; }
.ex-table td:nth-child(n+2), .ex-table th:nth-child(n+2) { text-align: end; font-variant-numeric: tabular-nums; }
@media print { .explain > summary::after { content: none; } }

/* report a mistake */
.rp-l { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
#rp-form input, #rp-form textarea { width: 100%; font: 15px/1.5 var(--sans); background: var(--card2); color: var(--ink); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; }
#rp-form textarea { resize: vertical; }
.rp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rp-err { color: var(--far); min-height: 1.4em; margin: 8px 0 0; font-size: 14px; }

/* confidence badges and the sampling range on topic bars */
.tbar .ci { position: absolute; top: 3px; bottom: 3px; background: color-mix(in srgb, var(--ink) 35%, transparent); border-radius: 2px; }
.conf { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px var(--sans); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink2); text-decoration: none; white-space: nowrap; }
.conf::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; }
.conf-high::before { background: currentColor; }
.conf-medium::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.conf-low { border-style: dashed; }
.conf-none::before { border-style: dotted; }
a.conf:hover { border-color: var(--a); color: var(--ink); }
.why .conf { margin-inline-start: 6px; vertical-align: 1px; }
.cap .conf { margin-top: 6px; }
.sure-row { display: grid; grid-template-columns: 150px 110px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.sure-row:first-of-type { border-top: 0; }
@media (max-width: 760px) { .sure-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.ideal-line { margin: 10px 0 0; font-size: 14.5px; color: var(--ink2); }

/* method paper */
.paper-toc { margin: 8px 0 0; padding-inline-start: 22px; columns: 2; column-gap: 28px; font-size: 14.5px; }
@media (max-width: 700px) { .paper-toc { columns: 1; } }
.sec-n { color: var(--muted); font-weight: 600; margin-inline-end: 6px; }
pre.formula { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 13.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-x: auto; max-width: 100%; }
.paper-fig { margin: 18px 0; }
.fig-svg { width: 100%; max-width: 560px; height: auto; display: block; }
.fig-svg text { fill: var(--ink2); font: 11px var(--sans); }
.fig-svg .g { stroke: var(--line2); stroke-width: 1; }
.fig-svg polyline { fill: none; stroke: var(--close); stroke-width: 3; stroke-linejoin: round; }
.paper h2 { scroll-margin-top: 120px; }
.paper .dtable th, .paper .dtable td { text-align: start; vertical-align: top; }
.paper [role="region"] { margin: 10px 0 18px; }

/* votes that set two countries apart */
.splits { list-style: none; margin: 10px 0 0; padding: 0; }
.splits li { padding: 9px 0; border-top: 1px solid var(--line); }
.splits li:first-child { border-top: 0; }
.splits .sp-t { margin: 0 0 3px; font-weight: 500; }
.splits .sp-v { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.vv { display: inline-flex; border-radius: 999px; padding: 2px 10px; font-weight: 600; border: 1px solid var(--line2); }
.vv.y { color: var(--ink); background: var(--card); }
.vv.n { color: var(--ink); background: var(--card); border-style: dashed; }
.vv { align-items: center; gap: 5px; }
.vv .icon { width: 14px; height: 14px; stroke-width: 3; }
.vv.y .icon { color: var(--close); }
.vv.n .icon { color: var(--far); }
.chat.collapsed [data-early], .splits.collapsed [data-more] { display: none !important; }
.show-more { align-self: center; background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 7px 16px; font: 600 13.5px var(--sans); color: var(--ink2); cursor: pointer; }
.show-more:hover { border-color: var(--a); color: var(--ink); }
.splits + .show-more { display: block; margin: 10px auto 0; }

/* voting position on the country page */
.pos-line { width: 100%; height: auto; max-width: 640px; display: block; }
.pos-line .ax { stroke: var(--line2); stroke-width: 2; }
.pos-line .rg { fill: var(--a); opacity: .22; }
.pos-line .me { fill: var(--a); stroke: var(--bg); stroke-width: 2; }
.pos-line .ref { fill: var(--ink2); stroke: var(--bg); stroke-width: 1.5; }
.pos-line .lab { font: 600 11px var(--sans); fill: var(--ink2); }
.h4 { font: 600 14px var(--sans); margin: 0 0 4px; color: var(--ink); }

/* country context table */
.ctx th[scope=row] { font-weight: 600; text-align: left; white-space: nowrap; }
.ctx td, .ctx th { vertical-align: top; }
.spark { width: 120px; height: 28px; display: block; }
.spark polyline { fill: none; stroke: var(--a); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.ctx th[scope=row] .muted { font-weight: 400; font-size: 12px; white-space: normal; display: inline-block; max-width: 30ch; }

/* group brief */
.bm th[scope=row] { white-space: nowrap; text-align: left; font-weight: 600; }
.bm th[scope=row] .flag { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 8px; }
.bm td { text-align: center; line-height: 1.2; min-width: 64px; }
.bm td a { text-decoration: none; display: block; padding: 4px 2px; }
.bm td.self { color: var(--muted); }
.brief-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; align-items: center; margin: 8px 0 14px; }

/* Other scripts: Inter and Instrument Serif cover Latin only, so these languages use the system's fonts for their script */
html:is([lang="ar"], [lang="fa"], [lang="ur"]) { --sans: "Vazirmatn", "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, "DejaVu Sans", sans-serif; --serif: var(--sans); }
html[lang="ur"] { --sans: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
html:is([lang="ru"], [lang="uk"], [lang="pl"], [lang="tr"], [lang="vi"]) { --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; --serif: Georgia, "Noto Serif", "Times New Roman", serif; }
html[lang="hi"] { --sans: "Noto Sans Devanagari", "Nirmala UI", Mangal, system-ui, sans-serif; --serif: var(--sans); }
html[lang="bn"] { --sans: "Noto Sans Bengali", "Nirmala UI", Vrinda, system-ui, sans-serif; --serif: var(--sans); }
html[lang="ja"] { --sans: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif; --serif: var(--sans); }
html[lang="ko"] { --sans: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; --serif: var(--sans); }
html[lang="zh"] { --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif; --serif: var(--sans); }
html:is([lang="ar"], [lang="fa"], [lang="ur"], [lang="hi"], [lang="bn"], [lang="ja"], [lang="ko"], [lang="zh"]) :is(h1, h2, h3, h4, .eyebrow) { letter-spacing: 0; }
html:is([lang="ar"], [lang="fa"], [lang="ur"], [lang="hi"], [lang="bn"], [lang="ja"], [lang="ko"], [lang="zh"]) :is(h1 em, h2 em, .lede em) { font-style: normal; }
html:is([lang="ar"], [lang="fa"], [lang="ur"], [lang="hi"], [lang="bn"]) h1 { line-height: 1.35; }
html:not([lang="en"]) h1 { overflow-wrap: anywhere; }
.eyebrow:lang(ar), .eyebrow:lang(fa), .eyebrow:lang(ur) { text-transform: none; }
html[dir="rtl"] .prose ul, html[dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.3em; }
html[dir="rtl"] .eyebrow .dot { margin-right: 0; margin-left: 8px; }

.callout { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line2); border-left: 3px solid var(--a); border-radius: 10px; background: var(--card); color: var(--ink); }
html[dir="rtl"] .callout { border-left: 1px solid var(--line2); border-right: 3px solid var(--a); }
html[dir="rtl"] .logo { direction: ltr; }   /* the name is a Latin brand: keep its letters and mark in order */
html[dir="rtl"] h1 { font-size: clamp(1.8rem, 7vw, 3.4rem); }
.en-only { margin: 0; padding: 8px 16px; text-align: center; font-size: 13px; color: var(--ink2); background: var(--card); border-bottom: 1px solid var(--line); }
/* right to left: charts keep time running left to right, and signed numbers keep their sign in front */
html[dir="rtl"] svg, html[dir="rtl"] .chart, html[dir="rtl"] canvas { direction: ltr; }
html[dir="rtl"] :is(.num, .val, .idx, .ex-score, .cv, #gauge-num, .tm-year, output) { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .disc .v { unicode-bidi: plaintext; }
html[dir="rtl"] .fp-row .val { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .fp-row .val { text-align: left; }
html[dir="rtl"] .fp-s { unicode-bidi: isolate; direction: ltr; display: inline-block; }
html[dir="rtl"] .fp-scale div { flex-direction: row-reverse; }  /* bars run left (far apart) to right (close), as on the gauge */
.vm-tm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; } .vm-tm input[type=range] { flex: 1 1 160px; min-width: 0; }
.vm-tm[hidden] { display: none; }

.layers { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; } @media (max-width: 760px) { .layers { grid-template-columns: 1fr; gap: 18px; } }
.layer-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; font-size: 14px; }
.layer-list .iss { display: inline-block; min-width: 2.4em; font: 700 11px/1.6 var(--sans); letter-spacing: .04em; text-align: center; border: 1px solid var(--line2); border-radius: 6px; padding: 0 4px; color: var(--ink2); margin-inline-end: 4px; }

/* ---------- world map hub: layers beside the map, a country panel on click, full screen on request */
.hub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 22px; }
.hub-layers { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hub-h { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.hub-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-list button { font: 600 13.5px var(--sans); background: var(--card); border: 1px solid var(--line2); color: var(--ink2); padding: 7px 12px; border-radius: 999px; cursor: pointer; text-align: start; }
.hub-list button:hover { color: var(--ink); border-color: var(--ink2); }
.hub-list button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hub-main { min-width: 0; padding: 14px 16px; }
.hub-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.hub-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 6px; }
.hub-time { display: flex; align-items: center; gap: 10px; flex: 1 1 280px; min-width: 0; }
.hub-time input[type="range"] { flex: 1; min-width: 0; accent-color: var(--a); }
.hub-time output { min-width: 3.2em; font-weight: 700; text-align: end; }
.hub-time :disabled { opacity: .45; cursor: default; }
.hub-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.hub-legend .bar { width: 200px; height: 8px; border-radius: 4px; }
.hub-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.hub-legend .key i, .disc .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.hub-keys { display: none; }
#map .land.picked { stroke: var(--ink); stroke-width: 1.6px; }
.hub-panel { min-width: 0; padding: 18px; align-self: start; }
.hub-ph { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hub-ph h3 { flex: 1; }
.hub-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 14px; font-size: 14px; }
.hub-facts dt { color: var(--muted); }
.hub-facts dd { margin: 0; font-weight: 600; }
.hub-acts { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 1099px) { .hub-main, .hub-panel { order: -1; } }  /* narrow screens: the map first, the country you clicked under it, then the layers */
@media (min-width: 1100px) {
  .hub { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .hub.has-panel { grid-template-columns: 220px minmax(0, 1fr) 320px; }
  .hub-layers { position: sticky; top: 130px; }
  .hub-list { flex-direction: column; }
  .hub-list button { border-radius: 10px; }
  .hub-keys { display: block; }
}
@media (max-width: 1099px) { .hub-panel { order: 3; } }
@media (min-width: 1920px) { .hub.has-panel { grid-template-columns: 240px minmax(0, 1fr) 380px; } }
.hub:fullscreen { background: var(--bg); padding: 16px; margin: 0; overflow: auto; align-content: start; }
.hub:fullscreen .hub-layers { position: static; }

/* ---------- wide screens: use the room for more side by side, never for longer lines ----------
   The page grows in steps; paragraphs keep a reading width (--text grows a little with the type size). */
.duo { display: contents; }
.toc { display: none; }
@media (min-width: 1280px) {
  /* text pages with a side table of contents: the heading block lines up with the text column */
  .prose.doc-toc { max-width: calc(var(--text) + 300px); display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 60px; }
  .prose.doc-toc > .toc { display: block; position: sticky; top: 130px; align-self: start; max-height: calc(100vh - 160px); overflow-y: auto; font-size: 14px; }
  .prose.doc-toc .doc-body > :first-child > h2:first-child { margin-top: 0; }
  body:has(.doc-toc) .wrap.text { max-width: calc(var(--text) + 300px); padding-inline-start: 320px; }
  .toc-head { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
  .toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--line2); }
  .toc li { margin: 0; }
  .toc a { display: block; padding: 5px 12px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--ink2); text-decoration: none; line-height: 1.35; }
  .toc a:hover { color: var(--ink); }
  .toc a[aria-current] { color: var(--ink); border-inline-start-color: var(--a); font-weight: 600; }
}
@media (min-width: 1440px) {
  /* pages made of separate parts: the parts become cards side by side */
  .prose.doc-cards, .wrap.prose.log { max-width: var(--wrap); }
  body:has(.doc-cards, .log, .check-out) .wrap.text { max-width: var(--wrap); }
  body:has(.doc-cards, .log, .check-out) .wrap.text > :not(h1) { max-width: var(--text); }
  .doc-cards .doc-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 540px), 1fr)); gap: 16px; align-items: start; }
  .doc-cards .doc-intro { grid-column: 1 / -1; max-width: var(--text); }
  .doc-cards .doc-sec { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 26px; }
  .doc-cards .doc-sec > h2:first-child { margin-top: 0 !important; font-size: 1.35rem; }
  .doc-cards .doc-sec > :last-child { margin-bottom: 0; }
  /* the changelog: one card per change, newest first, left to right */
  .wrap.prose.log { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
  .log > article { margin: 0 !important; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; }
  .log > :not(article) { grid-column: 1 / -1; }
  /* claim checker: evidence side by side */
  .wrap.prose.check-out { max-width: var(--wrap); }
  .check-out > :not(.ev-grid) { max-width: var(--text); }
  .ev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
  .ev-grid > .card { margin: 0 !important; }
}
@media (min-width: 1600px) {
  :root { --wrap: 1440px; }
  .bento > .card.stat:not(.w2, .w3, .w4, .w6) { grid-column: span 1; }   /* the six numbers in one row */
  .duo { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .duo > * { grid-column: auto !important; }
  .duo > :only-child { grid-column: 1 / -1 !important; }
  .duo:not(:has(*)) { display: none; }
  #friends { max-width: 1240px; margin-inline: auto; }   /* the two hubs stay close enough to read as one picture */
  .grid4.wide5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #globe-wrap { max-width: 760px; }
}
@media (min-width: 1920px) { :root { --wrap: 1680px; --text: 740px; } body { font-size: 17px; } h3 { font-size: 1.28rem; } }
@media (min-width: 2400px) { :root { --wrap: 2000px; --text: 780px; } #globe-wrap { max-width: 880px; } .grid4.wide5 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 3000px) { :root { --wrap: 2400px; --text: 820px; } body { font-size: 18px; } }
.grid3:has(> [hidden]:last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid3:has(> [hidden]:last-child) { grid-template-columns: minmax(0, 1fr); } }
.terr-bars { width: 100%; height: 48px; display: block; margin: 8px 0 0; }
.terr-bars rect { fill: var(--far); }
.tbl-small { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl-small th { font-weight: 600; color: var(--muted); font-size: 12px; text-align: start; padding: 4px 0; border-bottom: 1px solid var(--line2); }
.tbl-small td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.terr-why { font: 700 14px var(--sans); margin: 14px 0 6px; }
.terr-gaza { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.terr-gaza .src { font-size: 12px; color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line2); }
.hist li { position: relative; padding: 0 0 18px 22px; padding-inline-start: 22px; padding-left: 0; }
.hist li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--a); }
.hist-y { display: block; font-weight: 800; font-size: 15px; margin-inline-start: 22px; }
.hist p { margin: 2px 0 0; margin-inline-start: 22px; }
.hist .src, .hist-tbl a { font-size: 12.5px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.hist-tbl td { vertical-align: top; padding: 10px 8px 10px 0; }

/* home: the index scale under the featured heading, and the "show all" button */
.iscale { margin-top: 14px; max-width: 560px; font-size: 12px; }
.iscale-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.iscale-bar i:nth-child(1) { background: var(--far); }
.iscale-bar i:nth-child(2) { background: color-mix(in srgb, var(--far) 50%, var(--mid)); }
.iscale-bar i:nth-child(3) { background: var(--mid); }
.iscale-bar i:nth-child(4) { background: color-mix(in srgb, var(--close) 50%, var(--mid)); }
.iscale-bar i:nth-child(5) { background: var(--close); }
.iscale-names { display: flex; margin-top: 5px; color: var(--ink2); font-weight: 500; }
.iscale-names span { min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.iscale-ticks { position: relative; height: 16px; margin-top: 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.iscale-ticks span { position: absolute; transform: translateX(-50%); }
.iscale-ticks span:nth-child(1) { left: 0; transform: none; } .iscale-ticks span:nth-child(2) { left: 35%; } .iscale-ticks span:nth-child(3) { left: 50%; }
.iscale-ticks span:nth-child(4) { left: 62.5%; } .iscale-ticks span:nth-child(5) { left: 77.5%; } .iscale-ticks span:nth-child(6) { right: 0; left: auto; transform: none; }
[dir="rtl"] .iscale-ticks { direction: ltr; }
[dir="rtl"] .iscale-bar, [dir="rtl"] .iscale-names { direction: ltr; }
.cards-more { text-align: center; margin-top: 22px; }
@media (max-width: 560px) { .iscale { font-size: 11px; } .iscale-names span { padding: 0; text-overflow: clip; } .iscale-names { letter-spacing: -.01em; } }

/* pair page: the first-visit guide */
.guide { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; margin: 0 0 16px; padding: 16px 20px; border: 1px solid var(--line2); border-radius: 18px; background: var(--card); }
.guide[hidden] { display: none; }
.guide-h { grid-column: 1 / -1; margin: 0; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.guide ol { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 22px; }
.guide li { counter-increment: g; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; font-size: 14px; color: var(--ink2); }
.guide li::before { content: counter(g); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 700 13px var(--sans); }
.guide li b { color: var(--ink); }
@media (max-width: 760px) { .guide { grid-template-columns: minmax(0, 1fr); } .guide ol { grid-template-columns: minmax(0, 1fr); } .guide .btn { justify-self: start; } }
@media print { .guide { display: none !important; } }

/* pair page: moments found in the data */
.data-events .event { border-left-style: dashed; border-left-color: var(--close); }
.data-rules { margin-top: 6px; }
.data-rules > summary { cursor: pointer; list-style: none; }
.data-rules > summary::-webkit-details-marker { display: none; }
.data-rules ul { margin: 6px 0 0; padding-inline-start: 18px; }

/* pair page: the jump menu at the top of "Do" and its targets (grid items of no height) */
.do-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.do-nav a { font: 600 14px var(--sans); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink2); }
.do-nav a:hover { border-color: var(--a); color: var(--ink); }
.do-anchor { display: block; grid-column: 1 / -1; height: 0; scroll-margin-top: 140px; }

/* country page: the four facts at a glance */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.glance-c { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; color: inherit; text-decoration: none; }
a.glance-c:hover { border-color: var(--a); }
.glance-c .k { font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.glance-c .g-n { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.glance-c .d { font-size: 13.5px; color: var(--ink2); }
html:is([lang="ar"], [lang="fa"], [lang="ur"]) .glance-c .k { letter-spacing: 0; text-transform: none; }

/* pictures for Moments (8 Nov 2026): strip on the home page, gallery, and the Moment cards on pair pages */
.pics { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 22px 18px; }
.pic { margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; }
.pic > a { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 3px; }
.pic img, .ev-pic img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--card2); display: block; }
.pic > a:hover img { filter: brightness(1.05); }
.pic-y { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pic-p { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pic-t { font-size: 14px; line-height: 1.4; color: var(--ink2); }
.pic figcaption, .ev-pic figcaption { font-size: 11px; line-height: 1.35; color: var(--muted); margin-top: 6px; }
.pic figcaption a, .ev-pic figcaption a { color: inherit; text-decoration: underline; text-decoration-color: var(--line2); }
.events-img { grid-auto-columns: minmax(230px, 1fr); }
.ev-pic { margin: 0 0 10px; }
.ev-pic figcaption { margin-top: 4px; }
.ev-cap { display: block; font-style: italic; margin-bottom: 2px; }
.events-img .event { border-left: 0; padding-left: 0; }
.events-img .event:not(.has-img)::before { content: ""; display: block; aspect-ratio: 3 / 2; border-radius: 12px; margin-bottom: 26px; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 14%, var(--card2)), color-mix(in srgb, var(--b) 14%, var(--card2))); }
@media (max-width: 640px) { .pics, .events-img { grid-auto-columns: 78%; } }
@media print { .pics, .events-img { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

#inshort { align-self: start; }
/* folded notes (app.js) */
.fold:not(.open) { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fold-btn { background: none; border: 0; padding: 0; margin: 2px 0 8px; font: inherit; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }
@media print { .fold { display: block !important; -webkit-line-clamp: none; overflow: visible; } .fold-btn { display: none; } }
/* phones: the index recipe shows parts, bars and values; the reasons and confidence are in "How sure are we?" */
@media (max-width: 640px) { #fp .why, #fp > p.small { display: none; } #fp .fp-row { padding-block: 4px; } }

/* small maps drawn on the server (geo.py) */
.duo-map, .c-map { margin: 22px auto 0; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.duo-map { aspect-ratio: 960 / 220; max-width: 980px; }
.c-map { aspect-ratio: 640 / 230; margin-top: 16px; }
.gmap { width: 100%; height: 100%; display: block; }
.gm-land { fill: color-mix(in srgb, var(--ink) 10%, var(--card)); stroke: var(--card); stroke-width: .7; }
.gm-a { fill: var(--a); stroke: var(--card); stroke-width: .7; }
.gm-disp { fill: none; stroke: var(--ink); stroke-opacity: .7; stroke-width: 1.1; stroke-dasharray: 3 2.5; vector-effect: non-scaling-stroke; }
.map-disp { margin: 6px auto 0; font-size: 12px; }
.duo-map + .map-disp { max-width: 980px; }
.gm-b { fill: var(--b); stroke: var(--card); stroke-width: .7; }
.gm-dot { stroke-width: 2; }
@media (max-width: 640px) { .duo-map { margin-top: 16px; } }
@media print { .duo-map, .c-map { border: 0; } }

/* when strong parts of the index cancel out (pair.mixed_note) */
.mixed-note { max-width: 760px; margin: 18px auto 0; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--far) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--far) 30%, var(--line)); font-size: 14px; line-height: 1.5; color: var(--ink2); text-align: start; }
.mixed-note b { color: var(--ink); display: block; margin-bottom: 2px; }
.mixed-note a { color: inherit; text-decoration: underline; }
.mixed-tag { font-size: 12px; color: color-mix(in srgb, var(--far) 62%, var(--ink)); margin: 6px 0 2px; }

/* the free course (course.js): lesson list, quiz, certificate */
.course-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.course-list .card { display: flex; flex-direction: column; height: 100%; }
.course-state { color: var(--ink2); }
.course-q { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px 10px; margin: 0 0 14px; }
.course-q legend { padding: 0 6px; font-weight: 500; }
.course-o { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.course-o input { margin-top: .35em; }
.course-q.course-right { border-color: var(--close); }
.course-q.course-wrong { border-color: var(--far); }
.course-q.course-right .course-verdict { color: var(--close); font-weight: 600; }
.course-q.course-wrong .course-verdict { color: var(--far); font-weight: 600; }
.course-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 28px; }
.cert { max-width: 760px; margin: 0 auto; padding: 48px 40px; text-align: center; background: #fff; color: #0b0b0b; border: 1px solid #d9d8d2; border-radius: 16px; box-shadow: 0 0 0 10px #f6f6f3 inset, 0 0 0 11px #e7e6e1 inset; }
.cert-logo { font-weight: 700; font-size: 19px; display: inline-flex; gap: 8px; align-items: center; }
.cert-logo span:not(.logo-mark) { color: #6b6a65; }
.cert-k { letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: #6b6a65; margin: 26px 0 6px; }
.cert-name { font-family: "Instrument Serif", Georgia, serif; font-size: clamp(30px, 6vw, 46px); line-height: 1.15; margin: 8px 0; min-height: 1.2em; border-bottom: 1px solid #d9d8d2; padding-bottom: 8px; }
.cert-t { color: #52514e; margin: 12px 0 2px; }
.cert-title { font-family: "Instrument Serif", Georgia, serif; font-size: 26px; margin: 4px 0 10px; }
.cert-small { font-size: 13px; color: #52514e; margin: 8px auto; max-width: 560px; }
.cert-meta { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; font-size: 14px; margin: 20px 0 6px; }
.cert-note { font-size: 12px; color: #6b6a65; margin: 18px 0 0; }
@media print {
  body:has(.cert:not([hidden])) .sec:not(:has(.cert)), body:has(.cert:not([hidden])) footer { display: none !important; }
  .cert { border: 1px solid #bbb; box-shadow: none; margin-top: 30mm; }
}

/* header at 1280–1500px: labels stay on one line; the search button's text shrinks and the key hint goes first */
.search-btn .lbl, .search-btn kbd { white-space: nowrap; }
.search-btn .lbl { overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
@media (max-width: 1500px) { .search-btn kbd { display: none; } }

/* NR Indices */
.idx-find { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.idx-find select { max-width: 16rem; }
.idx-big { font-size: clamp(40px, 8vw, 64px); line-height: 1; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.idx-big b { font-weight: 700; }
.idx-two .card { padding: 16px 18px; }
.idx-chart { width: 100%; height: 200px; }
.idx-axis { stroke: var(--line2); stroke-width: 1; }
.idx-range { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.idx-line-a { fill: none; stroke: var(--a); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.idx-line-b { fill: none; stroke: var(--b); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.idx-tick { font-size: 12px; fill: var(--muted); }
.nri-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.nri-row b { font-size: 22px; font-variant-numeric: tabular-nums; }
.nri-row small { grid-column: 1 / -1; color: var(--muted); }
.nri-row:hover span { text-decoration: underline; }
