/* Datum Arc styles. Colors are defined once here and reused everywhere. */
:root {
  --bg: #0b1020;
  --panel: #121a30;
  --line: #24304f;
  --text: #e6ebf5;
  --muted: #8d98b3;
  --accent: #4fd1c5;   /* healthy arcs and vendors */
  --datum: #f6c453;    /* the reference company */
  --hit: #ff5d6c;      /* vendors in a breach report */
  --land: #1a2440;
  --max: 1180px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 18px 16px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .02em; font-size: 18px; }
.mark { color: var(--datum); }
.tagline { display: block; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--muted); margin-top: 2px; }
nav { display: flex; gap: 18px; }
nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
@media (max-width: 520px) { .top { align-items: flex-start; } nav { flex-direction: column; gap: 4px; text-align: right; font-size: 14px; } }
nav a[aria-current] , nav a:hover { color: var(--text); }

main { max-width: var(--max); margin: 0 auto; padding: 0 16px 40px; }
.intro { padding: 28px 0 8px; max-width: 780px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; margin: 0 0 8px; }
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.12; margin: 0 0 14px; }
h1 em { font-style: normal; color: var(--datum); }
.lede { color: var(--muted); font-size: 17px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 26px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.alert b { color: var(--hit); }

.map-wrap, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.datum { background: var(--datum); } .dot.ok { background: var(--accent); } .dot.hit { background: var(--hit); }
#map { width: 100%; height: auto; display: block; margin-top: 10px; }
.map-note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.land { fill: var(--land); stroke: var(--bg); stroke-width: .5; }
.graticule { fill: none; stroke: #ffffff0d; }
.arc { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .55; stroke-dasharray: 4 6; animation: flow 3s linear infinite; }
.arc.hit { stroke: var(--hit); opacity: .95; stroke-width: 2; }
@keyframes flow { to { stroke-dashoffset: -40; } }
.node { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; cursor: pointer; }
.node.hit { fill: var(--hit); }
.node.datum { fill: var(--datum); }
.pulse { fill: none; stroke: var(--hit); animation: pulse 2s ease-out infinite; }
.pulse.datum { stroke: var(--datum); }
@keyframes pulse { from { r: 4; opacity: .9; } to { r: 22; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .arc, .pulse { animation: none; } }

.tip { position: fixed; pointer-events: none; background: #050814ee; border: 1px solid var(--line);
  padding: 8px 10px; border-radius: 8px; font-size: 13px; max-width: 260px; z-index: 10; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols .panel { margin-bottom: 0; }
.cols + .panel { margin-top: 18px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

.feed { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
.feed li { border-top: 1px solid var(--line); padding: 10px 0; }
.feed a { color: var(--text); text-decoration: none; font-weight: 600; }
.feed a:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); margin-right: 6px; color: var(--muted); }
.tag.hit { border-color: var(--hit); color: var(--hit); }
.empty { color: var(--muted); padding: 10px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.filters button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.filters button[aria-pressed="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }

#timeline { width: 100%; height: 180px; display: block; }
#timeline .bar { fill: var(--accent); }
#timeline .axis text { fill: var(--muted); font-size: 11px; }
#timeline .axis path, #timeline .axis line { stroke: var(--line); }

footer { max-width: var(--max); margin: 0 auto; padding: 10px 16px 40px; color: var(--muted); font-size: 13px; }

/* Concentration risk */
.conc-callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.callout { border-left: 3px solid var(--datum); padding: 4px 12px; font-size: 14px; }
.callout b { display: block; font-size: 20px; }
.conc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.conc h3 { font-size: 14px; margin: 0 0 2px; display: flex; justify-content: space-between; gap: 8px; }
.level { font-size: 11px; padding: 1px 8px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.level.low { color: var(--accent); } .level.moderate { color: var(--datum); } .level.high { color: var(--hit); }
.conc .hhi { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; font-size: 13px; margin: 5px 0; align-items: center; }
.bar-row .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { grid-column: 1 / -1; height: 5px; background: var(--line); border-radius: 3px; margin-top: -2px; }
.bar-row .fill { height: 100%; background: var(--accent); border-radius: 3px; }
.bar-row .pct { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Notes page */
.doc { max-width: 820px; }
.doc h2 { font-size: 21px; margin: 34px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; border-top: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.doc code { background: var(--panel); padding: 1px 6px; border-radius: 5px; }
.table-scroll { overflow-x: auto; }
