/* СИГНАЛ — monochrome editorial UI. No framework. */
:root {
  --bg: #000;
  --bg-2: #0a0a0a;
  --bg-3: #141414;
  --fg: #fff;
  --fg-2: #cfcfcf;
  --muted: #8b8b8b;
  --faint: #5a5a5a;
  --line: rgba(255, 255, 255, .14);
  --line-2: rgba(255, 255, 255, .28);
  --ok: #8fe3a6;
  --warn: #f2c46d;
  --bad: #ff7a6b;
  --info: #9cc3ff;
  --font: "Inter Tight", "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;   /* display: headlines, big figures */
  --text: "Inter", "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;   /* reading text and UI up to ~22px */
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  /* surfaces/accents used by the viewer cabinet and canvases (read from JS via getComputedStyle) */
  --plate: #e9e9e9;          /* backing plate for company logos */
  --amber: #e0be7a;
  --av-bg: 17%; --av-fg: 80%; --av-line: 28%; --av-stroke: 46%;   /* initials avatars: hsl lightness */
  --rel-ownership: #8fb4e6; --rel-family: #e0be7a; --rel-office: #93cbb7; --rel-business: #d4d4d4;
  --rel-employee: #93cbb7; --rel-participation: #9a9a9a; --rel-shadow: #e0be7a; --rel-hidden: #9a9a9a;
  --map-land: #121212; --map-land-own: #222; --map-border: rgba(255, 255, 255, .10);
  --map-border-own: rgba(255, 255, 255, .42); --map-grid: rgba(255, 255, 255, .035);
  color-scheme: dark;
}

/* Light theme: same layout, typography and motion; quiet "official" palette — white surfaces on
   a light grey field, graphite text, muted accents. Switched by data-theme on <html> (js/theme.js). */
:root[data-theme="light"] {
  --bg: #f4f4f1;
  --bg-2: #ffffff;
  --bg-3: #ebebe7;
  --fg: #111214;
  --fg-2: #33353a;
  --muted: #676a70;
  --faint: #a3a5aa;
  --line: rgba(17, 18, 20, .12);
  --line-2: rgba(17, 18, 20, .24);
  --ok: #1d7a45;
  --warn: #9a6400;
  --bad: #c53a2c;
  --info: #2a5c9e;
  --plate: #ffffff;
  --amber: #96650c;
  --av-bg: 90%; --av-fg: 30%; --av-line: 78%; --av-stroke: 55%;
  --rel-ownership: #2f5f9e; --rel-family: #96650c; --rel-office: #2b7560; --rel-business: #3f4146;
  --rel-employee: #2b7560; --rel-participation: #8a8c91; --rel-shadow: #96650c; --rel-hidden: #8a8c91;
  --map-land: #e3e3de; --map-land-own: #cfd1cc; --map-border: rgba(17, 18, 20, .14);
  --map-border-own: rgba(17, 18, 20, .5); --map-grid: rgba(17, 18, 20, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--text);
  font-size: 16px; line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- intro */
.intro {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center;
  transition: transform 900ms var(--ease-in-out) 150ms;
}
.intro__mark { width: 96px; fill: var(--fg); overflow: visible; }
.intro__mark .p1 { animation: introA 700ms var(--ease) both; }
.intro__mark .p2 { animation: introB 700ms var(--ease) 120ms both; }
@keyframes introA { from { transform: translate(-40px, 20px); opacity: 0; } }
@keyframes introB { from { transform: translate(40px, -20px); opacity: 0; } }
.intro.is-done { transform: translateY(-100%); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gutter); height: 64px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 300ms;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 12px; flex: none; }
.nav__mark { width: 30px; fill: var(--fg); transition: transform 500ms var(--ease); }
.nav__brand:hover .nav__mark { transform: skewX(-8deg) translateX(2px); }
.nav__name { font-weight: 500; letter-spacing: .22em; font-size: 13px; }
.nav__links { display: flex; gap: 28px; margin-left: 24px; }
.nav__links a, .link {
  position: relative; font-size: 14px; color: var(--fg-2); padding: 4px 0; transition: color 200ms;
}
.nav__links a::after, .link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 450ms var(--ease);
}
.nav__links a:hover, .nav__links a.is-active, .link:hover { color: var(--fg); }
.nav__links a:hover::after, .nav__links a.is-active::after, .link:hover::after {
  transform: scaleX(1); transform-origin: left;
}
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav__op {
  background: none; border: 1px solid var(--line); padding: 6px 12px; font-size: 12px;
  font-family: var(--text); font-size: 13px; color: var(--fg-2); cursor: pointer; transition: border-color 200ms, color 200ms;
}
.nav__op:hover { border-color: var(--fg); color: var(--fg); }
.nav__burger { display: none; background: none; border: 0; width: 32px; height: 32px; cursor: pointer; position: relative; }
.nav__burger span { position: absolute; left: 6px; right: 6px; height: 1px; background: var(--fg); transition: transform 300ms var(--ease); }
.nav__burger span:first-child { top: 12px; } .nav__burger span:last-child { top: 19px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.health { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.health i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.health.up i { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2.4s infinite; }
.health.down i { background: var(--bad); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent); } 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 0%, transparent); } }

/* ---------------------------------------------------------------- layout */
.view { min-height: 70vh; outline: none; }
.view.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 180ms, transform 180ms; }
.view.is-entering { animation: viewIn 600ms var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

.section { padding: clamp(48px, 8vw, 120px) var(--gutter); border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section--tight { padding-top: 40px; padding-bottom: 40px; }
.pagehead { padding: clamp(56px, 9vw, 136px) var(--gutter) clamp(32px, 4vw, 56px); position: relative; }
.pagehead .lead { max-width: 640px; color: var(--fg-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; margin: 28px 0 0; font-weight: 400; }
.display {
  font-size: clamp(44px, 8.4vw, 136px); line-height: 1; letter-spacing: -.03em;
  font-weight: 400; margin: 0; max-width: 14ch;
}
.display--sm { font-size: clamp(36px, 5.6vw, 84px); max-width: 18ch; }
.h2 { font-size: clamp(28px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.025em; font-weight: 400; margin: 0; }
.h3 { font-size: 22px; letter-spacing: -.015em; font-weight: 500; margin: 0 0 8px; }

/* word-mask reveal for headlines */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1000ms var(--ease); }
.split.is-in .w > span { transform: none; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

.grid { display: grid; gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid > * { background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split-head > * { min-width: 0; max-width: 100%; }
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }

/* ---------------------------------------------------------------- hero canvas */
.hero { position: relative; min-height: min(86vh, 860px); display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--gutter) clamp(40px, 6vw, 80px); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.85) 100%); pointer-events: none; }
.hero > *:not(canvas) { position: relative; z-index: 1; }
.hero__meta { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-top: 40px; }
.scrollcue { font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.scrollcue::before { content: ""; width: 1px; height: 36px; background: var(--fg); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------------------------------------------------------------- stats */
.stat { padding: 28px 24px 24px; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; transition: background 300ms; }
.stat:hover { background: var(--bg-2); }
.stat__num { font-size: clamp(44px, 5vw, 76px); line-height: 1; letter-spacing: -.03em; font-weight: 300; font-variant-numeric: tabular-nums; }
.stat__label { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --b: var(--fg); position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 20px; border: 1px solid var(--b); background: transparent; color: var(--fg);
  font-size: 14px; cursor: pointer; overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: color 400ms var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: translateY(101%); transition: transform 450ms var(--ease); z-index: -1; }
.btn:hover:not(:disabled) { color: var(--bg); }
.btn:hover:not(:disabled)::before { transform: none; }
.btn .arr { transition: transform 450ms var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid::before { background: var(--bg-3); }
.btn--solid:hover:not(:disabled) { color: var(--fg); }
.btn--ghost { --b: var(--line-2); }
.btn--sm { padding: 8px 12px; font-size: 13px; }
.btn--danger { --b: color-mix(in srgb, var(--bad) 55%, transparent); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.input, select.input, textarea.input {
  background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 10px 0; width: 100%;
  border-radius: 0; transition: border-color 200ms; font-size: 15px;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 10px) 50%, calc(100% - 5px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 24px; }
select.input option { background: var(--bg-2); }
textarea.input { resize: vertical; min-height: 88px; border: 1px solid var(--line-2); padding: 12px; }
.input:focus { outline: none; border-color: var(--fg); }
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: 20px 24px; align-items: end; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { white-space: nowrap; flex: none; background: none; border: 0; padding: 9px 14px; font-size: 13px; cursor: pointer; color: var(--fg-2); }
.segmented button + button { border-left: 1px solid var(--line-2); }
.segmented button.is-on { background: var(--fg); color: var(--bg); }

/* ---------------------------------------------------------------- tables / rows */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .01em; color: var(--muted); padding: 0 16px 12px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.row-link { cursor: pointer; transition: background 200ms; }
.table tr.row-link:hover { background: var(--bg-2); }
.table-wrap { overflow-x: auto; }

.doclist { border-top: 1px solid var(--line); }
.docrow {
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 220px; gap: 28px; padding: 28px 0;
  border-bottom: 1px solid var(--line); position: relative; cursor: pointer;
}
.docrow::before { content: ""; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 0; bottom: 0; background: var(--bg-2); opacity: 0; transition: opacity 300ms; z-index: -1; }
.docrow:hover::before { opacity: 1; }
.docrow:hover .docrow__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.docrow__thumb { aspect-ratio: 16 / 10; border: 1px solid var(--line); overflow: hidden; background: var(--bg-3); position: relative; }
.docrow__thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 600ms, transform 900ms var(--ease); }
.docrow:hover .docrow__thumb img { filter: none; transform: scale(1.04); }
.docrow__title { font-size: 20px; letter-spacing: -.005em; line-height: 1.25; margin: 6px 0 10px; font-weight: 500; }
.docrow__url { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.docrow__side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: 13px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; margin: 0; font-variant-numeric: tabular-nums; }
.kv dt { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .01em; padding-top: 2px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.noshot { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--fg) 4%, transparent) 8px 9px); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .01em; padding: 4px 9px; border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.badge.ok i { background: var(--ok); } .badge.warn i { background: var(--warn); } .badge.bad i { background: var(--bad); } .badge.info i { background: var(--info); }
.badge.live i { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); }

/* ---------------------------------------------------------------- detail card */
.detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail > * { background: var(--bg); padding: clamp(24px, 3vw, 44px) var(--gutter); }
.detail > *:nth-child(odd) { padding-right: clamp(24px, 3vw, 44px); }
.detail > *:nth-child(even) { padding-left: clamp(24px, 3vw, 44px); }
.shot { border: 1px solid var(--line); background: var(--bg-3); aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; cursor: zoom-in; }
.shot .noshot { font-size: 12px; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score__num { font-size: 96px; line-height: .9; letter-spacing: -.04em; font-weight: 300; }
.score__bar { height: 2px; background: var(--line); margin-top: 18px; position: relative; overflow: hidden; }
.score__bar i { position: absolute; inset: 0 auto 0 0; background: var(--fg); transform-origin: left; animation: grow 1200ms var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.factors { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.factors li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.factors .note { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.original { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--fg-2); white-space: pre-wrap; max-height: 360px; overflow: auto; border: 1px solid var(--line); padding: 18px; background: var(--bg-2); }
.prose { font-size: 18px; line-height: 1.55; font-weight: 400; color: var(--fg-2); max-width: 64ch; margin: 0; }
.empty-state { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .01em; padding: 14px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; background: var(--fg); border-radius: 50%; }
.timeline li:last-child { padding-bottom: 0; }

.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review__head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.review p { margin: 8px 0 0; }

/* ---------------------------------------------------------------- modal / lightbox / toast */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); animation: fade 300ms both; }
.modal__box { width: min(560px, 100%); background: var(--bg); border: 1px solid var(--line-2); padding: 32px; max-height: 90vh; overflow: auto; animation: rise 500ms var(--ease) both; }
.modal__box .h3 { margin-bottom: 24px; }
.modal form { display: grid; gap: 22px; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade 250ms both; }
.lightbox img { max-height: 92vh; border: 1px solid var(--line-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--fg); color: var(--bg); padding: 14px 16px; font-size: 14px; animation: rise 400ms var(--ease) both; display: flex; gap: 10px; }
.toast.bad { background: var(--bad); }
.toast.is-out { opacity: 0; transform: translateX(20px); transition: opacity 300ms, transform 300ms; }

.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; height: 14px; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice { border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; color: var(--fg-2); }
.notice b { color: var(--bad); font-weight: 500; }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; gap: 16px; }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 56px; animation: marquee 40s linear infinite; padding-left: 56px; }
.marquee span { font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.marquee span b { color: var(--fg); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 64px var(--gutter) 28px; margin-top: 80px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; }
.footer__grid a { display: block; color: var(--fg-2); font-size: 14px; padding: 4px 0; }
.footer__grid a:hover { color: var(--fg); }
.footer__mark { width: 56px; fill: var(--fg); }
.footer__base { display: flex; justify-content: space-between; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); letter-spacing: .08em; }

/* ---------------------------------------------------------------- app hero */
.hero--app { min-height: 0; padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(40px, 5vw, 64px); }
.hero--app canvas { opacity: .55; }
.lead--hero { max-width: 640px; color: var(--fg-2); font-weight: 400; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; margin: 0; }
.display--md { font-size: clamp(36px, 6vw, 96px); line-height: 1; letter-spacing: -.03em; font-weight: 400; margin: 0; max-width: 16ch; }

/* ---------------------------------------------------------------- login */
.login { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); min-height: calc(100vh - 64px); }
.login__art { position: relative; overflow: hidden; border-right: 1px solid var(--line); display: flex; align-items: flex-end; padding: var(--gutter); }
.login__art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.9)); pointer-events: none; }
.login__art-inner { position: relative; z-index: 1; }
.login__mark { width: 72px; fill: var(--fg); margin-bottom: 40px; animation: markIn 1200ms var(--ease) both; }
@keyframes markIn { from { opacity: 0; transform: translateY(20px) skewX(-12deg); } }
.login__panel { padding: clamp(40px, 6vw, 96px) var(--gutter); display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; }
.login__form { display: grid; gap: 28px; }
.login__form.shake { animation: shake 420ms var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.login__err { margin: -8px 0 0; color: var(--bad); font-size: 14px; }
.input--lg { font-size: 22px; padding: 12px 0; letter-spacing: 0; }
.pwwrap { position: relative; }
.pwtoggle { position: absolute; right: 0; bottom: 12px; background: none; border: 0; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .01em; cursor: pointer; }
.pwtoggle:hover { color: var(--fg); }
.btn--block { width: 100%; justify-content: space-between; padding: 18px 22px; font-size: 16px; }
.btn.is-loading .arr { animation: nudge 700ms infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
body.is-public:has(.login) .footer { display: none; }

/* ---------------------------------------------------------------- user menu */
.usermenu { position: relative; }
.usermenu__pop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--bg); border: 1px solid var(--line-2); padding: 14px; display: grid; gap: 12px; animation: rise 300ms var(--ease) both; z-index: 60; }
.usermenu__who { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.usermenu__pop button { background: none; border: 0; text-align: left; padding: 6px 0; cursor: pointer; color: var(--fg-2); }
.usermenu__pop button:hover { color: var(--fg); }
#loginBtn[hidden], .usermenu[hidden], .health[hidden], .nav__links[hidden], .ccswitch[hidden] { display: none !important; }

/* ---------------------------------------------------------------- graph */
.graph { position: relative; width: 100%; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.graph.is-panning { cursor: grabbing; }
.graph__svg { width: 100%; height: 100%; display: block; }
.graph__edges { pointer-events: none; }
.graph__edge { stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1600ms var(--ease) forwards; transition: stroke 250ms, opacity 250ms; }
.graph__edge--mentioned_in { stroke: color-mix(in srgb, var(--fg) 14%, transparent); }
.graph__edge--published_in { stroke: color-mix(in srgb, var(--fg) 9%, transparent); stroke-dasharray: 2 4; animation: fadeEdge 1200ms var(--ease) forwards; stroke-dashoffset: 0; opacity: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeEdge { to { opacity: 1; } }
.graph__edge.is-hot { stroke: var(--fg); opacity: 1; }
.graph.has-focus .graph__edge:not(.is-hot) { opacity: .25; }
.graph__node { cursor: pointer; animation: pop 800ms var(--ease) both; transition: opacity 250ms; outline: none; }
@keyframes pop { from { opacity: 0; } }
.graph__shape { fill: var(--bg); stroke: var(--fg); stroke-width: 1.2; transition: fill 250ms, stroke-width 250ms; }
.graph__node--document .graph__shape { fill: var(--muted); stroke: none; }
.graph__node--source .graph__shape { fill: none; stroke: color-mix(in srgb, var(--fg) 60%, transparent); }
.graph__node--organization .graph__shape { fill: var(--bg-2); }
.graph__node:hover .graph__shape, .graph__node:focus .graph__shape { fill: var(--fg); stroke-width: 2; }
.graph__node.is-center .graph__shape { fill: var(--fg); }
.graph__ring { fill: none; stroke: color-mix(in srgb, var(--fg) 50%, transparent); animation: ring 2.8s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
.graph__label { fill: var(--fg-2); font-family: var(--text); font-size: 12px; pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.graph__node.is-center .graph__label { fill: var(--fg); font-size: 15px; font-weight: 500; }
.graph__node.is-dim { opacity: .14; }
.graph__glow { pointer-events: none; }
.graph__tip { position: absolute; left: 0; top: 0; max-width: 250px; background: color-mix(in srgb, var(--bg) 92%, transparent); border: 1px solid var(--line-2); padding: 10px 12px; display: grid; gap: 4px; pointer-events: none; font-size: 14px; z-index: 2; transition: transform 120ms linear; }
.graph.is-static .graph__edge, .graph.is-static .graph__node { animation: none; stroke-dashoffset: 0; opacity: 1; }
.graph-wrap { border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 50%, var(--bg-2) 0%, var(--bg) 70%); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.legend span, .legend button { display: inline-flex; align-items: center; gap: 8px; }
.legend--toggle { border: 0; padding: 0; }
.legend--toggle button { background: none; border: 1px solid var(--line-2); color: var(--muted); padding: 7px 10px; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; transition: color 200ms, border-color 200ms, background-color 200ms; }
.legend--toggle button.is-on { color: var(--fg); border-color: var(--fg); }
.lg { width: 10px; height: 10px; display: inline-block; border: 1px solid var(--fg); }
.lg--person { border-radius: 50%; }
.lg--document { border-radius: 50%; background: var(--muted); border: 0; width: 7px; height: 7px; }
.lg--source { transform: rotate(45deg); width: 8px; height: 8px; border-color: color-mix(in srgb, var(--fg) 60%, transparent); }

/* ---------------------------------------------------------------- entities */
.search { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line-2); padding-bottom: 10px; transition: border-color 300ms; }
.search:focus-within { border-color: var(--fg); }
.search__icon { font-size: 30px; color: var(--muted); line-height: 1; }
.search__input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: clamp(26px, 3.4vw, 48px); letter-spacing: -.02em; font-weight: 400; padding: 6px 0; }
.search__input::placeholder { color: var(--faint); }
.search__input::-webkit-search-cancel-button { filter: invert(1); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.person { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 24px; min-height: 230px; position: relative; transition: background 300ms; }
.person:hover { background: var(--bg-2); }
.person:hover .person__name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.person__top { display: flex; gap: 14px; align-items: flex-start; }
.person__id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.person__name { font-size: 21px; letter-spacing: -.005em; line-height: 1.15; }
.person__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.person__num { font-size: 44px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.person__spark { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.star { margin-left: auto; color: var(--muted); font-size: 16px; }
.star.is-on { color: var(--fg); }
.momentum { font-family: var(--mono); font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.momentum--up { color: var(--ok); } .momentum--down { color: var(--bad); }
.mono-av { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; font-family: var(--font); font-weight: 500; font-size: 15px; letter-spacing: 0; background: linear-gradient(135deg, #1a1a1a, var(--bg-2)); position: relative; overflow: hidden; }
.mono-av::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, color-mix(in srgb, var(--fg) 18%, transparent) 50%, transparent 60%); transform: translateX(-100%); transition: transform 900ms var(--ease); }
a:hover .mono-av::after { transform: translateX(100%); }
.mono-av--organization { border-radius: 0; }
.mono-av--sm { width: 30px; height: 30px; font-size: 11px; }
.mono-av--xl { width: clamp(84px, 9vw, 128px); height: clamp(84px, 9vw, 128px); font-size: clamp(22px, 2.6vw, 36px); border-color: var(--fg); }
.spark { width: 140px; height: 40px; overflow: visible; }
.spark__line { fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1400ms var(--ease) 200ms forwards; }
.spark__area { fill: color-mix(in srgb, var(--fg) 6%, transparent); }
.spark__dot { fill: var(--fg); animation: pop 600ms 1.4s both; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.chip { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--fg-2); transition: color 200ms, border-color 200ms, background-color 200ms; white-space: nowrap; }
.chip--organization { border-radius: 0; }
.chip:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.entity-head { display: flex; gap: clamp(20px, 3vw, 44px); align-items: center; }
.stat__num--sm { font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -.02em; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; padding-bottom: 22px; position: relative; border-bottom: 1px solid var(--line); }
.bars__col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.bars__col i { display: block; background: var(--fg); transform-origin: bottom; animation: growY 900ms var(--ease) both; min-height: 1px; }
.bars__col i.is-zero { background: var(--line-2); }
.bars__col:hover i { background: var(--ok); }
.bars__col span { position: absolute; bottom: -22px; left: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes growY { from { transform: scaleY(0); } }
.meter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.meter-list__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.meter { height: 2px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--fg); transform-origin: left; animation: grow 1200ms var(--ease) both; }
.related { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.related a { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); transition: padding 300ms var(--ease); }
.related a:hover { padding-left: 8px; }
.related__name { flex: 1; }
.related__w { color: var(--muted); }
.timeline--wide li { padding-bottom: 28px; }

/* hot articles */
.hotlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hot { display: grid; grid-template-columns: 56px minmax(0, 1fr) 220px; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.hot::before { content: ""; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 0; bottom: 0; background: var(--bg-2); opacity: 0; transition: opacity 300ms; z-index: -1; }
.hot:hover::before { opacity: 1; }
.hot__n { font-size: 28px; font-weight: 300; color: var(--faint); font-family: var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hot:hover .hot__n { color: var(--fg); }
.hot__title { display: block; font-size: 20px; letter-spacing: -.005em; margin-top: 6px; line-height: 1.3; }
.hot:hover .hot__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.heat { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.heat__bar { width: 100%; height: 2px; background: var(--line); overflow: hidden; }
.heat__bar i { display: block; height: 100%; background: var(--fg); transform-origin: left; animation: grow 1200ms var(--ease) both; }
.heat--hot .heat__bar i { background: var(--bad); }
.heat--warm .heat__bar i { background: var(--warn); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .field:first-child { grid-column: 1 / -1; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docrow { grid-template-columns: 140px minmax(0, 1fr); }
  .docrow__side { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login__art { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hot { grid-template-columns: 40px minmax(0, 1fr); }
  .hot .heat { grid-column: 2; }
  .entity-head { align-items: flex-start; }
  .nav__links { position: fixed; inset: 64px 0 auto 0; background: var(--bg); flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
  .nav__links a { font-size: 28px; letter-spacing: -.02em; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__burger { display: block; }
  .health span { display: none; }
  .detail, .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .detail > * { padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .entity-head { flex-direction: column; }
  .person__spark .spark { width: 110px; }
  .filters, .cols-4 { grid-template-columns: 1fr; }
  .docrow { grid-template-columns: 1fr; gap: 16px; }
  .docrow__side { grid-column: auto; }
  .nav__op { display: none; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  [data-reveal], .split .w > span { opacity: 1; transform: none; }
}
.bars__col:last-child span { left: auto; right: 0; }
@media (max-width: 560px) { .bars__col span { display: none; } .bars__col:first-child span, .bars__col:last-child span { display: block; } }

/* ---------------------------------------------------------------- cabinets: entry + chrome */
body.is-bare .nav, body.is-bare .footer, body:not(.is-ops) .footer { display: none; }
.entry { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; align-content: center; gap: 64px; padding: var(--gutter); }
.entry__mark { width: clamp(84px, 11vw, 132px); fill: var(--fg); overflow: visible; }
.entry__mark path:first-child { animation: introA 900ms var(--ease) 200ms both; }
.entry__mark path:last-child { animation: introB 900ms var(--ease) 320ms both; }
.entry__btn { min-width: 200px; justify-content: space-between; animation: fade 900ms var(--ease) 700ms both; }
.ccswitch { display: inline-flex; border: 1px solid var(--line-2); flex: none; }
.ccswitch a { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; padding: 6px 10px; color: var(--muted); transition: color 200ms, background-color 200ms; }
.ccswitch a + a { border-left: 1px solid var(--line-2); }
.ccswitch a:hover { color: var(--fg); }
.ccswitch a.is-on { background: var(--fg); color: var(--bg); }

/* ---------------------------------------------------------------- viewer: country picker */
.countries { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); display: flex; flex-direction: column; padding: 8px var(--gutter) 24px; }
.countries__hint { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 8px; }
.countries__grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.countries__note:not(:empty) { margin-top: 16px; }
.country { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(24px, 4vh, 44px); padding: clamp(24px, 4vh, 48px) 16px; min-width: 0; outline-offset: -6px; }
.country + .country { border-left: 1px solid var(--line); }
.country__arms { height: min(46vh, 430px); width: 100%; display: flex; justify-content: center; align-items: center; }
.country__arms img { height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1) brightness(.55) contrast(1.05); opacity: .8; transition: filter 700ms var(--ease), opacity 700ms var(--ease), transform 700ms var(--ease); }
.country:hover .country__arms img, .country:focus-visible .country__arms img { filter: none; opacity: 1; transform: translateY(-8px) scale(1.02); }
.country__text { text-align: center; }
.country__name { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; letter-spacing: -.03em; font-weight: 400; margin: 0; }
.country__full { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.country__figs { display: flex; justify-content: center; gap: clamp(24px, 4vw, 56px); margin: 24px 0 0; }
.country__figs > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; }
.country__figs dt { font-size: 13px; color: var(--muted); }
.country__figs dd { margin: 0; }
.country__num { display: block; font-size: clamp(28px, 2.6vw, 40px); font-weight: 300; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.country:hover .country__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------------------------------------------------------------- viewer: page head */
.wpage { padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(20px, 2.6vw, 36px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--fg-2); transition: color 200ms; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.crumbs [aria-current] { color: var(--fg); overflow-wrap: anywhere; }
.crumbs__sep { color: var(--faint); }
.pagehead .crumbs { margin-bottom: 28px; }
.wpage__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.wpage__title { font-size: clamp(32px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -.03em; font-weight: 400; margin: 0; max-width: 20ch; }
.wsec { padding-top: clamp(36px, 4.5vw, 64px); padding-bottom: clamp(36px, 4.5vw, 64px); }
.wsec.section--tight { padding-top: 24px; padding-bottom: 32px; }
.stat__eyebrow { font-size: 13px; color: var(--muted); }
a.stat:hover .stat__eyebrow { color: var(--fg); }
.wkpi .stat { min-height: 168px; }
.delta { font-family: var(--mono); font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.delta--down, .delta--flat { color: var(--muted); }
.wnum { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- viewer: world map */
.wmap { position: relative; border: 1px solid var(--line); background: var(--bg-2); }
.wmap__stage { position: relative; width: 100%; aspect-ratio: 2.3 / 1; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.wmap.is-zoomed .wmap__stage { touch-action: none; }
.wmap__stage.is-panning { cursor: grabbing; }
.wmap__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 900ms var(--ease); }
.wmap.is-ready .wmap__canvas { opacity: 1; }
.wmap__layer { position: absolute; inset: 0; pointer-events: none; }
.wmap__o { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; outline: none; cursor: pointer; }
.wmap__o::before { content: ""; position: absolute; left: 0; top: 0; width: max(30px, calc(var(--r) * 2)); height: max(30px, calc(var(--r) * 2)); transform: translate(-50%, -50%); border-radius: 50%; }
.wmap__dot { position: absolute; left: calc(var(--r) * -1); top: calc(var(--r) * -1); width: calc(var(--r) * 2); height: calc(var(--r) * 2); border-radius: 50%; background: color-mix(in srgb, var(--fg) 80%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent); transition: transform 240ms var(--ease), box-shadow 240ms var(--ease); animation: fade 900ms var(--ease) 300ms both; }
.wmap__o--hot .wmap__dot { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 16%, transparent), 0 0 14px 2px color-mix(in srgb, var(--bad) 35%, transparent); }
.wmap__o--warm .wmap__dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 14%, transparent), 0 0 10px 1px color-mix(in srgb, var(--warn) 22%, transparent); }
.wmap__o--idle .wmap__dot { background: color-mix(in srgb, var(--fg) 35%, transparent); box-shadow: none; }
.wmap__o:hover .wmap__dot, .wmap__o:focus-visible .wmap__dot, .wmap__o.is-active .wmap__dot { transform: scale(1.5); }
.wmap__o:focus-visible .wmap__dot { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--fg); }

.wmap__label { position: absolute; left: calc(var(--r) + 8px); top: 0; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--fg-2); white-space: nowrap; pointer-events: none; text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg); }
.wmap__tip { position: absolute; left: 0; top: 0; width: max-content; min-width: 170px; max-width: 240px; background: color-mix(in srgb, var(--bg) 94%, transparent); border: 1px solid var(--line-2); padding: 12px 14px; display: grid; gap: 4px; font-size: 13px; pointer-events: none; z-index: 3; }
.wmap__tip b { font-weight: 500; }
.wmap__tip.is-touch { pointer-events: auto; }
.wmap__tiprow { display: flex; justify-content: space-between; gap: 16px; color: var(--fg-2); }
.wmap__tiprow b { font-variant-numeric: tabular-nums; color: var(--fg); }
.wmap__tiplink { margin-top: 6px; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; padding: 4px 0; }
.wmap__ctrl { position: absolute; right: 10px; bottom: 10px; display: flex; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 85%, transparent); z-index: 2; }
.wmap__btn { background: none; border: 0; color: var(--fg-2); width: 34px; height: 34px; font-size: 18px; line-height: 1; cursor: pointer; transition: color 200ms, background-color 200ms; }
.wmap__btn + .wmap__btn { border-left: 1px solid var(--line-2); }
.wmap__btn--txt { width: auto; padding: 0 12px; font-size: 13px; }
.wmap__btn:hover:not(:disabled) { background: var(--fg); color: var(--bg); }
.wmap__btn:disabled { opacity: .35; cursor: default; }
.wmap__fail { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.wmap-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--fg-2); }
.wmap-legend span { display: inline-flex; align-items: center; }
.wl { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: color-mix(in srgb, var(--fg) 80%, transparent); }
.wl--hot { background: var(--bad); box-shadow: 0 0 8px color-mix(in srgb, var(--bad) 50%, transparent); }
.wl--warm { background: var(--warn); }
.wplaces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.wplaces a { display: flex; align-items: center; gap: 0; padding: 14px 16px 14px 0; font-size: 14px; color: var(--fg-2); transition: color 200ms; }
.wplaces a:hover { color: var(--fg); }
.wplaces a:hover .wplaces__city { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.wplaces__city { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wplaces__n { font-variant-numeric: tabular-nums; color: var(--fg); margin-left: 10px; }

/* ---------------------------------------------------------------- viewer: chart + blocks */
.wsplit { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 88px); }
.wsplit--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wsplit .h2 { margin-bottom: 8px; }
.lchart { margin: 24px 0 0; }
.lchart__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 13px; margin-bottom: 18px; }
.lchart__legend > span { display: inline-flex; align-items: center; gap: 8px; }
.lchart__legend b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--fg); }
.lg-line { display: inline-block; width: 18px; border-top: 2px solid var(--fg); }
.lg-line--removed { border-top-color: var(--bad); }
.lchart__plot { position: relative; border-bottom: 1px solid var(--line); animation: wipe 1400ms var(--ease) 200ms both; touch-action: pan-y; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.lchart__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.lchart__grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lchart__area { fill: color-mix(in srgb, var(--fg) 5%, transparent); }
.lchart__line { fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lchart__line--removed { stroke: var(--bad); }
.lchart__area--removed { fill: color-mix(in srgb, var(--bad) 7%, transparent); }
.lchart__guide { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lchart__dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--fg); transform: translate(-50%, -50%); pointer-events: none; }
.lchart__dot--removed { background: var(--bad); }
.lchart__tip .is-removed { color: var(--bad); }
.lchart__tip { position: absolute; top: 8px; transform: translateX(-50%); background: color-mix(in srgb, var(--bg) 94%, transparent); border: 1px solid var(--line-2); padding: 8px 12px; display: grid; gap: 2px; font-size: 13px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; z-index: 1; }
.lchart__tip b { font-weight: 500; }
.lchart__y { position: absolute; left: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); transform: translateY(-120%); pointer-events: none; font-variant-numeric: tabular-nums; }
.lchart__y--top { top: 3%; } .lchart__y--mid { top: 50%; }
.lchart__x { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wchannels a { display: block; transition: color 200ms; }
.wchannels a:hover .meter-list__row > span:first-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.wcat { display: flex; flex-direction: column; padding: 24px; min-height: 240px; transition: background 300ms; }
.wcat:hover { background: var(--bg-2); }
.wcat__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; color: var(--fg-2); }
.wcat__arr { color: var(--muted); transition: transform 450ms var(--ease), color 200ms; }
.wcat:hover .wcat__arr { transform: translateX(4px); color: var(--fg); }
.wcat:hover .wcat__title { color: var(--fg); }
.wcat__num { font-size: clamp(48px, 5vw, 72px); font-weight: 300; letter-spacing: -.03em; line-height: 1; margin-top: 28px; font-variant-numeric: tabular-nums; }
.wcat__kind { font-size: 13px; color: var(--muted); margin-top: 6px; }
.wcat__stats { margin: auto 0 0; padding-top: 24px; display: grid; gap: 6px; }
.wcat__stats > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.wcat__stats dt { color: var(--muted); }
.wcat__stats dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--fg-2); }

.wtop, .whot { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.wtop a { display: grid; grid-template-columns: 24px 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); transition: background 300ms; }
.wtop a:hover .wtop__name, .whot a:hover .whot__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.wtop__n { font-size: 20px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wtop a:hover .wtop__n { color: var(--fg); }
.wtop__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wtop__name { font-size: 17px; line-height: 1.25; }
.wtop__role, .wwho__role { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.wtop__num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wtop__num b { font-size: 24px; font-weight: 300; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.wtop__num span { font-size: 12px; color: var(--muted); }
.whot a { display: grid; grid-template-columns: 28px minmax(0, 1fr) 128px; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.whot__n { font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 3px; font-variant-numeric: tabular-nums; }
.whot__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.whot__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.whot__title { font-size: 16px; line-height: 1.4; color: var(--fg); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.whot .heat { padding-top: 4px; }

/* ---------------------------------------------------------------- viewer: lists, filters, table */
.wfilters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.wfilters > *, .wpubs { min-width: 0; }
.wfilters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.wsearch { flex: 1 1 320px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-2); transition: border-color 300ms; min-width: 0; }
.wsearch:focus-within { border-color: var(--fg); }
.wsearch__icon { color: var(--muted); font-size: 20px; line-height: 1; }
.wsearch__input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 17px; padding: 12px 0; }
.wsearch__input::placeholder { color: var(--faint); }
.wsearch__input::-webkit-search-cancel-button { filter: invert(1); }
.wtabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.wtabs::-webkit-scrollbar { display: none; }
.wtab { display: inline-flex; align-items: baseline; gap: 8px; flex: none; padding: 12px 0; margin-bottom: -1px; border-bottom: 1px solid transparent; font-size: 15px; color: var(--muted); white-space: nowrap; transition: color 200ms, border-color 200ms; }
.wtab:hover { color: var(--fg); }
.wtab.is-on { color: var(--fg); border-bottom-color: var(--fg); }
.wtab__n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--fg-2); font-size: 13px; cursor: pointer; white-space: nowrap; transition: color 200ms, border-color 200ms, background-color 200ms; }
.fchip:hover { border-color: var(--fg); color: var(--fg); }
.fchip.is-on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.fchip.is-empty { opacity: .45; }
.fchip__n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip.is-on .fchip__n { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.fchip--x span[aria-hidden] { font-size: 15px; line-height: 1; }
.wlist__meta { margin: 24px 0 8px; }
.wtable__note { margin: 0 0 12px; }
.wtable-wrap { overflow-x: auto; }
.wtable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.wtable th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); padding: 0 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom; }
.wtable th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; transition: color 200ms; }
.wtable th button:hover, .wtable th button.is-on { color: var(--fg); }
.wtable td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wtable th:first-child, .wtable td:first-child { padding-left: 0; }
.wtable th:last-child, .wtable td:last-child { padding-right: 0; }
.wtable .c-num { text-align: right; white-space: nowrap; }
.wtable .c-rank { width: 44px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.wtable .c-strong { color: var(--fg); font-weight: 500; }
.wtable td.c-num:not(.c-strong) { color: var(--fg-2); }
.wtable .c-spark { width: 112px; text-align: right; }
.wrow { cursor: pointer; transition: background 200ms; }
.wrow:hover { background: var(--bg-2); }
.wwho { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wwho__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wwho__name { font-size: 15px; color: var(--fg); line-height: 1.3; }
.wrow:hover .wwho__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.spark--sm { width: 96px; height: 26px; display: inline-block; vertical-align: middle; }
.pager__nums { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pager__n { min-width: 34px; height: 34px; padding: 0 8px; background: none; border: 1px solid transparent; color: var(--fg-2); font-family: var(--mono); font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.pager__n:hover { border-color: var(--line-2); color: var(--fg); }
.pager__n.is-on { border-color: var(--fg); color: var(--fg); }

.wdoclist { border-top: 1px solid var(--line); }
.wdoc { display: grid; grid-template-columns: 136px minmax(0, 1fr) 150px; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.wdoc::before { content: ""; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 0; bottom: 0; background: var(--bg-2); opacity: 0; transition: opacity 300ms; z-index: -1; }
.wdoc:hover::before { opacity: 1; }
.wdoc__thumb { aspect-ratio: 16 / 10; border: 1px solid var(--line); overflow: hidden; background: var(--bg-3); }
.wdoc__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.05); transition: filter 600ms, transform 900ms var(--ease); }
.wdoc:hover .wdoc__thumb img { filter: none; transform: scale(1.04); }
.wdoc__thumb .noshot { font-size: 11px; padding: 6px; }
.wdoc__body { min-width: 0; }
.wdoc__meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.wdoc__meta span:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--faint); }
.wdoc__title { display: block; font-size: 17px; line-height: 1.35; margin: 6px 0 4px; color: var(--fg); overflow-wrap: anywhere; }
.wdoc:hover .wdoc__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.wdoc.is-removed .wdoc__title { color: var(--fg-2); }
.wdoc__url { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.wdoc .chips { margin-top: 10px; }
.wdoc__side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.wdoc__side .heat { width: 100%; }

@media (max-width: 1100px) {
  .wplaces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wsplit, .wsplit--even { grid-template-columns: 1fr; }
  .wdoc { grid-template-columns: 120px minmax(0, 1fr); }
  .wdoc__side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .wdoc__side .heat { width: auto; flex-direction: row-reverse; align-items: center; }
  .wdoc__side .heat__bar { width: 64px; }
}
@media (max-width: 860px) {
  .wtable .c-opt2 { display: none; }
  .wmap__stage { aspect-ratio: 1.5 / 1; }
  body.is-app .nav__name { display: none; }
}
@media (max-width: 560px) {
  .countries__grid { grid-template-columns: 1fr; }
  .country { padding: 28px 8px; gap: 20px; }
  .country + .country { border-left: 0; border-top: 1px solid var(--line); }
  .country__arms { height: 26vh; }
  .wmap__stage { aspect-ratio: 1.05 / 1; }
  .wmap__label { display: none; }
  .wkpi.cols-4, .wcats.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wkpi .stat { min-height: 140px; padding: 18px 16px; }
  .wkpi .stat__num { font-size: 40px; }
  .wcat { padding: 18px 14px; min-height: 0; }
  .wcat__stats > div { font-size: 12px; gap: 6px; }
  .wcat__num { font-size: 44px; margin-top: 18px; }
  .wplaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wplaces li:nth-child(odd) a { padding-right: 20px; }
  .fchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .fchips::-webkit-scrollbar { display: none; }
  .wtable .c-opt3 { display: none; }
  .wtable td { padding: 12px 8px; }
  .wtable th { padding: 0 8px 10px; white-space: normal; }
  .wtable th.c-num { width: 72px; }
  .wtable .c-rank { width: 28px; }
  .wwho .mono-av { display: none; }
  .wdoc { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  .wdoc__side { grid-column: 1 / -1; }
  .wdoc__title { font-size: 16px; }
  .wtop a { grid-template-columns: 18px 40px minmax(0, 1fr) auto; gap: 12px; }
  .wtop .mono-av { width: 40px; height: 40px; font-size: 13px; }
  .whot a { grid-template-columns: 24px minmax(0, 1fr); }
  .whot .heat { grid-column: 2; flex-direction: row-reverse; align-items: center; }
  .whot .heat__bar { width: 64px; }
  .pager { flex-wrap: wrap; justify-content: center; }
  .pager__nums { order: -1; width: 100%; }
  .nav__op { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .lchart__plot { animation: none; }
  .country__arms img { transition: filter 1ms, opacity 1ms; }
  .country:hover .country__arms img, .country:focus-visible .country__arms img { transform: none; }
}

/* ---------------------------------------------------------------- type roles */
/* Inter Tight is a display cut: headlines and big figures only. Everything else reads in Inter. */
.display, .display--md, .display--sm, .h2, .h3, .stat__num, .score__num,
.person__num, .search__input, .hot__n, .nav__name, .wpage__title, .country__name, .country__num,
.wcat__num, .wtop__n, .wtop__num b { font-family: var(--font); }
.stat > .eyebrow { text-transform: none; letter-spacing: .01em; }
.table td { font-variant-numeric: tabular-nums; }
.ico { width: 1em; height: 1em; flex: none; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.ico.is-on { fill: currentColor; }
.ico--lead { margin-right: 8px; }
.star .ico { font-size: 16px; }

/* ---------------------------------------------------------------- channel icons */
.chico { flex: none; fill: currentColor; }
.chico--line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chlabel { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.chlabel > .chico { color: var(--fg-2); }
.wdoc__meta .chlabel { gap: 6px; }
.fchip .chico { margin-right: 6px; opacity: .8; }
.fchip.is-on .chico { opacity: 1; }
a:hover .chlabel > .chico { color: var(--fg); }

/* ---------------------------------------------------------------- theme switch */
.themesw { display: inline-flex; border: 1px solid var(--line); }
.themesw button {
  display: grid; place-items: center; width: 30px; height: 28px; padding: 0; background: none; border: 0;
  color: var(--muted); cursor: pointer; transition: color 200ms var(--ease), background 200ms var(--ease);
}
.themesw button + button { border-left: 1px solid var(--line); }
.themesw svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.themesw button:hover { color: var(--fg); }
.themesw button.is-on { color: var(--fg); background: var(--bg-3); }
html { transition: background-color 300ms var(--ease); }
@media (max-width: 600px) {
  .themesw button { width: 26px; }
  .themesw button[data-mode="system"] { display: none; }
}
@media (prefers-reduced-motion: reduce) { html, .themesw button { transition: none; } }

/* light theme: emblems in their own colours (the dark theme keeps the muted monochrome look) */
:root[data-theme="light"] .country__arms img { filter: saturate(.92); opacity: 1; }
:root[data-theme="light"] .wside__arms { filter: none; }
:root[data-theme="light"] .search__input::-webkit-search-cancel-button,
:root[data-theme="light"] .wsearch__input::-webkit-search-cancel-button,
:root[data-theme="light"] .wsearch2__input::-webkit-search-cancel-button { filter: none; }
:root[data-theme="light"] .hero::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 20%, transparent) 0%, transparent 30%, color-mix(in srgb, var(--bg) 90%, transparent) 100%); }
