/* =========================================================
   Dozorix — "Liquid Glass" interface
   ========================================================= */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, sans-serif;
  --font-brand: "Unbounded", var(--font-display, sans-serif);
  --brand-grad: linear-gradient(120deg, #5a46ff 0%, #3b5bff 45%, #0fc3d9 100%);
  --brand-cyan: #0fb6cc;
  --brand-violet: #5a46ff;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* light */
  --bg: #eef1f7;
  --blob-1: #7aa7ff;
  --blob-2: #c59bff;
  --blob-3: #6fe0cf;
  --blob-4: #ffb199;
  --blob-opacity: 0.55;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-border: rgba(255, 255, 255, 0.72);
  --rim-1: rgba(255, 255, 255, 0.95);
  --rim-2: rgba(255, 255, 255, 0.35);
  --hairline: rgba(60, 60, 67, 0.13);
  --fill: rgba(118, 118, 128, 0.1);
  --fill-2: rgba(118, 118, 128, 0.18);
  --fill-3: rgba(118, 118, 128, 0.28);
  --surface: #fbfbfd;

  --text: #0b0b0f;
  --text-2: rgba(40, 40, 50, 0.76);
  --text-3: rgba(60, 60, 67, 0.55);

  --accent: #0a6cff;
  --accent-soft: rgba(10, 108, 255, 0.12);
  --on-accent: #ffffff;
  --ok: #1f9d45;
  --ok-soft: rgba(31, 157, 69, 0.13);
  --purple: #8a4dff;

  --sev-critical: #e0352b;
  --sev-high: #ef7d0f;
  --sev-medium: #d9a400;
  --sev-low: #2f7cf6;
  --sev-info: #8e8e93;

  --host-primary: #0a6cff;
  --host-sub: #8a4dff;
  --graph-cat: #b9bfcc;
  --graph-edge: rgba(60, 60, 67, 0.2);
  --graph-bg: rgba(255, 255, 255, 0.4);

  --shadow: 0 12px 40px rgba(28, 40, 80, 0.1), 0 2px 6px rgba(28, 40, 80, 0.05);
  --shadow-lg: 0 30px 80px rgba(20, 30, 70, 0.22), 0 6px 18px rgba(20, 30, 70, 0.08);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07080c;
    --blob-1: #2356ff;
    --blob-2: #7a2cff;
    --blob-3: #00a58d;
    --blob-4: #ff5a36;
    --blob-opacity: 0.28;

    --glass: rgba(30, 31, 38, 0.56);
    --glass-strong: rgba(40, 41, 50, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --rim-1: rgba(255, 255, 255, 0.26);
    --rim-2: rgba(255, 255, 255, 0.06);
    --hairline: rgba(255, 255, 255, 0.09);
    --fill: rgba(120, 120, 128, 0.18);
    --fill-2: rgba(120, 120, 128, 0.28);
    --fill-3: rgba(120, 120, 128, 0.4);
    --surface: #111217;

    --text: #f5f5f7;
    --text-2: rgba(235, 235, 245, 0.74);
    --text-3: rgba(235, 235, 245, 0.46);

    --accent: #3d8bff;
    --accent-soft: rgba(61, 139, 255, 0.18);
    --ok: #30d158;
    --ok-soft: rgba(48, 209, 88, 0.16);
    --purple: #b28bff;

    --sev-critical: #ff5147;
    --sev-high: #ff9f0a;
    --sev-medium: #ffd60a;
    --sev-low: #409cff;
    --sev-info: #98989d;

    --host-primary: #3d8bff;
    --host-sub: #a77bff;
    --graph-cat: #4a4d5a;
    --graph-edge: rgba(235, 235, 245, 0.16);
    --graph-bg: rgba(0, 0, 0, 0.18);

    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.3);
    --specular: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

:root[data-theme="dark"] {
  --bg: #07080c;
  --blob-1: #2356ff;
  --blob-2: #7a2cff;
  --blob-3: #00a58d;
  --blob-4: #ff5a36;
  --blob-opacity: 0.28;

  --glass: rgba(30, 31, 38, 0.56);
  --glass-strong: rgba(40, 41, 50, 0.9);
  --glass-border: rgba(255, 255, 255, 0.1);
  --rim-1: rgba(255, 255, 255, 0.26);
  --rim-2: rgba(255, 255, 255, 0.06);
  --hairline: rgba(255, 255, 255, 0.09);
  --fill: rgba(120, 120, 128, 0.18);
  --fill-2: rgba(120, 120, 128, 0.28);
  --fill-3: rgba(120, 120, 128, 0.4);
  --surface: #111217;

  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.74);
  --text-3: rgba(235, 235, 245, 0.46);

  --accent: #3d8bff;
  --accent-soft: rgba(61, 139, 255, 0.18);
  --ok: #30d158;
  --ok-soft: rgba(48, 209, 88, 0.16);
  --purple: #b28bff;

  --sev-critical: #ff5147;
  --sev-high: #ff9f0a;
  --sev-medium: #ffd60a;
  --sev-low: #409cff;
  --sev-info: #98989d;

  --host-primary: #3d8bff;
  --host-sub: #a77bff;
  --graph-cat: #4a4d5a;
  --graph-edge: rgba(235, 235, 245, 0.16);
  --graph-bg: rgba(0, 0, 0, 0.18);

  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.3);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ---------------- base ---------------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, textarea { font-family: var(--mono); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }
.muted { color: var(--text-2); }
.tabular { font-variant-numeric: tabular-nums; }

.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ---------------- ambient backdrop ---------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--blob-opacity);
  transition: opacity 0.6s ease, background-color 0.6s ease;
}
.b1 { background: var(--blob-1); top: -18vmax; left: -10vmax; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { background: var(--blob-2); top: -12vmax; right: -16vmax; animation: drift2 30s ease-in-out infinite alternate; }
.b3 { background: var(--blob-3); bottom: -22vmax; left: 12vmax; animation: drift3 34s ease-in-out infinite alternate; }
.b4 { background: var(--blob-4); bottom: -24vmax; right: -8vmax; width: 34vmax; height: 34vmax; opacity: calc(var(--blob-opacity) * 0.7); animation: drift1 38s ease-in-out infinite alternate-reverse; }

@keyframes drift1 { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-10vmax, 8vmax) scale(0.92); } }
@keyframes drift3 { to { transform: translate(6vmax, -8vmax) scale(1.1); } }

/* ---------------- glass material ---------------- */

.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), var(--specular);
}
.glass::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--rim-1), transparent 32%, transparent 68%, var(--rim-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  padding: 4px 8px 4px 0;
  background: none;
  border: 0;
  color: var(--text);
  text-decoration: none;
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(74, 80, 255, 0.32);
  transition: transform 0.55s var(--bounce);
}
.brand:hover .brand-logo { transform: rotate(-10deg) scale(1.06); }
.wordmark {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
}
.wordmark-x {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fill-3);
  margin-left: 2px;
}
.health-dot.online { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.health-dot.offline { background: var(--sev-critical); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sev-critical) 18%, transparent); }

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  margin-left: 10px;
  border-radius: 999px;
  background: var(--fill);
}
.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.topnav a .ico { width: 16px; height: 16px; }
.topnav a:hover { color: var(--text); }
.topnav a.on {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 30, 70, 0.08), 0 0 0 1px var(--hairline);
}

.target-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 36%;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 0;
  background: var(--fill);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}
.target-chip:hover { background: var(--fill-2); }
#target-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 6px;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0;
  background: var(--fill);
  color: var(--text);
  transition: background 0.2s, transform 0.35s var(--bounce), color 0.2s;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn.active { background: var(--accent); color: var(--on-accent); }
.icon-btn.wide { padding: 0 12px; }
.kbd {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0 5px;
  line-height: 18px;
}

/* account dropdown (server-rendered pages) */
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-name { font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron-down { width: 14px; height: 14px; transform: rotate(90deg); color: var(--text-3); transition: transform 0.3s var(--spring); }
.account-menu[open] .chevron-down { transform: rotate(-90deg); }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  min-width: 250px;
  padding: 8px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--glass-strong);
  animation: menu-in 0.28s var(--spring);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.menu-head { display: flex; flex-direction: column; padding: 8px 12px 10px; }
.menu-head strong { font-size: 15px; }
.menu-head small { color: var(--text-3); font-size: 12.5px; }
.menu a, .menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}
.menu a:hover, .menu button:hover { background: var(--fill); }
.menu .ico { width: 17px; height: 17px; color: var(--text-2); }
.menu form { margin: 0; }
.menu-sep { height: 1px; margin: 4px 8px; background: var(--hairline); }
.menu-mobile { display: none !important; }

@media (max-width: 900px) {
  .topnav { display: none; }
  .menu-mobile { display: flex !important; }
  .account-name { display: none; }
}
@media (max-width: 560px) {
  .topbar-actions .hide-mobile { display: none; }
  .wordmark { font-size: 16px; }
  .topbar-inner { gap: 8px; }
}

/* ---------------- layout ---------------- */

main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 140px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.eyebrow .ico { width: 15px; height: 15px; }
.large-title {
  font-family: var(--font-brand);
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.subtitle {
  color: var(--text-2);
  font-size: 17px;
  max-width: 720px;
  margin: 12px 0 0;
}
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px 6px;
}
.hint {
  color: var(--text-2);
  font-size: 13.5px;
  margin: 0 0 14px;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.35s var(--bounce), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 48%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-primary.copied { background: var(--ok); box-shadow: 0 8px 22px color-mix(in srgb, var(--ok) 38%, transparent); }
.btn-glass { background: var(--fill); color: var(--text); }
.btn-glass:hover { background: var(--fill-2); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-tinted { background: var(--accent-soft); color: var(--accent); }
.btn-tinted:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }

.button-cluster { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------- scan view ---------------- */

.scan-view { display: flex; flex-direction: column; gap: 22px; }
.hero { padding: 18px 6px 0; }

.scan-card {
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.search-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-field > .ico { color: var(--text-3); width: 20px; height: 20px; }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
  height: 44px;
}
.search-field input::placeholder { color: var(--text-3); }
.search-field.small { padding: 0 14px; background: var(--fill); border-color: transparent; box-shadow: none; }
.search-field.small input { height: 38px; font-size: 15px; }
.search-field.small > .ico { width: 17px; height: 17px; }
.search-field.shake { animation: shake 0.45s var(--spring); }
@keyframes shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

.inset-group {
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-row + .toggle-row { border-top: 1px solid var(--hairline); }
.toggle-row:hover { background: var(--fill); }
.toggle-row.attention { animation: attention 1.2s ease; }
@keyframes attention {
  0%, 100% { background: transparent; }
  30% { background: color-mix(in srgb, var(--sev-high) 18%, transparent); }
}
.row-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
}
.row-icon .ico { width: 18px; height: 18px; stroke-width: 2; }
.tint-green { background: linear-gradient(160deg, #3ad26b, #1c9f47); }
.tint-purple { background: linear-gradient(160deg, #a67bff, #6d3bff); }
.tint-blue { background: linear-gradient(160deg, #5ea4ff, #1467ff); }
.tint-orange { background: linear-gradient(160deg, #ffb340, #ff7a00); }
.tint-red { background: linear-gradient(160deg, #ff6b5e, #e0352b); }
.tint-gray { background: linear-gradient(160deg, #a1a1a8, #6e6e76); }
.tint-teal { background: linear-gradient(160deg, #4fd8c6, #0a9b8a); }
.tint-red-text { color: var(--sev-critical); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text strong { font-weight: 600; font-size: 15.5px; }
.row-text small { color: var(--text-2); font-size: 13px; line-height: 1.4; }

/* iOS switch */
.switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  margin: 0;
  border-radius: 999px;
  background: var(--fill-3);
  cursor: pointer;
  transition: background 0.3s ease;
}
.switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s var(--bounce), width 0.2s ease;
}
.switch:active::before { width: 32px; }
.switch:checked { background: var(--ok); }
.switch:checked::before { transform: translateX(20px); }
.switch:checked:active::before { transform: translateX(15px); }

.disclaimer { color: var(--text-3); font-size: 12.5px; margin: 0 6px; }
.status-line { margin: 0 6px; font-size: 14px; font-weight: 500; color: var(--text-2); min-height: 1px; }
.status-line:empty { display: none; }
.status-line.error { color: var(--sev-critical); }
.status-line.ok { color: var(--ok); }

/* compact scan view (after results) */
.scan-view.compact .hero,
.scan-view.compact .disclaimer,
.scan-view.compact .recent { display: none; }
.scan-view.compact .scan-card { padding: 12px; gap: 10px; }
.scan-view.compact .inset-group { display: flex; flex-wrap: wrap; background: transparent; border: 0; gap: 8px; }
.scan-view.compact .toggle-row {
  flex: 1 1 280px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--fill);
}
.scan-view.compact .toggle-row small { display: none; }
.scan-view.compact .row-icon { width: 26px; height: 26px; border-radius: 7px; }
.scan-view.compact .row-icon .ico { width: 15px; height: 15px; }

/* recent scans */
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  text-align: left;
  border: 1px solid var(--glass-border);
  transition: transform 0.35s var(--bounce);
}
.recent-item:hover { transform: translateY(-2px); }
.recent-item:active { transform: scale(0.98); }
.recent-item .recent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-item strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { color: var(--text-3); font-size: 12.5px; }

/* ---------------- progress ---------------- */

.progress-card { border-radius: var(--r-xl); padding: 22px; }
.progress-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.progress-head > div:nth-child(2) { flex: 1; min-width: 0; }
.progress-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.progress-head p { margin: 2px 0 0; font-size: 14px; }
.spinner-ring { width: 46px; height: 46px; flex: none; }
.spinner-ring svg { width: 100%; height: 100%; animation: spin 1.1s linear infinite; }
.spinner-ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 90 200;
  animation: dash 1.6s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash {
  0% { stroke-dasharray: 1 200; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90 200; stroke-dashoffset: -30; }
  100% { stroke-dasharray: 90 200; stroke-dashoffset: -124; }
}
.progress-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.progress-stages li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--fill);
  font-size: 14px;
  color: var(--text-2);
  position: relative;
  overflow: hidden;
  transition: color 0.3s, background 0.3s;
}
.progress-stages li .ico { color: var(--text-3); }
.progress-stages li.active { color: var(--text); background: var(--accent-soft); }
.progress-stages li.active .ico { color: var(--accent); }
.progress-stages li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 2.4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------------- results head ---------------- */

.results-view { display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 84px; }
.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 6px 0;
}
.results-title-wrap { min-width: 0; flex: 1 1 420px; }
#results-title { word-break: break-all; }
.results-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 13px;
  color: var(--text-2);
}
.meta-chip .ico { width: 14px; height: 14px; }
.meta-chip strong { color: var(--text); font-weight: 600; }

/* ---------------- views & cards ---------------- */

.view { display: none; flex-direction: column; gap: 22px; }
.view.active { display: flex; animation: viewIn 0.45s var(--spring); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

.grid { display: grid; gap: 22px; }
.overview-grid { grid-template-columns: minmax(250px, 0.85fr) minmax(300px, 1.15fr) minmax(300px, 1.1fr); }
.two-col { grid-template-columns: 1.7fr 1fr; }
.infra-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); align-items: start; }
.infra-grid .span-all { grid-column: 1 / -1; }

.card {
  border-radius: var(--r-xl);
  padding: 20px 22px;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.card-head.wrap { flex-wrap: wrap; }
.card h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card h2 .ico { width: 20px; height: 20px; color: var(--accent); }
.card h2 .ico.tint-red-text { color: var(--sev-critical); }
.card h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.card-sub { color: var(--text-3); font-size: 13px; margin: 2px 0 14px; }

.empty-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--ok-soft);
  color: var(--text);
  font-size: 14.5px;
}
.empty-state .ico { color: var(--ok); width: 22px; height: 22px; }
.empty-state.neutral { background: var(--fill); }
.empty-state.neutral .ico { color: var(--text-3); }

/* ---------------- severity badge ---------------- */

.sev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  text-transform: lowercase;
  white-space: nowrap;
  background: color-mix(in srgb, var(--sev, var(--sev-info)) 16%, transparent);
  color: var(--text);
  line-height: 1.35;
}
.sev-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sev, var(--sev-info));
  flex: none;
}
.critical { --sev: var(--sev-critical); }
.high { --sev: var(--sev-high); }
.medium { --sev: var(--sev-medium); }
.low { --sev: var(--sev-low); }
.info { --sev: var(--sev-info); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--fill);
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
}
.tag .ico { width: 12px; height: 12px; }
.tag.new { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); }
.tag.fixed { background: var(--ok-soft); color: var(--ok); }
.tag.accepted { background: color-mix(in srgb, var(--sev-medium) 18%, transparent); color: var(--text); }
.tag.snippet { background: var(--accent-soft); color: var(--accent); }
.tag.primary { background: var(--accent-soft); color: var(--accent); }
.tag.sub { background: color-mix(in srgb, var(--host-sub) 15%, transparent); color: var(--host-sub); }

/* ---------------- score card ---------------- */

.score-card { display: flex; flex-direction: column; }
.score-body { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.score-ring { position: relative; width: 132px; height: 132px; flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .track { fill: none; stroke: var(--fill-2); stroke-width: 11; }
.score-ring .bar {
  fill: none;
  stroke: var(--grade-color, var(--accent));
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--spring);
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--grade-color, var(--accent)) 40%, transparent));
}
.score-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.score-grade { font-family: var(--font-display); font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.score-num { font-size: 13px; color: var(--text-2); font-weight: 600; margin-top: 2px; }
.score-text h3 { font-size: 19px; letter-spacing: -0.02em; }
.score-text p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.score-projected {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ok-soft);
  font-size: 12.5px;
  font-weight: 600;
}
.grade-A, .grade-B { --grade-color: var(--ok); }
.grade-C { --grade-color: var(--sev-medium); }
.grade-D { --grade-color: var(--sev-high); }
.grade-F { --grade-color: var(--sev-critical); }

.grade-pill {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: var(--grade-color, var(--fill-3));
}

details.explain { margin-top: auto; padding-top: 12px; font-size: 12.5px; color: var(--text-2); }
details.explain summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  font-weight: 600;
}
details.explain summary::-webkit-details-marker { display: none; }
details.explain summary .ico { width: 14px; height: 14px; }
details.explain p { margin: 8px 0 0; }

/* ---------------- severity distribution ---------------- */

.sevbar {
  display: flex;
  gap: 2px;
  height: 16px;
  margin: 14px 0 16px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--fill);
}
.sevbar > span {
  background: var(--sev);
  min-width: 6px;
  border-radius: 4px;
  transition: flex-grow 0.8s var(--spring), opacity 0.2s;
}
.sevbar > span:hover { opacity: 0.8; }
.sevbar.mini { height: 8px; margin: 0; border-radius: 4px; }
.sevbar.mini > span { min-width: 3px; border-radius: 3px; }

.sev-legend { display: flex; flex-direction: column; gap: 2px; }
.sev-legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 14px;
  transition: background 0.2s;
}
.sev-legend-row:hover { background: var(--fill); }
.sev-legend-row .dot { width: 10px; height: 10px; }
.sev-legend-row .count { font-weight: 700; font-variant-numeric: tabular-nums; }
.sev-legend-row .pct { color: var(--text-3); font-size: 12.5px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sev, var(--sev-info)); flex: none; }
.dot.host-primary { background: var(--host-primary); }
.dot.host-sub { background: var(--host-sub); }
.dot.cat { background: var(--graph-cat); }

/* ---------------- stat tiles ---------------- */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.tile {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--fill);
  border: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.2s, transform 0.35s var(--bounce);
}
button.tile:hover { background: var(--fill-2); }
button.tile:active { transform: scale(0.97); }
.tile-value { font-family: var(--font-display); font-size: 26px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile-label { font-size: 12.5px; color: var(--text-2); }
.tile .progress { height: 5px; border-radius: 3px; background: var(--fill-2); overflow: hidden; margin-top: 6px; }
.tile .progress > i { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width 0.8s var(--spring); }

/* ---------------- diff ---------------- */

.diff-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.diff-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--fill);
}
.diff-stat b { font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.diff-stat span { font-size: 13px; color: var(--text-2); }
.diff-stat.up b { color: var(--ok); }
.diff-stat.down b { color: var(--sev-critical); }
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.diff-cols h3 { font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.diff-list { display: flex; flex-direction: column; gap: 4px; }
.diff-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
}
button.diff-item:hover { background: var(--fill); }
.diff-item .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.diff-item.resolved .t { text-decoration: line-through; color: var(--text-3); }

/* ---------------- risk list ---------------- */

.risk-list { display: flex; flex-direction: column; gap: 8px; }
.risk-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--bounce), box-shadow 0.25s;
}
.risk-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--sev);
}
.risk-item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.risk-item:active { transform: scale(0.99); }
.risk-item-title { font-weight: 650; }
.risk-item-host { font-size: 12.5px; color: var(--text-3); font-family: var(--mono); margin-top: 1px; }
.risk-item-detail {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.risk-item > a { font-size: 13.5px; font-weight: 600; white-space: nowrap; align-self: center; }

/* ---------------- heatmap ---------------- */

.heatmap-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.heatmap { border-collapse: separate; border-spacing: 3px; font-size: 12.5px; min-width: 100%; }
.heatmap th { font-weight: 600; color: var(--text-3); padding: 2px 4px; white-space: nowrap; }
.heatmap thead th { font-size: 11.5px; text-align: center; }
.heatmap tbody th {
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-cell {
  width: 100%;
  min-width: 44px;
  height: 34px;
  border-radius: 9px;
  border: 0;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: color-mix(in srgb, var(--sev) var(--heat, 22%), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sev) 35%, transparent);
  transition: transform 0.3s var(--bounce);
}
.heat-cell:hover { transform: scale(1.08); }
.heat-cell.empty { background: var(--fill); box-shadow: none; color: transparent; cursor: default; }
.heat-cell.empty:hover { transform: none; }
.heat-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 0; }

/* ---------------- host list ---------------- */

.host-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.host-row {
  display: grid;
  grid-template-columns: 1fr 120px 52px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  text-align: left;
  transition: background 0.2s;
}
.host-row:hover { background: var(--fill); }
.host-name { min-width: 0; display: flex; flex-direction: column; }
.host-name code { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-name small { font-size: 11.5px; color: var(--text-3); }
.host-score { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.host-score .grade-pill { min-width: 24px; height: 24px; font-size: 12px; }

/* ---------------- graph ---------------- */

.graph-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chip-toggle-group { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 0;
  font-size: 12.5px;
  font-weight: 600;
  background: color-mix(in srgb, var(--sev) 15%, transparent);
  transition: background 0.2s, opacity 0.2s;
}
.chip-toggle[aria-pressed="false"] { background: var(--fill); color: var(--text-3); }
.chip-toggle[aria-pressed="false"] .dot { background: var(--fill-3); }

.graph-workspace { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
#graph {
  height: 620px;
  border-radius: var(--r-lg);
  background: var(--graph-bg);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.graph-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.legend { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--fill); }
.legend-group { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); }

.node-detail {
  flex: 1;
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
}
.node-detail-placeholder {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
  gap: 8px;
}
.node-detail-placeholder .ico { width: 34px; height: 34px; stroke-width: 1.4; }
.node-detail-placeholder p { margin: 0; max-width: 220px; }

.graph-section.is-fullscreen {
  position: fixed;
  inset: 10px;
  z-index: 90;
  overflow: auto;
  background: var(--glass-strong);
}
.graph-section.is-fullscreen .graph-workspace { height: calc(100% - 110px); }
.graph-section.is-fullscreen #graph { height: 100%; min-height: 400px; }
.graph-section.is-fullscreen .node-detail { max-height: none; }

div.vis-tooltip {
  font-family: var(--font) !important;
  font-size: 13px !important;
  max-width: 340px;
  white-space: normal !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--hairline) !important;
  background: var(--glass-strong) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* ---------------- finding detail (shared) ---------------- */

.detail { display: flex; flex-direction: column; gap: 14px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.detail-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin: 0; word-break: break-word; }
.node-detail .detail-title { font-size: 17px; }
.detail-text { margin: 0; white-space: pre-wrap; color: var(--text-2); font-size: 14.5px; line-height: 1.55; word-break: break-word; }
.detail-block { display: flex; flex-direction: column; gap: 6px; }
.detail-label { font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-location {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--fill);
  word-break: break-all;
}
.snippet-box {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: #0d1017;
  color: #d7e1f5;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 1px; border-radius: 12px; overflow: hidden; background: var(--hairline); }
.kv > div { background: var(--surface); padding: 7px 10px; font-size: 13px; min-width: 0; word-break: break-word; }
.kv > .k { color: var(--text-3); font-weight: 600; font-size: 12px; }
.kv .v code { font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips .tag { font-family: var(--mono); font-weight: 500; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--fill);
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] {
  background: var(--glass-strong);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 0.5px var(--hairline);
}
.seg-btn .n { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.segmented.triage .seg-btn[data-status="fixed"][aria-pressed="true"] { background: var(--ok); color: #fff; }
.segmented.triage .seg-btn[data-status="accepted"][aria-pressed="true"] { background: var(--sev-medium); color: #1a1400; }

/* ---------------- findings ---------------- */

.findings-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 8px; }
.findings-toolbar .search-field { flex: 1 1 260px; }
.toolbar-selects { display: flex; gap: 8px; flex-wrap: wrap; }
.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 4px 0 12px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 13px;
  color: var(--text-3);
}
.select-wrap select {
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  padding: 0 6px;
  height: 100%;
  cursor: pointer;
  outline: 0;
}
.select-wrap select option { background: var(--surface); color: var(--text); }
.findings-subbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 30px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 6px 0 11px;
  border-radius: 999px;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}
.filter-chip .ico { width: 14px; height: 14px; }
.findings-count { font-size: 13px; color: var(--text-3); font-weight: 600; margin-left: auto; white-space: nowrap; }

.findings-list { display: flex; flex-direction: column; gap: 18px; }
.f-group-head {
  position: sticky;
  top: 66px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  border-radius: 999px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.f-group-head .n { color: var(--text-3); font-weight: 600; }
.f-group-head code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-group-body {
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.finding-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  transition: background 0.15s;
}
.finding-row + .finding-row { border-top: 1px solid var(--hairline); }
.finding-row:hover { background: var(--fill); }
.finding-row.is-resolved .fr-title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--fill-3); }
.fr-main { min-width: 0; }
.fr-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.fr-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.fr-sub code { font-size: 12px; }
.fr-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.finding-row > .ico { color: var(--text-3); width: 16px; height: 16px; }
.more-btn { margin: 10px auto 0; display: flex; }

/* ---------------- infra ---------------- */

.info-rows { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: var(--glass-strong); border: 1px solid var(--hairline); }
.info-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 12px; font-size: 14px; }
.info-row + .info-row { border-top: 1px solid var(--hairline); }
.info-row > span:first-child { color: var(--text-3); flex: none; }
.info-row > span:last-child { text-align: right; font-weight: 600; min-width: 0; word-break: break-word; }
.big-value { font-family: var(--font-display); font-size: 28px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; margin: 4px 0 12px; overflow-wrap: anywhere; }

.check-list { display: flex; flex-direction: column; gap: 2px; }
.check-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
button.check-row:hover { background: var(--fill); }
.check-row .ico { width: 20px; height: 20px; }
.check-row.pass .ico { color: var(--ok); }
.check-row.fail .ico { color: var(--sev-critical); }
.check-row.warn .ico { color: var(--sev-high); }
.check-row.na .ico { color: var(--text-3); }
.check-row small { color: var(--text-3); font-size: 12px; text-align: right; }

.timeline { margin: 14px 0 6px; }
.timeline-bar { position: relative; height: 10px; border-radius: 5px; background: var(--fill-2); }
.timeline-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--purple)); }
.timeline-bar > b {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-50%);
}
.timeline-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 6px; }

.hdr-matrix-scroll { overflow-x: auto; }
.hdr-matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.hdr-matrix th, .hdr-matrix td { padding: 8px 10px; border-bottom: 1px solid var(--hairline); text-align: center; white-space: nowrap; }
.hdr-matrix th { font-weight: 600; color: var(--text-3); font-size: 12px; }
.hdr-matrix th:first-child, .hdr-matrix td:first-child { text-align: left; font-family: var(--mono); font-size: 12.5px; }
.hdr-matrix tr:last-child td { border-bottom: 0; }
.hdr-cell { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; border: 0; background: transparent; padding: 2px 6px; border-radius: 8px; }
.hdr-cell .ico { width: 18px; height: 18px; }
.hdr-cell.pass { color: var(--ok); }
.hdr-cell.fail { color: var(--sev-critical); }
button.hdr-cell:hover { background: var(--fill); }

.tech-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
}
.tech-chip code { font-size: 12px; color: var(--text-2); font-weight: 500; }
.tech-chip .tag { margin-left: 2px; }

.cve-list { display: flex; flex-direction: column; gap: 6px; }
.cve-row {
  display: grid;
  grid-template-columns: 150px 1fr 160px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  text-align: left;
  width: 100%;
  transition: transform 0.3s var(--bounce);
}
.cve-row:hover { transform: translateX(2px); }
.cve-id { font-family: var(--mono); font-weight: 700; font-size: 13px; }
.cve-desc { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cve-desc small { display: block; color: var(--text-3); font-size: 11.5px; }
.cvss { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 8px; }
.cvss-track { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.cvss-track > i { display: block; height: 100%; border-radius: 4px; background: var(--sev); }
.cvss b { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }

.plain-list { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; }
.plain-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  min-width: 0;
}
button.plain-item:hover { background: var(--fill); }
.plain-item code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; min-width: 90px; flex: 1; }
.plain-item .pt { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.plain-item .meta { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.plain-item .meta { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.dns-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dns-group { padding: 10px 12px; border-radius: var(--r-md); background: var(--fill); min-width: 0; }
.dns-group b { font-size: 12px; color: var(--text-3); display: block; margin-bottom: 4px; }
.dns-group code { display: block; font-size: 12px; word-break: break-all; }
.note { font-size: 12.5px; color: var(--text-3); margin: 10px 0 0; }

/* ---------------- report ---------------- */

.report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.report-stats { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
#ai-prompt-text {
  width: 100%;
  min-height: 460px;
  resize: vertical;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  outline: 0;
}
#ai-prompt-text:focus { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------------- tab bar ---------------- */

.tabbar {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  animation: tabbarIn 0.6s var(--bounce);
}
@keyframes tabbarIn { from { transform: translate(-50%, 140%); } }
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 80px;
  height: 54px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  transition: background 0.3s var(--spring), color 0.25s, transform 0.35s var(--bounce);
}
.tab .ico { width: 22px; height: 22px; }
.tab:hover { color: var(--text); }
.tab:active { transform: scale(0.92); }
.tab[aria-selected="true"] {
  color: var(--accent);
  background: var(--fill-2);
  box-shadow: var(--specular);
}
.tab-badge {
  position: absolute;
  top: 5px;
  right: 16px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--sev-critical);
  color: #fff;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ---------------- sheet ---------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed;
  z-index: 101;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(540px, calc(100% - 24px));
  border-radius: var(--r-xl);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg), var(--specular);
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 30px));
  transition: transform 0.5s var(--spring);
}
.sheet.open { transform: none; }
.sheet[hidden], .sheet-backdrop[hidden] { display: none; }
.sheet-grabber { display: none; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 6px 22px; }
.sheet-heading { font-size: 13px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.sheet-body { flex: 1; overflow: auto; padding: 6px 22px 24px; overscroll-behavior: contain; }

/* history list inside sheet */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--fill);
}
.history-item button.open { background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.history-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item small { color: var(--text-3); font-size: 12.5px; }

/* ---------------- palette ---------------- */

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.palette-backdrop[hidden] { display: none; }
.palette {
  width: min(640px, 100%);
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg), var(--specular);
  overflow: hidden;
  animation: pop 0.35s var(--bounce);
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.palette-input .ico { color: var(--text-3); width: 20px; height: 20px; }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; min-width: 0; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.palette-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  min-width: 0;
}
.palette-list li .ico { width: 17px; height: 17px; color: var(--text-3); }
.palette-list li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list li .meta { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.palette-list li.active { background: var(--accent); color: var(--on-accent); }
.palette-list li.active .ico, .palette-list li.active .meta { color: inherit; }
.palette-list li.active .sev-badge { background: rgba(255, 255, 255, 0.22); color: #fff; }
.palette-list .group-label { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; cursor: default; }

/* ---------------- toast & tooltip ---------------- */

.toast {
  position: fixed;
  z-index: 150;
  top: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--glass-strong);
  transform: translate(-50%, -150%);
  opacity: 0;
  transition: transform 0.5s var(--bounce), opacity 0.3s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { color: var(--ok); }

.tooltip {
  position: fixed;
  z-index: 160;
  max-width: 300px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow), 0 0 0 0.5px var(--hairline);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: pre-line;
}
.tooltip.show { opacity: 1; }

/* ---------------- responsive ---------------- */

@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .overview-grid .score-card { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr; }
  .graph-workspace { grid-template-columns: 1fr; }
  #graph { height: 520px; }
  .node-detail { max-height: none; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  main { width: calc(100% - 32px); padding-top: 18px; }
  .target-chip { max-width: none; flex: 1; }
  .kbd { display: none; }
  .icon-btn.wide { padding: 0 9px; }
  .overview-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 24px; }
  .scan-card { padding: 12px; border-radius: 26px; }
  .search-field { flex-wrap: wrap; border-radius: 22px; padding: 6px 6px 6px 14px; }
  .search-field input { flex: 1 1 160px; }
  #scan-button { width: 100%; }
  .search-field.small { flex-wrap: nowrap; border-radius: 999px; }
  .results-actions { width: 100%; }
  .results-actions .btn { flex: 1; }
  .finding-row { grid-template-columns: 1fr 16px; gap: 8px 10px; }
  .finding-row > .sev-badge { grid-column: 1; justify-self: start; }
  .finding-row > .fr-main { grid-column: 1; }
  .finding-row > .fr-tags { grid-column: 1; justify-content: flex-start; }
  .finding-row > .ico { grid-column: 2; grid-row: 1 / span 3; }
  .risk-item { grid-template-columns: 1fr; gap: 8px; }
  .risk-item > a { justify-self: start; }
  .diff-cols { grid-template-columns: 1fr; }
  .cve-row { grid-template-columns: 1fr; gap: 6px; }
  .infra-grid { grid-template-columns: 1fr; }
  .host-row { grid-template-columns: 1fr 80px 48px; }
  .dns-groups { grid-template-columns: 1fr 1fr; }
  #graph { height: 440px; }
  .f-group-head { top: 62px; }
  .toolbar-selects { width: 100%; }
  .select-wrap { flex: 1; }
  .select-wrap select { flex: 1; min-width: 0; }
  .report-stats { margin-left: 0; width: 100%; }

  .tabbar { left: 8px; right: 8px; transform: none; justify-content: space-between; animation: none; }
  .tab { flex: 1; width: auto; min-width: 0; height: 52px; }
  .tab-badge { right: calc(50% - 22px); }

  .sheet {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 90vh;
    border-radius: 30px 30px 0 0;
    transform: translateY(105%);
  }
  .sheet-grabber { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--fill-3); margin: 8px auto 0; }
  .sheet-top { padding-top: 8px; }
  .sheet-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); }
}

/* ---------------- print ---------------- */

@media print {
  :root { --glass: #fff; --glass-strong: #fff; --bg: #fff; --text: #000; }
  body { background: #fff; }
  .backdrop, .topbar, .tabbar, .scan-view, .results-actions, .graph-toolbar, .sheet, .sheet-backdrop, .toast, .tooltip,
  .report-actions, .findings-toolbar, .card-head .button-cluster, #report-mode, .more-btn, [data-view="graph"] { display: none !important; }
  .view { display: flex !important; animation: none !important; break-inside: auto; }
  .glass { box-shadow: none; border: 1px solid #ddd; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass::before { display: none; }
  .card { break-inside: avoid; }
  #ai-prompt-text { min-height: 0; height: auto; border: 0; }
  .f-group-head { position: static; }
  main { padding-bottom: 0; }
}

/* =========================================================
   Accounts: auth pages, roles, quota
   ========================================================= */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.small { font-size: 12.5px; }
.center-text { text-align: center; }
.button-cluster.center { justify-content: center; }
.inline-form { display: inline-flex; margin: 0; }
.hide-sm { font-size: 13px; font-weight: 600; }
a.icon-btn { text-decoration: none; }

/* role pills */
.role-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: var(--role, var(--sev-info));
}
.role-free { --role: #8e8e93; }
.role-basic { --role: #2f7cf6; }
.role-pro { --role: #8a4dff; }
.role-max { --role: linear-gradient(135deg, #ff9f0a, #ff375f); }
.role-org { --role: linear-gradient(135deg, #1f9d45, #0a9b8a); }

/* topbar user button */
.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 3px;
  border-radius: 999px;
  border: 0;
  background: var(--fill);
  color: var(--text);
  transition: background 0.2s, transform 0.35s var(--bounce);
}
.user-btn:hover { background: var(--fill-2); }
.user-btn:active { transform: scale(0.95); }
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(145deg, #4f8dff, #7b4dff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.avatar.lg { width: 52px; height: 52px; font-size: 22px; }
.user-card { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.user-card strong { display: block; font-size: 19px; letter-spacing: -0.02em; margin-bottom: 3px; }

/* quota */
.quota-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px;
  font-size: 13px;
  color: var(--text-2);
}
.quota-line:empty { display: none; }
.quota-line .ico { width: 15px; height: 15px; color: var(--accent); }
.quota-line.exhausted { color: var(--sev-critical); }
.quota-line.exhausted .ico { color: var(--sev-critical); }
progress.quota-bar {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--fill-2);
  margin: 4px 0 8px;
}
progress.quota-bar::-webkit-progress-bar { background: var(--fill-2); border-radius: 4px; }
progress.quota-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 4px; }
progress.quota-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 4px; }

.toggle-row.locked { cursor: not-allowed; opacity: 0.72; }
.toggle-row.locked:hover { background: transparent; }
.switch:disabled { cursor: not-allowed; opacity: 0.5; }

/* flash messages */
.flash-stack {
  position: fixed;
  z-index: 140;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 12px 16px;
  border-radius: var(--r-md);
  background: var(--glass-strong);
  font-size: 14px;
  font-weight: 500;
  animation: pop 0.4s var(--bounce);
  transition: opacity 0.3s, transform 0.3s;
}
.flash span { flex: 1; }
.flash > .ico { width: 20px; height: 20px; }
.flash.success > .ico { color: var(--ok); }
.flash.error > .ico { color: var(--sev-critical); }
.flash.warning > .ico { color: var(--sev-high); }
.flash.info > .ico { color: var(--accent); }
.flash.leaving { opacity: 0; transform: translateY(-8px); }
.flash-close { border: 0; background: transparent; color: var(--text-3); padding: 4px; border-radius: 8px; display: grid; }
.flash-close:hover { background: var(--fill); }

/* page layouts */
.page-main { width: min(1320px, calc(100% - 32px)); }
.auth-main { width: min(1320px, calc(100% - 32px)); align-items: center; padding-top: 6vh; }
.page-head { padding: 12px 6px 0; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.back-link .ico { width: 16px; height: 16px; }

.auth-card {
  width: min(440px, 100%);
  border-radius: var(--r-xl);
  padding: 30px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-card.wide { width: min(640px, 100%); }
.auth-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.auth-head h1 { font-size: 28px; font-weight: 750; letter-spacing: -0.03em; }
.auth-head p { margin: 0; font-size: 14.5px; }
.auth-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  color: #fff;
  margin-bottom: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.auth-icon .ico { width: 28px; height: 28px; stroke-width: 1.9; }
.auth-foot { text-align: center; font-size: 14px; color: var(--text-2); margin: 0; }
.error-code { font-family: var(--font-display); font-size: 54px; font-weight: 800; letter-spacing: -0.04em; margin: 0; line-height: 1; }

.auth-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.auth-form.compact { gap: 10px; margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { margin-bottom: 5px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); padding-left: 4px; }
.field-input, .field input:not([type="checkbox"]) {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  font-size: 16px;
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.has-error .field-input { border-color: color-mix(in srgb, var(--sev-critical) 60%, transparent); }
.field-help { font-size: 12px; color: var(--text-3); padding-left: 4px; }
.field-error { font-size: 12.5px; color: var(--sev-critical); padding-left: 4px; font-weight: 500; }
.reveal-wrap { position: relative; display: block; }
.reveal-wrap .field-input { padding-right: 46px; }
.reveal-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  display: grid;
  place-items: center;
}
.reveal-btn:hover, .reveal-btn.active { color: var(--accent); background: var(--fill); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.toggle-row.boxed { border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid var(--hairline); }
.toggle-row.boxed.has-error { border-color: color-mix(in srgb, var(--sev-critical) 60%, transparent); }
.plain-ul { margin: 8px 0 0; padding-left: 20px; }

.btn-block { width: 100%; }
.btn-danger { background: var(--sev-critical); color: #fff; }
.btn.is-disabled { opacity: 0.6; cursor: default; }
a.btn { text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--sev-critical) 12%, transparent);
  font-size: 14px;
  margin: 0;
  text-align: left;
}
.form-alert .ico { color: var(--sev-critical); width: 20px; height: 20px; margin-top: 1px; }
.form-alert p { margin: 0; }
.form-alert.inline { background: color-mix(in srgb, var(--sev-high) 14%, transparent); }
.form-alert.inline .ico { color: var(--sev-high); }

/* 2FA setup */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 56px;
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: var(--accent);
}
.steps strong { display: block; font-size: 15.5px; }
.steps small { color: var(--text-2); font-size: 13px; }
.qr-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 10px; }
.qr-box { width: 180px; height: 180px; padding: 8px; border-radius: 16px; background: #fff; flex: none; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.secret-box { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; align-items: flex-start; }
.secret { font-size: 15px; letter-spacing: 0.08em; padding: 8px 10px; border-radius: 10px; background: var(--fill); word-break: break-all; }

.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; counter-reset: code; }
.codes li {
  counter-increment: code;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--fill);
}
.codes li::before { content: counter(code); font-size: 11px; color: var(--text-3); min-width: 14px; }
.codes code { font-size: 15px; letter-spacing: 0.06em; font-weight: 600; }

/* account & plans */
.account-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; }
.feature-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.feature-list li { display: flex; align-items: flex-start; gap: 8px; }
.feature-list .ico { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; stroke-width: 2.2; }
.danger-zone summary { color: var(--sev-critical); }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.plan-card {
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.35s var(--bounce);
}
.plan-card:hover { transform: translateY(-3px); }
.plan-card.current { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.plan-card.by-request { border-style: dashed; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-tagline { margin: 0; color: var(--text-2); font-size: 14px; }
.plan-metric { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.plan-metric b { white-space: nowrap; }
.plan-metric small { color: var(--text-3); font-size: 15px; font-weight: 600; }
.plan-metric b { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: -0.04em; }
.plan-metric span { color: var(--text-3); font-size: 13px; }
.plan-foot { margin-top: auto; padding-top: 8px; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 18px 20px; }
  .hide-sm { display: none; }
  .user-btn .role-pill { display: none; }
  .user-btn { padding-right: 3px; }
  .codes { grid-template-columns: 1fr; }
  .flash-stack { top: 62px; }
}

/* =========================================================
   Detail banner + legal page
   ========================================================= */

.detail-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  font-size: 14px;
}
.detail-banner > .ico { width: 22px; height: 22px; flex: none; }
.detail-banner div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.detail-banner strong { font-weight: 650; }
.detail-banner span { color: var(--text-2); font-size: 13px; }
.detail-banner.summary { background: color-mix(in srgb, var(--sev-medium) 12%, transparent); }
.detail-banner.summary > .ico { color: var(--sev-high); }
.detail-banner.full { background: var(--ok-soft); }
.detail-banner.full > .ico { color: var(--ok); }

.legal { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.legal .card { padding: 22px 24px; }
.legal h2 { font-size: 19px; }
.legal p { margin: 0 0 10px; color: var(--text); font-size: 14.5px; line-height: 1.6; }
.legal p:last-child { margin-bottom: 0; }
.legal-list { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.5; }
.legal-list li { color: var(--text-2); }
.legal-callout { border-left: 4px solid var(--sev-critical); }
.legal-disclaimer { background: var(--fill); font-size: 13.5px; }
.legal-disclaimer p { color: var(--text-2); }
.legal h3 { margin: 18px 0 8px; font-size: 15.5px; }
.legal code { font-size: 13px; padding: 1px 5px; border-radius: 6px; background: var(--fill); }
.legal-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.legal-doc { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--hairline); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.legal-doc:hover { border-color: var(--accent); background: var(--fill); }
.legal-doc b { font-size: 15px; }
.legal-doc span { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.legal .table-scroll { overflow-x: auto; margin: 0 0 10px; }
.legal-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; line-height: 1.45; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--hairline); }
.legal-table th { color: var(--text-3); font-weight: 600; }
.legal-table td { color: var(--text-2); }
.legal-table td:first-child { color: var(--text); white-space: nowrap; }
@media (max-width: 640px) { .legal .card { padding: 18px 16px; } }

/* =========================================================
   Organization cabinet
   ========================================================= */

.org-main { width: min(1320px, calc(100% - 32px)); }
.org-shell { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }

.org-nav {
  position: sticky;
  top: 74px;
  border-radius: var(--r-lg);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.org-nav-head { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.org-avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; flex: none;
  font-weight: 700; color: #fff; background: linear-gradient(150deg, #1f9d45, #0a9b8a);
}
.org-nav-title { min-width: 0; }
.org-nav-title strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-nav-title small { color: var(--text-3); font-size: 12px; }
.org-worker-off { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sev-high); padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--sev-high) 12%, transparent); margin-bottom: 4px; }
.org-worker-off .ico { width: 15px; height: 15px; }

.org-links { display: flex; flex-direction: column; gap: 2px; }
.org-links a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; font-size: 14px; text-decoration: none; transition: background 0.15s, color 0.15s;
}
.org-links a .ico { width: 18px; height: 18px; }
.org-links a:hover { background: var(--fill); color: var(--text); }
.org-links a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.org-links-sep { height: 1px; background: var(--hairline); margin: 6px 8px; }
.nav-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--fill-2); color: var(--text-2); border-radius: 999px; padding: 1px 7px; }
.nav-badge.red { background: var(--sev-critical); color: #fff; }
.org-back { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; font-size: 13px; color: var(--text-3); border-radius: 12px; }
.org-back:hover { background: var(--fill); }

.org-body { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.org-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.org-head .large-title { font-size: clamp(26px, 3vw, 34px); }
.org-trial-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-md); font-size: 13.5px; color: var(--text-2); }
.org-trial-bar .ico { color: var(--sev-high); width: 18px; height: 18px; }

.org-kpis { grid-template-columns: repeat(5, 1fr); }
.kpi { padding: 16px; text-align: center; text-decoration: none; }
a.kpi { transition: transform 0.3s var(--bounce); }
a.kpi:hover { transform: translateY(-2px); }
.kpi-val { font-family: var(--font-display); font-size: 30px; font-weight: 780; letter-spacing: -0.03em; line-height: 1.1; }
.kpi-val small { font-size: 16px; color: var(--text-3); }
.kpi-lbl { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.kpi.danger .kpi-val { color: var(--sev-critical); }
.kpi.warn .kpi-val { color: var(--sev-high); }
.kpi-val.grade-A, .kpi-val.grade-B { color: var(--ok); }
.kpi-val.grade-C { color: var(--sev-medium); }
.kpi-val.grade-D { color: var(--sev-high); }
.kpi-val.grade-F { color: var(--sev-critical); }

.host-score.big { font-size: 24px; }
.host-score.big .grade-pill { width: 34px; height: 34px; font-size: 16px; }

.alert-list { display: flex; flex-direction: column; }
.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--hairline); }
.alert-row:first-child { border-top: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-body strong { font-weight: 600; font-size: 14.5px; }
.alert-body p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.alert-time { color: var(--text-3); font-size: 12px; white-space: nowrap; }

.domain-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.domain-card { padding: 16px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: transform 0.3s var(--bounce); }
.domain-card:hover { transform: translateY(-2px); }
.domain-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.domain-card-top code { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.domain-card-mid { display: flex; align-items: center; gap: 10px; }

.inline-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-add .field-input { flex: 1; min-width: 180px; }
.inline-add select.field-input, .inline-add .select { min-width: 140px; flex: 0 1 auto; }
.mini-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

.verify-card .kv { margin-top: 10px; }
.domain-actions { display: flex; align-items: center; gap: 10px; }
.domain-actions .spacer { flex: 1; }
.domain-actions form { margin: 0; }
.col-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.monitor-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.finding-row.static { cursor: default; }
.finding-row.static:hover { background: transparent; }
.findings-list.plain { border-radius: var(--r-md); border: 1px solid var(--hairline); overflow: hidden; }

.trend { display: flex; flex-direction: column; gap: 6px; }
.trend-svg { width: 100%; height: 90px; }
.trend-grid { stroke: var(--hairline); stroke-width: 1; }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.trend-dot { fill: var(--accent); }
.trend-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }

.task-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.task-filters .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--fill); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.task-filters .chip.on { background: var(--accent); color: #fff; }
.task-filters .chip em { font-style: normal; opacity: 0.7; }

.snippet-fix { margin-top: 10px; }
.snippet-fix-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.comments { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment { padding: 10px 12px; border-radius: var(--r-md); background: var(--fill); }
.comment.system { background: transparent; border: 1px dashed var(--hairline); }
.comment-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.comment p { margin: 0; font-size: 14px; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.stack-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.cal-list { display: flex; flex-direction: column; }
.cal-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--hairline); }
.cal-row:first-child { border-top: 0; }
.cal-days { min-width: 64px; text-align: center; font-weight: 700; font-size: 13px; padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--sev) 15%, transparent); color: var(--text); }
.cal-days.critical { --sev: var(--sev-critical); } .cal-days.high { --sev: var(--sev-high); } .cal-days.medium { --sev: var(--sev-medium); }
.cal-main { flex: 1; min-width: 0; } .cal-main strong { display: block; font-size: 14px; } .cal-main span { color: var(--text-2); font-size: 13px; }
.cal-date { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.cal-row.expired { background: color-mix(in srgb, var(--sev-critical) 6%, transparent); }

.member-list { display: flex; flex-direction: column; gap: 4px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--hairline); }
.member-row:first-child { border-top: 0; }
.member-info { flex: 1; min-width: 0; } .member-info strong { display: block; font-size: 14px; } .member-info small { color: var(--text-3); font-size: 12.5px; }
.member-role select, .member-row select { border: 0; background: var(--fill); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text); }
.member-row form { margin: 0; }

.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.integration-card { padding: 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 8px; }
.integration-card.on { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.integration-card strong { font-size: 15px; }
.int-status { min-height: 20px; }
.integration-card form { margin: 0; }

.key-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.scope-row { display: flex; flex-wrap: wrap; gap: 14px; }
.key-reveal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hairline); }
.key-reveal code { font-size: 13px; word-break: break-all; flex: 1; min-width: 0; }

.audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-table th { text-align: left; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--hairline); font-size: 12px; }
.audit-table td { padding: 8px 10px; border-bottom: 1px solid var(--hairline); }

.soon-card { position: relative; overflow: hidden; }
.soon-badge { position: absolute; top: 14px; right: 14px; background: var(--purple); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

@media (max-width: 900px) {
  .org-shell { grid-template-columns: 1fr; }
  .org-nav { position: static; flex-direction: row; flex-wrap: wrap; top: 0; }
  .org-nav-head, .org-back, .org-worker-off { width: 100%; }
  .org-links { flex-direction: row; flex-wrap: wrap; }
  .org-links a { padding: 8px 12px; }
  .nav-badge { margin-left: 4px; }
  .org-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* org utility classes (no inline styles — strict CSP) */
.mw-560 { max-width: 560px; } .mw-620 { max-width: 620px; } .mw-640 { max-width: 640px; }
.pay-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--fill); border-left: 3px solid var(--accent); font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.pay-note.warn { border-left-color: var(--sev-high); }
.plan-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pay-banner { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; background: var(--fill); border: 1px solid var(--hairline); border-left: 4px solid var(--sev-high); }
.pay-banner .ico { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--sev-high); }
.pay-banner div { display: flex; flex-direction: column; gap: 2px; }
.pay-banner span { color: var(--text-2); font-size: 14px; line-height: 1.45; }
/* Dozorix Agent — внутренняя сеть */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat-row .stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.stat-num { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stat-label { color: var(--text-3); font-size: 13px; }
.finding-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.finding-list li { padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.finding-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.finding-list code { font-size: 12px; padding: 1px 5px; border-radius: 6px; background: var(--fill); }
.token-card { border-left: 4px solid var(--accent); }
.deploy-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.deploy-radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--fill); cursor: pointer; font-size: 14px; }
.deploy-radio input { accent-color: var(--accent); }
.org-sublink { margin-left: 14px; font-size: 13.5px; opacity: 0.9; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.switch-form .field { margin: 0; }
.map-building { margin: 0 0 18px; }
.map-title { font-size: 16px; margin: 0 0 10px; }
.map-floor { margin: 0 0 14px; }
.map-floor-label { display: inline-block; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.map-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.map-room { border: 1px solid var(--hairline); border-radius: 14px; padding: 12px; background: var(--fill); }
.map-room-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; margin: 0 0 8px; }
.map-room-name .ico { width: 15px; height: 15px; color: var(--text-3); }
.map-sw { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px; font-size: 13px; color: inherit; text-decoration: none; }
.map-sw:hover { background: var(--hairline); }
.sw-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.sw-up .sw-dot { background: #29a35a; }
.sw-down .sw-dot { background: var(--sev-critical); }
.sw-warn { color: var(--sev-high); font-weight: 800; }


.mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; }
.text-critical { color: var(--sev-critical); }
.card-ok { border: 1px solid var(--ok) !important; }
/* ---------------- security passport ---------------- */
.passport-card h3 { margin: 18px 0 8px; font-size: 15px; }
.passport-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.passport-seal { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); }
.passport-seal .ico { width: 26px; height: 26px; }
.passport-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.passport-title h2 { margin: 2px 0; font-size: 22px; overflow-wrap: anywhere; }
.passport-status.status-active { background: var(--ok-soft); color: var(--ok); }
.passport-status.status-stale, .passport-status.status-pending { background: color-mix(in srgb, var(--sev-medium) 18%, transparent); color: var(--text); }
.passport-status.status-suspended { background: color-mix(in srgb, var(--sev-critical) 16%, transparent); color: var(--sev-critical); }
.passport-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.passport-kpis .kpi { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.kpi-val.small-val { font-size: 17px; line-height: 1.5; }
.kpi-val.grade-none { color: var(--text-3); }
.passport-cats .plain-item .ico { width: 18px; height: 18px; flex: none; }
.passport-cats .cat-ok .ico { color: var(--ok); }
.passport-cats .cat-attention .ico { color: var(--sev-high); }
.passport-foot { margin-top: 16px; }
.passport-page { max-width: 820px; }
.passport-grid { align-items: start; }
.section-title { font-size: 15px; margin: 0 0 8px 4px; color: var(--text-2); }
.vendor-table { padding: 6px; }

/* ---------------- documentation ---------------- */
.docs .card p, .docs .card li { line-height: 1.6; }
.docs .card h3 { margin: 18px 0 6px; font-size: 15px; }
.docs .card ul, .docs .card ol { padding-left: 20px; margin: 6px 0 10px; }
.docs .snippet-box { max-height: none; word-break: normal; overflow-wrap: anywhere; }
.code-block { position: relative; margin: 8px 0 12px; }
.code-block .code-copy { position: absolute; top: 6px; right: 6px; }
.code-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); margin: 10px 0 2px 4px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 12px; }
.docs-table th, .docs-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.docs-table th { color: var(--text-3); font-weight: 600; font-size: 12px; }
.docs-table td code { white-space: nowrap; }
.docs-table-scroll { overflow-x: auto; }
.docs-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.docs .callout { border-left: 3px solid var(--accent); }
.docs .callout.warn { border-left-color: var(--sev-high); }

/* ---------------- radar (start screen, landing) ---------------- */
:root {
  --radar-bg: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.92), rgba(236, 241, 255, 0.78));
  --radar-ring: rgba(59, 91, 255, 0.14);
  --radar-ring-strong: rgba(59, 91, 255, 0.3);
  --radar-sweep: rgba(15, 182, 204, 0.5);
  --radar-edge: rgba(15, 182, 204, 0.95);
  --blip: #0fb6cc;
  --blip-sub: #6a55ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --radar-bg: radial-gradient(circle closest-side, rgba(22, 28, 58, 0.9), rgba(9, 12, 28, 0.85));
    --radar-ring: rgba(120, 150, 255, 0.16);
    --radar-ring-strong: rgba(120, 150, 255, 0.34);
    --radar-sweep: rgba(40, 230, 220, 0.42);
    --radar-edge: rgba(90, 255, 240, 0.95);
    --blip: #3ff0e0;
    --blip-sub: #9d8bff;
  }
}
:root[data-theme="dark"] {
  --radar-bg: radial-gradient(circle closest-side, rgba(22, 28, 58, 0.9), rgba(9, 12, 28, 0.85));
  --radar-ring: rgba(120, 150, 255, 0.16);
  --radar-ring-strong: rgba(120, 150, 255, 0.34);
  --radar-sweep: rgba(40, 230, 220, 0.42);
  --radar-edge: rgba(90, 255, 240, 0.95);
  --blip: #3ff0e0;
  --blip-sub: #9d8bff;
}

.radar { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.radar-stage { position: absolute; inset: 0; border-radius: 50%; transition: transform 0.7s var(--spring); cursor: crosshair; }
.radar-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle closest-side, transparent 0 calc(25% - 1px), var(--radar-ring) calc(25% - 1px) 25%),
    var(--radar-bg);
  border: 1px solid var(--radar-ring-strong);
  box-shadow: var(--shadow-lg), inset 0 0 80px color-mix(in srgb, var(--brand-violet) 16%, transparent);
  transition: border-color 0.5s, box-shadow 0.5s;
}
.radar-disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(var(--radar-ring), var(--radar-ring)) center / 1px 100% no-repeat,
    linear-gradient(90deg, var(--radar-ring), var(--radar-ring)) center / 100% 1px no-repeat;
}
.radar-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--radar-ring-strong) 0 0.5deg, transparent 0.5deg 7.5deg);
  -webkit-mask: radial-gradient(closest-side, transparent 94%, #000 94.5%, #000 99%, transparent 99.5%);
  mask: radial-gradient(closest-side, transparent 94%, #000 94.5%, #000 99%, transparent 99.5%);
}
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 280deg, color-mix(in srgb, var(--radar-sweep) 18%, transparent) 318deg, var(--radar-sweep) 359deg, transparent 360deg);
  will-change: transform;
}
.radar-sweep::after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  top: 0;
  width: 2px;
  height: 50%;
  border-radius: 2px;
  background: linear-gradient(to top, transparent, var(--radar-edge));
  box-shadow: 0 0 12px var(--radar-edge);
}
.radar-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.radar-links line { stroke: var(--blip); stroke-width: 0.3; stroke-dasharray: 1 1.6; opacity: 0; transition: opacity 0.6s ease; }
.radar.locked .radar-links line { opacity: 0.55; animation: radar-dash 1.4s linear infinite; }
@keyframes radar-dash { to { stroke-dashoffset: -5.2; } }

.radar-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  text-align: center;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--radar-ring-strong);
  box-shadow: 0 10px 30px rgba(30, 40, 110, 0.18);
  transition: box-shadow 0.5s, border-color 0.5s;
  pointer-events: none;
}
.radar-core-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.radar-target { font-family: var(--font-brand); font-size: clamp(11px, 1.35vw, 15px); font-weight: 600; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; color: var(--text); }
.radar.empty .radar-target { color: var(--text-3); font-weight: 500; }
.radar-state { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.radar.locked .radar-core { border-color: var(--blip); box-shadow: 0 0 0 6px color-mix(in srgb, var(--blip) 14%, transparent), 0 10px 30px rgba(30, 40, 110, 0.18); }
.radar.locked .radar-state { background: color-mix(in srgb, var(--blip) 16%, transparent); color: var(--text); }
.radar.authorized .radar-disc { border-color: color-mix(in srgb, var(--ok) 70%, transparent); box-shadow: var(--shadow-lg), inset 0 0 80px color-mix(in srgb, var(--ok) 16%, transparent); }
.radar.authorized.locked .radar-state { background: var(--ok-soft); color: var(--ok); }

.radar-pulses { position: absolute; inset: 0; pointer-events: none; }
.radar-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--blip);
  transform: translate(-50%, -50%);
  animation: radar-pulse 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes radar-pulse { to { transform: translate(-50%, -50%) scale(2.75); opacity: 0; border-width: 1px; } }

.radar-blips { position: absolute; inset: 0; }
.blip {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--text);
  transform: translate(-50%, -12px);
  cursor: help;
}
.blip:hover, .blip:focus-visible { z-index: 3; }
.blip-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--blip);
  opacity: 0.45;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--blip) 50%, transparent);
  transition: opacity 1.8s ease, transform 0.3s var(--bounce);
}
.blip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text-2);
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-strong) 80%, transparent);
  transition: color 0.4s;
}
.blip.ping .blip-dot { animation: blip-ping 1.9s ease-out; }
.blip.ping .blip-label { color: var(--text); }
@keyframes blip-ping {
  0% { opacity: 1; transform: scale(1.5); box-shadow: 0 0 0 0 color-mix(in srgb, var(--blip) 60%, transparent), 0 0 16px var(--blip); }
  70% { opacity: 0.85; box-shadow: 0 0 0 12px transparent, 0 0 6px var(--blip); }
  100% { opacity: 0.45; transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}
.blip:hover .blip-dot, .blip:focus-visible .blip-dot { opacity: 1; transform: scale(1.35); }
.blip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 210px;
  transform: translate(-50%, 6px);
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  color: var(--text);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--spring);
}
.blip.tip-below .blip-tip { bottom: auto; top: calc(100% + 4px); transform: translate(-50%, -6px); }
.blip.tip-left .blip-tip { left: auto; right: 50%; transform: translate(20px, 6px); }
.blip.tip-left.tip-below .blip-tip { transform: translate(20px, -6px); }
.blip:hover .blip-tip, .blip:focus-visible .blip-tip { opacity: 1; transform: translate(-50%, 0); }
.blip.tip-left:hover .blip-tip, .blip.tip-left:focus-visible .blip-tip { transform: translate(20px, 0); }
.blip.sub { opacity: 0; transform: translate(-50%, -12px) scale(0.6); pointer-events: none; transition: opacity 0.45s ease, transform 0.5s var(--bounce); }
.blip.sub .blip-dot { background: var(--blip-sub); width: 8px; height: 8px; }
.blip.sub .blip-label { font-size: 10px; font-weight: 600; }
.radar.subs .blip.sub { opacity: 1; transform: translate(-50%, -12px) scale(1); pointer-events: auto; }
.radar.static .blip-dot { opacity: 0.9; }

/* ---------------- start screen ---------------- */
.scan-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 40px; align-items: center; }
.scan-hero-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.scan-hero-radar { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.radar-caption { margin: 0; font-size: 12.5px; color: var(--text-3); text-align: center; }
.hero-title {
  font-family: var(--font-brand);
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
}
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scan-view.compact .scan-hero { grid-template-columns: 1fr; }
.scan-view.compact .scan-hero-radar { display: none; }
@media (max-width: 1100px) {
  .scan-hero { grid-template-columns: 1fr; gap: 20px; }
  .scan-hero-radar .radar { max-width: 320px; }
}
@media (max-width: 560px) {
  .blip-label { font-size: 10px; padding: 0 5px; }
  .blip-tip { width: 170px; }
}

/* ---------------- landing ---------------- */
.landing { gap: 64px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; padding-top: 28px; }
.landing-copy { display: flex; flex-direction: column; gap: 20px; }
.landing-copy .subtitle { max-width: 580px; }
.landing-try { display: flex; flex-direction: column; gap: 8px; max-width: 600px; }
.landing-proof { display: flex; flex-wrap: wrap; gap: 8px; }
.proof-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--glass); border: 1px solid var(--hairline); }
.proof-chip .ico { width: 15px; height: 15px; color: var(--ok); }
.section-heading { font-family: var(--font-brand); font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 18px; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r-lg); transition: transform 0.4s var(--bounce); }
.feature-card:hover { transform: translateY(-4px); }
.feature-card h3 { font-family: var(--font-brand); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.feature-card p { margin: 0; color: var(--text-2); line-height: 1.55; font-size: 14.5px; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: #fff; background: var(--brand-grad); box-shadow: 0 8px 20px rgba(74, 80, 255, 0.28); }
.feature-icon .ico { width: 22px; height: 22px; }
.feature-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.landing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 70px; border-radius: var(--r-lg); }
.step::after {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-brand);
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}
.step strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.step p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.landing-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px 32px; border-radius: var(--r-xl); }
.landing-cta h2 { font-family: var(--font-brand); font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.02em; }
.landing-cta p { margin: 6px 0 0; color: var(--text-2); }
.landing-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 4px 0; font-size: 13px; color: var(--text-3); }
.landing-foot a { color: var(--text-2); }
@media (max-width: 1000px) {
  .landing-hero { grid-template-columns: 1fr; gap: 24px; }
  .landing-hero .radar { max-width: 380px; }
  .landing-features, .landing-steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .landing-try .search-field .btn { width: 100%; }
  .landing { gap: 44px; }
}
/* ---------------- report catalogue ---------------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.report-card { display: flex; flex-direction: column; gap: 14px; }
.report-card-head { display: flex; gap: 14px; align-items: flex-start; }
.report-card-head h2 { font-family: var(--font-brand); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.report-highlight { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.report-facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.report-facts dt { color: var(--text-3); font-weight: 600; }
.report-facts dd { margin: 0; color: var(--text-2); line-height: 1.45; }
.report-btn { align-self: flex-start; margin-top: auto; }
.risk-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: center; }
.risk-num { font-family: var(--font-brand); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.risk-num.up { color: var(--sev-critical); }
.risk-num.down { color: var(--ok); }
.risk-lbl { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 560px) { .report-facts { grid-template-columns: 1fr; } .report-grid { grid-template-columns: 1fr; } }
