/* Dark theme. Every colour comes from these tokens; components use them
   rather than their own hex values. Contrast against --bg: --fg ~14:1,
   --muted ~7:1, --accent ~8:1. */
:root {
  color-scheme: dark;
  --bg: #0f1318;        /* page */
  --panel: #151a21;     /* cards, table headers, code */
  --panel-2: #1b212a;   /* hover, selected, raised */
  --line: #262d37;      /* borders, rules */
  --line-2: #36404c;    /* stronger borders, inputs */
  --fg: #e2e6eb;
  --muted: #98a2ae;
  --accent: #7ea6f2;    /* links, focus, selection */
  --accent-2: #a9c3f7;  /* link hover */
  --accent-bg: rgba(126, 166, 242, .12);
  --warn: #e0a959;
  --warn-bg: rgba(224, 169, 89, .10);
  --ok: #5cc095;
  --ok-bg: rgba(92, 192, 149, .10);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-2); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(126, 166, 242, .35); }
code, pre { font-family: var(--mono); font-size: 13px; }
header.site, main, footer.site { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
header.site { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--fg); letter-spacing: .01em; } .brand:hover { color: var(--fg); text-decoration: none; }
.site-nav { display: flex; gap: 16px; font-size: 14px; }
.site-nav a { color: var(--muted); } .site-nav a:hover { color: var(--fg); text-decoration: none; }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
input[type=search], input[type=url], input[type=text], input[type=password], select {
  font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; }
input::placeholder { color: var(--muted); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.search input, .search-page input { width: 100%; padding: 6px 10px; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; }
.search-results:empty { display: none; }
.search-results ul, .search-results p { margin: 4px 0 0; padding: 6px 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.45); list-style: none; }
.search-results p { padding: 8px 12px; }
.search-results li { padding: 4px 12px; } .search-results li:hover { background: var(--panel-2); }
.search-page { display: flex; gap: 8px; max-width: 480px; margin-bottom: 16px; }
main { padding-top: 20px; padding-bottom: 40px; }
h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 6px; font-weight: 650; }
h2 { font-size: 16px; margin: 28px 0 8px; font-weight: 650; }
.lede, .muted, .crumbs { color: var(--muted); }
.lede { margin: 0 0 8px; }
.intro p { max-width: 720px; margin: 0 0 12px; color: var(--muted); }

/* Tables: the bulk of the site. Dense rows, a quiet header, a clear hover. */
table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: var(--panel); border-bottom-color: var(--line-2); }
tbody tr:hover td { background: var(--panel-2); }
td.num, th.num { text-align: right; }
td time { white-space: nowrap; }

.tag { display: inline-block; font-size: 12px; line-height: 18px; padding: 0 7px; margin-left: 6px; border: 1px solid var(--line-2); border-radius: 9px; color: var(--muted); }
.tag.ok { color: var(--ok); border-color: rgba(110, 190, 140, .45); }
.tag.warn { color: var(--warn); border-color: rgba(224, 169, 89, .45); background: var(--warn-bg); }
.tag.upcoming, .tag.inherited { color: var(--accent); border-color: rgba(126, 166, 242, .45); background: var(--accent-bg); }
.notice { padding: 8px 12px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 6px; background: var(--panel); }
details { margin-top: 12px; } summary { cursor: pointer; color: var(--muted); } summary:hover { color: var(--fg); }
ul.inline { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
ol.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
ol.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ol.timeline time { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.sev-2 strong, .sev-3 strong { color: var(--warn); }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
dl.meta dt { color: var(--muted); } dl.meta dd { margin: 0; overflow-wrap: anywhere; }
pre.evidence { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; line-height: 1.5; max-height: 70vh; overflow: auto; }
footer.site { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 28px; color: var(--muted); font-size: 13px; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); font-weight: 600; }
.small { font-size: 12px; } h1 .small { font-weight: 400; margin-left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* admin */
.admin-nav, .filters { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.filters { border: 0; margin: 12px 0 4px; }
.admin-nav a.active, .filters a.active { color: var(--fg); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--panel); }
.stat.warn { border-color: rgba(224, 169, 89, .45); background: var(--warn-bg); }
.stat-value { font-size: 22px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; } .stat-value a { color: inherit; }
.stat-label { font-size: 13px; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 32px; }
td.small { overflow-wrap: anywhere; max-width: 480px; }
.status-added, .status-linked { color: var(--ok); border-color: rgba(92, 192, 149, .45); }
.status-review, .status-pending { color: var(--warn); border-color: rgba(224, 169, 89, .45); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.inline-form { display: inline; margin: 0; }
button { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--fg); cursor: pointer; }
button:hover { border-color: var(--accent); color: var(--accent-2); }
.flash { padding: 8px 12px; border: 1px solid rgba(92, 192, 149, .45); background: var(--ok-bg); border-radius: 6px; }
tr.retired td { color: var(--muted); }
.source-form { display: flex; flex-wrap: wrap; gap: 8px; }
.source-form input[type=url] { flex: 1; min-width: min(100%, 320px); padding: 5px 8px; }
.source-form select { padding: 4px 6px; }
.action-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin: 8px 0 16px; }
.action-card { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--panel); margin: 0; }
.action-card button { font-weight: 600; }
.action-card p { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* vendor icons: favicons sit on a light tile so dark logos stay visible */
.vicon { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; border-radius: 3px; object-fit: contain; background: #e8ecf0; padding: 1px; }
.vicon-none { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); padding: 0; }
.vicon-lg { width: 30px; height: 30px; vertical-align: -6px; margin-right: 10px; border-radius: 6px; padding: 2px; }
th.icon-cell, td.icon-cell { width: 1%; padding-right: 0; white-space: nowrap; }
td.icon-cell { padding-top: 10px; } /* 16px icon centred on the first text line */
td.icon-cell .vicon { display: block; margin: 0; vertical-align: 0; }
.results li { display: flex; align-items: baseline; gap: 6px; } .results li .vicon { margin-right: 0; align-self: center; }

/* Supply-chain map (atlas.js) at the top of vendor pages: one card, two
   tabs. Reliance heat is its own scale, apart from the accent: grey < 5
   vendors, amber 5-19, orange 20-59, brick 60+. */
.atlas-card { --heat0: #6f7e89; --heat1: #d0a24c; --heat2: #d27a42; --heat3: #c3553c; --ink: var(--fg);
  position: relative; margin: 16px 0 8px; height: clamp(400px, 52vw, 580px); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: radial-gradient(ellipse at 50% 52%, #18202a 0, var(--panel) 60%, var(--bg) 100%); }
/* three rings (department, agency, vendor) need the room */
.atlas-card.atlas-tall { height: clamp(460px, 72vw, 780px); }
.atlas-tabs { position: absolute; left: 10px; top: 10px; z-index: 1; display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(21, 26, 33, .92); border: 1px solid var(--line-2); border-radius: 7px; }
.atlas-tabs button { font: 600 12px/1 var(--font); letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: none; border: 0; border-radius: 5px; padding: 7px 10px; cursor: pointer; }
.atlas-tabs button:hover { color: var(--fg); }
.atlas-tabs button b { margin-left: 4px; font-size: 13px; letter-spacing: 0; color: inherit; font-variant-numeric: tabular-nums; }
.atlas-tabs button[aria-selected="true"] { background: var(--line-2); color: var(--fg); }
.atlas-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.atlas-pane { position: absolute; inset: 0; }
.atlas-empty { height: 100%; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.atlas-pane.failed .atlas-svg { visibility: hidden; }
.atlas-zoom { position: absolute; right: 10px; top: 10px; z-index: 1; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.atlas-card:hover .atlas-zoom, .atlas-card:focus-within .atlas-zoom, .atlas-card.zoomed .atlas-zoom { opacity: 1; }
.atlas-card.empty .atlas-zoom { display: none; }
@media (hover: none) { .atlas-zoom { opacity: 1; } }
.atlas-zoom button { width: 28px; height: 28px; padding: 0; font: 600 15px/1 var(--font); color: var(--fg); background: rgba(27, 33, 42, .92); border: 1px solid var(--line-2); }
.atlas-zoom button:hover, .atlas-zoom button:focus-visible { border-color: var(--accent); }
.atlas-svg { display: block; width: 100%; height: 100%; touch-action: pan-y; user-select: none; }
.atlas-card.zoomed .atlas-svg { touch-action: none; cursor: grab; }
.atlas-svg.panning { cursor: grabbing; }
.atlas-svg text { font-family: var(--font); fill: var(--ink); }
.atlas-ring { fill: none; stroke: var(--line-2); stroke-dasharray: 2 5; }
.atlas-edge { fill: none; stroke: #52606d; stroke-width: .8; opacity: .6; }
.atlas-edge.hot { stroke: var(--accent); stroke-width: 2; opacity: 1; }
.atlas-node { cursor: pointer; outline: none; }
.atlas-node.center { cursor: default; }
.atlas-node .disc { fill: var(--panel-2); }
.atlas-node .halo { fill: none; stroke-width: 2.5; }
.atlas-node.h0 .halo { stroke: var(--heat0); } .atlas-node.h1 .halo { stroke: var(--heat1); }
.atlas-node.h2 .halo { stroke: var(--heat2); } .atlas-node.h3 .halo { stroke: var(--heat3); }
.atlas-node.center .halo { stroke: var(--fg); stroke-width: 3; }
.atlas-node.onpath .halo, .atlas-node:focus-visible .halo { stroke: var(--accent); stroke-width: 3.5; }
.atlas-node.dim { opacity: .18; }
.atlas-node .initial { font-weight: 700; fill: var(--ink); }
/* "+N": the companies that didn't fit this ring, expanded by a click */
.atlas-group .stack, .atlas-group .disc { fill: var(--panel-2); stroke: var(--line-2); stroke-width: 1.5; }
.atlas-group .stack { fill: var(--panel); }
.atlas-group:hover .disc, .atlas-group:focus-visible .disc { stroke: var(--accent); }
.atlas-group .count { font-size: 12px; font-weight: 700; fill: var(--muted); }
.atlas-group:hover .count, .atlas-group:focus-visible .count { fill: var(--accent); }
.atlas-node .lbl { display: none; font-size: 10.5px; font-weight: 500; paint-order: stroke; stroke: var(--bg); stroke-width: 3.5px; stroke-linejoin: round; }
.atlas-node.labeled .lbl, .atlas-node:hover .lbl, .atlas-node.onpath .lbl, .atlas-node:focus-visible .lbl { display: inline; }
@media (prefers-reduced-motion: no-preference) { .atlas-node, .atlas-edge { transition: opacity .15s; } }

/* Transparency rating: a dim five-star row with a gold row clipped over
   it (widths come from classes: the CSP forbids inline styles). */
.stars { position: relative; display: inline-block; white-space: nowrap; color: #5e6875; font-size: 15px; letter-spacing: 1px; }
.stars .fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #d9a53a; }
.w0 { width: 0; } .w1 { width: 10%; } .w2 { width: 20%; } .w3 { width: 30%; } .w4 { width: 40%; } .w5 { width: 50%; }
.w6 { width: 60%; } .w7 { width: 70%; } .w8 { width: 80%; } .w9 { width: 90%; } .w10 { width: 100%; }
.rating { margin-top: 20px; }
.rating-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.rating-head .stars { font-size: 20px; }
.rating-label { color: var(--muted); }
.rating details { max-width: 720px; }
.rating summary { font-size: 14px; }
.rating-parts { margin-top: 8px; }
.rating-parts td { padding: 5px 10px; }
.rating-parts tr.missing td:first-child { color: var(--muted); }
.rating-parts tr.got td:first-child::before { content: "✓ "; color: var(--ok); }
.rating-parts tr.total td { font-weight: 600; border-bottom: 0; }

/* "Used as a subprocessor by": a row per company, with what that company
   says it uses this vendor for. */
ul.used-by { list-style: none; margin: 0; padding: 0; font-size: 14px; }
ul.used-by li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; padding: 6px 4px; border-bottom: 1px solid var(--line); }
ul.used-by li:hover { background: var(--panel-2); }
ul.used-by li:last-child { border-bottom: 0; }
ul.used-by .purpose { flex: 1 1 18rem; color: var(--muted); }

/* certifications */
section.certs { margin: 4px 0 14px; }
section.certs p { margin: 4px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
a.chip { display: inline-block; font-size: 13px; line-height: 22px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 11px; color: var(--fg); background: var(--panel); }
a.chip:hover { border-color: var(--accent); text-decoration: none; }

/* service status */
#status p.ongoing { padding: 8px 10px; border: 1px solid rgba(224, 169, 89, .45); background: var(--warn-bg); border-radius: 6px; }
.tag.impact-major, .tag.impact-critical { color: var(--warn); border-color: rgba(224, 169, 89, .45); background: var(--warn-bg); }
table.incidents td:last-child a { margin-left: 6px; font-size: 12px; }

/* security record */
#security h3 { margin: 18px 0 4px; font-size: 15px; }
table.exploited td:first-child { white-space: nowrap; }
table.exploited td:last-child a { margin-left: 6px; font-size: 12px; }
ul.breaches { list-style: none; margin: 0; padding: 0; font-size: 14px; }
ul.breaches li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
ul.breaches li:last-child { border-bottom: 0; }
ul.breaches li > time, ul.breaches li > .muted { margin-left: 8px; }
ul.breaches p { margin: 4px 0; color: var(--muted); }

/* Federal award pages: role tabs (funded / awarded) and record tables. */
nav.tabs { display: inline-flex; gap: 2px; padding: 3px; margin: 8px 0 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 7px; font-size: 13px; }
nav.tabs a { padding: 5px 12px; border-radius: 5px; color: var(--muted); }
nav.tabs a:hover { color: var(--fg); text-decoration: none; background: var(--panel-2); }
nav.tabs a.active { color: var(--fg); background: var(--line-2); font-weight: 600; }
table.awards td.desc { max-width: 360px; overflow-wrap: anywhere; }
table.awards td.small, table.gov-vendors td .small { color: var(--muted); }
table.gov-vendors td .small { display: block; }

/* Sign-in and API keys */
.signin { display: flex; flex-wrap: wrap; gap: 10px; }
a.button { display: inline-block; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--fg); font-weight: 600; }
a.button:hover { border-color: var(--accent); color: var(--accent-2); text-decoration: none; }
.key-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; max-width: 520px; }
.key-form input[type=text] { flex: 1; min-width: 200px; padding: 5px 8px; }
button.danger:hover { border-color: var(--warn); color: var(--warn); }
.newkey pre { margin: 8px 0 0; user-select: all; }
.usage { display: flex; align-items: flex-end; gap: 3px; height: 72px; padding: 6px 0; border-bottom: 1px solid var(--line-2); max-width: 720px; }
.usage .bar { flex: 1; min-width: 4px; background: var(--accent); opacity: .85; border-radius: 2px 2px 0 0; }
.usage .bar:hover { opacity: 1; }
.usage .h0 { height: 1px; background: var(--line-2); } .usage .h1 { height: 10%; } .usage .h2 { height: 20%; } .usage .h3 { height: 30%; }
.usage .h4 { height: 40%; } .usage .h5 { height: 50%; } .usage .h6 { height: 60%; } .usage .h7 { height: 70%; }
.usage .h8 { height: 80%; } .usage .h9 { height: 90%; } .usage .h10 { height: 100%; }

/* Changes */
.verb { font-weight: 600; text-transform: capitalize; }
.verb-added { color: var(--ok); } .verb-removed { color: var(--warn); } .verb-changed { color: var(--accent); }
table.changes td { vertical-align: top; }

/* Landing */
.headline { color: var(--muted); } .headline strong { color: var(--fg); font-variant-numeric: tabular-nums; }
ul.change-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
ul.change-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
ul.change-list time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
ul.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); font-size: 13px; }
ul.chips li:hover { border-color: var(--accent); }
table.compact td { padding: 5px 8px; }
p.more { margin-top: 24px; font-weight: 600; }
