/* WS Gateway. Wersirius / Niški polumaraton brand: indigo #323491, lime #CADB2B, Exo 2, slanted bars. */


/* Exo 2 (OFL), headings, labels, numbers. Files: public/Fonts, subset to latin + latin-ext.
   font-display: block keeps headings invisible for the few ms the local file needs, instead of
   flashing another face (an installed Ethnocentric or the system font). */
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 500; font-display: block; src: url(fonts/exo2-500.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 600; font-display: block; src: url(fonts/exo2-600.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 700; font-display: block; src: url(fonts/exo2-700.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 800; font-display: block; src: url(fonts/exo2-800.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: italic; font-weight: 800; font-display: block; src: url(fonts/exo2-800i.woff2) format("woff2"); }

/* Satoshi (Indian Type Foundry, Fontshare free licence), body text */
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 400; font-display: block; src: url(fonts/satoshi-regular.woff2) format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: italic; font-weight: 400; font-display: block; src: url(fonts/satoshi-italic.woff2) format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 700; font-display: block; src: url(fonts/satoshi-bold.woff2) format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: italic; font-weight: 700; font-display: block; src: url(fonts/satoshi-bolditalic.woff2) format("woff2"); }

/* ------------------------------------------------------------------ tokens */
:root {
  --indigo: #323491;
  --indigo-700: #282a78;
  --indigo-900: #15163b;
  --lime: #cadb2b;
  --lime-hover: #d8e74a;
  --on-lime: #15163b;
  --white: #ffffff;

  --bg: #f3f4fa;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #ecedf6;
  --border: #dfe0ee;
  --border-2: #c9cbe3;
  --text: #15163b;
  --text-2: #3b3d67;
  --muted: #5d5f88;
  --link: #323491;
  --sel-bg: #323491;
  --sel-text: #ffffff;
  --focus: #323491;
  --side-bg: #323491;
  --side-border: transparent;
  --bib-bg: #323491;

  --clean: #12936a;   --clean-soft: #e2f4ec;  --clean-text: #0b6e4f;
  --gray: #6a6f8e;    --gray-soft: #ecedf4;   --gray-text: #4c5072;
  --spam: #d48a06;    --spam-soft: #fcf1da;   --spam-text: #8d5503;
  --susp: #e2601a;    --susp-soft: #fdeae0;   --susp-text: #ab4108;
  --mal: #d92d2d;     --mal-soft: #fce5e5;    --mal-text: #ad1d1d;
  --danger-solid: #d92d2d; --danger-ink: #ffffff;

  --series-ok: #4a4dbf;
  --series-spam: #e5a12a;
  --series-threat: #df3d3d;

  --shadow: 0 1px 2px rgba(21, 22, 59, .05);
  --shadow-pop: 0 10px 30px -12px rgba(21, 22, 59, .28);

  --r-xs: 4px; --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --side-w: 244px;
  --display: "Exo 2", ui-sans-serif, system-ui, sans-serif;
  --font: "Satoshi", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c22; --surface: #13143a; --surface-2: #181a46; --surface-3: #202256;
    --border: #272a62; --border-2: #363a7c;
    --text: #eef0fb; --text-2: #c3c5e8; --muted: #9b9ecb;
    --link: #cadb2b; --sel-bg: #cadb2b; --sel-text: #15163b; --focus: #cadb2b;
    --side-bg: #101132; --side-border: #23255e; --bib-bg: #1f2170;
    --clean: #36c48e; --clean-soft: rgba(54, 196, 142, .14); --clean-text: #6ad9ad;
    --gray: #8e93b8;  --gray-soft: rgba(142, 147, 184, .15); --gray-text: #b2b6d6;
    --spam: #f0ac3a;  --spam-soft: rgba(240, 172, 58, .15); --spam-text: #f6c470;
    --susp: #fb8445;  --susp-soft: rgba(251, 132, 69, .15); --susp-text: #fda677;
    --mal: #f25c5c;   --mal-soft: rgba(242, 92, 92, .16);  --mal-text: #ff8f8f;
    --series-ok: #8b8ef5; --series-spam: #f0ac3a; --series-threat: #f25c5c;
    --shadow: none;
    --shadow-pop: 0 14px 40px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c22; --surface: #13143a; --surface-2: #181a46; --surface-3: #202256;
  --border: #272a62; --border-2: #363a7c;
  --text: #eef0fb; --text-2: #c3c5e8; --muted: #9b9ecb;
  --link: #cadb2b; --sel-bg: #cadb2b; --sel-text: #15163b; --focus: #cadb2b;
  --side-bg: #101132; --side-border: #23255e; --bib-bg: #1f2170;
  --clean: #36c48e; --clean-soft: rgba(54, 196, 142, .14); --clean-text: #6ad9ad;
  --gray: #8e93b8;  --gray-soft: rgba(142, 147, 184, .15); --gray-text: #b2b6d6;
  --spam: #f0ac3a;  --spam-soft: rgba(240, 172, 58, .15); --spam-text: #f6c470;
  --susp: #fb8445;  --susp-soft: rgba(251, 132, 69, .15); --susp-text: #fda677;
  --mal: #f25c5c;   --mal-soft: rgba(242, 92, 92, .16);  --mal-text: #ff8f8f;
  --series-ok: #8b8ef5; --series-spam: #f0ac3a; --series-threat: #f25c5c;
  --shadow: none;
  --shadow-pop: 0 14px 40px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--text); text-wrap: balance; letter-spacing: -.005em; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--mono); }
::selection { background: var(--sel-bg); color: var(--sel-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-inline { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.block { display: block; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
kbd { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 8px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 16px; text-align: center; }

/* ------------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px; padding: 18px 12px 14px; background: var(--side-bg); border-right: 1px solid var(--side-border); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: #fff; font: 600 17px/1 var(--display); letter-spacing: .01em; }
.brand b { font-weight: 800; margin-left: 4px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.bm-bg { fill: var(--lime); }
.bm-a { fill: var(--indigo); }
.bm-b { fill: var(--indigo); opacity: .5; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: rgba(255, 255, 255, .78); font: 600 14px/1.3 var(--display); letter-spacing: .01em; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav a.on { background: var(--lime); color: var(--on-lime); }
.nav a .ic { width: 19px; height: 19px; }
.nav .count { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--danger-solid); color: var(--danger-ink); font: 700 12px/1.3 var(--display); text-align: center; }
.nav .count-soft { background: rgba(255, 255, 255, .16); color: #fff; }
.nav a.on .count-soft { background: rgba(21, 22, 59, .14); color: var(--on-lime); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.mode { padding: 12px; border-radius: var(--r); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.mode-head { display: flex; align-items: center; gap: 8px; }
.mode b { font: 700 13.5px var(--display); }
.mode p { margin-top: 4px; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .72); }
.mode-dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--lime); }
.mode-act .mode-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; animation: pulse 2.4s cubic-bezier(.16, 1, .3, 1) infinite; }
.mode-obs .mode-dot { background: var(--spam); }
@keyframes pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
.mode-btn { margin-top: 10px; width: 100%; height: 30px; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-sm); background: transparent; color: #fff; font: 600 12.5px var(--display); cursor: pointer; }
.mode-btn:hover { background: rgba(255, 255, 255, .1); }
.mode-obs .mode-btn { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.me { display: flex; align-items: center; gap: 8px; padding: 12px 4px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.me-mail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; }
.me-mail small { display: block; color: rgba(255, 255, 255, .62); font-weight: 500; font-size: 12px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: var(--r-sm); background: transparent; color: rgba(255, 255, 255, .72); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ic-sun { display: none; }
:root[data-theme="dark"] .ic-sun { display: block; }
:root[data-theme="dark"] .ic-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic-sun { display: block; } :root:not([data-theme="light"]) .ic-moon { display: none; } }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 18px 32px 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.3) blur(10px); }
.top-title { flex: 1; min-width: 0; }
.top h1 { font-size: 27px; font-weight: 800; line-height: 1.15; }
.top h1.subject { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.top .sub { color: var(--muted); margin-top: 3px; max-width: 80ch; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--muted); font: 600 13px var(--display); }
.back .ic { width: 15px; height: 15px; }
.search { position: relative; width: min(340px, 34vw); flex: none; }
.search .ic, .field-search .ic { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search input[type=search] { padding-left: 38px; background: var(--surface); }
.page { padding: 6px 32px 48px; max-width: 1440px; }

/* ---------------------------------------------------------------- controls */
input[type=text], input[type=email], input[type=search], select {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
select { appearance: none; padding-right: 30px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.select { position: relative; display: inline-flex; align-items: center; }
.select > .ic { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.select > .ic ~ select { padding-left: 34px; }
.select-block { display: flex; }
.field-search { position: relative; flex: 1 1 260px; min-width: 200px; }
.field-search input[type=search] { padding-left: 38px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 12px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--indigo); width: 16px; height: 16px; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: 700 13.5px var(--display); letter-spacing: .01em; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--surface-2); border-color: var(--text-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
.btn-primary kbd { background: transparent; border-color: rgba(21, 22, 59, .3); color: inherit; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: var(--mal-text); }
.btn-danger:hover { background: var(--mal-soft); border-color: var(--mal); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .select select { width: auto; min-width: 150px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: var(--r-sm); }
.seg a, .seg-radio span { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: var(--r-xs); color: var(--muted); font: 700 13px var(--display); cursor: pointer; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { background: var(--indigo); color: #fff; }
:root[data-theme="dark"] .seg a.on { background: var(--lime); color: var(--on-lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg a.on { background: var(--lime); color: var(--on-lime); } }
.seg-sm a { padding: 5px 12px; }
.seg-radio label { display: inline-flex; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio input:checked + span { background: var(--indigo); color: #fff; }
.seg-radio input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

.tabs { display: flex; gap: 2px; margin: 0 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { padding: 10px 12px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--muted); font: 700 13.5px var(--display); white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--indigo); }
:root[data-theme="dark"] .tabs a.on { border-bottom-color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs a.on { border-bottom-color: var(--lime); } }

.hint { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.hint kbd { margin: 0 2px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--r-sm); font-weight: 600; }
.alert-err { background: var(--mal-soft); color: var(--mal-text); }
.alert-ok { background: var(--clean-soft); color: var(--clean-text); }

/* ----------------------------------------------------------- pills & tags */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font: 700 12.5px var(--display); white-space: nowrap; background: var(--gray-soft); color: var(--gray-text); }
.pill .dot, .dot-sm, .lg { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.v-clean { background: var(--clean-soft); color: var(--clean-text); }
.v-graymail { background: var(--gray-soft); color: var(--gray-text); }
.v-spam { background: var(--spam-soft); color: var(--spam-text); }
.v-suspicious { background: var(--susp-soft); color: var(--susp-text); }
.v-malicious { background: var(--mal-soft); color: var(--mal-text); }
.v-none { background: var(--surface-3); color: var(--muted); }
.pill-lg { height: 32px; padding: 0 14px 0 12px; font-size: 16px; }
.pill-lg .dot { width: 9px; height: 9px; }
.pill-pp { padding-left: 4px; }
.pp-tag { display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 11px; font-weight: 800; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-2); font: 600 12px var(--display); white-space: nowrap; }
.tag-ok { background: var(--clean-soft); color: var(--clean-text); }
.tag-warn { background: var(--spam-soft); color: var(--spam-text); }
.tag-q { background: var(--indigo); color: #fff; }
.tag-ai { background: var(--surface-3); color: var(--text); }
.tag-role-admin { background: var(--indigo); color: #fff; }
.tag-role-analyst { background: var(--lime); color: var(--on-lime); }
.dot-sm.v-clean { background: var(--clean); } .dot-sm.v-graymail { background: var(--gray); } .dot-sm.v-spam { background: var(--spam); }
.dot-sm.v-suspicious { background: var(--susp); } .dot-sm.v-malicious { background: var(--mal); }

.av { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font: 700 12px var(--display); }
.av-sm { width: 26px; height: 26px; font-size: 11px; }
.av-lg { width: 44px; height: 44px; font-size: 15px; }
.av-sq { border-radius: var(--r-sm); }
.av-me { width: 32px; height: 32px; background: var(--lime); color: var(--on-lime); font-size: 13px; }
.av-0, .av-4 { background: #e7e8f7; color: #323491; }
.av-1, .av-5 { background: #eef4cf; color: #5a6309; }
.av-2, .av-6 { background: #dfe0f3; color: #282a78; }
.av-3, .av-7 { background: #ececf2; color: #44476b; }
:root[data-theme="dark"] .av:not(.av-me) { background: var(--surface-3); color: var(--text-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av:not(.av-me) { background: var(--surface-3); color: var(--text-2); } }

/* ------------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.col-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-stack > .card:last-child { flex: 1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .trio-h { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-head h2::before, .trio-h::before { content: ""; width: 5px; height: 15px; flex: none; transform: skewX(-20deg); background: var(--indigo); }
:root[data-theme="dark"] .card-head h2::before, :root[data-theme="dark"] .trio-h::before { background: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-head h2::before, :root:not([data-theme="light"]) .trio-h::before { background: var(--lime); } }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-note { color: var(--muted); font-size: 12.5px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 12px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); }
.empty-lg { padding: 56px 16px; }
.empty-ic { width: 28px; height: 28px; padding: 6px; box-sizing: content-box; border-radius: 50%; background: var(--lime); color: var(--on-lime); }

/* --------------------------------------------- the start-number hero band */
.bib { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; padding-right: 132px; overflow: hidden; border-radius: var(--r-lg); background: var(--bib-bg); color: #fff; isolation: isolate; }
.bib-cell { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 20px 22px 18px; color: #fff; border-right: 1px solid rgba(255, 255, 255, .14); }
.bib-cell:hover { text-decoration: none; background: rgba(255, 255, 255, .05); }
.bib-label { font: 600 13.5px var(--display); color: rgba(255, 255, 255, .78); letter-spacing: .04em; }
.bib-num { font: italic 800 46px/1.05 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--lime); }
.bib-cell:nth-child(2) .bib-num { color: #fff; }
.bib-num.is-hot { color: #ff9b9b; }
.bib-foot { display: flex; align-items: center; gap: 8px; min-height: 22px; color: rgba(255, 255, 255, .72); font-size: 12.5px; position: relative; z-index: 1; }
.bib-cell .spark { position: absolute; right: 18px; top: 26px; width: 38%; height: 34px; }
.bib-you { background: var(--lime); color: var(--on-lime); border-right: 0; overflow: hidden; }
.bib-you .bib-num { color: var(--indigo); }
.bib-you::before, .bib-you::after { content: ""; display: none; position: absolute; top: -10%; bottom: -10%; width: 16px; transform: skewX(-22deg); }
.bib-you::before { right: 44px; background: var(--indigo); }
.bib-you::after { right: 20px; background: #fff; }
.bib-you:hover { background: var(--lime-hover); }
.bib-you .bib-label, .bib-you .bib-foot { color: rgba(21, 22, 59, .78); }
.go { display: inline-flex; align-items: center; gap: 2px; font: 700 13px var(--display); color: inherit; }
.go .ic { width: 15px; height: 15px; }
.streaks { position: absolute; inset: 0 0 0 auto; width: 132px; pointer-events: none; z-index: -1; }
.streaks i { position: absolute; top: -20%; bottom: -20%; width: 22px; transform: skewX(-22deg); }
.streaks i:nth-child(1) { right: 84px; background: #fff; opacity: .92; }
.streaks i:nth-child(2) { right: 50px; background: var(--lime); }
.streaks i:nth-child(3) { right: 16px; background: #fff; opacity: .35; }
.bib .delta.flat { background: rgba(255, 255, 255, .14); color: #fff; }
.bib .delta.good { background: rgba(202, 219, 43, .22); color: var(--lime); }
.bib .delta.bad { background: rgba(255, 120, 120, .2); color: #ffb0b0; }
.delta { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-xs); font: 700 12px var(--display); font-variant-numeric: tabular-nums; }
.delta.good { background: var(--clean-soft); color: var(--clean-text); }
.delta.bad { background: var(--mal-soft); color: var(--mal-text); }
.delta.flat { background: var(--surface-3); color: var(--muted); }
.spark-line { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.spark-area { stroke: none; opacity: .14; }
.sp-white .spark-line { stroke: #fff; opacity: .8; } .sp-white .spark-area { fill: #fff; }

/* ------------------------------------------------------------------ charts */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 2px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.lg-ok { background: var(--series-ok); } .lg-spam { background: var(--series-spam); } .lg-threat { background: var(--series-threat); }
.lg-clean { background: var(--clean); } .lg-graymail { background: var(--gray); } .lg-suspicious { background: var(--susp); } .lg-malicious { background: var(--mal); }
.area-chart { display: block; width: 100%; height: auto; overflow: visible; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.axis { fill: var(--muted); font: 600 11px var(--display); font-variant-numeric: tabular-nums; }
.layer { stroke: none; }
.layer-ok { fill: var(--series-ok); opacity: .14; }
.layer-spam { fill: var(--series-spam); opacity: .45; }
.layer-threat { fill: var(--series-threat); opacity: .75; }
.layer-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.line-ok { stroke: var(--series-ok); } .line-spam { stroke: var(--series-spam); } .line-threat { stroke: var(--series-threat); }
.hover-col { fill: var(--text); opacity: 0; }
.hover-col:hover { opacity: .05; }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 150px; height: 150px; flex: none; }
.donut circle { fill: none; }
.donut-track { stroke: var(--surface-3); }
.seg-clean { stroke: var(--clean); } .seg-graymail { stroke: var(--gray); } .seg-spam { stroke: var(--spam); }
.seg-suspicious { stroke: var(--susp); } .seg-malicious { stroke: var(--mal); }
.donut-num { fill: var(--text); font: italic 800 26px var(--display); }
.donut-cap { fill: var(--muted); font: 600 11px var(--display); }
.dist-legend { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.dist-legend a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; font-size: 13px; }
.dist-legend a:hover { background: var(--surface-2); text-decoration: none; }
.dist-legend b { margin-left: auto; color: var(--text); font: 700 14px var(--display); font-variant-numeric: tabular-nums; }

.bars, .people { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.bars a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 8px; border-radius: var(--r-sm); color: var(--text); }
.bars a:hover { background: var(--surface-2); text-decoration: none; }
.bar-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-val { font: 700 14px var(--display); font-variant-numeric: tabular-nums; }
.bar-val em { font-style: normal; color: var(--mal-text); font-weight: 600; font-size: 12.5px; margin-left: 4px; }
.bar { grid-column: 1 / -1; display: block; width: 100%; height: 6px; }
.bar-bg { fill: var(--surface-3); }
.bar-fg { fill: var(--series-ok); opacity: .8; }
.bar-threat { fill: var(--series-threat); }
.people a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); color: var(--text); font-weight: 600; }
.people a span:not(.av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people a:hover { background: var(--surface-2); text-decoration: none; }
.n-bad { color: var(--mal-text); font: 700 14px var(--display); font-variant-numeric: tabular-nums; }

/* agent + PP cards: number blocks */
.did { margin: 0 -8px; padding: 0; list-style: none; }
.did a, .pp-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); color: var(--text); }
.did a { grid-template-columns: 58px minmax(0, 1fr); }
.did li + li a, .pp-row + .pp-row { border-top: 1px solid var(--border); border-radius: 0; }
.did a:hover, .pp-row:hover { background: var(--surface-2); text-decoration: none; }
.did-num, .pp-num { display: grid; place-items: center; height: 44px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text); font: italic 800 24px var(--display); font-variant-numeric: tabular-nums; }
.n-lime { background: var(--lime); color: var(--on-lime); }
.n-red { background: var(--mal-soft); color: var(--mal-text); }
.n-amber { background: var(--spam-soft); color: var(--spam-text); }
.n-orange { background: var(--susp-soft); color: var(--susp-text); }
.did b:not(.did-num), .pp-what b { display: block; font: 700 14px var(--display); }
.did small, .pp-what small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.did-fail { margin-top: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--mal-soft); color: var(--mal-text); font-size: 12.5px; font-weight: 600; }
.pp-row .ic { color: var(--muted); width: 16px; height: 16px; }
.pp-row.bad .pp-num { background: var(--mal-soft); color: var(--mal-text); }
.pp-row.good .pp-num { background: var(--lime); color: var(--on-lime); }

/* queue + insights */
.queue { margin: 0 -8px; padding: 0; list-style: none; }
.queue a { display: flex; align-items: flex-start; gap: 12px; padding: 12px 8px; color: var(--text); }
.queue li + li a { border-top: 1px solid var(--border); }
.queue a:hover { background: var(--surface-2); text-decoration: none; }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.q-top { display: flex; align-items: baseline; gap: 10px; }
.q-top b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-top time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.q-subj { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sum { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.queue .pill { margin-top: 2px; }
.insights ul { margin: 0 -8px; padding: 0; list-style: none; }
.ins { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; line-height: 1.45; }
.ins:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.ins > span { flex: 1; }
.ins .ic { width: 15px; height: 15px; margin-top: 2px; color: var(--muted); }
.ins-dot { width: 10px; height: 4px; margin-top: 9px; flex: none; transform: skewX(-22deg); background: var(--indigo); }
.ins-bad .ins-dot { background: var(--mal); } .ins-warn .ins-dot { background: var(--spam); } .ins-good .ins-dot { background: var(--clean); }
:root[data-theme="dark"] .ins-dot { background: var(--text-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ins-dot { background: var(--text-2); } }
:root[data-theme="dark"] .ins-bad .ins-dot { background: var(--mal); } :root[data-theme="dark"] .ins-warn .ins-dot { background: var(--spam); } :root[data-theme="dark"] .ins-good .ins-dot { background: var(--lime); }

/* ------------------------------------------------------------------ tables */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 12px; text-align: left; color: var(--muted); font: 700 12px var(--display); letter-spacing: .02em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; }
.table-dense td { padding: 7px 10px; font-size: 12.5px; }
.table .w-bar { width: 32%; }
.table .bar { width: 100%; }
.row-link { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; min-width: 0; }
.row-link:hover { text-decoration: none; }
.from { display: flex; flex-direction: column; min-width: 0; }
.from b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from small { color: var(--muted); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-cell { text-align: center; color: var(--muted); padding: 28px; }
.is-off { opacity: .6; }

.list-card { padding: 4px 8px; }
.list-card .card-head { padding: 16px 12px 0; }
.mail-table { table-layout: fixed; }
.mail-table th:nth-child(1) { width: 25%; } .mail-table th:nth-child(2) { width: auto; }
.mail-table th:nth-child(3) { width: 170px; } .mail-table th:nth-child(4) { width: 170px; } .mail-table th:nth-child(5) { width: 112px; }
.q-table th:nth-child(3) { width: 22%; } .q-table th:nth-child(4) { width: 100px; } .q-table th:nth-child(5) { width: 160px; }
.mrow { transition: background .12s; }
.mrow:hover { background: var(--surface-2); }
.c-mail a { display: flex; flex-direction: column; color: var(--text); min-width: 0; }
.c-mail a:hover { text-decoration: none; }
.subj { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-v { white-space: nowrap; }
.c-v .tag { margin-top: 4px; display: flex; width: max-content; }
.c-t time { display: block; font: 700 13.5px var(--display); }
.c-t small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-rc { color: var(--text-2); overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }

/* bottom panel: three rankings in one card */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trio-col { min-width: 0; padding: 0 20px; border-left: 1px solid var(--border); }
.trio-col:first-child { padding-left: 0; border-left: 0; }
.trio-col:last-child { padding-right: 0; }
.trio-h { margin-bottom: 14px; }

/* lists page */
.add-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; padding: 14px; }
.add-row .grow { flex: 1 1 220px; }
.kind { display: inline-block; width: 12px; height: 12px; border-radius: 2px; transform: skewX(-18deg); }
.kind-allow { background: var(--lime); box-shadow: 0 0 0 1px var(--indigo); } .kind-block { background: var(--mal); }

/* ------------------------------------------------------------------ detail */
.mail-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.mail-meta .who { flex: 1; min-width: 0; }
.mail-meta .who p { overflow-wrap: anywhere; }
.mail-meta .when { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font: 600 13px var(--display); }
.warn-inline { display: inline-flex; align-items: center; margin-left: 10px; color: var(--susp-text); font-weight: 650; }

.verdict-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; padding: 20px 22px; margin-bottom: 16px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.vb-malicious { background: var(--mal-soft); border-color: color-mix(in srgb, var(--mal) 35%, var(--border)); }
.vb-suspicious { background: var(--susp-soft); border-color: color-mix(in srgb, var(--susp) 35%, var(--border)); }
.vb-clean { background: var(--clean-soft); border-color: color-mix(in srgb, var(--clean) 25%, var(--border)); }
.vb-spam { background: var(--spam-soft); border-color: color-mix(in srgb, var(--spam) 30%, var(--border)); }
.vb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.verdict-banner .pill-lg { background: var(--surface); }
.vb-summary { font-size: 16px; font-weight: 600; line-height: 1.5; max-width: 72ch; color: var(--text); }
.vb-reasons { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); max-width: 72ch; }
.vb-reasons li { margin: 3px 0; }
.vb-facts { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 200px; padding-left: 24px; border-left: 1px solid color-mix(in srgb, var(--text) 14%, transparent); }
.vb-facts dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.vb-facts dd { margin: 2px 0 0; font: 700 14px var(--display); display: flex; align-items: center; gap: 10px; }
.meter svg { display: block; width: 90px; height: 6px; }
.meter-bg { fill: color-mix(in srgb, var(--text) 12%, transparent); } .meter-fg { fill: var(--indigo); }
:root[data-theme="dark"] .meter-fg { fill: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meter-fg { fill: var(--lime); } }
.vb-action { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); color: var(--mal-text); font-weight: 600; }
.vb-action .ic { margin-top: 1px; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }

.card.preview-card { padding: 0; overflow: hidden; }
.preview-card .card-head { align-items: center; padding: 12px 14px; margin: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.frame-wrap { background: #fff; }
.mail-frame { display: block; width: 100%; max-height: 80vh; border: 0; background: #fff; }
.frame-note { display: flex; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; background: var(--surface-2); }
.mail-text { margin: 0; padding: 18px 20px; max-height: 72vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; color: var(--text); }

.signals { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sig { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.sig div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sig .muted { font-size: 12.5px; }
.sev { flex: none; display: inline-grid; place-items: center; min-width: 64px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font: 700 11.5px var(--display); background: var(--surface-3); color: var(--text-2); }
.sev-critical { background: var(--danger-solid); color: var(--danger-ink); }
.sev-high { background: var(--mal-soft); color: var(--mal-text); }
.sev-medium { background: var(--susp-soft); color: var(--susp-text); }
.sev-low { background: var(--spam-soft); color: var(--spam-text); }

.card.acc { padding: 0; }
.acc summary { display: flex; align-items: center; gap: 10px; padding: 15px 18px; cursor: pointer; list-style: none; font: 700 15px var(--display); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ic { color: var(--muted); }
.acc summary:hover { background: var(--surface-2); border-radius: var(--r); }
.acc-chev { margin-left: auto; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.acc[open] .acc-chev { transform: rotate(90deg); }
.badge { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font: 700 12px var(--display); text-align: center; }
.acc-body { padding: 0 18px 18px; }
.acc-body h3 { font-size: 14px; margin: 18px 0 8px; }
.links { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.links li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.links code { font-size: 12px; color: var(--text); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 650; }
.kv-tight { gap: 8px 14px; font-size: 13px; }
.auth { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: var(--r-xs); font: 700 12px var(--display); background: var(--surface-3); color: var(--text-2); }
.auth-pass { background: var(--clean-soft); color: var(--clean-text); }
.auth-fail, .auth-softfail, .auth-permerror { background: var(--mal-soft); color: var(--mal-text); }

.agent-log .card-head { margin-bottom: 10px; }
.log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.log li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.log b { font: 700 13.5px var(--display); }
.log em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.log small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.log .log-err { color: var(--mal-text); }
.log-dot { width: 12px; height: 5px; margin-top: 7px; flex: none; transform: skewX(-22deg); background: var(--clean); }
.log-pending .log-dot { background: var(--spam); }
.log-failed .log-dot { background: var(--mal); }
.log-skipped .log-dot { background: var(--gray); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.decide { border-color: color-mix(in srgb, var(--indigo) 40%, var(--border)); }
.choices { margin: 0 0 12px; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm); font: 700 14px var(--display); transition: border-color .12s, background .12s; }
.choice span kbd { margin-left: auto; }
.choice .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.c-clean .dot { background: var(--clean); } .c-graymail .dot { background: var(--gray); } .c-spam .dot { background: var(--spam); }
.c-suspicious .dot { background: var(--susp); } .c-malicious .dot { background: var(--mal); }
.choice:hover span { border-color: var(--border-2); background: var(--surface-2); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.choice input:checked + span { border-color: var(--indigo); background: var(--indigo); color: #fff; }
.choice input:checked + span kbd { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.decide input[type=text] { margin-bottom: 12px; }
.decide-actions { display: flex; gap: 8px; }
.decide-actions .btn-primary { flex: 1; }
.history { margin: 14px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.history li { display: flex; gap: 8px; align-items: flex-start; }
.history .dot-sm { margin-top: 6px; }
.history small { display: block; color: var(--muted); }

.compare { margin: 0; display: flex; flex-direction: column; }
.compare div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.compare div:first-child { border-top: 0; padding-top: 0; }
.compare dt { color: var(--text-2); font-weight: 650; }
.compare dd { margin: 0; }
.score { font: 800 15px var(--display); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- users */
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; font: 600 13px var(--display); color: var(--text-2); }

/* ------------------------------------------------------------------- auth */
.auth-page { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: hidden; background: var(--indigo); isolation: isolate; }
.auth-page::before, .auth-page::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 90px; transform: skewX(-22deg); z-index: -1; }
.auth-page::before { right: 18%; background: var(--lime); }
.auth-page::after { right: calc(18% - 130px); background: #fff; opacity: .9; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 32px 28px; text-align: center; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.auth-card .brand-mark { width: 52px; height: 52px; margin-bottom: 6px; }
.auth-card .bm-bg { fill: var(--indigo); }
.auth-card .bm-a { fill: var(--lime); }
.auth-card .bm-b { fill: #fff; opacity: 1; }
.auth-card h1 { font-size: 28px; font-weight: 800; }
.auth-card .alert { margin: 8px 0 0; width: 100%; text-align: left; }
.btn-google { width: 100%; height: 46px; margin-top: 18px; font-size: 14.5px; gap: 10px; }
.auth-foot { margin-top: 6px; font-size: 12.5px; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .span-5, .span-7, .span-8 { grid-column: span 12; }
  .span-4 { grid-column: span 6; }
  .agent-card { grid-column: span 12; }
  .col-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .detail { grid-template-columns: minmax(0, 1fr) 300px; }
  .bib { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-right: 0; }
  .bib-cell { border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .streaks { display: none; }
  .bib-you { padding-right: 84px; }
  .bib-you::before, .bib-you::after { display: block; }
  .trio { grid-template-columns: 1fr; gap: 20px; }
  .trio-col { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .trio-col:first-child { padding-top: 0; border-top: 0; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 4px; padding: 8px 12px; overflow-x: auto; }
  .brand { padding: 0 8px 0 0; }
  .brand span { display: none; }
  .nav { flex-direction: row; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; }
  .mode, .me-mail, .me .av-me { display: none; }
  .me { border: 0; padding: 0; }
  .top { position: static; padding: 18px 16px 12px; flex-wrap: wrap; gap: 12px; }
  .search { width: 100%; }
  .page { padding: 4px 16px 40px; }
  .detail { display: flex; flex-direction: column; align-items: stretch; }
  .detail-main, .detail-side { display: contents; }
  .preview-card { order: 1; }
  .agent-log { order: 2; }
  .decide { order: 3; }
  .detail-main > .card:not(.preview-card):not(.acc) { order: 4; }
  .detail-side > .card:not(.decide):not(.agent-log) { order: 5; }
  .card.acc { order: 6; }
  .verdict-banner { grid-template-columns: 1fr; }
  .vb-facts { flex-direction: row; flex-wrap: wrap; padding: 12px 0 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent); gap: 12px 28px; }
}
@media (max-width: 760px) {
  .side { overflow: visible; min-width: 0; }
  .nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 28px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { gap: 7px; font-size: 13px; padding: 8px 9px; }
  .nav a .count { margin-left: 2px; min-width: 18px; padding: 1px 5px; font-size: 11px; }
  .brand .bm-bg { fill: rgba(255, 255, 255, .14); }
  .brand .bm-a { fill: var(--lime); }
  .brand .bm-b { fill: #fff; opacity: 1; }
  .bib-cell { padding: 14px; }
  .bib-num { font-size: 34px; }
  .bib-cell .spark { position: static; display: block; width: 100%; height: 26px; margin-top: 4px; }
  .bib-foot { flex-wrap: wrap; gap: 4px 8px; font-size: 12px; line-height: 1.35; }
  .grid { gap: 12px; }
  .span-4, .span-6 { grid-column: span 12; }
  .col-stack { display: flex; gap: 12px; }
  .axis { font-size: 23px; }
  .axis-x.alt, .axis-y0 { display: none; }
  .card { padding: 16px; }
  .card-head { flex-wrap: wrap; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
  .table .w-bar { display: none; }
  .toolbar .select, .toolbar .select select { flex: 1 1 140px; min-width: 0; width: 100%; }
  .mail-table, .mail-table tbody, .mail-table tr, .mail-table td { display: block; width: 100%; }
  .mail-table thead { display: none; }
  .mail-table tr { position: relative; padding: 12px 6px; border-bottom: 1px solid var(--border); }
  .mail-table tr:last-child { border-bottom: 0; }
  .mail-table td { padding: 0; border: 0; }
  .mail-table .c-from { padding-right: 96px; }
  .mail-table .c-mail { margin: 6px 0 8px 44px; width: auto; }
  .mail-table .c-v, .mail-table .c-pp, .mail-table .c-act { display: inline-flex; width: auto; margin-left: 44px; gap: 6px; }
  .mail-table .c-pp { margin-left: 6px; }
  .mail-table .c-v .tag { display: none; }
  .mail-table .c-rc { margin: 0 0 8px 44px; width: auto; }
  .mail-table .c-t { position: absolute; top: 12px; right: 6px; width: auto; }
  .mail-meta { flex-wrap: wrap; }
  .mail-meta .when { align-items: flex-start; text-align: left; width: 100%; padding-left: 58px; }
  .top h1 { font-size: 23px; }
  .top h1.subject { font-size: 19px; }
  .auth-page::before { right: -20px; } .auth-page::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
