/* NaijaPhish design system (frontend rebuild, docs/FRONTEND_PLAN.md).
   Identity from the brand kit: Ink #101418, Green #0A7A4F (#34C38F on dark), Paper #F4F2EA,
   Bricolage Grotesque for display. Green means "caught, confirmed, taken down" and nothing else.
   Every text colour is at least 4.5:1 on the surface it sits on, in both themes. */

@font-face {
  font-family: "Bricolage";
  src: url("/static/fonts/bricolage-800.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("/static/fonts/bricolage-600.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101418;
  --surface: #161b21;
  --surface-2: #1c232b;
  --surface-3: #232c36;
  --line: #27313b;
  --line-2: #34404c;
  --text: #e9edf0;
  --text-2: #b4bec7;
  --text-3: #8b97a3; /* 5.6:1 on --bg, 5.2:1 on --surface */
  --green: #34c38f;
  --green-ink: #062b1d;
  --green-soft: rgba(52, 195, 143, 0.12);
  --focus: #7cc4ff;
  --r-low: #9aa6b2;
  --r-low-bg: rgba(154, 166, 178, 0.12);
  --r-medium: #e6b94a;
  --r-medium-bg: rgba(230, 185, 74, 0.13);
  --r-high: #f5874a;
  --r-high-bg: rgba(245, 135, 74, 0.14);
  --r-critical: #ff6b81;
  --r-critical-bg: rgba(255, 107, 129, 0.15);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
  --wordmark-dark: block;
  --wordmark-light: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2ea;
  --surface: #ffffff;
  --surface-2: #f8f7f2;
  --surface-3: #eeece4;
  --line: #e2dfd4;
  --line-2: #cfcbbd;
  --text: #101418;
  --text-2: #3a444e;
  --text-3: #5b6570; /* 5.8:1 on #fff */
  --green: #0a7a4f;
  --green-ink: #ffffff;
  --green-soft: rgba(10, 122, 79, 0.1);
  --focus: #1f6feb;
  --r-low: #5b6570;
  --r-low-bg: rgba(91, 101, 112, 0.1);
  --r-medium: #735100;
  --r-medium-bg: rgba(178, 126, 0, 0.12);
  --r-high: #973a08;
  --r-high-bg: rgba(212, 92, 22, 0.12);
  --r-critical: #b3123a;
  --r-critical-bg: rgba(200, 20, 60, 0.1);
  --shadow: 0 1px 2px rgba(16, 20, 24, 0.06), 0 6px 18px rgba(16, 20, 24, 0.06);
  --wordmark-dark: none;
  --wordmark-light: block;
}

:root {
  --font-display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-s: 6px;
  --gutter: 24px;
  --max: 1280px;
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; line-height: 1.1; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; font-family: var(--font-ui); }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
.skip, .skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-s); }
.skip:focus, .skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ shell */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 30px; width: auto; }
.logo .on-dark { display: var(--wordmark-dark); }
.logo .on-light { display: var(--wordmark-light); }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a, .nav summary {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: var(--radius-s); color: var(--text-2); text-decoration: none; font-weight: 500;
  cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--text); }
.nav .count { font: 600 11px/1 var(--font-mono); padding: 3px 6px; border-radius: 99px; background: var(--r-high-bg); color: var(--r-high); }
.nav details { position: relative; }
.nav .menu {
  position: absolute; top: 42px; left: 0; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.nav .menu a { display: flex; width: 100%; }

.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px; font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--r-low); }
.status-pill.live .dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-pill.stale .dot { background: var(--r-medium); }
.status-pill.down .dot { background: var(--r-critical); }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    padding: 8px var(--gutter) 14px; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0;
  }
  .nav.open { display: flex; }
  .nav details .menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: transparent; }
  .status-pill .label { display: none; }
}

main { flex: 1; padding: 28px 0 64px; }
.footer { border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; padding: 20px 0 28px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ------------------------------------------------------------------ page head */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin-bottom: 24px; }
.page-head .titles { flex: 1 1 420px; min-width: 0; }
.eyebrow { font: 600 12px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.eyebrow a { text-decoration: none; }
.lede { color: var(--text-2); margin-top: 8px; max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------ buttons, badges */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font: 500 14px/1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: 0.9; }
.btn.go { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }

.lvl {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px;
  font: 700 12px/1 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lvl.low { color: var(--r-low); background: var(--r-low-bg); }
.lvl.medium { color: var(--r-medium); background: var(--r-medium-bg); }
.lvl.high { color: var(--r-high); background: var(--r-high-bg); }
.lvl.critical { color: var(--r-critical); background: var(--r-critical-bg); }
.lvl.unscored { color: var(--text-3); background: var(--surface-3); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--radius-s);
  border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.tag b { color: var(--text-3); font-weight: 500; }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.verdict.confirmed, .verdict.likely { color: var(--text); }
.verdict.confirmed::before, .verdict.likely::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--r-high); }
.verdict.cleared::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--text-3); }
.caught { color: var(--green); font-weight: 600; }

/* ------------------------------------------------------------------ cards, grids */

.grid { display: grid; gap: 16px; }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 1080px) { .grid.main-side { grid-template-columns: minmax(0, 1fr); } .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid.k3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .grid.k4 { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; }
.card-head .meta { margin-left: auto; color: var(--text-3); font-size: 13px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }

.stat { padding: 16px 18px; }
.stat .k { color: var(--text-3); font-size: 13px; }
.stat .v { font: 800 32px/1.1 var(--font-display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.stat .v.high { color: var(--r-high); }
.stat .v.caught { color: var(--green); }

.callout { border-left: 3px solid var(--line-2); padding: 10px 14px; background: var(--surface-2); border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--text-2); font-size: 14px; }
.callout.warn { border-left-color: var(--r-medium); }
.callout.good { border-left-color: var(--green); }

/* ------------------------------------------------------------------ domains */

/* A domain never breaks mid-word: one line, the registrable part emphasised, the rest truncated
   from the left side of the name with the full name in the title attribute. */
.dom { display: flex; min-width: 0; max-width: 100%; font-family: var(--font-mono); font-size: 14px; white-space: nowrap; }
.dom .sub { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; min-width: 0; flex: 0 1 auto; }
.dom .sub bdi { direction: ltr; unicode-bidi: isolate; }
.dom .reg { color: var(--text); font-weight: 600; flex: none; }
.dom a { text-decoration: none; display: flex; min-width: 0; }
.dom a:hover .reg { text-decoration: underline; }
.dom-big { font: 700 clamp(20px, 3vw, 30px)/1.2 var(--font-mono); word-break: break-all; letter-spacing: -0.01em; }
.dom-big .sub { color: var(--text-3); font-weight: 500; }
.idn { color: var(--text-3); font-size: 13px; margin-top: 4px; font-family: var(--font-mono); word-break: break-all; }

/* ------------------------------------------------------------------ tables */

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 600 12px/1 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); padding: 12px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .w-dom { width: 40%; max-width: 0; }
.table .muted { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.table .why { color: var(--text-2); font-size: 13.5px; }

/* On phones a table becomes a list of cards: each cell shows its column label. */
@media (max-width: 720px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; max-width: none; }
  .table.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stack td { padding: 3px 0; border: 0; text-align: left; }
  .table.stack td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 96px; color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
  .table.stack .num { text-align: left; }
}

/* ------------------------------------------------------------------ case page */

.case-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: start; margin-bottom: 20px; }
@media (max-width: 720px) { .case-head { grid-template-columns: minmax(0, 1fr); } }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reasons li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
.reasons .pts { font: 800 15px/1.6 var(--font-display); color: var(--r-high); text-align: right; font-variant-numeric: tabular-nums; }
.reasons .t { font-weight: 600; }
.reasons .d { color: var(--text-2); font-size: 14px; }

.score { display: flex; align-items: baseline; gap: 8px; }
.score .n { font: 800 44px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.score .of { color: var(--text-3); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--r-high); }
.meter.medium i { background: var(--r-medium); }
.meter.low i { background: var(--r-low); }
.meter.critical i { background: var(--r-critical); }

.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; } }

details.more > summary { cursor: pointer; color: var(--text-2); padding: 12px 18px; list-style: none; border-top: 1px solid var(--line); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; color: var(--text-3); }
details.more[open] > summary::before { content: "- "; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--text-3); font-size: 12.5px; font-family: var(--font-mono); }
.timeline li.key::before { background: var(--r-high); }
.timeline li.good::before { background: var(--green); }

/* A list of linked items (operations, ready-to-report groups). */
.ops { list-style: none; margin: 0; padding: 0; }
.ops li + li { border-top: 1px solid var(--line); }
.ops a { display: block; padding: 12px 0; text-decoration: none; }
.ops a:hover b { text-decoration: underline; }
.ops .row b { min-width: 0; }

/* ------------------------------------------------------------------ campaign map */

.map { width: 100%; height: auto; display: block; }
.map .edge { stroke: var(--line-2); stroke-width: 1; }
.map .server { fill: var(--surface-3); stroke: var(--text); stroke-width: 2; }
.map .server-t { fill: var(--text); font: 700 13px var(--font-mono); }
.map .brand { fill: var(--surface); stroke: var(--line-2); }
.map .brand-t { fill: var(--text); font: 600 12px var(--font-ui); }
.map .brand-n { fill: var(--text-3); font: 600 11px var(--font-mono); }
.map .d-high { fill: var(--r-high); }
.map .d-critical { fill: var(--r-critical); }
.map .d-medium { fill: var(--r-medium); }
.map .d-low { fill: var(--r-low); }
.map .d-verdict { stroke: var(--text); stroke-width: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); padding: 12px 18px; border-top: 1px solid var(--line); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.spark { display: block; width: 100%; height: 64px; }
.spark rect { fill: var(--r-high); opacity: 0.85; }
.spark .axis { fill: var(--text-3); font: 11px var(--font-mono); }

/* ------------------------------------------------------------------ forms */

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
input[type="text"], input[type="search"], input[type="password"], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 14px var(--font-ui);
}
textarea { min-height: 72px; resize: vertical; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1 1 240px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; }
.seg a { padding: 0 12px; height: 34px; display: inline-flex; align-items: center; text-decoration: none; color: var(--text-2); font-size: 13.5px; }
.seg a + a { border-left: 1px solid var(--line-2); }
.seg a[aria-current="true"] { background: var(--surface-3); color: var(--text); }

/* ------------------------------------------------------------------ utilities */

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack-s > * + * { margin-top: 8px; }
.stack-m > * + * { margin-top: 16px; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.mt { margin-top: 16px; }
.mt-l { margin-top: 28px; }
.empty { padding: 28px 18px; text-align: center; color: var(--text-3); }
.paused-note { font-size: 12.5px; color: var(--text-3); }

@media print {
  .topbar, .footer, .actions, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Expandable rows: the evidence opens in place (an open row is never refreshed away). */
.row-more > summary { cursor: pointer; list-style: none; }
.row-more > summary::-webkit-details-marker { display: none; }
.expand-caret { display: inline-block; width: 1ch; color: var(--text-3); font-family: var(--font-mono); }
.row-more[open] .expand-caret { transform: rotate(45deg); }
.row-group + .row-group td { border-top: 0; }

.grid.k2-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid.k2-even { grid-template-columns: minmax(0, 1fr); } }
/* On narrow screens the decision (risk, takedown, verdict) comes before the evidence. */
@media (max-width: 1080px) { .grid.main-side > aside { order: -1; } }

/* ------------------------------------------------------------------ reference pages
   Methodology, Scoring, Registry, Infrastructure, Investigate and Advisories keep their written
   content; these rules render their content classes in the design system. */
:root { --ink: var(--text); --ink-2: var(--text-2); --ink-3: var(--text-3); --hairline: var(--line); --hairline-2: var(--line-2); --accent: var(--r-high); --ok: var(--green); --warn: var(--r-medium); --critical: var(--r-critical); }
.h1 { font: 800 clamp(26px, 3.2vw, 36px)/1.1 var(--font-display); margin: 0; }
.h2 { font: 600 19px/1.3 var(--font-display); margin: 18px 0 8px; }
.sub, .lead { color: var(--text-2); margin-top: 6px; }
.lead { font-size: 17px; max-width: 72ch; }
.dim, .faint { color: var(--text-3); }
.muted-note { color: var(--text-3); font-size: 13px; margin-left: auto; }
.card-head .eyebrow { margin: 0; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 2px 8px; border-radius: var(--radius-s); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; text-decoration: none; overflow-wrap: anywhere; }
.chip.accent { color: var(--r-high); border-color: color-mix(in srgb, var(--r-high) 40%, transparent); }
.btn.ghost { background: transparent; }
.btn.accent { background: var(--text); color: var(--bg); border-color: var(--text); }
.table-wrap { width: 100%; overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font: 600 12px/1 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.deck { display: grid; gap: 16px; margin-bottom: 16px; }
.deck.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deck.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deck.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .deck.grid-2, .deck.grid-3, .deck.grid-4 { grid-template-columns: minmax(0, 1fr); } }
.deck > .card + .card { margin-top: 0; }
.pstat .lbl { color: var(--text-3); font-size: 13px; }
.pstat .num { text-align: left; font: 800 30px/1.1 var(--font-display); margin-top: 6px; }
.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.dl dt { color: var(--text-3); } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .dl { grid-template-columns: minmax(0, 1fr); } }
.callout .c-t { display: block; font: 600 12px/1.4 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.prose { max-width: 76ch; color: var(--text-2); }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose h2, .prose h3 { color: var(--text); margin: 22px 0 8px; }
.sec { margin: 0 0 28px; }
.sec-index { font: 600 12px/1 var(--font-mono); color: var(--text-3); margin-right: 8px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.toc a { display: inline-flex; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--text-2); font-size: 13px; }
.field { position: relative; }
.field .ic { display: none; }
.form-select { width: 100%; }
.logo-big { height: 48px; width: auto; }
.on-dark-only { display: var(--wordmark-dark); }
.on-light-only { display: var(--wordmark-light); }
.toc .n { margin-right: 6px; color: var(--text-3); font-family: var(--font-mono); }

/* Native selects follow the theme (both schemes declared above); the open list uses the
   theme colours where the browser supports a styleable picker. */
@supports (appearance: base-select) {
  select.form-select, .toolbar select { appearance: base-select; }
  select.form-select::picker(select), .toolbar select::picker(select) { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-s); }
}
:root[data-theme="dark"] select { background: var(--surface-2); color: var(--text); }
:root[data-theme="light"] select { background: var(--surface); color: var(--text); }
.social-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-s); border: 1px solid var(--line); color: var(--text-2); }
.social-btn:hover { color: var(--text); background: var(--surface-2); }

/* Domains per brand: a ranked list readable at any width (on phones it replaces the map). */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 13.5px; }
.bars .b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bars .b-bar i { display: block; height: 100%; background: var(--r-high); border-radius: 99px; }
.bars .b-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
@media (max-width: 640px) { .map-wrap { display: none; } .bars li { grid-template-columns: minmax(0, 1fr) 80px 32px; } }
