/* EvilEye - Dashboard. Two themes from one set of tokens: a slightly lightened dark (default) and an inverted light. */
:root {
  --fs: 1;                      /* text scale: 1.15 on phones, see the @media block below */
  --bg: #151b26;
  --surface: #1c2331;
  --surface-2: #252e3f;
  --border: #2f3a4e;
  --border-strong: #3f4d66;
  --text: #e9eef6;
  --text-2: #bcc7d8;
  --muted: #94a2b7;
  --accent: #e02a52;
  --accent-hover: #f1426b;
  --accent-soft: rgba(224, 42, 82, .16);
  --link: #8ab8ff;
  --good: #44c593;
  --bad: #ec6d78;
  --warn: #e6bf55;
  --bar-a: #b8244a;
  --knob: #3a4860;
  --hover: rgba(255, 255, 255, .035);
  --overlay: rgba(8, 11, 18, .68);
  --topbar: color-mix(in srgb, var(--bg) 88%, transparent);
  --shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 10px 28px -14px rgba(0, 0, 0, .55);
  --glow: 0 0 22px -4px rgba(224, 42, 82, .55);
  --c1: #e02a52; --c2: #4f9dff; --c3: #e6bf55; --c4: #44c593; --c5: #a98bff; --c6: #36c5d6; --c7: #94a2b7;
  --radius: 10px;
  --font: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f1f3f8;
  --surface: #ffffff;
  --surface-2: #ecf0f6;
  --border: #dce2ec;
  --border-strong: #c2cbdb;
  --text: #18202e;
  --text-2: #38445a;
  --muted: #62708a;
  --accent: #c8204a;
  --accent-hover: #a9183c;
  --accent-soft: rgba(200, 32, 74, .10);
  --link: #1c5cb8;
  --good: #12805a;
  --bad: #bf2f3c;
  --warn: #8f6505;
  --bar-a: #e0577a;
  --knob: #c2cbdb;
  --hover: rgba(20, 30, 50, .035);
  --overlay: rgba(20, 28, 44, .46);
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 8px 24px -14px rgba(20, 30, 50, .20);
  --glow: 0 0 18px -6px rgba(200, 32, 74, .45);
  --c1: #c8204a; --c2: #1c5cb8; --c3: #b3820a; --c4: #12805a; --c5: #7a55e0; --c6: #0f8a9a; --c7: #62708a;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 640px) { :root { --fs: 1.15; } }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: calc(14.5px * var(--fs));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
body { transition: background-color .2s ease, color .2s ease; }
[hidden] { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
button { font-family: inherit; }
code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text); user-select: all; }

/* ---------- brand ---------- */
.logo { display: block; flex-shrink: 0; }
.logo img { display: block; width: auto; height: 100%; }
.logo-lg { height: 112px; }
.wordmark { font-size: calc(26px * var(--fs)); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.wordmark .eye { color: var(--accent); }
.tagline { color: var(--muted); font-size: calc(12px * var(--fs)); letter-spacing: .02em; }

/* the shield is the screen-wake switch: red eye = off, green eye = on. Looks like a plain logo until clicked.
   The artwork carries its own red / green glow, so no CSS glow is added. */
.mark { position: relative; flex-shrink: 0; width: 48px; height: 54px; padding: 0; margin: 0; border: 0; background: none; cursor: default; }
.mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .35s ease; }
:root[data-theme="light"] .mark img, :root[data-theme="light"] .logo img { filter: drop-shadow(0 1px 2px rgba(20, 40, 80, .3)); }
.mark-on { opacity: 0; }
.mark[aria-pressed="true"] .mark-on { opacity: 1; }
.brand-text { display: block; color: inherit; text-decoration: none; }
.brand-text:hover { text-decoration: none; }
.brand-text:hover .wordmark { opacity: .85; }

/* ---------- login ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 520px at 50% -8%, var(--accent-soft), transparent 62%), var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 34px 32px 30px; box-shadow: var(--shadow);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form label { color: var(--muted); font-size: calc(11.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.login-form input {
  background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 11px 12px; font-size: calc(15px * var(--fs));
}
.login-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.login-form .btn { margin-top: 8px; padding: 11px 16px; }
.login-error { color: var(--bad); font-size: calc(13px * var(--fs)); }
.theme-corner { position: fixed; top: 16px; right: 16px; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--topbar); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 10px 0;
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.status-row { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.updated { color: var(--muted); font-size: calc(12px * var(--fs)); text-align: right; }
.updated .ok { color: var(--good); }
.updated .err { color: var(--bad); }
.region-pick { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.region-pick span { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: calc(11px * var(--fs)); }
.region-pick select.search { flex: none; min-width: 190px; padding: 6px 10px; font-size: calc(13px * var(--fs)); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 32px; padding: 0; color: var(--text-2); }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { display: block; }

/* ---------- tabs ---------- */
/* The baseline is an inset line (not a border + negative-margin tab), so the bar has no stray 1px of vertical scroll. */
.tabs { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; max-width: 1240px; margin: 0 auto; padding: 0 20px;
  box-shadow: inset 0 -1px 0 var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); }
.tabs.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 30px), transparent); }
.tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.tab {
  background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent;
  padding: 13px 12px; font-size: calc(13.5px * var(--fs)); font-weight: 500; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
@media (max-width: 820px) { .tab { padding: 13px 10px; } }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; }
.panel { display: none; padding-top: 22px; }
.panel.active { display: block; }

/* ---------- cards & stats ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h3, .card h3 { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; }
h3.sub { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 16px 22px; box-shadow: var(--shadow); }
.stat::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--border-strong); }
.stat.hl::before { background: var(--accent); }
.stat .num { font-size: calc(28px * var(--fs)); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: calc(12px * var(--fs)); margin-top: 4px; }
.stat.hl .num { color: var(--accent); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }

/* ---------- region strip (horizontal) ---------- */
.region-card { margin-bottom: 18px; }
.region-strip { --cols: 7; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; }
.rtile {
  display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px 11px;
}
.rtile:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.rtile.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.rtile .rn { font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--text-2); line-height: 1.25; min-height: 29px; }
.rtile .rc { font-size: calc(24px * var(--fs)); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rtile .rs { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.rtile .rbar { display: block; height: 4px; border-radius: 3px; background: var(--border); margin-top: 7px; overflow: hidden; }
.rtile .rbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--bar-a), var(--accent)); }
.rtile.dim .rc { color: var(--muted); }
.rtile.dim .rbar i { background: var(--muted); }
.region-card .hint { margin: 12px 0 0; }

/* ---------- bars ---------- */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: calc(12.5px * var(--fs)); }
.bar-row .bk { color: var(--text-2); width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--surface-2); border-radius: 4px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--bar-a), var(--accent)); border-radius: 4px; min-width: 2px; }
.bar-row .bv { min-width: 64px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.bar-row .fine { color: var(--muted); font-size: calc(11px * var(--fs)); }
.bar-row.pick { cursor: pointer; border-radius: 6px; margin: 0 -6px; padding: 3px 6px; }
.bar-row.pick:hover { background: var(--surface-2); }
.bar-row.pick:hover .bk { color: var(--text); }

/* ---------- controls ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.search {
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px 12px; font-size: calc(13.5px * var(--fs)); min-width: 140px; flex: 0 1 260px; font-family: inherit;
}
.search::placeholder { color: var(--muted); }
.search:hover { border-color: color-mix(in srgb, var(--border-strong) 70%, var(--text)); }
select.search { flex: 0 1 210px; }
.radio-group { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; }
.radio-group label { display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 6px; color: var(--muted); font-size: calc(13px * var(--fs)); cursor: pointer; user-select: none; }
.radio-group label:has(input:checked) { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.radio-group input { margin: 0; accent-color: var(--accent); }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font-size: calc(13.5px * var(--fs)); font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.more {
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); border-radius: 7px;
  padding: 5px 11px; font-size: calc(12.5px * var(--fs)); font-weight: 500; line-height: 1.2; cursor: pointer; flex-shrink: 0; text-decoration: none;
}
.more:hover, .more.on { background: var(--surface-2); color: var(--text); border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text)); text-decoration: none; }
.more:disabled { opacity: .55; cursor: default; }
.more.small { padding: 2px 8px; font-size: calc(11.5px * var(--fs)); margin-top: 5px; }
.more.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.more.danger:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

.count { color: var(--muted); font-size: calc(12.5px * var(--fs)); margin: 0 0 10px; }
.hint { color: var(--muted); font-size: calc(13px * var(--fs)); margin-bottom: 14px; max-width: 80ch; }
.meta { color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.ldr { color: var(--muted); padding: 32px; text-align: center; font-size: calc(13px * var(--fs)); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--fs)); min-width: 760px; }
.table th {
  text-align: left; color: var(--muted); font-size: calc(11px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--hover); }
.table .meta { margin-top: 2px; }
.table td.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table select.search { min-width: 150px; padding: 5px 8px; font-size: calc(12.5px * var(--fs)); }

/* ---------- badges ---------- */
.badge { display: inline-block; border-radius: 5px; font-size: calc(11px * var(--fs)); padding: 1px 7px; font-weight: 600; letter-spacing: .01em; line-height: 1.6; border: 1px solid transparent; }
.badge.wm  { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, transparent); }
.badge.uk  { background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); border-color: color-mix(in srgb, var(--link) 32%, transparent); }
.badge.grp { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.badge.off { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.badge.on  { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); border-color: color-mix(in srgb, var(--good) 38%, transparent); }
.badge.src { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--text-2); border-color: color-mix(in srgb, var(--muted) 34%, transparent); }

/* ---------- victim / gang cards ---------- */
.victim-grid, .gang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 14px; }
.vc, .gc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.vc:hover, .gc:hover { border-color: var(--border-strong); }
.vc .name { font-weight: 650; font-size: calc(14.5px * var(--fs)); letter-spacing: -.005em; }
.gc .gname { font-weight: 650; font-size: calc(15px * var(--fs)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gc .gdesc { color: var(--muted); font-size: calc(12.5px * var(--fs)); line-height: 1.45; }
.sites { display: flex; flex-direction: column; gap: 4px; }
.gc .site-line { display: flex; align-items: center; gap: 8px; font-size: calc(12px * var(--fs)); color: var(--muted); }
.gc .site-line .dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.gc .site-line .dot.ok { background: var(--good); box-shadow: 0 0 6px 1px color-mix(in srgb, var(--good) 65%, transparent); animation: pulse-glow 1.8s ease-in-out infinite; }
.gc .site-line .dot.bad { background: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 20%, transparent); }
.gc .site-line .dot.na { background: var(--muted); }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px 1px color-mix(in srgb, var(--good) 55%, transparent), 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); transform: scale(1); }
  50%      { box-shadow: 0 0 14px 4px color-mix(in srgb, var(--good) 90%, transparent), 0 0 0 7px color-mix(in srgb, var(--good) 0%, transparent); transform: scale(1.12); }
}
/* click-to-copy: leak-site addresses are never opened from here */
.copy {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-family: var(--mono); font-size: calc(11.5px * var(--fs)); text-align: left; cursor: copy;
}
.copy:hover { border-color: var(--border-strong); color: var(--text); }
.copy .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.copy .cpy { color: var(--muted); font-family: var(--font); font-size: calc(11px * var(--fs)); flex-shrink: 0; }
.copy:hover .cpy { color: var(--link); }
.copy.done { border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.copy.done .cpy { color: var(--good); }

/* ---------- feed ---------- */
.post-list { display: flex; flex-direction: column; gap: 8px; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.post:hover { border-color: var(--border-strong); }
.post > div:first-child { min-width: 0; }
.post .ptitle, .post .pdetail, .news-item .nt, .news-item .sum { overflow-wrap: anywhere; }
.post .ptitle { font-weight: 600; }
.post .pdetail { color: var(--muted); font-size: calc(12.5px * var(--fs)); margin-top: 4px; }
.post .right { text-align: right; flex-shrink: 0; }
.post .pdate { color: var(--muted); font-size: calc(12px * var(--fs)); white-space: nowrap; }
.post a { font-size: calc(12.5px * var(--fs)); }

/* ---------- ticker ---------- */
.ticker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.ticker-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.ticker-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ticker-head h3 { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; }
.ticker-head h3 span { color: var(--text); }
.ticker-head .meta { margin-left: auto; font-size: calc(11.5px * var(--fs)); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex-shrink: 0; animation: pulse-glow 1.8s ease-in-out infinite; }
.ticker-list { list-style: none; display: flex; flex-direction: column; }
.ticker-list li { padding: 9px 0; border-top: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ticker-list li:first-child { border-top: 0; }
.ticker-list li.ldr { padding: 14px 0; text-align: left; display: block; }
.ticker-list li.fresh { animation: flash-in 2.4s ease-out; }
.tk-title { font-weight: 600; font-size: calc(13.5px * var(--fs)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@keyframes flash-in { from { background: var(--accent-soft); } to { background: transparent; } }

/* ---------- forms ---------- */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: calc(12px * var(--fs)); font-weight: 500; }
.field .search { flex: none; min-width: 170px; }
.pw { display: flex; gap: 6px; align-items: center; }
.pw .search { min-width: 210px; font-family: var(--mono); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--overlay); backdrop-filter: blur(3px); }
.modal-card {
  width: min(720px, 100%); max-height: min(82vh, 760px); overflow: auto; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.modal-actions { display: flex; gap: 8px; margin-left: auto; }
.modal-card .hint { margin: 0 0 14px; }
.slice-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.slice-list .vc { box-shadow: none; background: var(--surface-2); }

/* ---------- misc ---------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 9px 16px; font-size: calc(13px * var(--fs)); box-shadow: var(--shadow); transition: opacity .18s ease, transform .18s ease;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.foot { max-width: 1240px; margin: 0 auto; padding: 22px 20px 48px; color: var(--muted); font-size: calc(12px * var(--fs)); border-top: 1px solid var(--border); }

@media (max-width: 640px) {
  .topbar-inner { padding: 0 14px; }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .status-row { margin-left: 0; justify-content: flex-start; width: 100%; }
  .tabs { padding: 0 10px; }
  main { padding: 0 14px 40px; }
  .updated { text-align: left; }
  .region-pick { width: 100%; }
  .region-pick select.search { flex: 1; }
  .post { flex-direction: column; }
  .post .right { text-align: left; }
  .stat .num { font-size: calc(24px * var(--fs)); }
  .bar-row .bk { width: 92px; }
  .wordmark { font-size: calc(21px * var(--fs)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- v3: filter bar, banners, ticker extras ---------- */
.filterbar { max-width: 1240px; margin: 12px auto 0; padding: 0 20px; }
.fb { display: inline-flex; align-items: center; gap: 10px; font-size: calc(13px * var(--fs)); color: var(--text-2); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 999px; padding: 4px 6px 4px 14px; }
.fb strong { color: var(--text); }
.fb button { background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 10px; font-size: calc(12px * var(--fs)); cursor: pointer; }
.fb button:hover { color: var(--text); }
.newbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 16px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: calc(13.5px * var(--fs)); }
.newbar button { background: var(--accent); color: #fff; border: 0; border-radius: 7px; padding: 4px 12px; font-size: calc(12.5px * var(--fs)); cursor: pointer; }
.badge.new { background: var(--accent); color: #fff; border-color: transparent; letter-spacing: .04em; }
.town { color: var(--muted); font-weight: 400; }
.hint.small { font-size: calc(12px * var(--fs)); margin: 12px 0 0; }
.page-title { font-size: calc(20px * var(--fs)); letter-spacing: -.01em; margin-bottom: 4px; }
.chk { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: calc(13px * var(--fs)); cursor: pointer; user-select: none; }
.chk input { accent-color: var(--accent); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sortable table + pager ---------- */
.table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.sortable:hover { color: var(--text); }
.table th.sorted { color: var(--text); }
.table th .arrow { margin-left: 4px; font-size: calc(10px * var(--fs)); opacity: .8; }
.table tbody tr.clickable { cursor: pointer; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.pager .btns { display: flex; gap: 6px; }

/* ---------- drawer (victim details) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 44; background: var(--overlay); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(520px, 100vw); background: var(--surface);
  border-left: 1px solid var(--border-strong); box-shadow: -18px 0 50px rgba(0, 0, 0, .3); display: flex; flex-direction: column; animation: slide-in .18s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.drawer-head h2 { font-size: calc(19px * var(--fs)); line-height: 1.3; letter-spacing: -.01em; }
.drawer-body { padding: 4px 22px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.drawer .dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: calc(13px * var(--fs)); }
.drawer .dl dt { color: var(--muted); }
.drawer .desc { color: var(--text-2); font-size: calc(13.5px * var(--fs)); line-height: 1.6; white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.drawer .sect { font-size: calc(11px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.drawer .copy { flex: none; width: 100%; }

/* ---------- region strip ---------- */
.region-card { margin-bottom: 18px; }
.region-strip { --cols: 7; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; }
.rtile { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px 11px; }
.rtile:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.rtile.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.rtile .rn { font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--text-2); line-height: 1.25; min-height: 29px; }
.rtile .rc { font-size: calc(24px * var(--fs)); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rtile .rs { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.rtile .rbar { display: block; height: 4px; border-radius: 3px; background: var(--border); margin-top: 7px; overflow: hidden; }
.rtile .rbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--bar-a), var(--accent)); }
.rtile.dim .rc { color: var(--muted); }
.rtile.dim .rbar i { background: var(--muted); }
.region-card .hint { margin: 12px 0 0; }

/* ---------- dark web news ---------- */
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.news-head .hint { margin-bottom: 0; }
.briefing { font-size: calc(15px * var(--fs)); line-height: 1.65; }
.news-top-list { display: flex; flex-direction: column; }
.news-item { padding: 11px 0; border-top: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; }
.news-item .nbody { flex: 1; min-width: 0; }
.news-item:first-child { border-top: 0; padding-top: 2px; }
.news-item .nt { font-weight: 600; font-size: calc(14px * var(--fs)); display: block; color: var(--text); }
.news-item a.nt:hover { color: var(--link); text-decoration: none; }
.news-item .meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.news-item .sum { color: var(--muted); font-size: calc(12.5px * var(--fs)); margin-top: 4px; }

/* ---------- loading skeletons ---------- */
.sk { height: 14px; border-radius: 6px; margin: 12px 0; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 75%, var(--text) 10%) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.sk:nth-child(2n) { width: 82%; } .sk:nth-child(3n) { width: 64%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- news thumbnails ---------- */
.thumb { flex: none; width: 132px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.no-thumbs .thumb { display: none; }
.head-actions { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
@media (max-width: 640px) { .thumb { width: 92px; height: 62px; } .news-item { gap: 10px; } }

/* ---------- spacing: every block on a page keeps a gap from the next ---------- */
.news-top { margin-bottom: 18px; }

/* ---------- dark web briefing ---------- */
.brief { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px 36px; align-items: start; margin-bottom: 10px; }
.brief .sect-t { font-size: calc(11px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.brief-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.kick { font-size: calc(11px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.delta { font-size: calc(12px * var(--fs)); font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.delta.up { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.delta.down { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.delta.flat { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.brief-headline { font-size: calc(22px * var(--fs)); line-height: 1.25; letter-spacing: -.015em; font-weight: 650; margin-bottom: 16px; }
.points { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.points li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.points .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.points .ic.hot { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.points .lbl { font-size: calc(11px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.points .txt { font-size: calc(14px * var(--fs)); color: var(--text); line-height: 1.4; }
.donut-wrap { position: relative; width: 168px; height: 168px; margin: 0 auto 12px; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-wrap circle { fill: none; stroke-width: 15; cursor: pointer; transition: stroke-width .15s ease, opacity .15s ease; }
.donut-wrap circle.track { stroke: var(--surface-2); cursor: default; }
.donut-wrap circle:not(.track):hover, .donut-wrap circle.on { stroke-width: 19; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-size: calc(30px * var(--fs)); font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.donut-center span { font-size: calc(11px * var(--fs)); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.legend { display: flex; flex-direction: column; gap: 3px; }
.lg { display: grid; grid-template-columns: 12px 1fr auto; gap: 9px; align-items: center; text-align: left; width: 100%; background: none; border: 1px solid transparent; border-radius: 7px; padding: 4px 8px; font: inherit; font-size: calc(12.5px * var(--fs)); color: var(--text-2); cursor: pointer; }
.lg:hover { background: var(--surface-2); }
.lg.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
.lg i { width: 11px; height: 11px; border-radius: 3px; }
.lg b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.hint.brief-note { margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--fs)); padding: 3px 4px 3px 11px; border-radius: 999px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
.chip button { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); border-radius: 999px; width: 20px; height: 20px; line-height: 1; cursor: pointer; font-size: calc(13px * var(--fs)); padding: 0; }
@media (max-width: 900px) { .brief { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .brief { grid-template-columns: 1fr; } .brief-headline { font-size: calc(19px * var(--fs)); } }

/* a 'Load more' / pager paragraph under a list never sits flush against it */
.panel > p:has(> .more) { margin-top: 14px; }

/* full-width card whose news items flow into columns */
.chart-grid .card.wide { grid-column: 1 / -1; }
.uk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 0 32px; }
.uk-grid .news-item:first-child { padding-top: 11px; border-top: 1px solid var(--border); }
.uk-grid .news-item:nth-child(-n+2) { border-top: 0; padding-top: 2px; }
@media (max-width: 760px) { .uk-grid .news-item:nth-child(2) { border-top: 1px solid var(--border); padding-top: 11px; } }

/* long addresses in log rows wrap instead of widening the table (only the detail column) */
#act-rows td:nth-child(4), #ua-rows td:nth-child(3) { overflow-wrap: anywhere; }

/* ---------- welcome tour (shown once per user; reopen from Account) ---------- */
.onboard { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto;
  background: radial-gradient(900px 520px at 50% -8%, var(--accent-soft), transparent 62%), var(--bg); }
.ob-card { width: min(780px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px 40px 26px; box-shadow: var(--shadow); margin: auto; }
.ob-card.wide { width: min(980px, 100%); }
.ob-step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ob-mark { display: block; margin-bottom: 10px; }
.ob-title { font-size: calc(28px * var(--fs)); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.ob-title .eye { color: var(--accent); }
.ob-sub { color: var(--muted); font-size: calc(14px * var(--fs)); margin: 4px 0 22px; }
.ob-sub2 { color: var(--text-2); font-size: calc(14px * var(--fs)); line-height: 1.55; max-width: 60ch; margin: 8px 0 20px; }
.ob-points { list-style: none; display: flex; flex-direction: column; gap: 14px; width: 100%; text-align: left; margin-bottom: 18px; }
.ob-points li { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: calc(14.5px * var(--fs)); line-height: 1.5; color: var(--text-2); }
.ob-points strong { color: var(--text); font-weight: 650; }
.ob-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.ob-fine { color: var(--muted); font-size: calc(12px * var(--fs)); margin-bottom: 18px; }
.ob-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.btn.big { padding: 11px 24px; font-size: calc(14.5px * var(--fs)); border-radius: 10px; }
.ob-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(215px, 100%), 1fr)); gap: 10px; width: 100%; text-align: left; margin-bottom: 20px; padding: 2px; }
.ob-tile { display: flex; flex-direction: column; gap: 3px; font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px 12px; }
.ob-tile:hover { border-color: var(--border-strong); }
.ob-tile[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.ob-tile .n { font-weight: 650; font-size: calc(14px * var(--fs)); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ob-tile .n em { font-style: normal; font-weight: 500; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-tile .f { font-size: calc(12px * var(--fs)); color: var(--muted); line-height: 1.4; }
.ob-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.ob-dots i.on { background: var(--accent); width: 22px; border-radius: 6px; }
@media (max-width: 640px) { .ob-card { padding: 26px 18px 20px; } .ob-title { font-size: calc(23px * var(--fs)); } .ob-points li { grid-template-columns: 38px 1fr; gap: 12px; padding: 12px; font-size: calc(14px * var(--fs)); } .ob-ic { width: 38px; height: 38px; } }

/* ---------- Users page: aligned form and table ---------- */
.add-user { margin-bottom: 18px; }
.uform { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(280px, 2.2fr) 120px minmax(150px, 1fr) auto; gap: 14px 16px; align-items: end; }
.uform .field { min-width: 0; }
.uform .search, .uform .btn, .uform .more { height: 38px; }
.uform .search { width: 100%; flex: none; min-width: 0; }
.uform .pw { display: flex; gap: 8px; }
.uform .pw .search { flex: 1; }
.uform .pw .more { padding: 0 14px; }
.uform .btn { padding: 0 22px; }
.callout { margin: 14px 0 10px; padding: 11px 14px; border-radius: 9px; font-size: calc(13.5px * var(--fs)); background: color-mix(in srgb, var(--good) 10%, transparent); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.callout.err { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.users th, .users td { vertical-align: middle; }
.users td { padding-top: 12px; padding-bottom: 12px; }
.users th.r, .users td.r { text-align: right; }
.users .who { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.users .who .nm { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.users .st { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.users select.search { width: 100%; min-width: 150px; max-width: 200px; height: 32px; padding: 0 8px; font-size: calc(12.5px * var(--fs)); }
.users td.actions { display: table-cell; white-space: nowrap; }
.row-actions { display: inline-flex; justify-content: flex-end; gap: 6px; }
.row-actions .icon-btn { width: 32px; height: 32px; }
.row-actions .icon-btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.row-actions .icon-btn.danger:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
@media (max-width: 1100px) {
  .uform { grid-template-columns: 1fr 1fr; grid-template-areas: "name role" "pass pass" "region add"; }
  .uform > label:nth-child(1) { grid-area: name; } .uform > label:nth-child(2) { grid-area: pass; }
  .uform > label:nth-child(3) { grid-area: role; } .uform > label:nth-child(4) { grid-area: region; }
  .uform > .btn { grid-area: add; justify-self: start; }
}
@media (max-width: 640px) { .uform { grid-template-columns: 1fr; grid-template-areas: "name" "pass" "role" "region" "add"; } }
.users { min-width: 900px; }
.users td, .users th { white-space: nowrap; }
.users .who .meta { white-space: normal; }
/* phones: each user becomes a stacked card instead of a squeezed table row */
@media (max-width: 640px) {
  .users { min-width: 0; } .users thead { display: none; }
  .users, .users tbody, .users tr, .users td { display: block; width: 100%; }
  .users tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .users tbody tr:last-child { border-bottom: 0; }
  .users td { padding: 0; border: 0; white-space: normal; }
  .users td::before { content: attr(data-label); display: block; font-size: calc(10.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
  .users td.who-cell, .users td.actions { grid-column: 1 / -1; } .users td.who-cell::before, .users td.actions::before { display: none; }
  .users select.search { max-width: none; }
  .users td.actions { text-align: left; } .row-actions { justify-content: flex-start; }
}
/* ---------- set-your-own-password screen ---------- */
.pr-card { width: min(520px, 100%); }
.pr-card .ob-title, .pr-card .ob-sub2, .pr-card .ob-mark { align-self: center; text-align: center; }
.pr-card { display: flex; flex-direction: column; align-items: center; }
.pr-form { display: flex; flex-direction: column; gap: 14px; width: 100%; text-align: left; }
.pr-form .search { width: 100%; flex: none; height: 40px; }
.pr-form input[readonly] { background: var(--surface-2); color: var(--muted); }
.pr-form .ob-actions { margin-top: 6px; }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--bad); transition: width .2s ease, background .2s ease; }
.meter i[data-l="2"] { background: var(--warn); } .meter i[data-l="3"] { background: var(--link); } .meter i[data-l="4"] { background: var(--good); }
.strength { font-size: calc(12px * var(--fs)); color: var(--muted); min-height: 16px; }
.pr-msg { font-size: calc(13px * var(--fs)); color: var(--bad); padding: 9px 12px; border-radius: 8px; background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.sr-only-input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.warnbox { margin: 8px 0 0; padding: 9px 12px; border-radius: 8px; font-size: calc(13px * var(--fs)); line-height: 1.45; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 36%, transparent); }
.warnbox[hidden] { display: none; }

/* ticker entries: name + meta on the left, the area in a box on the right; View more footer */
.tk-main { min-width: 0; flex: 1 1 auto; }
.tk-name { color: inherit; }
.tk-open:hover .tk-name, .tk-open:focus-visible .tk-name { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tk-area { flex: 0 1 auto; align-self: center; max-width: 44%; text-align: center; font-size: calc(12px * var(--fs)); line-height: 1.25; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 7px; padding: 4px 9px; overflow-wrap: break-word; }
.ticker-list.expanded { max-height: 540px; overflow-y: auto; padding-right: 8px; }
.tk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tk-foot[hidden] { display: none; }
.tk-foot .meta { font-size: calc(12px * var(--fs)); white-space: nowrap; }
.tk-btns { margin-left: auto; display: flex; gap: 8px; }
.tk-btns [hidden] { display: none; }

/* ---------- flag / allocate ---------- */
.flagbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; padding: 0; cursor: pointer;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 7px; }
.flagbtn:hover, .flagbtn:focus-visible { color: var(--text); background: var(--surface-2); }
.flagbtn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.flagbtn svg, .badge.alloc svg { display: block; }
.badge.fp { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); text-transform: uppercase; letter-spacing: .05em; font-size: calc(10px * var(--fs)); }
.badge.alloc { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); letter-spacing: .06em; }
.tk-side { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; max-width: 56%; }
.tk-side .tk-area { max-width: none; }
.table td.r, .table th.r { text-align: right; white-space: nowrap; }
.dr-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dr-actions .more { display: inline-flex; align-items: center; gap: 6px; }
.modal.fdlg { z-index: 50; }
.fd-card { max-width: 520px; }
.fd-sub { margin: -4px 0 14px; color: var(--text-2); font-size: calc(13.5px * var(--fs)); }
.fd-status { padding: 10px 12px; border-radius: 9px; font-size: calc(13px * var(--fs)); line-height: 1.5; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; border: 1px solid var(--border); background: var(--surface-2); }
.fd-status.fp { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.fd-status.al { border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.fd-status .fd-st-text { flex: 1 1 220px; min-width: 0; }
.fd-sect { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.fd-sect:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.fd-sect h4 { font-size: calc(13px * var(--fs)); margin: 0 0 4px; }
.fd-sect .hint { margin: 0 0 10px; }
.fd-opts { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.fd-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 9px; cursor: pointer; background: var(--surface); }
.fd-opt:hover { background: var(--surface-2); }
.fd-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.fd-opt input { margin-top: 3px; accent-color: var(--accent); }
.fd-opt b { display: block; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.fd-opt small { color: var(--muted); font-size: calc(12.5px * var(--fs)); line-height: 1.4; }
.fd-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.fd-row .field .search { min-width: 0; width: 100%; }
.fd-row .grow { flex: 1 1 200px; }
.fd-init { width: 92px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; text-align: center; font-family: var(--mono); }
.fd-msg { min-height: 1.3em; margin: 8px 0 0; font-size: calc(12.5px * var(--fs)); color: var(--bad); }
#toast.act { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
#toast .toast-act { background: transparent; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- breach details (the pop-up) ---------- */
.ticker-list li.tk-open { cursor: pointer; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.ticker-list li.tk-open:hover { background: var(--hover); }
.ticker-list li.tk-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.drawer .dl dd .meta { margin-left: 4px; }
.br-gang { border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.br-gh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.br-gd { margin: 2px 0 4px; font-size: calc(13px * var(--fs)); line-height: 1.5; color: var(--text-2); }
.br-src { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.br-src li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; align-items: start; font-size: calc(13px * var(--fs)); line-height: 1.45; }
.br-src li.ldr { display: block; color: var(--muted); }
.br-src li > .badge { justify-self: start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.br-sl { min-width: 0; overflow-wrap: break-word; }
.br-sl .copy { margin-top: 6px; width: 100%; }
.br-sl .meta { margin-top: 3px; }
@media (max-width: 480px) { .br-src li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ---------- company (Companies House) in the breach summary ---------- */
.br-dir { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.br-cofoot { margin-top: 8px; font-size: calc(13px * var(--fs)); line-height: 1.5; }
.br-cofoot .meta { margin-top: 4px; }

/* ---------- welcome tour: light or dark, and the icon guide ---------- */
.ob-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin: 4px 0 20px; }
.ob-theme { display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px; }
.ob-theme:hover { border-color: var(--text-2); }
.ob-theme[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.ob-theme .tn { font-weight: 650; font-size: calc(16px * var(--fs)); }
.ob-theme .td { color: var(--text-2); font-size: calc(13px * var(--fs)); line-height: 1.45; }
.ob-pv { display: grid; gap: 7px; padding: 10px; height: 108px; align-content: start; border-radius: 9px; border: 1px solid var(--pv-bd); background: var(--pv-bg); }
.ob-pv.dark { --pv-bg: #151b26; --pv-sf: #1c2331; --pv-bd: #2f3a4e; --pv-tx: #e9eef6; --pv-mu: #94a2b7; --pv-ac: #e02a52; }
.ob-pv.light { --pv-bg: #f1f3f8; --pv-sf: #ffffff; --pv-bd: #dce2ec; --pv-tx: #18202e; --pv-mu: #62708a; --pv-ac: #c8204a; }
.ob-pv .pt { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.ob-pv .pt b { width: 9px; height: 9px; border-radius: 50%; background: var(--pv-ac); }
.ob-pv .pt i { height: 7px; width: 46%; border-radius: 3px; background: var(--pv-tx); opacity: .85; }
.ob-pv .pr { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; background: var(--pv-sf); border: 1px solid var(--pv-bd); }
.ob-pv .pr i { flex: 1; height: 6px; border-radius: 3px; background: var(--pv-mu); opacity: .75; }
.ob-pv .pr u { width: 26px; height: 9px; border-radius: 3px; background: var(--pv-ac); opacity: .9; text-decoration: none; }
.ob-icons { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 18px; margin-bottom: 18px; }
.ob-icons h3 { font-size: calc(11.5px * var(--fs)); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.ob-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ob-legend li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.ob-legend .ic { display: grid; place-items: center; min-height: 34px; }
.ob-legend strong { display: block; color: var(--text); font-weight: 650; font-size: calc(14px * var(--fs)); margin-bottom: 2px; }
.ob-legend .d { display: block; color: var(--text-2); font-size: calc(12.5px * var(--fs)); line-height: 1.45; }
.ob-ibtn { display: inline-grid; place-items: center; width: 36px; height: 34px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--text-2); }
.ob-ibtn svg { display: block; }
.ob-arrow { font-size: calc(22px * var(--fs)); color: var(--link); line-height: 1; }
.ob-copy { font-size: calc(11.5px * var(--fs)); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 3px 9px; background: var(--surface); }
@media (max-width: 720px) { .ob-legend { grid-template-columns: 1fr; } .ob-themes { grid-template-columns: 1fr; } }

.ob-legend .badge { white-space: nowrap; }
@media (max-width: 720px) { .ob-legend li { grid-template-columns: 104px minmax(0, 1fr); } }
