/* gruff scanner UI. Tokens, fonts, header, buttons and footer live in base.css. */

main { container-type: inline-size; position: relative; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); outline: none; }
main:focus, main:focus-visible { outline: none; }

/* ------------------------------------------------------------ display type */
.display {
  font-family: var(--serif); font-weight: 300; color: var(--ink); margin: 0;
  letter-spacing: -0.035em; line-height: 0.95; font-optical-sizing: auto;
}
.display em { font-style: italic; color: var(--muted); font-weight: 300; }

/* ------------------------------------------------------------ hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center;
  padding: clamp(56px, 10vw, 128px) 0 clamp(56px, 8vw, 104px);
}
.hero-copy { display: grid; gap: 30px; min-width: 0; }
.hero h1 { font-size: clamp(52px, 9.4cqi, 128px); }
.hero h1 em { display: block; padding-left: 0.04em; }
.hero .lede { font-size: clamp(16px, 1.55cqi, 19px); line-height: 1.65; color: var(--text); max-width: 34em; margin: 0; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .orbit-wrap { max-width: 420px; justify-self: center; width: 100%; } }

/* the scan instrument: four stages on a ring, a sweep, a live count */
.orbit-wrap { container-type: inline-size; min-width: 0; }
.orbit { width: 100%; height: auto; display: block; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.orbit .ring-2 { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.orbit .ticks line { stroke: var(--line-2); stroke-width: 1; }
.orbit .arm { transform-origin: 200px 200px; animation: sweep 9s linear infinite; }
.orbit .arm path { fill: url(#sweepfade); }
.orbit .arm line { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.orbit .node circle { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; transition: stroke .4s, fill .4s; }
.orbit .node .halo { fill: none; stroke: var(--line); }
.orbit .node text { font-family: var(--mono); font-size: 10.5px; fill: var(--ink); letter-spacing: 0.04em; }
.orbit .node .nm { font-family: var(--mono); font-size: 9.5px; fill: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.orbit .node.lit circle:not(.halo) { stroke: var(--ink); }
.orbit .node.lit .halo { stroke: var(--signal); }
.orbit .core-n { font-family: var(--serif); font-weight: 300; font-size: 76px; fill: var(--ink); letter-spacing: -0.03em; }
.orbit .core-l { font-family: var(--mono); font-size: 9.5px; fill: var(--muted); letter-spacing: 0.22em; }
.orbit .blip { fill: var(--signal); }
.orbit .hub { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.orbit .blip-ring { fill: none; stroke: var(--signal); animation: ping 2.4s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }

/* ------------------------------------------------------------ scan box */
.scanbox {
  display: flex; align-items: stretch; max-width: 680px; background: var(--surface);
  border: 1px solid var(--line-2); padding: 5px; box-shadow: var(--shadow);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.scanbox:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 7%, transparent), var(--shadow); }
.scanbox .prefix { display: flex; align-items: center; padding: 0 2px 0 14px; color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.scanbox input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-family: var(--mono); font-size: 15px; font-weight: 400; padding: 12px 12px; color: var(--ink); }
.scanbox input::placeholder { color: var(--dim); }
.scanbox .btn { height: auto; min-height: 46px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 0; max-width: 680px; }
.hint code { font-family: var(--mono); font-size: 12px; color: var(--ink); background: var(--surface-2); padding: 1px 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips > .dim { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-right: 4px; }
.chip {
  border: 1px solid var(--line-2); background: transparent; padding: 5px 11px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; color: var(--text);
  transition: color .25s, border-color .25s, background-color .25s;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.error-banner {
  border: 1px solid color-mix(in srgb, var(--malicious) 45%, transparent); border-left-width: 3px;
  background: color-mix(in srgb, var(--malicious) 7%, var(--bg)); color: var(--ink);
  padding: 12px 16px; max-width: 680px; margin: 0; font-size: 14px;
}

/* ------------------------------------------------------------ stats row */
.ticker {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 24px;
}
.ticker > div { padding: 26px 24px 22px 0; }
.ticker > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.ticker .n { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 18cqi, 54px); line-height: 1; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.ticker .l { margin-top: 10px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .ticker { grid-template-columns: 1fr 1fr; }
  .ticker > div, .ticker > div + div { padding: 20px 14px 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .ticker > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .ticker > div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ------------------------------------------------------------ sections */
.section { margin: clamp(72px, 10vw, 128px) 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px 56px; align-items: end; margin-bottom: 40px; }
.section-head .kicker { grid-column: 1 / -1; margin: 0 0 -6px; }
.section-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5.6cqi, 68px); line-height: 1; letter-spacing: -0.03em; margin: 0; color: var(--ink); }
.section-head h2 em { font-style: italic; color: var(--muted); }
.section-head p { margin: 0; color: var(--muted); max-width: 46ch; font-size: 15px; }
.section-head .btn { justify-self: start; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); }

/* full-bleed inverted band (ink on paper becomes paper on ink) */
.band {
  --bg: #111111; --bg-2: #161615; --surface: #191918; --surface-2: #21211f;
  --ink: #f2f0ea; --text: #d9d6cd; --muted: #9b998f; --dim: #6c6a64;
  --line: #2a2927; --line-2: #3b3a36; --on-ink: #111111; --signal: #ff5b3a;
  background: var(--bg); color: var(--text);
  margin-inline: calc(50% - 50vw); padding: clamp(72px, 10vw, 128px) calc(50vw - 50%);
}
:root[data-theme="dark"] .band { --bg: #191918; --surface: #1e1e1c; --line: #2f2e2b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band { --bg: #191918; --surface: #1e1e1c; --line: #2f2e2b; } }
.band.section { margin-top: clamp(72px, 10vw, 128px); }

/* ------------------------------------------------------------ recent cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; }
.scard {
  display: grid; gap: 12px; padding: 22px 0 26px; text-decoration: none; position: relative;
  border-top: 1px solid var(--line);
}
.scard::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease);
}
.scard:hover::before { transform: scaleX(1); }
.scard .top-row { display: flex; justify-content: space-between; align-items: center; }
.scard .repo { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); word-break: break-word; transition: color .3s; }
.scard:hover .repo { color: var(--signal); }
.scard .meta { display: flex; justify-content: space-between; color: var(--dim); font-family: var(--mono); font-size: 11.5px; }
.scard .why { color: var(--muted); font-size: 14px; min-height: 1.6em; }

/* verdict / severity tags: square, monospace, a single dot of colour */
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 8px 3px 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  background: color-mix(in srgb, var(--c) 7%, transparent); width: fit-content; white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.l-malicious { --c: var(--malicious); }
.l-suspicious { --c: var(--suspicious); }
.l-benign { --c: var(--benign); }
.l-unknown { --c: var(--unknown); }
.s-critical { --c: var(--critical); }
.s-high { --c: var(--high); }
.s-medium { --c: var(--medium); }
.s-low { --c: var(--low); }
.s-info { --c: var(--info); }
.l-malicious.pill::before { animation: blink 1.4s var(--ease) infinite; }

/* ------------------------------------------------------------ how it works (inside the band) */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 32px; }
.stage-cell { padding: 22px 0 8px; border-top: 1px solid var(--line-2); position: relative; }
.stage-cell::before { content: ""; position: absolute; top: -1px; left: 0; width: 32px; height: 1px; background: var(--signal); }
.stage-cell .num { font-family: var(--mono); color: var(--muted); font-size: 11px; letter-spacing: 0.16em; }
.stage-cell h3 { margin: 26px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -0.02em; color: var(--ink); }
.stage-cell p { margin: 0; color: var(--muted); font-size: 14.5px; }
.stage-cell ul { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.stage-cell li { font-family: var(--mono); font-size: 11px; color: var(--text); border: 1px solid var(--line-2); padding: 2px 7px; }

/* ------------------------------------------------------------ page heads */
.dossier-head { padding: clamp(48px, 8vw, 96px) 0 8px; display: grid; gap: 18px; }
.dossier-head .kicker { margin-bottom: 4px; }
.dossier-head h1 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 7.4cqi, 96px); letter-spacing: -0.035em; line-height: 0.98; color: var(--ink); word-break: break-word; }
.dossier-head h1 .org, .dossier-head h1 em { color: var(--muted); font-style: italic; }
.dossier-head > p.muted { font-size: 16.5px; line-height: 1.65; }
.rowline { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; color: var(--muted); font-size: 14px; }
.rowline + .rowline { margin-top: 6px; }
.sha {
  font-family: var(--mono); font-size: 12px; padding: 4px 9px; background: var(--surface);
  border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; transition: border-color .25s;
}
.sha:hover { border-color: var(--ink); }
.tag { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border: 1px solid var(--line-2); color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; white-space: nowrap; }
.tag.fresh { color: var(--benign); border-color: color-mix(in srgb, var(--benign) 45%, transparent); }
.tag.warn { color: var(--suspicious); border-color: color-mix(in srgb, var(--suspicious) 45%, transparent); }

/* ------------------------------------------------------------ live job */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; margin-top: 36px; }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; } }
.pcol { display: grid; gap: 0; align-content: start; border-top: 1px solid var(--ink); padding-top: 14px; }
.pcol h3 { margin: 0 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); font-weight: 500; display: flex; justify-content: space-between; }
.node {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; font-size: 14px; color: var(--text);
  border-bottom: 1px solid var(--line); transition: color .3s;
}
.node .dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; transition: background-color .3s, border-color .3s; }
.node .cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
.node.running { color: var(--ink); }
.node.running .dot { background: var(--signal); border-color: var(--signal); animation: blink 0.9s infinite; }
.node.running .cnt { color: var(--signal); }
.node.passed .dot { background: var(--benign); border-color: var(--benign); }
.node.flagged .dot { background: var(--high); border-color: var(--high); }
.node.flagged .cnt { color: var(--high); }
.node.incomplete .dot { background: var(--suspicious); border-color: var(--suspicious); }
.node.error .dot { background: var(--malicious); border-color: var(--malicious); }
.node.skipped { opacity: 0.45; }
.node.skipped .dot { border-style: dashed; }

.meter { margin-top: 32px; display: grid; gap: 12px; }
.meter-bar { height: 2px; background: var(--line); overflow: hidden; }
.meter-bar > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .8s var(--ease); }
.meter-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.scanning-line { height: 1px; margin-top: 28px; background: linear-gradient(90deg, transparent, var(--signal), transparent); background-size: 35% 100%; background-repeat: no-repeat; animation: scanline 1.8s var(--ease) infinite; }
@keyframes scanline { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ------------------------------------------------------------ verdict */
.verdict {
  margin-top: 40px; display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  border: 1px solid var(--line-2); background: var(--surface); position: relative; box-shadow: var(--shadow);
}
.verdict::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: var(--c); }
@media (max-width: 820px) { .verdict { grid-template-columns: 1fr; } }
.verdict-gauge { container-type: inline-size; min-width: 0; padding: 40px 28px 32px; display: grid; justify-items: center; align-content: start; gap: 4px; border-right: 1px solid var(--line); }
@media (max-width: 820px) { .verdict-gauge { border-right: 0; border-bottom: 1px solid var(--line); } }
.gauge { width: min(240px, 100%); height: auto; aspect-ratio: 230 / 150; overflow: visible; }
.gauge .track { stroke: var(--line); }
.gauge .tick { stroke: var(--line-2); }
.gauge .arc { stroke: var(--c); transition: stroke-dashoffset 1.6s var(--ease); }
.gauge .score { fill: var(--ink); font-family: var(--serif); font-weight: 300; letter-spacing: -0.02em; }
.gauge .cap { fill: var(--muted); font-family: var(--mono); }
.verdict-label {
  font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--c);
  font-size: clamp(30px, var(--label-fit, 15cqi), 76px); line-height: 1; letter-spacing: -0.03em;
  white-space: nowrap; max-width: 100%; text-transform: capitalize; margin-top: 4px;
}
.l-malicious .verdict-label { --label-fit: 20cqi; }
.l-suspicious .verdict-label { --label-fit: 18cqi; }
.l-benign .verdict-label { --label-fit: 24cqi; }
.l-unknown .verdict-label { --label-fit: 24cqi; }
.verdict-src { text-align: center; margin-top: 10px; font-family: var(--mono); font-size: clamp(9px, 3.4cqi, 10.5px); color: var(--dim); text-transform: uppercase; letter-spacing: 0.14em; }
.verdict-body { container-type: inline-size; min-width: 0; padding: 40px 40px 36px; display: grid; gap: 16px; align-content: start; }
.verdict-body .kicker { margin: 0; }
.verdict-body h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 5cqi, 40px); letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); }
.verdict-body > p { margin: 0; color: var(--text); max-width: 68ch; }
.verdict-body .coverage { margin: 4px 0 8px; padding: 10px 14px; border-left: 2px solid var(--c, var(--line-2)); background: var(--bg-2); font-size: 14px; }
.reasons { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.reasons li { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.reasons li:last-child { border-bottom: 1px solid var(--line); }
.reasons a { text-decoration: none; color: var(--ink); }
.reasons a:hover .rt { text-decoration: underline; }
.reasons .rw { display: block; color: var(--dim); font-family: var(--mono); font-size: 11.5px; word-break: break-all; margin-top: 2px; }
.reasons .ok { --c: var(--benign); }
@media (max-width: 560px) { .verdict-body { padding: 28px 22px; } .reasons li { grid-template-columns: 1fr; gap: 6px; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { container-type: inline-size; min-width: 0; padding: 22px 20px 20px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi .n { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3vw, 42px); line-height: 1; letter-spacing: -0.025em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.kpi .l { margin-top: 10px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); overflow-wrap: anywhere; }
.kpi .s { margin-top: 4px; font-size: 12.5px; color: var(--dim); }

/* ------------------------------------------------------------ checks */
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.ccard { padding: 20px 0 24px; display: grid; gap: 10px; align-content: start; border-top: 1px solid var(--line); }
.ccard header { display: flex; align-items: center; gap: 10px; }
.ccard h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -0.015em; color: var(--ink); }
.ccard .stage { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; }
.ccard p { margin: 0; color: var(--muted); font-size: 14px; }
.ccard.passed { --c: var(--benign); } .ccard.flagged { --c: var(--high); } .ccard.incomplete { --c: var(--suspicious); }
.ccard.error { --c: var(--malicious); } .ccard.skipped { --c: var(--dim); opacity: 0.6; }
.ccard .st { font-family: var(--mono); font-size: 11.5px; color: var(--c); }
.ccard .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.sevbar { display: flex; height: 3px; overflow: hidden; background: var(--line); }
.sevbar i { display: block; height: 100%; background: var(--c); }
details.more summary { cursor: pointer; color: var(--muted); font-size: 12px; font-family: var(--mono); list-style: none; letter-spacing: 0.04em; transition: color .2s; }
details.more summary:hover { color: var(--ink); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; color: var(--signal); }
details.more[open] summary::before { content: "− "; }
pre.raw {
  margin: 10px 0 0; padding: 14px; max-height: 320px; overflow: auto; background: var(--bg-2);
  border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}

/* ------------------------------------------------------------ treemap */
.treemap-wrap { padding: 14px; }
.treemap { width: 100%; height: 360px; display: block; }
.treemap rect { fill: var(--c); stroke: var(--surface); stroke-width: 2; transition: opacity .2s; }
.treemap g:hover rect { opacity: 0.8; }
.treemap text { font-family: var(--mono); font-size: 11px; fill: var(--fmt-ink); pointer-events: none; }
.treemap g.hot text { fill: #fff; }
.treemap text.sz { opacity: 0.62; }
.fmt-0 { --c: var(--fmt-0); } .fmt-1 { --c: var(--fmt-1); } .fmt-2 { --c: var(--fmt-2); } .fmt-3 { --c: var(--fmt-3); }
.fmt-4 { --c: var(--fmt-4); } .fmt-5 { --c: var(--fmt-5); } .fmt-6 { --c: var(--fmt-6); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 4px 2px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; background: var(--c); display: inline-block; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; padding: 9px 11px; background: var(--ink); color: var(--on-ink);
  font-family: var(--mono); font-size: 11.5px; max-width: 420px; word-break: break-all; display: none; box-shadow: var(--shadow);
}

/* ------------------------------------------------------------ findings */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.findings { display: grid; gap: 14px; }
.fcard {
  padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--c);
  display: grid; gap: 10px; scroll-margin-top: 100px;
}
.fcard.hl { animation: hl 1.8s var(--ease); }
@keyframes hl { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.fcard header { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.fcard h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -0.015em; color: var(--ink); }
.fcard .rid { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: auto; }
.fcard .msg { margin: 0; color: var(--text); }
.fcard .loc { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.evidence { font-family: var(--mono); font-size: 12px; padding: 12px 14px; background: var(--bg-2); border: 1px dashed var(--line-2); color: var(--evidence); white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.whyit { font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }
.whyit b { color: var(--ink); font-weight: 500; }
.empty { padding: 36px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); font-family: var(--serif); font-style: italic; font-size: 19px; grid-column: 1 / -1; }

/* ------------------------------------------------------------ tables */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { flex: 1; min-width: 220px; background: var(--surface); border: 1px solid var(--line-2); padding: 0 14px; height: 40px; font-family: var(--mono); font-size: 13.5px; outline: none; color: var(--ink); transition: border-color .25s; }
.search:focus { border-color: var(--ink); }
.search::placeholder { color: var(--dim); }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); font-weight: 400; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td b { font-weight: 500; }
tbody tr { cursor: pointer; transition: background-color .2s; }
tbody tr:hover { background: var(--bg-2); }
tbody tr:focus-visible { outline-offset: -1px; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.sevmini { display: inline-flex; gap: 6px; font-family: var(--mono); font-size: 12px; }
.sevmini span { color: var(--c); }
.sevmini span.z { color: var(--line-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.pager .btn { margin-left: 6px; }

.timeline { display: flex; gap: 0; overflow-x: auto; padding-bottom: 6px; border-top: 1px solid var(--line); }
.tl { flex: none; text-decoration: none; padding: 16px 20px 14px; border-right: 1px solid var(--line); display: grid; gap: 6px; min-width: 170px; position: relative; transition: background-color .2s; }
.tl:hover { background: var(--bg-2); }
.tl.cur::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--ink); }
.tl .mono { color: var(--muted); }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-top: 1px solid var(--line); }
.meta-grid > div { padding: 14px 16px 14px 0; min-width: 0; border-bottom: 1px solid var(--line); }
.meta-grid .l { font-family: var(--mono); font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.15em; }
.meta-grid .v { font-size: 14.5px; color: var(--ink); word-break: break-word; margin-top: 4px; }

.rules { display: grid; gap: 0; margin-top: 8px; }
.rule { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rule .rid { font-family: var(--mono); font-size: 11px; color: var(--dim); display: block; }
.rule p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.loading { padding: 120px 0; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 22px; grid-column: 1 / -1; }
.loading::after { content: ""; display: block; width: 64px; height: 1px; margin: 18px auto 0; background: linear-gradient(90deg, transparent, var(--ink), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: scanline 1.4s var(--ease) infinite; }
.noscript { padding: 40px; text-align: center; }

.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 24px 0 0; padding: 14px 18px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; }
.banner.warn { border-color: color-mix(in srgb, var(--suspicious) 50%, transparent); border-left: 2px solid var(--suspicious); }
.banner .btn { margin-left: auto; }
tr.superseded td { opacity: 0.55; }
td .tag { margin-left: 8px; font-size: 9.5px; padding: 1px 6px; }

/* ------------------------------------------------------------ ledger overview */
.overview { margin: 32px 0 0; }
.overview .kpis { margin-top: 0; }
.kpi-pick { cursor: pointer; position: relative; transition: background-color .25s; }
.kpi-pick::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--c); transform: scaleX(0.18); transform-origin: left; transition: transform .6s var(--ease); }
.kpi-pick:first-child::before { left: 0; }
.kpi-pick:hover::before, .kpi-pick:focus-visible::before { transform: scaleX(1); }
.kpi-pick:hover, .kpi-pick:focus-visible { background: var(--bg-2); outline: none; }
.kpi-pick .n { color: var(--c); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; margin-top: 40px; }
.ov-grid .panel { min-width: 0; padding: 18px 0 0; background: transparent; border: 0; border-top: 1px solid var(--line); }
.ov-grid h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -0.015em; color: var(--ink); }
.ov-grid .dim { margin: 0 0 16px; font-size: 13px; }
@media (max-width: 1000px) { .ov-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; } .ov-chart { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
svg.daily { width: 100%; height: auto; display: block; }
svg.daily .seg.l-benign { fill: var(--benign); }
svg.daily .seg.l-unknown { fill: var(--unknown); }
svg.daily .seg.l-suspicious { fill: var(--suspicious); }
svg.daily .seg.l-malicious { fill: var(--malicious); }
svg.daily .axis { fill: var(--dim); font-family: var(--mono); font-size: 10px; }
svg.daily .baseline { stroke: var(--line-2); stroke-width: 1; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13.5px; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hb-n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hb-bar { grid-column: 1 / -1; height: 1px; background: linear-gradient(90deg, var(--ink) var(--w), var(--line) var(--w)); }

.toast { position: fixed; z-index: 60; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: min(680px, calc(100vw - 32px)); box-shadow: var(--shadow); }

@media (max-width: 640px) {
  .scanbox { flex-wrap: wrap; }
  .scanbox .prefix { display: none; }
  .scanbox input { width: 100%; flex-basis: 100%; }
  .scanbox .btn { width: 100%; }
  .kpi { padding-left: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kpi { border-bottom: 1px solid var(--line); }
}
