/* Readout — Editorial archive design system
   Quiet reading desk: list + bilingual text. Freeze-friendly static CSS. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces — cool ink-tinted neutrals */
  --bg-app: oklch(0.965 0.006 255);
  --bg-rail: oklch(0.99 0.003 255);
  --bg-read: oklch(0.998 0.002 255);
  --bg-soft: oklch(0.955 0.008 255);
  --border: oklch(0.86 0.012 255);
  --border-soft: oklch(0.92 0.008 255);

  /* Ink — stronger hierarchy */
  --ink: oklch(0.2 0.025 255);
  --ink-soft: oklch(0.4 0.02 255);
  --ink-muted: oklch(0.5 0.015 255);

  /* Accent — deep navy, restrained */
  --accent: oklch(0.36 0.07 255);
  --accent-soft: oklch(0.95 0.025 255);
  --accent-hover: oklch(0.3 0.08 255);

  /* Speakers — labels only */
  --spk-putin: oklch(0.42 0.11 25);
  --spk-lavrov: oklch(0.4 0.09 255);
  --spk-zakharova: oklch(0.42 0.09 300);

  /* Quotes — one system, mild fill */
  --quote-bg: oklch(0.975 0.006 90);
  --quote-ink: oklch(0.3 0.03 60);
  --exchange-bg: oklch(0.975 0.008 280);
  /* Famous / iconic lines */
  --famous-bg: oklch(0.97 0.035 85);
  --famous-border: oklch(0.78 0.08 75);
  --famous-ink: oklch(0.32 0.07 55);
  --famous-badge: oklch(0.45 0.12 55);

  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 255 / 0.04);
  --shadow-md: 0 12px 32px oklch(0.2 0.02 255 / 0.08);

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-read: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-display: "Newsreader", "Source Serif 4", Georgia, "Times New Roman", serif;

  --rail-w: 272px;
  --topbar-h: 56px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 160ms;

  /* Chip scale — md = filters / agenda; sm = Topics / in-digest tags */
  --chip-md-size: 12px;
  --chip-md-pad-y: 5px;
  --chip-md-pad-x: 11px;
  --chip-sm-size: 11.5px;
  --chip-sm-pad-y: 4px;
  --chip-sm-pad-x: 9px;
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  background: var(--bg-app);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: var(--topbar-h);
  background: var(--bg-rail);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo:hover strong { color: var(--accent); }
.logo-mark { flex-shrink: 0; }
.logo-word {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 1px;
}
.logo-word strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
}
.logo-word span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.tab {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.7;
  padding: 4px 14px;
  border-radius: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur);
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: var(--bg-rail);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.search-wrap { flex: 1; position: relative; max-width: 360px; }
.search-wrap input {
  width: 100%;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px 8px 34px;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.search-wrap input::placeholder { color: var(--ink-muted); }
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-read);
}
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-size: 13px;
  pointer-events: none;
}
.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-rail);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 4px;
}
.search-suggest[hidden] { display: none; }
.search-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: var(--chip-md-size);
  font-weight: 500;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.search-suggest-item:hover,
.search-suggest-item[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.search-suggest-n {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.search-suggest-item[aria-selected="true"] .search-suggest-n { color: inherit; opacity: 0.8; }
.search-match {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 20;
}
.search-match[hidden] { display: none; }
.search-wrap:focus-within .search-match:not([hidden]) {
  /* keep chip below suggestions when both could show — suggest wins while open */
}
.search-wrap.has-suggest .search-match { display: none; }
.search-match-chip {
  font-family: inherit;
  font-size: var(--chip-sm-size);
  font-weight: 600;
  padding: var(--chip-sm-pad-y) var(--chip-sm-pad-x);
  border-radius: 999px;
  border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--border));
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.search-match-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.list-empty {
  padding: 20px 16px;
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.list-empty[hidden] { display: none; }
.list-empty-msg { margin: 0 0 10px; }
.list-empty-clear {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.list-empty-clear:hover { text-decoration: underline; }
.count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.nav-toggle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink-soft);
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.nav-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ── Layout ── */
.layout { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar rail ── */
.sidebar {
  width: var(--rail-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-rail);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.filter-bar {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; }
.advanced-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.select-row { display: flex; flex-wrap: wrap; gap: 6px; }
.foot-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.fmt-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}
.fmt-label.fmt-meeting { color: oklch(0.38 0.08 160); background: oklch(0.96 0.02 160); border-color: oklch(0.9 0.03 160); }
.fmt-label.fmt-briefing { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in oklch, var(--accent) 25%, var(--border)); }
.fmt-label.fmt-interview { color: oklch(0.4 0.1 300); background: oklch(0.96 0.02 300); border-color: oklch(0.9 0.03 300); }
.fmt-label.fmt-qa { color: oklch(0.42 0.1 50); background: oklch(0.97 0.02 80); border-color: oklch(0.9 0.03 80); }
.cp-label {
  font-size: 10px;
  font-weight: 600;
  color: oklch(0.35 0.06 160);
  letter-spacing: 0.01em;
}
.country-row { gap: 4px; }
.country-row .pill.country .tc {
  opacity: 0.55;
  font-weight: 500;
  font-size: 10px;
}
.country-row[hidden] { display: none !important; }
.mini-select {
  flex: 1 1 40%;
  min-width: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background-color: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 22px 5px 9px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--dur), color var(--dur), background-color var(--dur);
}
.mini-select:hover { border-color: var(--accent); }
.mini-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mini-select.set {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-soft);
}
.filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
}
.clear-filters {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
}
.clear-filters:hover { color: var(--accent); }
.clear-filters[hidden] { display: none; }
.foot-right { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.lang-toggle .lt {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  background: var(--bg-app);
  color: var(--ink-muted);
  border: none;
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
.lang-toggle .lt:hover { color: var(--accent); }
.lang-toggle .lt.active {
  background: var(--accent);
  color: #fff;
}

button.pill, button.topic-pill, button.kw-toggle, button.clear-filters, button.toc-chip, button.toc-more, button.wk-chip {
  font-family: inherit;
}
.pill {
  font-size: var(--chip-md-size);
  font-weight: 500;
  padding: var(--chip-md-pad-y) var(--chip-md-pad-x);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur), color var(--dur);
  white-space: nowrap;
  user-select: none;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.kw-toggle {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.01em;
  background: none;
  border: none;
  padding: 0;
}
.kw-toggle:hover { color: var(--ink-soft); }
.kw-toggle .tc { color: var(--ink-muted); font-weight: 500; }
button.clear-filters {
  background: none;
  border: none;
  padding: 0;
}

.topic-cloud {
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  max-height: 140px;
  overflow-y: auto;
}
.topic-cloud::-webkit-scrollbar { width: 3px; }
.topic-cloud::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--chip-sm-size);
  font-weight: 500;
  padding: var(--chip-sm-pad-y) var(--chip-sm-pad-x);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--ink-soft);
  cursor: pointer;
  margin: 2px 3px 2px 0;
  transition: all var(--dur) var(--ease);
  user-select: none;
}
.topic-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.topic-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.topic-pill .tc { font-size: 10px; opacity: 0.8; }

/* Agenda strip in the list rail — always visible (mobile never shows empty pane) */
.sidebar-agenda {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--bg-app) 0%, var(--bg-rail) 100%);
}
.sidebar-agenda-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 9px;
}
.sidebar-agenda-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar-agenda .agenda-chip {
  background: var(--bg-read);
}

/* List */

/* Main | Short length band — orthogonal to header Video|Articles and to #len-select */
.band-seg {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  margin: 0 14px 8px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
}
.band-btn {
  flex: 1;
  margin: 0;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  line-height: 1.2;
}
.band-btn:hover { color: var(--ink-soft); }
.band-btn.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.list-empty-sec {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.list-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.list-empty-switch {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.list-empty-switch:hover { color: var(--ink); }
.list-empty-switch[hidden] { display: none; }
.sidebar-list { flex: 1; overflow-y: auto; min-height: 0; }
.sidebar-list::-webkit-scrollbar { width: 5px; }
.sidebar-list::-webkit-scrollbar-thumb {
  background: oklch(0.82 0.01 255);
  border-radius: 3px;
}

.date-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: oklch(0.96 0.006 255 / 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 11px 16px 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border-soft);
}

.digest-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background var(--dur) var(--ease);
  border-left: 2px solid transparent;
}
.digest-item:hover { background: var(--bg-app); }
.digest-item.active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.digest-item.active .item-title { color: var(--accent); }

.item-title {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.item-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.item-meta:empty { display: none; }
.spk-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.spk-label.spk-putin { color: var(--spk-putin); }
.spk-label.spk-lavrov { color: var(--spk-lavrov); }
.spk-label.spk-zakharova { color: var(--spk-zakharova); }
.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--ink-soft);
}
.item-date { font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* ── Reading panel ── */
.panel {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-read);
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100%;
  color: var(--ink-muted);
  gap: 0;
  padding: 36px 36px 48px;
  text-align: left;
  container: agenda / inline-size;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, oklch(0.94 0.02 255 / 0.7), transparent 70%),
    var(--bg-read);
}
.empty-state .hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 22px;
  text-align: center;
  letter-spacing: 0.01em;
}
.empty-state .hint kbd {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--ink-soft);
}

/* On the agenda — discovery home: invite a first pick and a read */
.agenda {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.agenda-kicker {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.agenda-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  line-height: 1.12;
  text-wrap: balance;
}
.agenda-sub {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 16px;
  max-width: 42ch;
}
.agenda-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.agenda-chip {
  font-family: var(--font-ui);
  font-size: var(--chip-md-size);
  font-weight: 500;
  padding: var(--chip-md-pad-y) var(--chip-md-pad-x);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-rail);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--dur), background var(--dur), color var(--dur), box-shadow var(--dur);
}
.agenda-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
}
.agenda-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}
.agenda-chip.active .agenda-n,
.agenda-chip.active .agenda-rising { color: inherit; opacity: 0.9; }
.agenda-n {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.agenda-rising {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.agenda-chip.rising:not(.active) {
  border-color: color-mix(in oklch, var(--accent) 28%, var(--border));
}
.agenda-recent-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}
.agenda-recent-label.is-primary {
  color: var(--accent);
  letter-spacing: 0.07em;
}
.agenda-board-wrap {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.agenda-board-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}
.agenda-recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-rail);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.agenda-recent li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur);
}
.agenda-recent li:last-child { border-bottom: none; }
.agenda-recent li:hover { background: var(--bg-app); }
.agenda-recent-link {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.agenda-recent-link:hover { color: var(--accent); }
.agenda-recent-date {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* Dashboard: two-column front-page grid. The side column runs beside the
   header and the main column, so neither leaves a dead band above or below it.
   .agenda-grid is a template wrapper only; its children join .agenda's grid. */
.agenda {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "head side"
    "main side"
    "hint hint";
  column-gap: 40px;
}
.agenda-grid { display: contents; }
.agenda-head { grid-area: head; margin-bottom: 20px; }
.agenda .hint { grid-area: hint; }
@container agenda (max-width: 700px) {
  .agenda {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-template-areas: "head" "main" "side" "hint";
    row-gap: 4px;
  }
}
.agenda-main { grid-area: main; min-width: 0; }
.agenda-side {
  grid-area: side;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.agenda-block { min-width: 0; }
.agenda-block:has(> .meet-list) { flex: 1; display: flex; flex-direction: column; }

/* Dashboard: on the agenda — ranked themes with weight bars */
.agenda-board {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}
.agenda-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 88px 26px;
  align-items: center;
  gap: 14px;
  padding: 9px 6px;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  background: none;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
  transition: background var(--dur);
}
.agenda-board li:last-child .agenda-row { border-bottom: none; }
.agenda-row:hover { background: var(--bg-app); }
.agenda-row:hover .agenda-row-label { color: var(--accent); }
.agenda-row:hover .agenda-row-fill { background: var(--accent-hover); }
.agenda-row-label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agenda-row.rising .agenda-row-label { font-weight: 600; }
.agenda-row .agenda-rising {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.agenda-row-bar {
  height: 5px;
  display: flex;
}
.agenda-row-fill {
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 78%, var(--border));
  transition: background var(--dur);
}
.agenda-row.rising .agenda-row-fill { background: var(--accent); }
.agenda-row-n {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  justify-self: end;
  text-align: right;
}

/* Dashboard: shared section label */
.agenda-section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

/* Dashboard: by voice */
.voice-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.voice-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  text-align: left;
  padding: 11px 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-rail);
  cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.voice-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.voice-name {
  grid-column: 1;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 650;
}
.voice-count {
  grid-column: 2;
  align-self: center;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.voice-latest {
  grid-column: 1 / -1;
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dashboard: meetings by country */
.meet-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-rail);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.meet-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.meet-item:last-child { border-bottom: none; }
.meet-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
}
.meet-country {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 92px;
}
.meet-title {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meet-link:hover .meet-title { color: var(--accent); }
.meet-count {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

#digest-content {
  padding: 36px 44px 64px;
  max-width: 1120px;
  margin: 0 auto;
  font-family: var(--font-read);
  container-type: inline-size;
}

/* Digest meta — text, not chip soup */
.digest-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-soft);
}
.meta-chip {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 13px;
}
.meta-chip a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.meta-chip a:hover { text-decoration: underline; }
.audit-chip { font-size: 12px; color: var(--ink-muted); cursor: help; }
.audit-chip.audit-unresolved { color: var(--famous-ink); }
.meta-sep { color: var(--border); user-select: none; }

/* Evidence CTA → /t/<id> full stenogram */
.transcript-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 5px 11px;
  border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--border));
  border-radius: 6px;
  background: color-mix(in oklch, var(--accent) 8%, transparent);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.transcript-btn:hover {
  background: color-mix(in oklch, var(--accent) 16%, transparent);
  border-color: color-mix(in oklch, var(--accent) 55%, var(--border));
  text-decoration: none;
}
.transcript-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kw-bar, .digest-kw {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 20px;
  font-family: var(--font-ui);
}
.digest-kw span,
.kw-bar .kw-chip {
  font-size: var(--chip-sm-size);
  padding: var(--chip-sm-pad-y) var(--chip-sm-pad-x);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.digest-kw span:hover,
.kw-bar .kw-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* TOC — collapsed by default to one chip row on long digests */
.theme-toc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 28px;
  font-family: var(--font-ui);
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-read);
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--border-soft);
}
.toc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.theme-toc.is-collapsed .toc-chips {
  max-height: 28px;
  overflow: hidden;
}
.toc-chip {
  font-size: 11.5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--bg-rail);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color var(--dur), color var(--dur);
}
.toc-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.toc-more {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.toc-more:hover { color: var(--ink-soft); }
.toc-caret { display: inline-block; width: 0.9em; }

/* Structured themes (content.html path) */
.theme { margin: 0 0 36px; scroll-margin-top: 56px; }
.theme-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
/* Equal columns: corpus median EN/RU char ratio ≈ 1.0 — do not widen RU
   on the old “Cyrillic runs longer” assumption (that made EN wrap taller). */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  align-items: start;
  /* Parallel-text gutter rule: shows behind transparent bilingual prose,
     covered by the opaque quote/exchange boxes. */
  background-image: linear-gradient(var(--border-soft), var(--border-soft));
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 1px 100%;
}
.s-ru, .s-en {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--ink);
}
.s-ru { grid-column: 1; }
.s-en { grid-column: 2; }
.s-empty { min-height: 0; padding: 0; margin: 0; border: none; background: none; }
/* Key exchange: parallel columns when both langs exist */
.x-col {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 6px;
  padding: 10px 12px;
  background: var(--exchange-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}
.x-col.x-ru { grid-column: 1; }
.x-col.x-en { grid-column: 2; }
.x-col.x-script { grid-column: 1; }
.x-col.x-script + .x-col.x-en { grid-column: 2; }
.x-col.x-ru + .x-col.x-script { grid-column: 2; }
/* Script quote inside exchange row */
.xq-ru {
  margin: 0 0 6px;
  padding: 0;
  border: none;
  background: none;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--quote-ink);
  font-family: var(--font-read);
}
.xq-ru + .xq-ru { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.xq-en {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
  font-style: normal;
}
/* One language only — full width, no empty twin cell */
.x-solo {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.5;
  margin: 4px 0 8px;
  padding: 12px 14px;
  background: var(--exchange-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}
.x-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.x-lang-tag {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.85;
  margin-left: 4px;
}
.x-turn {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 6px 8px;
  margin: 0 0 8px;
}
.x-turn:last-child { margin-bottom: 0; }
.x-role {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-top: 2px;
}
.x-turn.x-a .x-role { color: oklch(0.38 0.08 160); }
.x-text {
  min-width: 0;
  color: var(--ink-soft);
}
.q-ru, .q-en {
  margin: 0;
  padding: 12px 14px;
  background: var(--quote-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--quote-ink);
  line-height: 1.55;
  font-family: var(--font-read);
}
.q-ru { grid-column: 1; }
.q-en { grid-column: 2; }
.q-ru::before, .q-en::before {
  content: attr(data-lang);
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
/* Unaligned digests: each language shown whole, one column, nothing juxtaposed */
.lang-section { margin: 0 0 40px; }
.lang-section-title {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.theme-solo { max-width: 72ch; }
.s-solo { margin: 0 0 12px; font-size: 15.5px; line-height: 1.58; color: var(--ink); }
.q-solo {
  margin: 0 0 8px;
  padding: 12px 14px;
  background: var(--quote-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.55;
  color: var(--quote-ink);
  font-family: var(--font-read);
}
.q-solo::before {
  content: attr(data-lang);
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.q-solo-en { margin-top: -4px; margin-bottom: 14px; }

/* Famous / iconic quotes — same quote shell; badge only (no side stripe) */
.q-ru.famous, .q-en.famous,
.xq-ru.famous {
  /* Keep shared --quote-bg / border from .q-ru/.q-en; mark with badge only */
  box-shadow: none;
}
.famous-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--famous-badge);
  background: color-mix(in oklch, var(--famous-bg) 40%, white);
  border: 1px solid var(--famous-border);
  border-radius: 999px;
  padding: 1px 8px;
  margin: 0 0 8px;
}
.xq-ru.famous .famous-badge { margin-bottom: 6px; }
.famous-mark {
  font-size: 11px;
  color: var(--famous-badge);
  font-weight: 700;
}
.pill.famous-filter {
  font-weight: 600;
  color: var(--famous-badge);
  border-color: color-mix(in oklch, var(--famous-border) 70%, var(--border));
}
.pill.famous-filter.active {
  background: var(--famous-bg);
  border-color: var(--famous-border);
  color: var(--famous-ink);
}

/* Stack RU/EN only on phone shell — keep equal columns when the rail is open on desktop */
@media (max-width: 700px) {
  .theme-grid {
    display: block;
    background-image: none;
  }
  .theme-grid > * { margin-bottom: 10px; }
  .s-ru::before, .s-en::before {
    content: attr(data-lang);
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 4px;
  }
}

/* Markdown / colorize path (legacy body HTML) */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
  align-items: start;
  margin-top: 8px;
}
.lang-cell { min-width: 0; padding: 16px 0 18px; }
.lang-cell-ru {
  padding-right: 20px;
  border-right: 1px solid var(--border-soft);
}
.lang-cell-en { padding-left: 4px; }
.lang-grid > .lang-cell { border-top: 1px solid var(--border-soft); }
.lang-grid > .lang-cell:nth-child(1),
.lang-grid > .lang-cell:nth-child(2) { border-top: none; }
.lang-grid .lang-cell > h2:first-child { margin-top: 0; }

@media (max-width: 900px) {
  .lang-grid { grid-template-columns: 1fr; }
  .lang-cell-ru { border-right: none; padding-right: 0; }
  .lang-grid > .lang-cell:nth-child(2) { border-top: 1px solid var(--border-soft); }
}

#digest-content h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.18;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
#digest-content h2 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 650;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 28px 0 12px;
  padding: 0;
  background: none;
  border: none;
}
#digest-content h2.qa-theme {
  color: var(--ink);
  background: none;
  border: none;
}
#digest-content h2.qa-theme::after {
  content: " Q&A";
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  vertical-align: middle;
}
#digest-content p.kw-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 14px;
  font-family: var(--font-ui);
}
#digest-content .kw-tag {
  font-size: var(--chip-sm-size);
  padding: var(--chip-sm-pad-y) var(--chip-sm-pad-x);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  cursor: pointer;
}
#digest-content .kw-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
#digest-content h3 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 14px 0 8px;
}
#digest-content p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}
#digest-content strong { color: var(--ink); font-weight: 650; }
#digest-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
#digest-content ol, #digest-content ul {
  padding-left: 22px;
  margin-bottom: 12px;
}
#digest-content li {
  font-size: 15.5px;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Fallback colorize styles — unified quote system */
.line-en {
  background: var(--quote-bg);
  border: 1px solid var(--border-soft);
  padding: 8px 12px !important;
  margin: 6px 0 !important;
  color: var(--quote-ink) !important;
  border-radius: var(--radius-sm);
}
.line-ru-quote {
  color: var(--quote-ink);
  font-style: normal;
  background: var(--quote-bg);
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  margin: 6px 0;
  border-radius: var(--radius-sm);
  list-style: none;
}
.line-en strong { color: inherit !important; }

/* Loading skeleton (panel body + DigestListSkeleton) */
.loading {
  padding: 36px 44px;
  max-width: 720px;
}
.skel {
  height: 12px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border-soft) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: skel 1.2s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}
.skel.w60 { width: 60%; }
.skel.w80 { width: 80%; }
.skel.w90 { width: 90%; }
.skel.w40 { width: 40%; height: 20px; margin-bottom: 24px; }
@keyframes skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Static bone — used when animated count is capped above the fold */
.skel-static {
  height: 12px;
  background: var(--bg-soft);
  border-radius: 4px;
  margin-bottom: 12px;
}
.skel-static.w60 { width: 60%; }
.skel-static.w80 { width: 80%; }
.skel-static.w90 { width: 90%; }
.skel-static.w40 { width: 40%; }

/* DigestListSkeleton — geometry-matched sidebar rows */
.digest-list-skel {
  margin: 0;
  padding: 0;
}
.skel-digest-dh {
  padding: 11px 16px 7px;
  border-bottom: 1px solid var(--border-soft);
}
.skel-digest-dh .skel,
.skel-digest-dh .skel-static {
  height: 11px;
  width: 28%;
  margin-bottom: 0;
}
.skel-digest-row {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  border-left: 2px solid transparent;
}
.skel-digest-row .skel-kicker {
  height: 10px;
  width: 22%;
  margin-bottom: 8px;
}
.skel-digest-row .skel-title {
  height: 14px;
  margin-bottom: 0;
}
.skel-digest-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.skel-digest-chips .skel-chip {
  height: 14px;
  width: 52px;
  margin-bottom: 0;
  border-radius: 4px;
}
.skel-digest-chips .skel-chip.skel-chip-wide {
  width: 72px;
  border-radius: 999px;
}

/* Keyword cloud: map affordance */
.topic-cloud-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 4px 6px 0;
}
.kw-map-btn {
  font: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink-muted);
  cursor: pointer;
}
.kw-map-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Keyword map drawer (Style A — occurrence timeline) */
#wiki {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 92vw;
  height: 100%;
  background: var(--bg-rail);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
#wiki.open { transform: translateX(0); }
#wiki .wk-close {
  align-self: flex-end;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 12px 16px;
  line-height: 1;
}
#wiki .wk-close:hover { color: var(--ink); }
#wiki-body {
  padding: 0 0 28px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wk-h {
  font-family: var(--font-read);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  padding: 0 18px;
}
.wk-alias {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
  padding: 0 18px;
}
.wk-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
  padding: 0 18px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.wk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.wk-filter {
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.wk-filter:hover { color: var(--ink-soft); border-color: var(--ink-muted); }
.wk-filter.on {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
.wk-years {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
  padding: 10px 18px 4px;
}
.wk-years i {
  display: block;
  flex: 1;
  max-width: 12px;
  min-width: 4px;
  background: oklch(0.72 0.04 255);
  border-radius: 2px 2px 0 0;
}
.wk-years-cap {
  font-size: 10px;
  color: var(--ink-muted);
  padding: 0 18px 8px;
  border-bottom: 1px solid var(--border-soft);
}
.wk-tl {
  list-style: none;
  padding: 12px 0 8px;
  margin: 0;
  flex: 1;
}
.wk-tl li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 12px;
  padding: 0 16px 16px;
  position: relative;
}
.wk-tl li::before {
  content: "";
  position: absolute;
  left: 78px;
  top: 8px;
  bottom: -2px;
  width: 1px;
  background: var(--border-soft);
}
.wk-tl li:last-child::before { display: none; }
.wk-tl .wk-d {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  padding-top: 2px;
  text-align: right;
}
.wk-tl .wk-card {
  position: relative;
  padding: 0 0 0 14px;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.wk-tl .wk-card::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-rail);
  z-index: 1;
}
.wk-tl .wk-card:hover .wk-theme { color: var(--accent); }
.wk-tl .wk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.wk-spk {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-soft);
}
.wk-spk.lavrov { color: var(--spk-lavrov); }
.wk-spk.putin { color: var(--spk-putin); }
.wk-spk.zakharova { color: var(--spk-zakharova); }
.wk-fmt {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: 4px;
}
.wk-theme {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}
.wk-event {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 3px;
  line-height: 1.35;
}
.wk-co {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wk-co button,
button.wk-co-chip {
  font: inherit;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: none;
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
}
.wk-co button:hover,
button.wk-co-chip:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.wk-empty {
  padding: 20px 18px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
}
.wk-sec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 16px 18px 8px;
}
.wk-rel { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 18px; }
.wk-chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--bg-app);
}
.wk-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 640px) {
  #wiki { width: 100%; max-width: 100vw; }
  .wk-tl li { grid-template-columns: 64px 1fr; }
}

/* Focus + motion */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.search-wrap input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* DigestListSkeleton / panel .skel: static bones, no shimmer sweep */
  .skel {
    animation: none !important;
    background-image: none;
    background-color: var(--bg-soft);
    opacity: 1;
  }
}

@media (min-width: 701px) {
  body.nav-hidden .sidebar { display: none; }
}

@media (max-width: 700px) {
  html, body { height: auto; overflow: visible; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 8px 12px;
  }
  .logo-word span { display: none; }
  .search-wrap { order: 5; flex: 1 1 100%; max-width: none; }
  .layout { flex-direction: column; overflow: visible; }
  .sidebar { width: 100%; border-right: none; overflow: visible; }
  .sidebar-list { max-height: none; overflow: visible; }
  .panel { display: none; }
  body.reading .sidebar { display: none; }
  body.reading .panel { display: block; flex: none; overflow: visible; }
  #digest-content { padding: 20px 16px 48px; }
  .empty-state { padding: 28px 18px 40px; }
  .agenda-title { font-size: 22px; }
}

/* ── Separate transcript page (/t/<id>) — RU | EN table ── */
html.transcript-html,
html:has(body.transcript-page),
html.transcript-html body.transcript-page,
body.transcript-page {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: block !important;
}
body.transcript-page {
  background: var(--bg-read);
}
.transcript {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 28px 96px;
  font-family: var(--font-read);
  color: var(--ink);
}
.transcript-kicker {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.transcript-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 14px;
  text-wrap: balance;
}
.transcript-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.transcript-meta a {
  color: var(--accent);
  text-decoration: none;
}
.transcript-meta a:hover { text-decoration: underline; }
.transcript-note {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 52ch;
}
.transcript-page .theme-toc {
  margin-bottom: 22px;
}
.tr-theme-head td {
  border-bottom: none;
  padding: 22px 0 6px;
}
.tr-theme-label {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--accent);
  scroll-margin-top: 72px;
}
.tr-theme-num {
  display: inline-block;
  min-width: 1.4em;
  margin-right: 6px;
  color: var(--ink-muted);
  font-weight: 600;
}
.tr-theme-first td {
  border-top: none;
}
.tr-en-gloss {
  color: var(--ink-soft);
  font-size: 14.5px;
  white-space: pre-line;
}
.tr-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.tr-table thead th {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: left;
  padding: 0 18px 12px 0;
  border-bottom: 1px solid var(--border);
  width: 50%;
}
.tr-table thead th:last-child { padding-right: 0; padding-left: 18px; }
.tr-table td {
  vertical-align: top;
  font-size: 15.5px;
  line-height: 1.62;
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--border-soft);
  width: 50%;
}
.tr-table td:last-child {
  padding-right: 0;
  padding-left: 18px;
  border-left: 1px solid var(--border-soft);
}
.tr-table .tr-speaker {
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: 0.9em;
  color: var(--ink);
}
@media (max-width: 700px) {
  .transcript { padding: 28px 16px 72px; }
  .transcript-title { font-size: 22px; }
  .tr-table, .tr-table thead, .tr-table tbody, .tr-table th, .tr-table td, .tr-table tr {
    display: block;
    width: 100%;
  }
  .tr-table thead { display: none; }
  .tr-table td {
    padding: 10px 0;
    border-left: none !important;
    border-bottom: none;
  }
  .tr-table td.tr-ru {
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
  }
  .tr-table td.tr-en {
    padding-bottom: 16px;
    color: var(--ink-soft);
  }
  .tr-table td.tr-ru::before,
  .tr-table td.tr-en::before {
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 4px;
  }
  .tr-table td.tr-ru::before { content: "RU"; }
  .tr-table td.tr-en::before { content: "EN"; }
  .tr-table td.tr-en:empty { display: none; }
}


/* Paginated sidebar list */
.list-more {
  display: block;
  width: calc(100% - 1.25rem);
  margin: 0.5rem 0.625rem 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink-muted, #64748b);
  font: 500 0.8125rem/1.2 var(--font-ui);
  cursor: pointer;
}
.list-more:hover { color: var(--ink, #0f172a); border-color: var(--accent, #1e3a5f); }
