/* Cybercrime Visualization — ink on warm paper, light only. Colour means one thing: the kind of entity
   (actor, victim, indicator, wallet, CVE, tool). The time-window yellow marks what you're looking at. */
/* Schibsted Grotesk (SIL OFL, vendor/fonts/SchibstedGrotesk-OFL.txt): variable weight 400-900, no width axis,
   so the font-stretch values below have no effect. Latin + latin-ext split as published by fontsource. */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(vendor/fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(vendor/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(vendor/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  /* One theme, light. Warm paper page, white panels, near-black ink; colour is kept for meaning (the kind of entity,
     the source type of a document, the selected time window). Every pair is checked by scripts/contrast-check.py. */
  color-scheme: light;
  --page: #f6f6f3; --surface: #ffffff; --well: #f0f0ec; --ink: #14181d; --ink-2: #3f464e; --muted: #5a6068;
  --rule: #dddbd4; --grid: #ebeae5; --axis: #767d86; --focus: #1f4fbf; --select: #f2c230; --select-ink: #5a4700;
  --k-actor: #2f5bb7; --k-victim: #c4452f; --k-indicator: #00806f; --k-wallet: #9a6d00; --k-official: #8a2f66; --k-cve: #8a4fb3; --k-tool: #457a26;
  --k-report: #5f6a76; --k-place: #6f7c8a;
  --seq-0: #e3edf9; --seq-1: #b7d3f6; --seq-2: #86b6ef; --seq-3: #5598e7; --seq-4: #2a78d6; --seq-5: #1c5cab; --seq-6: #104281;
  --up: #a33a2a; --down: #1f6b3a;
  /* source types of news documents, in stack order (validated as a set: CVD-safe adjacent pairs, >= 3:1 on white) */
  --s-news: #256abf; --s-research: #d4561f; --s-social: #138a60; --s-linkedin: #6250d6; --s-digest: #a87200;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 4px;
  --edge: #737a82; --link: #1a4fae; --select-wash: #fdf3d4; --shadow: 0 10px 30px rgba(20, 24, 29, .12);
  --bar-h: 68px;   /* header height = sidebar title block height, so their bottom rules meet */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.5 var(--sans); font-stretch: 100%; }
a { color: var(--focus); text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: 0; word-break: break-all; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- frame */
.top { display: flex; align-items: center; justify-content: center; gap: 12px 8px; padding: 0 24px;   /* search centred */ min-height: var(--bar-h); flex-wrap: wrap;
  background: var(--surface); border-bottom: 1px solid var(--rule); }
.lab-link { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 18px 14px;
  color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.lab-link:hover { background: var(--well); color: var(--ink); }
.lab-link img { display: block; width: 194px; max-width: 100%; height: auto; }
.lab-link span { font-size: 12px; font-weight: 620; line-height: 1.25; }
/* title block at the top of the sidebar: title, then the subtitle on its own line */
.mark { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: var(--bar-h); padding: 10px 12px 10px 20px;
  text-decoration: none; color: var(--ink);
  font-weight: 760; font-size: 16px; letter-spacing: -.01em; line-height: 1.1; }   /* title and subtitle each fit the 240px sidebar on one line */
.mark small { font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; line-height: 1.25; }
/* page menu: a sidebar that stays beside the content; a tab row above it below 900px */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--rule); }
.main-col { min-width: 0; width: 100%; }
.content { min-width: 0; width: 100%; padding-top: 24px; overflow-x: clip; }
nav.pages { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; }
nav.pages a { position: relative; display: block; padding: 9px 14px; border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-weight: 520; }
nav.pages a:hover { background: var(--well); color: var(--ink); }
nav.pages .nav-badge { display: inline-block; min-width: 18px; margin-left: 8px; padding: 0 6px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 11.5px; font-weight: 650; line-height: 18px; text-align: center; vertical-align: 1px; }
nav.pages a[aria-current="page"] { background: var(--well); color: var(--ink); font-weight: 620; box-shadow: inset 3px 0 0 var(--ink); }
nav.pages.has-ind a[aria-current="page"] { box-shadow: none; }   /* the sliding bar takes over */
.nav-ind { position: absolute; top: 0; left: 0; background: var(--ink); pointer-events: none;
  transition: transform .28s cubic-bezier(.2, .7, .2, 1), width .28s cubic-bezier(.2, .7, .2, 1), height .28s cubic-bezier(.2, .7, .2, 1); }
.nav-ind.no-anim { transition: none; }
/* narrow: the sidebar's pieces become rows (display: contents lets them join the shell grid) */
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    grid-template-areas: "brand top" "mark top" "nav nav" "content content"; }
  .sidebar, .main-col { display: contents; }
  .lab-link { grid-area: brand; padding: 12px 16px 6px; border-bottom: 0; background: var(--surface); }
  .lab-link img { width: 180px; }
  .mark { grid-area: mark; background: var(--surface); padding: 10px 0 10px 20px; border-bottom: 1px solid var(--rule); }   /* part of the top bar here */
  .top { grid-area: top; }
  nav.pages { grid-area: nav; flex-direction: row; overflow-x: auto; scrollbar-width: none;
    padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--rule); }
  nav.pages a { padding: 12px 10px; white-space: nowrap; border-radius: 0; }
  nav.pages a:hover, nav.pages a[aria-current="page"] { background: none; }
  nav.pages a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
  .content { grid-area: content; padding-top: 20px; }
}
@media (max-width: 640px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "mark" "top" "nav" "content"; }
  .lab-link { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px 4px; }
  .lab-link img { width: min(170px, 52vw); }
  .lab-link span { max-width: 100px; }
  .mark { border-bottom: 0; padding: 12px 14px 0; min-height: 0; }
}
.find { position: relative; }
.find input { width: min(375px, 60vw); padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.find .results { position: absolute; left: 0; top: calc(100% + 4px);   /* opens rightward, away from the sidebar */ width: min(440px, 92vw); max-height: 70vh; overflow: auto; z-index: 30;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.find .results a { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; text-decoration: none; color: var(--ink); }
.find .results a:hover, .find .results a:focus { background: var(--well); outline: none; }
.find .results .grp { padding: 8px 12px 2px; color: var(--muted); font-size: 12px; }
.iconbtn { display: inline-flex; align-items: center; color: var(--ink); border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r); padding: 6px 9px; cursor: pointer; }

/* the time window: full history, brushed */
.window { margin: 0 24px; padding: 10px 14px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.window-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.window-title { font-stretch: 110%; font-weight: 650; font-size: 15px; }
.window-title span { font-weight: 450; color: var(--ink-2); font-stretch: 100%; margin-left: 8px; }
.window .presets { display: flex; gap: 4px; flex-wrap: wrap; }
.window .presets button { border: 1px solid transparent; background: none; padding: 3px 8px; border-radius: var(--r); cursor: pointer; color: var(--ink-2); }
.window .presets button:hover { background: var(--well); color: var(--ink); }
.window .presets button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.window .dates { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.window .dates input { border: 1px solid var(--rule); background: var(--surface); padding: 3px 6px; border-radius: var(--r); font-variant-numeric: tabular-nums; min-width: 0; max-width: 100%; }
.window .dates { flex-wrap: wrap; min-width: 0; }
.window.folded .timebar { display: none; }
.window .timebar-toggle, .window .bulk-note { font-size: 13px; }
.window .bulk-note { margin: 0; color: var(--ink-2); flex-basis: 100%; }
.timebar { position: relative; margin-top: 6px; height: 64px; touch-action: none; }
.timebar svg { display: block; width: 100%; height: 64px; overflow: visible; cursor: crosshair; }
.timebar .bar { fill: var(--axis); }
.timebar .bar.in { fill: var(--ink-2); }
.timebar .brushwin { fill: var(--select); fill-opacity: .38; stroke: var(--select-ink); stroke-width: 1; cursor: grab; }
.timebar .handle { fill: var(--select-ink); cursor: ew-resize; }
.timebar .grip { fill: transparent; cursor: ew-resize; }   /* invisible 24px targets around the handles */
.timebar .tick text, .chart .tick text { fill: var(--muted); font-size: 11px; font-stretch: 90%; }
.timebar .tick line, .chart .domain { stroke: var(--axis); }
.timebar .ev line { stroke: var(--ink); stroke-width: 1; }
.timebar .ev circle { fill: var(--ink); }
/* charts: periods with no data at all, and crawler hand-overs */
.nodata rect { fill: var(--muted); fill-opacity: .10; stroke: var(--muted); stroke-opacity: .45; stroke-dasharray: 3 3; }
.crawler-change line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.crawler-change text { fill: var(--muted); font-size: 11px; font-style: italic; }
/* News page: the years before news coverage starts */
.timebar .nocover rect { fill: var(--muted); fill-opacity: .10; }
.timebar .nocover text { fill: var(--muted); font-size: 12px; font-style: italic; }

main { width: 100%; max-width: none; padding: 32px 24px 64px; }
.loading main { opacity: .55; transition: opacity .2s; }
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main.enter { animation: page-enter .24s ease-out; }

/* ---------------------------------------------------------------- page type */
.lede { font-stretch: 112%; font-weight: 640; font-size: clamp(21px, 2.2vw, 28px); line-height: 1.22; letter-spacing: -.012em;
  max-width: 34ch; margin: 0 0 18px; text-wrap: balance; }
.lede-wide { max-width: 52ch; }
.sub { color: var(--ink-2); max-width: 78ch; margin: 0 0 18px; }
h2 { font-stretch: 105%; font-weight: 650; font-size: 16.5px; margin: 0 0 2px; letter-spacing: -.003em; }
h3 { font-weight: 620; font-size: 14.5px; margin: 14px 0 6px; }
.note { color: var(--muted); font-size: 13px; margin: 2px 0 10px; max-width: 80ch; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 0 0 36px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts div { display: flex; align-items: baseline; gap: 10px; }
.facts b { font-stretch: 108%; font-weight: 680; font-size: 20px; }
.facts span { color: var(--ink-2); font-size: 13.5px; }
.delta-up { color: var(--up); } .delta-down { color: var(--down); }

/* ---------------------------------------------------------------- panels */
.grid { display: grid; width: 100%; gap: 28px 24px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
@media (max-width: 1100px) { .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; } }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 24px 24px; min-width: 0; }
.panel.flat { background: none; border: 0; padding: 0; }
.panel-head { display: flex; align-items: flex-start; gap: 12px; }
.panel-head .grow { flex: 1; min-width: 0; }
/* collapsible panels: the header is a disclosure button; the body animates between 0 and its natural height */
.disclose { all: unset; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; max-width: 100%; border-radius: var(--r); }
.disclose:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.disclose:hover span { text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; }
.disclose .chev { flex: none; display: inline-flex; color: var(--muted); transition: transform .18s ease; }
.panel.collapsed .disclose .chev { transform: rotate(-90deg); }
.panel-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .2s ease; }
.panel-inner { min-height: 0; overflow: hidden; padding: 3px; margin: -3px; }   /* padding keeps focus rings unclipped */
.panel.collapsed .panel-body { grid-template-rows: 0fr; }
.panel.collapsed .panel-inner { visibility: hidden; transition: visibility 0s .2s; }  /* out of tab order once closed */
.panel.collapsed .toggle { display: none; }
.panel.collapsible.collapsed { padding-bottom: 20px; }
.panel.collapsible .panel-head h2 { margin: 0; }
.panel.collapsible .panel-inner > .note:first-child { margin: 8px 0 18px; }
.grid { align-items: start; }   /* a collapsed panel doesn't stretch to its open neighbour's height */
.toggle { border: 1px solid var(--rule); background: none; border-radius: var(--r); font-size: 12.5px; padding: 2px 8px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.toggle:hover { color: var(--ink); border-color: var(--axis); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--grid); }
.chart .zero { stroke: var(--axis); }
.empty { padding: 28px 0; color: var(--muted); }

/* tooltip */
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--rule);
  border-radius: var(--r); box-shadow: 0 6px 20px rgba(0,0,0,.16); padding: 7px 10px; font-size: 13px; max-width: 340px; display: none; }
.tip .t { color: var(--ink-2); font-size: 12px; margin-bottom: 2px; }
.tip .v { font-weight: 680; font-size: 15px; font-variant-numeric: tabular-nums; }
.tip .row { display: flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.tip .key { width: 12px; height: 2px; display: inline-block; }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-stretch: 94%; }
th { text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--rule); padding: 6px 8px; white-space: nowrap; position: sticky; top: 0; background: var(--surface); z-index: 1; }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--focus); }
td { padding: 6px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--well); }
.scroll { max-height: 460px; overflow: auto; }
.tablebar { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; flex-wrap: wrap; }
.tablebar input { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r); padding: 5px 8px; min-width: 220px; }
.table-actions { display: flex; justify-content: flex-end; align-items: center; margin: 4px 0 8px; }
.download-csv { min-height: 34px; padding: 5px 11px; border: 1px solid var(--edge); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.download-csv:hover { background: var(--well); }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 8px; color: var(--ink-2); font-size: 13px; }
.pager button { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r); padding: 3px 9px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

/* entity chips: colour + a shape, never colour alone */
.kind { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.kind i { width: 9px; height: 9px; display: inline-block; flex: none; }
.kind.actor i { background: var(--k-actor); border-radius: 50%; }
.kind.group i { border: 2px solid var(--k-actor); border-radius: 50%; }
.kind.victim i { background: var(--k-victim); }
.kind.indicator i { background: var(--k-indicator); transform: rotate(45deg) scale(.85); }
.kind.wallet i { background: var(--k-wallet); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.kind.cve i { background: var(--k-cve); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.kind.tool i, .kind.technique i, .kind.malware i { background: var(--k-tool); border-radius: 2px; }
.kind.malware i { background: none; border: 2px solid var(--k-tool); }
.kind.report i { background: var(--k-report); border-radius: 1px; width: 7px; height: 10px; }
.kind.country i, .kind.sector i { background: var(--k-place); border-radius: 50%; width: 7px; height: 7px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin: 6px 0; }
.tag { display: inline-block; font-size: 12px; padding: 0 6px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink-2); white-space: nowrap; }
.tag.kev { border-color: var(--k-cve); color: var(--ink); }
.conf { font-variant-numeric: tabular-nums; }

/* overview pieces */
.hbar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 6px 12px; align-items: center; font-size: 13.5px; }
.hbar a, .hbar span.l { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar a:hover { text-decoration: underline; }
.hbar .track { height: 12px; position: relative; }
.hbar .fill { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 0 3px 3px 0; background: var(--ink-2); }
.hbar .fill.actor { background: var(--k-actor); }
.hbar .fill.victim { background: var(--k-victim); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 4ch; }
.hbar .v small { color: var(--muted); margin-left: 6px; }
.scale { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.scale .ramp { display: flex; height: 8px; width: 160px; }
.scale .ramp span { flex: 1; }
.scale.binned { flex-wrap: wrap; gap: 4px 14px; }
.scale.binned .swatch { margin-right: 5px; }

/* timeline */
.lanes .lane-label { font-size: 13px; font-weight: 560; fill: var(--ink-2); }
.lanes .ev { cursor: pointer; }
.picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.picker select, .picker input { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r); padding: 5px 8px; }
.evlist { max-height: 420px; overflow: auto; }
.evlist li { padding: 6px 0; border-bottom: 1px solid var(--grid); list-style: none; }
.evlist ul { margin: 0; padding: 0; }
.evlist time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; font-size: 13px; }

/* graph */
.graph-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
@media (max-width: 1000px) { .graph-wrap { grid-template-columns: 1fr; } }
.graph-canvas { position: relative; height: min(70vh, 720px); min-height: 420px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.graph-canvas svg { width: 100%; height: 100%; display: block; cursor: grab; }
.graph-canvas .link { stroke: var(--axis); stroke-opacity: .9; }
.graph-canvas .link.path { stroke: var(--select-ink); stroke-width: 3; }
.graph-canvas .node text { font-size: 11px; fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; pointer-events: none; }
.graph-canvas .node.center text, .graph-canvas .node.hl text { fill: var(--ink); font-weight: 650; font-size: 12.5px; }
.graph-canvas .node { cursor: pointer; }
.graph-canvas .node .ring { fill: none; stroke: var(--select-ink); stroke-width: 2.5; }
.graph-canvas .more { fill: var(--well); stroke: var(--axis); stroke-dasharray: 3 2; }
.graph-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.graph-tools input { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r); padding: 5px 8px; width: 210px; }
.graph-actor-picker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 620; color: var(--ink-2); }
.graph-actor-picker .select-wrap { position: relative; display: inline-flex; min-width: min(300px, 72vw); }
.graph-actor-picker .select-wrap::after { content: ""; position: absolute; right: 11px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.graph-actor-picker select { width: 100%; min-height: 34px; appearance: none; border: 1px solid var(--edge); border-radius: var(--r);
  padding: 5px 34px 5px 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.graph-path-label { margin-left: 8px; font-size: 14px; font-weight: 620; color: var(--ink-2); }
.graph-tools button, .btn { border: 1px solid var(--ink); background: var(--ink); color: var(--surface); border-radius: var(--r); padding: 5px 11px; cursor: pointer; font-weight: 560; }
.btn.secondary { background: none; color: var(--ink); border-color: var(--rule); }
.side { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; max-height: min(70vh, 720px); overflow: auto; }
.side dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13.5px; margin: 8px 0; }
.side dt { color: var(--muted); }
.side dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-2); }
.suggest { position: relative; display: inline-block; }
.suggest .results { position: absolute; left: 0; top: calc(100% + 2px); z-index: 20; width: 320px; max-height: 300px; overflow: auto;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.suggest .results button { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 10px; cursor: pointer; }
.suggest .results button:hover, .suggest .results button:focus { background: var(--well); outline: none; }

/* actor profile */
.profile-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.profile-head h1 { font-stretch: 120%; font-weight: 760; font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -.02em; margin: 0; line-height: 1.05; }
.aka { color: var(--ink-2); margin: 6px 0 0; max-width: 90ch; }
.ttp { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ttp section h4 { margin: 0 0 4px; font-size: 13px; font-weight: 650; color: var(--ink-2); font-stretch: 95%; }
.ttp ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ttp li { padding: 2px 0 2px 8px; border-left: 2px solid var(--k-tool); margin-bottom: 3px; }
.ttp li small { color: var(--muted); }
.members li { margin-bottom: 4px; }
.evidence { font-size: 13px; color: var(--ink-2); }

/* sources / pipeline */
.layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 4px 0 20px; }
@media (max-width: 900px) { .layers { grid-template-columns: 1fr; } }
.layer { padding: 12px 16px 14px; border-left: 3px solid var(--ink); background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.layer:last-child { border-right: 1px solid var(--rule); }
.layer .n { font-stretch: 110%; font-weight: 700; font-size: 13px; color: var(--muted); }
.layer h3 { margin: 2px 0 6px; font-size: 15.5px; }
.layer ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--ink-2); }
.status-ok::before { content: "✓ "; color: var(--down); font-weight: 700; }
.status-failed::before { content: "✕ "; color: var(--up); font-weight: 700; }
.doc-text { white-space: pre-wrap; font-size: 14px; line-height: 1.6; max-width: 80ch; }
.doc-text mark { background: none; border-bottom: 2px solid var(--focus); color: inherit; padding: 0 1px; }
.doc-text mark.actor { border-color: var(--k-actor); } .doc-text mark.cve { border-color: var(--k-cve); }
.doc-text mark.country { border-color: var(--k-place); } .doc-text mark.money, .doc-text mark.volume { border-color: var(--k-wallet); }
.doc-text mark.btc, .doc-text mark.eth { border-color: var(--k-wallet); }
.doc-text mark.invalid { border-bottom-style: dotted; }

dialog { border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink); max-width: min(860px, 94vw); padding: 18px 20px; }
dialog::backdrop { background: rgba(10, 16, 24, .45); }
footer { width: 100%; max-width: none; padding: 0 24px 36px; color: var(--muted); font-size: 12.5px; }

@media (max-width: 640px) {
  .top { padding: 10px 14px 12px; gap: 10px 12px; min-height: 0; }
  .window { margin: 0 12px; }
  main { padding: 22px 12px 44px; }
  .panel { padding: 16px 16px 18px; }
  .grid { gap: 20px; }
  .window .dates { margin-left: 0; }
  .window .dates input { width: 9.6em; }
  .hbar { grid-template-columns: minmax(80px, 38%) 1fr auto; }
  footer { padding: 0 12px 30px; }
  .graph-actor-picker { width: 100%; align-items: stretch; flex-direction: column; gap: 4px; }
  .graph-actor-picker .select-wrap { width: 100%; min-width: 0; }
  .graph-path-label { width: 100%; margin: 8px 0 0; }
  .table-actions { justify-content: stretch; }
  .download-csv { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 640px) {
  .find { flex: 1; min-width: 0; }
  .find input { width: 100%; }
  .find .results { left: 0; right: 0; width: auto; }   /* match the search box so the list stays on screen */
}
.callout { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px;
  background: var(--surface); border-left: 3px solid var(--select); border-radius: 0 var(--r) var(--r) 0; }
.kind.technique i { width: 6px; height: 6px; }
.nowrap { white-space: nowrap; }
.tablewrap { overflow-x: auto; max-width: 100%; }
.panel, .grid > * { min-width: 0; }
.date-err { color: var(--k-victim); font-size: 13px; }
.date-err:empty { display: none; }
input[type="date"]:invalid { border-color: var(--k-victim); }

/* ---------------------------------------------------------------- accessibility layer
   Added alongside the sidebar redesign. Everything here either carries information that was
   previously colour-only, or gives a pointer-only action a keyboard and screen-reader path.
   Colour values were checked against WCAG 2.2 AA; see docs/accessibility.md. */

/* Visible only to screen readers: the live region, table captions and the search label. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 2.4.1 Bypass blocks: first in the tab order, visible once focused. */
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: var(--r);
  background: var(--ink); color: var(--page); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* The small-caps line above each page's h1 (App.head). */
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* How old the data is, and whether the live refresh is running. Shape as well as colour: the dot
   has a border in both states, and the words beside it say the same thing. */
.fresh { margin: 14px 0 0; padding: 0 2px; color: var(--muted); font-size: 12px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
.fresh .dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; border: 1px solid var(--edge); display: inline-block; flex: none; }
.fresh .dot.on { background: var(--down); border-color: var(--down); }
.fresh .dot.off { background: var(--up); border-color: var(--up); }
.fresh .dot.warn { background: var(--select); border-color: var(--select-ink); }

/* New data has arrived. The page never re-renders by itself (2.2.2); this offers the change instead. */
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 14px;
  border: 1px solid var(--select); border-radius: var(--r); background: var(--select-wash); color: var(--ink); }
.notice.hidden { display: none; }
.notice span { flex: 1; min-width: 200px; }

/* A button that reads as a link, used where the action is in-page (3.2.4). */
.linklike { all: unset; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linklike:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 2.5.7 Dragging movements: the graph's pan and zoom also work as buttons. */
.graph-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }   /* above the graph's nodes */
.graph-zoom button { width: 34px; height: 34px; border: 1px solid var(--edge); border-radius: var(--r);
  background: var(--surface); color: var(--ink); cursor: pointer; font-size: 16px; line-height: 1; }
.graph-zoom button:hover { background: var(--well); }

/* 2.4.7 Focus visible: one ring everywhere, including controls that invert on press. */
:where(a, button, input, select, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip:focus-visible { outline-offset: -3px; }

@media print {
  .sidebar, .top, .notice, .window .presets, .graph-zoom { display: none; }
  .shell, .main-col, .content { display: block; }
  a[href^="#"]::after { content: ""; }
}

/* ---------------------------------------------------------------- news & clusters */
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend li { list-style: none; }
ul.legend { padding: 0; }
/* source type of a document: a coloured square + its name (never colour alone) */
.stype { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12.5px; color: var(--ink-2); }
.stype i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.stype.news i { background: var(--s-news); } .stype.research i { background: var(--s-research); }
.stype.social i { background: var(--s-social); border-radius: 50%; } .stype.linkedin i { background: var(--s-linkedin); }
.stype.digest i { background: none; border: 2px solid var(--s-digest); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.facts dd { margin: 0; }
.facts dd b a { color: inherit; }
/* one row of filters above the charts */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 22px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.filters .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filters .field.grow { flex: 1 1 220px; }
.filters label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.filters select, .filters input, .tablebar select { min-height: 34px; border: 1px solid var(--edge); background: var(--surface); border-radius: var(--r); padding: 4px 8px; max-width: 100%; }
.filters .btn { min-height: 34px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.grid > .stack > .panel { grid-column: auto; }
.grid > .callout { grid-column: 1 / -1; }   /* a 'not loaded' note spans the row, not one column */
/* ranked stories */
ol.stories { list-style: none; margin: 4px 0 0; padding: 0; }
.story { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px 12px; padding: 14px 0 16px; border-top: 1px solid var(--grid); }
.story:first-child { border-top: 0; }
.story .rank { font: 650 15px/1.5 var(--mono); color: var(--muted); text-align: right; padding-top: 1px; }
.story h3 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.35; font-weight: 640; }
.story h3 a { color: var(--ink); text-decoration: none; }
.story h3 a:hover { text-decoration: underline; text-decoration-color: var(--axis); }
.story-meta { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.story-sum { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; max-width: 86ch;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
a.tag { text-decoration: none; color: var(--ink-2); line-height: 22px; padding: 0 8px; border-color: var(--edge); }
a.tag:hover { color: var(--ink); background: var(--well); }
.tag.actor { border-color: var(--k-actor); }
.tag.mono { font-family: var(--mono); font-size: 11.5px; }
.crumbs { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.story-lead { max-width: 80ch; font-size: 15.5px; }
ol.members-list { list-style: none; margin: 0; padding: 0; }
.members-list li { padding: 12px 0; border-top: 1px solid var(--grid); }
.members-list li:first-child { border-top: 0; padding-top: 2px; }
.members-list p { margin: 0 0 4px; }
.m-head { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.m-title { font-weight: 600; }
.m-ex { color: var(--ink-2); font-size: 14px; max-width: 84ch; }
.side-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 4px 0; font-size: 13.5px; }
.side-dl dt { color: var(--muted); }
.side-dl dd { margin: 0; min-width: 0; }
.outlets { font-size: 13px; color: var(--ink-2); margin: 0; }
.news-mini li { padding: 8px 0; border-top: 1px solid var(--grid); list-style: none; }
.news-mini li:first-child { border-top: 0; }
.news-mini { margin: 0; padding: 0; }
.news-mini .story-meta { margin: 2px 0 0; }
.feed-ok::before { content: "✓ "; color: var(--down); font-weight: 700; }
.feed-failed::before { content: "✕ "; color: var(--up); font-weight: 700; }
.feed-never::before { content: "– "; color: var(--muted); font-weight: 700; }
@media (max-width: 1100px) { .span-8.stack, .span-4.stack { grid-column: span 12; } }
@media (max-width: 640px) {
  .filters { padding: 12px; }
  .filters .field { flex: 1 1 140px; }
  .filters select { width: 100%; }
  .story { grid-template-columns: 1.6em minmax(0, 1fr); gap: 4px 8px; }
}
/* narrow side columns: let bar labels wrap instead of cutting them off */
.stack .hbar { grid-template-columns: minmax(110px, 46%) 1fr auto; }
.stack .hbar a, .stack .hbar span.l { white-space: normal; overflow: visible; line-height: 1.25; }
/* keyboard-reachable scrolling boxes show where focus is */
.scroll:focus-visible, .tablewrap:focus-visible, .evlist:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* inside a scrolling box, the box scrolls both ways: one keyboard stop, not two nested ones */
.scroll .tablewrap { overflow-x: visible; }
.dead-link { color: var(--muted); font-size: .9em; }
.form-status { margin: -12px 0 18px; color: var(--up); font-size: 13.5px; }
.form-status:empty { display: none; }

/* ---------------------------------------------------------------- crime statistics */
.kind.official i { background: var(--k-official); width: 8px; height: 8px; }
.tag.official { border-color: var(--k-official); color: var(--ink); margin-left: 6px; font-size: 11.5px; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 22px; padding: 0 0 10px; border-bottom: 1px solid var(--rule); }
.subnav a { padding: 6px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 520; }
.subnav a:hover { background: var(--well); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 620; }
@media (max-width: 640px) { .subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; } .subnav a { white-space: nowrap; } }
.note.takeaway { color: var(--ink); font-size: 14.5px; font-weight: 560; margin: 8px 0 8px; max-width: 90ch; }
.note.takeaway:empty { display: none; }
.caveat { margin: 0 0 12px; padding-left: 10px; border-left: 3px solid var(--select); color: var(--ink-2); font-size: 13px; max-width: 90ch; }
.source { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.facts.nomargin { margin-bottom: 4px; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin-bottom: 4px; }
.seg { display: inline-flex; margin: 0 0 12px; border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 12px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 22px; }
.mini { margin: 0; min-width: 0; }
.mini h3 { margin: 0 0 4px; }
.mini .note { margin: 4px 0 0; }
table.matrix th, table.matrix td { text-align: right; }
table.matrix th[scope="row"] { text-align: left; white-space: normal; min-width: 150px; position: sticky; left: 0; z-index: 2; background: var(--surface); }
table.matrix thead th small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
table.matrix td.none { color: var(--muted); }
table.matrix td a { color: var(--ink); }
table.matrix td.lv1 { background: var(--seq-0); } table.matrix td.lv2 { background: var(--seq-1); } table.matrix td.lv3 { background: var(--seq-2); }
details .desc { margin: 4px 0 0; max-width: 70ch; white-space: normal; font-size: 13px; color: var(--ink-2); }
summary { cursor: pointer; color: var(--link); }
.srccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.srccard { padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--r); min-width: 0; }
.srccard h3 { margin: 0 0 4px; } .srccard h4 { margin: 10px 0 4px; font-size: 13px; } .srccard p { margin: 4px 0; }
.beyond { margin: 0 0 28px; }
.beyond h2 { margin-bottom: 6px; }
.beyond .facts { margin: 6px 0 4px; }
