/* ARBK Lookup – same tokens as Lead Finder ("Domains" system tuned to Maileroo): Geist, light grey canvas, flat white
   cards with faint borders, orange #f36a25 as the single accent with white text on it. */
:root {
  --font: Geist, "Geist Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-full: 999px;
  --t: 150ms;
  --bg: #f7f7f7; --surface: #fefefe; --surface-2: #fafafa; --surface-3: #f3f3f3;
  --heading: #0a0a0a; --text: #454545; --muted: #666666; --faint: #8f8f8f;
  --border: #ececec; --border-2: #f2f2f2; --control-border: #e3e3e3; --control-hover: #cfcfcf;
  --accent: #f36a25; --accent-hover: #e25d1a; --on-accent: #ffffff; --accent-text: #b4480f; --accent-soft: #fff1ea;
  --focus: #f36a25; --inverse-bg: #000; --inverse-text: #fefefe;
  --good: #047857; --good-soft: #ecf8f3; --warn: #9a4a07; --warn-soft: #fdf4e7; --bad: #b91c1c; --bad-soft: #fdeeee;
  --info: #0369a1; --info-soft: #ebf5fb;
  /* charts: categorical (validated reference palette, brand-adjacent orange first) and a one-hue sequential ramp */
  --c1: #eb6834; --c2: #2a78d6; --c3: #1baf7a; --c4: #eda100;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a0a0a; --surface: #141414; --surface-2: #181818; --surface-3: #222;
  --heading: #fafafa; --text: #ededed; --muted: #a3a3a3; --faint: #737373;
  --border: #232323; --border-2: #1d1d1d; --control-border: #2e2e2e; --control-hover: #444;
  --accent-hover: #ff7a37; --accent-text: #ff8a4c; --accent-soft: #2a1408; --focus: #ff8a4c;
  --inverse-bg: #fafafa; --inverse-text: #0a0a0a;
  --good: #34d399; --good-soft: #0b2a1f; --warn: #fbbf24; --warn-soft: #2d2107; --bad: #f87171; --bad-soft: #321313;
  --info: #7dd3fc; --info-soft: #0b2230;
  --c1: #d95926; --c2: #3987e5; --c3: #199e70; --c4: #c98500;
  --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  color-scheme: dark;
} }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--heading); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--heading); font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 6px 12px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; }
.top nav a:hover { background: var(--surface-3); color: var(--heading); text-decoration: none; }
.top nav a.on { background: var(--surface-3); color: var(--heading); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }

main { max-width: 1240px; margin: 0 auto; padding: 24px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: var(--r-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--heading);
  font: inherit; font-weight: 500; cursor: pointer; transition: background var(--t), border-color var(--t); white-space: nowrap; }
.btn:hover { border-color: var(--control-hover); background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-3); color: var(--heading); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: progress; }
input, select { font: inherit; color: var(--heading); background: var(--surface); border: 1px solid var(--control-border);
  border-radius: var(--r-md); min-height: 36px; padding: 6px 10px; width: 100%; transition: border-color var(--t), box-shadow var(--t); }
input:hover, select:hover { border-color: var(--control-hover); }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--accent); }
label { display: block; font-weight: 500; color: var(--heading); font-size: 13px; }
label > input, label > select { margin-top: 4px; font-weight: 400; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.card + .card { margin-top: 16px; }

/* search */
.hero { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.searchbar { display: flex; gap: 8px; }
.searchbar input { min-height: 44px; font-size: 16px; padding: 8px 14px; }
.searchbar .btn { min-height: 44px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.filters .check { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 36px; font-weight: 400; }
.resbar { display: flex; align-items: center; gap: 12px; margin: 20px 0 10px; flex-wrap: wrap; }
.resbar .count { color: var(--heading); font-weight: 600; }
.resbar .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.resbar select { width: auto; }

.tbl-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; background: var(--surface-2); padding: 10px 14px;
  border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface-2); }
td .name { color: var(--heading); font-weight: 500; }
td .sub { color: var(--muted); font-size: 13px; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: 12px;
  font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--text); }
.pill.active { background: var(--good-soft); color: var(--good); }
.pill.closed { background: var(--bad-soft); color: var(--bad); }
.pill.passive { background: var(--warn-soft); color: var(--warn); }

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); }

.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty h2 { margin-bottom: 6px; }

/* business page */
.bhead { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.bhead .t { flex: 1; min-width: 260px; }
.bhead .t p { margin: 6px 0 0; color: var(--muted); }
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid2 > * { min-width: 0; }
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 14px 0 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--heading); word-break: break-word; }
.list { list-style: none; margin: 14px 0 0; padding: 0; }
.list li { display: flex; gap: 12px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.list li:last-child { border-bottom: 0; }
.list .r { color: var(--muted); white-space: nowrap; }
details.raw summary { cursor: pointer; color: var(--heading); font-weight: 600; }
details.raw pre { margin: 12px 0 0; padding: 12px; background: var(--surface-2); border-radius: var(--r-md); overflow: auto;
  font-family: var(--font-mono); font-size: 12px; max-height: 420px; }

/* admin */
.drop { border: 1.5px dashed var(--control-border); border-radius: var(--r-lg); padding: 28px; text-align: center; color: var(--muted);
  transition: border-color var(--t), background var(--t); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.steps { margin: 10px 0 0; padding-left: 20px; }
.steps li { margin: 4px 0; }
.note { padding: 10px 14px; border-radius: var(--r-md); background: var(--info-soft); color: var(--info); margin-top: 14px; }
.err { padding: 10px 14px; border-radius: var(--r-md); background: var(--bad-soft); color: var(--bad); margin-top: 12px; }

dialog { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; background: var(--surface); color: var(--text);
  width: min(420px, calc(100vw - 32px)); box-shadow: 0 12px 32px -10px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.32); }
dialog h2 { margin-bottom: 6px; }
dialog label { margin-top: 12px; }
dialog .row { margin-top: 18px; }

/* related businesses, grouped by person */
table.rel tr.rel-p th { background: var(--surface-2); color: var(--heading); font-size: 13px; padding: 9px 14px;
  border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
table.rel tbody:first-of-type tr.rel-p th { border-top: 0; }
table.rel .rel-name { font-weight: 600; }
table.rel .rel-role { color: var(--muted); font-weight: 400; margin-left: 8px; }
table.rel .rel-n { float: right; color: var(--muted); font-weight: 400; }
table.rel td:first-child { padding-left: 26px; }
/* progress bar (uploads, imports) */
.prog { margin-top: 14px; }
.prog-l { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--heading); font-weight: 500; }
.prog-l .mono { color: var(--muted); font-weight: 400; }
.prog-t { height: 8px; margin-top: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.prog-t i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s ease; }
.prog-t.ind i { animation: prog-ind 1.3s ease-in-out infinite; }
@keyframes prog-ind { from { margin-left: -30%; } to { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .prog-t.ind i { animation: none; width: 100% !important; opacity: .45; } }
.prog-d { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--inverse-bg); color: var(--inverse-text);
  padding: 10px 16px; border-radius: var(--r-md); opacity: 0; pointer-events: none; transition: opacity var(--t); z-index: 50; }
#toast.on { opacity: 1; }

/* navigation: scrolls sideways when it does not fit */
.top nav { overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { white-space: nowrap; }
.who { flex: none; }
.small { font-size: 13px; }
.phead { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.phead p { margin: 6px 0 0; }
.h2big { font-size: 20px; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; }
.tile .tl { color: var(--muted); font-size: 13px; }
.tile .tv { color: var(--heading); font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .ts { color: var(--muted); font-size: 12px; margin-top: 4px; }
.grid2 > .card + .card { margin-top: 0; }
.chart { position: relative; height: 260px; margin-top: 12px; }

/* ranked bar lists */
.barlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.barlist li { min-width: 0; }
.bl-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.bl-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v { white-space: nowrap; color: var(--heading); font-variant-numeric: tabular-nums; }
.bl-track { height: 6px; background: var(--surface-3); border-radius: 3px; margin-top: 4px; }
.bl-fill { height: 100%; background: var(--c2); border-radius: 3px; }
.bl-fill.st-active { background: var(--good); } .bl-fill.st-passive { background: var(--warn); }
.bl-fill.st-closed, .bl-fill.st-liquidation { background: var(--bad); }
.pill.liquidation { background: var(--bad-soft); color: var(--bad); }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--heading); }
th.num { text-align: right; }
.more-btn { margin-top: 10px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* export column menu */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 240px; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; box-shadow: 0 12px 32px -10px rgba(0,0,0,.2); }
.menu-pop .check { display: flex; gap: 8px; align-items: center; font-weight: 400; padding: 3px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font: inherit; font-size: 13px; border: 1px solid var(--control-border); background: var(--surface); color: var(--text);
  border-radius: var(--r-full); padding: 4px 12px; cursor: pointer; }
.chip:hover { border-color: var(--control-hover); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline .td { width: 90px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }

.map-card { margin-top: 16px; padding: 0; overflow: hidden; }
#map { height: 520px; background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.leaflet-container { font-family: var(--font); }

.cmp-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cmp-pick { display: grid; gap: 6px; }
.picklist { display: grid; gap: 8px; margin-top: 12px; max-height: 40vh; overflow: auto; }
.picklist .btn { justify-content: space-between; }
.note-in { min-height: 30px; padding: 4px 8px; font-size: 13px; }
td .sub { display: block; }
.list .sub { display: block; }

@media print {
  .top, .no-print, .back, details.raw { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .card, .tile { break-inside: avoid; border-color: #ddd; }
}

@media (max-width: 760px) {
  .top { padding: 0 16px; gap: 12px; }
  .who span { display: none; }
  .who { gap: 0; }
  .top nav a { padding: 6px 8px; }
  main { padding: 16px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
  .hide-sm { display: none; }
  .searchbar { flex-direction: column; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile .tv { font-size: 20px; }
  #map { height: 420px; }
  .chart { height: 220px; }
  .resbar .sp { flex-wrap: wrap; margin-left: 0; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .top { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 1ms !important; } }

/* insights: tabs, heatmaps (sequential ramp + diverging colour-mix), range plots */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: -8px 0 18px; padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--heading); text-decoration: none; }
.tabs a.on { color: var(--heading); border-bottom-color: var(--accent); }
.ins-head { margin-bottom: 14px; }
.ins-head p { margin: 4px 0 0; max-width: 820px; }
h2.sec { margin: 28px 0 0; font-size: 18px; }
.chart.tall { height: 380px; }
.heat-wrap { margin-top: 12px; }
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
table.heat th, table.heat td { padding: 5px 7px; border: 0; white-space: nowrap; }
table.heat td { border-radius: 3px; font-variant-numeric: tabular-nums; }
table.heat td a { color: inherit; }
table.heat th.sticky { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 1; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; }
table.heat.corr td { cursor: pointer; min-width: 38px; text-align: center; }
table.heat td.diag { background: var(--surface-3); }
.hs-1 { background: var(--seq-1); } .hs-2 { background: var(--seq-2); } .hs-3 { background: var(--seq-3); }
.hs-4 { background: var(--seq-4); } .hs-5 { background: var(--seq-5); } .hs-6 { background: var(--seq-6); } .hs-7 { background: var(--seq-7); }
td.hs-4, td.hs-5, td.hs-6, td.hs-7 { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) td.hs-4, :root:not([data-theme="light"]) td.hs-5,
  :root:not([data-theme="light"]) td.hs-6, :root:not([data-theme="light"]) td.hs-7 { color: #0a0a0a; }
  :root:not([data-theme="light"]) td.hs-4 { color: #fff; } }
.hlegend { display: flex; align-items: center; gap: 3px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.hlegend span { margin: 0 6px; }
.hlegend i { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
.hlegend i.mid { background: var(--surface-3); }
.mlist { margin: 12px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 18px; }
.mlist li { break-inside: avoid; padding: 2px 0; }
.mlist b { display: inline-block; min-width: 20px; color: var(--muted); font-weight: 500; }
.rngs { margin-top: 10px; }
.rng { display: grid; grid-template-columns: minmax(0, 1fr) 62px minmax(90px, 42%); gap: 10px; align-items: center; padding: 4px 0; }
.rng-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rng-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--heading); }
.rng-t { position: relative; height: 16px; }
.rng-t i { position: absolute; top: 50%; }
.rng-base { width: 1px; height: 16px; margin-top: -8px; background: var(--muted); }
.rng-ci { height: 4px; margin-top: -2px; background: var(--seq-2); border-radius: 2px; }
.rng-dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 0 2px var(--surface); }
h2 .chip { font-size: 12px; font-weight: 500; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
@media (max-width: 760px) { .mlist { columns: 1; } .chart.tall { height: 300px; } }
@media (max-width: 480px) { .filters.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filters.compact .check { grid-column: 1 / -1; } }

/* capture */
.steps { margin: 12px 0 0; padding-left: 20px; }
.steps li { margin: 0 0 10px; }
.bm { cursor: grab; margin-left: 4px; }
.capnum { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.capnum .mono { font-size: 26px; font-weight: 600; color: var(--heading); letter-spacing: .03em; }
#capSkip { width: auto; }
.ok-note { background: var(--good-soft); border-color: transparent; color: var(--text); }
dialog.wide { width: min(900px, 94vw); }
pre.rawpre { max-height: 300px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; }
.brand { white-space: nowrap; }
@media (max-width: 1440px) and (min-width: 761px) { .top { gap: 14px; } .top nav { gap: 0; } .top nav a { padding: 6px 8px; } }

/* search suggestions */
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; max-height: 60vh; overflow: auto; }
.sug a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); }
.sug a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sug a .sub { flex: none; color: var(--muted); font-size: 12px; }
.sug a:hover, .sug a.on { background: var(--surface-3); text-decoration: none; }
@media (max-width: 480px) { .sug a { flex-direction: column; gap: 2px; } }

/* network graph */
.net > svg { width: 100%; height: auto; display: block; max-height: 560px; }
.net-e { stroke: var(--border); stroke-width: 1.5; }
.net-e.rep { stroke-dasharray: 4 3; }
.net-n text { font: 11px var(--font); fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.net-n.root text { font-weight: 600; fill: var(--heading); }
.net-n circle, .net-n rect { stroke: var(--surface); stroke-width: 2; }
.net a:hover text { fill: var(--accent); }
.netleg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.netleg svg { vertical-align: -1px; margin-right: 4px; }

textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--control-border);
  border-radius: var(--r-sm); padding: 8px 10px; resize: vertical; }
textarea.mono { font-family: var(--font-mono); font-size: 13px; }
.langsw { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.langsw button { border: 0; background: none; color: var(--muted); font: 500 12px var(--font); padding: 4px 8px; cursor: pointer; }
.langsw button.on { background: var(--surface-3); color: var(--heading); }
.navmore { position: relative; flex: none; }
.navmore summary.on { background: var(--surface-3); color: var(--heading); }
.navmore .menu-pop { left: 0; right: auto; width: 190px; padding: 6px; }
.navmore .menu-pop a { display: block; padding: 7px 10px; border-radius: var(--r-sm); color: var(--text); }
.navmore .menu-pop a:hover, .navmore .menu-pop a.on { background: var(--surface-3); text-decoration: none; }
@media (max-width: 760px) { .navmore .menu-pop { left: auto; right: 0; } }
/* phone: menu links get their own row under the logo, language and account buttons */
@media (max-width: 760px) {
  .top { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 4px; row-gap: 4px; }
  .top nav { order: 5; flex: 1 0 100%; }
  .who { margin-left: auto; }
}

/* business page: key figures, then a wide main column and a narrow side column that stack independently */
.keybar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: 16px; overflow: hidden; }
.keybar .kf { padding: 16px 20px; border-left: 1px solid var(--border-2); min-width: 0; }
.keybar .kf:first-child { border-left: 0; }
.keybar .kl { color: var(--muted); font-size: 13px; }
.keybar .kv { color: var(--heading); font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px;
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keybar .ks { color: var(--muted); font-size: 12px; margin-top: 2px; }
.bpage { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.bmain, .bside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bmain > *, .bside > * { margin: 0 !important; }
.bmain > :empty, .bside > :empty { display: none; }
/* the cards that matter most: an accent edge and larger names */
.card.hi { border-left: 3px solid var(--accent); }
.card.hi h2 { font-size: 18px; }
.list.people li { padding: 12px 0; align-items: center; }
.list.people .pname { color: var(--heading); font-weight: 600; font-size: 15px; }
.list.people .r { text-align: right; line-height: 1.35; }
.list.people .r b { color: var(--heading); font-size: 15px; font-weight: 600; }
.list.people .r .sub { color: var(--muted); font-size: 12px; }
.sbar { display: block; height: 4px; max-width: 220px; background: var(--border-2); border-radius: 2px; margin-top: 7px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.list .main-act { font-weight: 600; }
.list .main-act a { color: var(--heading); }
dl.cfacts { margin: 12px 0 0; }
dl.cfacts dt { color: var(--muted); font-size: 12px; margin-top: 10px; }
dl.cfacts dt:first-child { margin-top: 0; }
dl.cfacts dd { margin: 2px 0 0; font-size: 16px; font-weight: 500; color: var(--heading); word-break: break-word; }
.bside dl.facts { grid-template-columns: 130px 1fr; font-size: 14px; }
/* background information: smaller headings and figures, so it reads as context */
.bside .quiet .grid2 { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin: 0 !important; }
.bside .quiet .grid2 > .card { margin: 0; }
.bside .quiet .tiles { grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.bside .quiet .tile { padding: 10px 12px; }
.bside .quiet .tile .tv { font-size: 18px; }
.bside .quiet .tile .ts { font-size: 11px; }
.bside .quiet .card h2, .quiet-card summary { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.bside .quiet .chart { height: 200px; }
@media (max-width: 1000px) {
  .bpage { grid-template-columns: minmax(0, 1fr); }
  .bside { display: contents; }          /* contact and registration go up, background below the main column */
  .bmain { order: 2; }
  .bside > .contact { order: 1; }
  .bside > .card:not(.contact) { order: 1; }
  .bside > .quiet { order: 3; }
  .bpage { display: flex; flex-direction: column; }
  .bmain, .bside > * { width: 100%; max-width: 100%; min-width: 0; }
  .list.people li { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .keybar { grid-template-columns: 1fr 1fr; }
  .keybar .kf:nth-child(3) { border-left: 0; }
  .keybar .kf:nth-child(n+3) { border-top: 1px solid var(--border-2); }
  .keybar .kv { font-size: 20px; }
  .bside dl.facts { grid-template-columns: 1fr; }
}
@media print { .bpage { display: block; } .bmain > *, .bside > * { margin-bottom: 12px !important; } }

/* customers: plans, upgrade dialog, locked cards */
.lock { font-size: 11px; opacity: .7; }
.card.locked { border: 1px dashed var(--control-hover); background: var(--surface-2); }
.card.locked h2 { color: var(--heading); }
.note.good { border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-soft); color: var(--heading); }
.upplans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pcard { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; background: var(--surface); display: flex; flex-direction: column; }
.pcard.cur { border: 2px solid var(--accent); padding: 15px; }
.pcard h3 { font-size: 16px; }
.pcard .pprice { font-size: 26px; font-weight: 600; color: var(--heading); letter-spacing: -.02em; margin-top: 6px; }
.pcard .pprice small { font-size: 13px; color: var(--muted); font-weight: 500; }
.pcard ul { margin: 12px 0; padding-left: 18px; flex: 1; }
.pcard li { margin: 3px 0; }
dialog.updlg { width: min(720px, calc(100vw - 32px)); }

/* opportunities and health score (bi.js) */
.oscore { display: inline-flex; align-items: center; gap: 6px; }
.oscore::before { content: ""; width: 44px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c3) var(--w), var(--surface-3) var(--w)); }
.hscore { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hnum { font-size: 34px; font-weight: 600; color: var(--heading); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hof { color: var(--muted); }
.hband { margin-left: auto; padding: 2px 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; }
.hband.low { background: var(--good-soft); color: var(--good); }
.hband.moderate { background: var(--info-soft); color: var(--info); }
.hband.elevated { background: var(--warn-soft); color: var(--warn); }
.hband.high { background: var(--bad-soft); color: var(--bad); }
.hmeter { height: 8px; border-radius: 4px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.hmeter i { display: block; height: 100%; border-radius: 4px; background: var(--good); }
.hmeter i.moderate { background: var(--info); } .hmeter i.elevated { background: var(--warn); } .hmeter i.high { background: var(--bad); }
.hfactors { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 13px; }
.hfactors li { display: flex; gap: 8px; align-items: baseline; }
.hfactors li.info::before { content: "i"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; line-height: 16px; }
.hfactors li.bad:not(:has(.hp))::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--bad-soft); color: var(--bad); font-size: 11px; font-weight: 700; text-align: center; line-height: 16px; }
.hp { flex: none; min-width: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hp.up { color: var(--good); } .hp.down { color: var(--bad); }
.vs-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface-2); color: var(--heading); font-weight: 500; }
.chip .x { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: var(--r-full); }
.chip .x:hover { background: var(--surface-3); color: var(--heading); }
.vs-add { position: relative; flex: 1 1 240px; }
.vs-add input { width: 100%; }
.vs-sug { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 4px; }
.vs-sug button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--heading); font: inherit; }
.vs-sug button:hover { background: var(--surface-3); }
.vs-sug p { margin: 6px 10px; }
.tbl-wrap.vs th[scope=row] { color: var(--muted); font-weight: 500; white-space: nowrap; }
.tbl-wrap.vs thead th { vertical-align: top; min-width: 160px; }
.tbl-wrap.vs tr.vs-sec th { background: var(--surface-2); color: var(--heading); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tbl-wrap.vs td.vs-top { font-weight: 700; color: var(--heading); }
#ldProf summary { cursor: pointer; list-style: none; }
#ldProf summary::-webkit-details-marker { display: none; }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.ld-grid select, .ld-grid input { width: 100%; }
.tbl-wrap.vs td.num { text-align: left; }

/* patterns (#/patterns) and the owners' track record on the business page */
.pat-item { padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.pat-item:last-child { border-bottom: 0; }
.pat-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--heading); }
.pat-item .sub { color: var(--muted); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.pat-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-full); font-size: 11px;
  font-weight: 500; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pat-tag.k-owner { background: var(--bad-soft); color: var(--bad); }
.pat-tag.k-director { background: var(--warn-soft); color: var(--warn); }
.pat-links { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.pat-links li { margin: 2px 0; }
.risk { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md, 10px); background: var(--surface-2); border-left: 3px solid var(--muted); }
.risk-medium { border-left-color: var(--warn); }
.risk-high { border-left-color: var(--bad); }
.risk-low { border-left-color: var(--good); }
.risk-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.risk ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.risk li { margin: 4px 0; }
.risk .sub { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sub-h { font-size: 13px; color: var(--muted); font-weight: 500; margin: 16px 0 4px; }

/* written summary on business pages */
.card.summary p { margin: 0 0 10px; line-height: 1.6; max-width: 75ch; }
.card.summary h2 + p { margin-top: 10px; }
.card.summary .sum-note { font-size: 12px; margin: 4px 0 0; }

/* network graph (#/network) */
.net-search { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.net-find { position: relative; flex: 1 1 320px; }
.net-find input { width: 100%; }
.net-sug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.10); max-height: 420px; overflow: auto; padding: 4px 0; }
.net-sug a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; color: var(--text); text-decoration: none; }
.net-sug a:hover, .net-sug a:focus { background: var(--surface-3); }
.net-sug b { color: var(--heading); font-weight: 600; } .net-sug .muted { display: block; font-size: 12px; }
.net-sh { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); padding: 8px 12px 2px; }
.net-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--accent); }
.net-dot.biz { border-radius: 3px; background: var(--good); } .net-dot.biz.passive { background: var(--warn); }
.net-dot.biz.closed, .net-dot.biz.liquidation { background: var(--faint); }
.net-lv { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.net-lv .btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.net-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 2px 10px; font-size: 13px; color: var(--muted); }
.net-stats b { color: var(--heading); font-size: 15px; } .net-stats .warn-t { color: var(--warn); }
.net-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .net-wrap { grid-template-columns: 1fr; } }
.net-graph-card { padding: 0; overflow: hidden; }
.net-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.net-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.net-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px 3px 6px; border: 1px solid var(--control-border);
  border-radius: var(--r-full); cursor: pointer; user-select: none; background: var(--surface); }
.net-chip input { margin: 0; accent-color: var(--accent); }
.net-line { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--faint); }
.net-line.r-owner { border-top: 3px solid var(--c1); } .net-line.r-director { border-top-color: var(--c2); }
.net-line.r-authorised { border-top: 2px dotted var(--c2); } .net-line.r-agent { border-top: 2px dashed var(--faint); }
.net-line.r-board { border-top-color: var(--c4); } .net-line.r-owns { border-top: 3px solid var(--info); }
.net-line.r-phone, .net-line.r-email { border-top: 2px dashed var(--c3); } .net-line.r-other { border-top: 2px dotted var(--faint); }
.net-cy { height: 640px; background: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0) 0 0 / 22px 22px, var(--surface-2); }
@media (max-width: 640px) { .net-cy { height: 480px; } }
.net-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.net-legend span { display: inline-flex; align-items: center; gap: 6px; }
.net-legend .lg { display: inline-block; width: 11px; height: 11px; background: var(--accent); border-radius: 50%; }
.net-legend .lg.center { width: 14px; height: 14px; box-shadow: 0 0 0 3px var(--accent-soft); }
.net-legend .lg.hub { background: var(--faint); outline: 1.5px dashed var(--muted); outline-offset: 1px; }
.net-legend .lg.biz { border-radius: 3px; background: var(--good); } .net-legend .lg.biz.passive { background: var(--warn); } .net-legend .lg.biz.closed { background: var(--faint); }
.net-legend .lg.outside { background: var(--info); border-radius: 1px; transform: rotate(45deg) scale(.85); }
.net-legend .lg.contact { background: var(--c3); border-radius: 2px 6px 6px 2px; }
.net-side { position: sticky; top: 74px; max-height: calc(100vh - 100px); overflow: auto; }
.net-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.net-facts { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.net-facts li { padding: 2px 0; }
.net-links { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.net-links li { padding: 5px 0; border-top: 1px solid var(--border-2); overflow-wrap: anywhere; }
.net-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: var(--r-full); background: var(--surface-3); color: var(--muted); white-space: nowrap; margin-right: 4px; }
.net-tag.r-owner { background: var(--accent-soft); color: var(--accent-text); }
.net-tag.r-director, .net-tag.r-authorised { background: var(--info-soft); color: var(--info); }
.net-tag.r-phone, .net-tag.r-email { background: var(--good-soft); color: var(--good); }
.net-tag.r-owns { background: var(--info-soft); color: var(--info); } .net-tag.r-board { background: var(--warn-soft); color: var(--warn); }
.net-intro p { max-width: 70ch; margin-left: auto; margin-right: auto; }

/* case reports (Patterns → Public contracts) */
.case-btn { margin-top: 10px; }
.case { margin-top: 12px; }
.case-r { border: 1px solid var(--border); border-left: 4px solid var(--faint); border-radius: var(--r-md); padding: 16px 18px; background: var(--surface); }
.case-r.risk-high { border-left-color: var(--bad); } .case-r.risk-medium { border-left-color: var(--warn); }
.case-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.case-lv.lv-high { background: var(--bad-soft); color: var(--bad); } .case-lv.lv-medium { background: var(--warn-soft); color: var(--warn); }
.case-lv.lv-low { background: var(--surface-3); color: var(--muted); }
.case-hl { font-size: 17px; line-height: 1.35; margin: 12px 0 4px; overflow-wrap: anywhere; }
.case-r section { margin-top: 16px; }
.case-r h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--heading); margin: 0 0 6px; }
.case-r p, .case-r li { line-height: 1.6; max-width: 80ch; overflow-wrap: anywhere; }
.case-r p { margin: 0 0 8px; } .case-r ul { margin: 0 0 8px; padding-left: 20px; } .case-r li { margin: 3px 0; }
.case-r tr.case-linked td { background: var(--bad-soft); }
.case-foot { font-size: 12px; margin-top: 16px !important; }
@media print { .case-r { border: 0; padding: 0; } }

/* network: business popup and link description */
.net-graph-card { position: relative; }
.net-pop { position: absolute; z-index: 20; width: 340px; max-height: 470px; overflow: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 14px 16px 16px; font-size: 13px; }
.net-pop-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.net-pop-x:hover { background: var(--surface-3); color: var(--heading); }
.net-pop .net-kind { display: flex; gap: 8px; align-items: center; }
.net-pop-h { margin: 6px 24px 2px 0; font-size: 16px; color: var(--heading); overflow-wrap: anywhere; }
.net-pop .sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.net-pop-kf { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 12px 0; padding: 10px 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
.net-pop-kf .kl { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .03em; }
.net-pop-kf .kv { color: var(--heading); font-weight: 500; }
.net-pop-sum { line-height: 1.55; margin: 0 0 10px; }
.net-pop-sec { margin-top: 10px; }
.net-pop-sec ul { list-style: none; margin: 4px 0 0; padding: 0; }
.net-pop-sec li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; overflow-wrap: anywhere; }
.net-rel { font-size: 15px; line-height: 1.5; color: var(--heading); margin: 0 0 8px; }
.net-note { font-size: 13px; line-height: 1.5; }
.net-ends { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.net-end { display: inline-flex; gap: 8px; align-items: center; max-width: 100%; text-align: left; }
.net-end .net-dot { margin-top: 0; }
.net-links a { color: var(--text); }
.net-dot.contact { background: var(--c3); border-radius: 2px; } .net-dot.outside { background: var(--info); border-radius: 1px; }
.net-busy { position: absolute; z-index: 15; left: 50%; top: 140px; transform: translateX(-50%); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-full); padding: 6px 14px; font-size: 13px; color: var(--muted); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.net-who { display: flex; align-items: center; gap: 10px; margin: 18px 2px 0; flex-wrap: wrap; }
.net-who h2 { margin: 0; font-size: 22px; color: var(--heading); overflow-wrap: anywhere; }
.net-who .net-dot { width: 14px; height: 14px; margin-top: 0; }

/* network: two-person connection, namesakes, officials */
.net-find2 { flex: 1 1 280px; }
.net-who2 h2 { font-size: 19px; }
.net-and { color: var(--muted); font-size: 14px; margin: 0 4px; }
.net-legend .lg.namesake { outline: 3px double var(--warn); outline-offset: 0; }
.net-legend .lg.official { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.net-tag.r-official { background: var(--bad-soft); color: var(--bad); white-space: normal; }
.net-path-l { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 14px; }
.net-path-l > li { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.net-path-l > li:hover { border-color: var(--accent); }
.net-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; }
.net-chipn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-full); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.net-chipn:hover { border-color: var(--accent); }
.net-chipn .net-dot { margin-top: 0; }
.net-arrow { color: var(--muted); padding: 0 3px; }
.net-why { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.net-why li { cursor: pointer; } .net-why li:hover { color: var(--text); }
/* patterns: pairs, buyers */
.pat-tag.k-rot { background: var(--warn-soft); color: var(--warn); }
.pat-tag.k-none { background: var(--surface-3); color: var(--muted); }
.buyer-t th { white-space: normal; min-width: 70px; font-size: 12px; vertical-align: bottom; }
.flag-c { background: var(--bad-soft); color: var(--bad); font-weight: 600; border-radius: 4px; }
ul.explain { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.sign-l { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sign-l li { display: grid; grid-template-columns: minmax(150px, 1.4fr) 1fr auto; gap: 4px 12px; align-items: center; }
.sign-l li .small { grid-column: 1 / -1; margin-top: -4px; }
.sign-l .bar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.sign-l .bar i { display: block; height: 100%; background: var(--faint); }
.sign-l li.flag .bar i { background: var(--bad); } .sign-l li.flag b { color: var(--bad); }
.note.warn-n { background: var(--bad-soft); border-color: var(--bad); color: var(--text); }
/* watchlist */
.wl-ev { list-style: none; margin: 0; padding: 0; }
.wl-ev li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.wl-ev li:last-child { border-bottom: 0; }
.wl-ev .d { color: var(--muted); font-size: 12.5px; white-space: nowrap; padding-top: 2px; }
.wl-k { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: var(--r-full); background: var(--surface-3); color: var(--muted); margin-right: 6px; }
.wl-k.won, .wl-k.person_won { background: var(--good-soft); color: var(--good); }
.wl-k.pair { background: var(--warn-soft); color: var(--warn); }
.wl-k.captured, .wl-k.changed { background: var(--info-soft); color: var(--info); }
@media (max-width: 600px) { .wl-ev li { grid-template-columns: 1fr; gap: 2px; } .sign-l li { grid-template-columns: 1fr auto; } .sign-l .bar { grid-column: 1 / -1; grid-row: 2; } }

/* Patterns → Politics */
.party-chip { display: inline-block; padding: 1px 7px; border-radius: 10px; color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.6; vertical-align: 1px; }
.pol-ch { border-top: 1px solid var(--border); padding: 8px 0; }
.pol-ch summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pol-ch summary .r { margin-left: auto; color: var(--muted); }
.pol-ch .pol-u { font-weight: 600; }
.pol-ch .grid2 { margin-top: 10px; }
.pol-f { border-top: 1px solid var(--border); padding: 8px 0; }
.pol-m td { white-space: nowrap; }
.pol-m .sub { display: inline; }

.flag-card { border-color: var(--bad); }
