:root {
  --bg: #0c1222;
  --panel: #131b2f;
  --panel-2: #18233d;
  --text: #edf2ff;
  --muted: #a9b6d3;
  --line: #29385c;
  --good: #42d17f;
  --good-bg: rgba(66,209,127,.10);
  --warn: #ffcd57;
  --warn-bg: rgba(255,205,87,.10);
  --bad: #ff6d7a;
  --bad-bg: rgba(255,109,122,.10);
  --info: #73b0ff;
  --info-bg: rgba(115,176,255,.10);
  --btn: #4f8cff;
  --btn2: #2a3554;
  --code: #091120;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, #0b1120, #0d1527 60%, #0c1222);
  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.45;
}
a { color: #9ec3ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 70px; }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 18px; align-items: center; }
.brand { background: linear-gradient(135deg, #18274a, #0d1833); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; flex: 1 1 520px; }
.brand h1 { margin: 0 0 8px; font-size: 30px; }
.brand p { margin: 0; color: var(--muted); }
.nav { display: flex; gap: 10px; flex-wrap: wrap; align-self: stretch; }
.nav a, button.navbtn { display: inline-flex; align-items: center; justify-content: center; background: var(--btn2); color: white; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 48px; cursor: pointer; font-weight: 700; }
button.navbtn.primary { background: var(--btn); border-color: transparent; }
button.navbtn:disabled { opacity: .55; cursor: not-allowed; }
.hero { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; }
.hero p { margin: 8px 0 0; color: var(--muted); }
.hero .actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.cards { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:14px; }
.grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; }
@media (max-width: 1080px) { .cards { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) { .grid, .cards { grid-template-columns: 1fr; } }
.stat, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.status-good { border-color: rgba(66,209,127,.75); box-shadow: inset 0 0 0 1px rgba(66,209,127,.15); }
.status-warn { border-color: rgba(255,205,87,.75); box-shadow: inset 0 0 0 1px rgba(255,205,87,.15); }
.status-bad { border-color: rgba(255,109,122,.75); box-shadow: inset 0 0 0 1px rgba(255,109,122,.15); }
.status-info { border-color: rgba(115,176,255,.75); box-shadow: inset 0 0 0 1px rgba(115,176,255,.15); }
.stat { padding: 16px; }
.stat .k { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { margin-top: 8px; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; word-break: break-word; }
.stat .d { margin-top: 10px; color: var(--muted); font-size: 13px; }
.card .head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; padding: 15px 16px 10px; border-bottom: 1px solid var(--line); }
.card .head h2, .card .head h3 { margin:0; font-size: 20px; }
.card .head p { margin:5px 0 0; color: var(--muted); font-size: 13px; }
.card .body { padding: 14px 16px 16px; }
.wide { grid-column: 1 / -1; }
.badge { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:4px 10px; font-size:12px; font-weight:700; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.mini-note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; color: var(--muted); background: var(--panel-2); border-left: 4px solid var(--info); }
.legend { display:flex; flex-wrap:wrap; gap:10px; color: var(--muted); font-size: 13px; }
.kv { width: 100%; border-collapse: collapse; }
.kv td, .kv th { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
.kv td:nth-child(1) { width: 220px; color: #dbe5ff; }
.kv td:nth-child(2) { width: 260px; font-weight: 700; }
.kv td:nth-child(3), .kv th:nth-child(3) { color: var(--muted); }
.kv tr:last-child td { border-bottom: 0; }
.mono { font-family: Consolas, monospace; word-break: break-word; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--code); border: 1px solid #1d2b4c; border-radius: 14px; color: #e7eeff; padding: 14px; max-height: 70vh; overflow: auto; }
.muted { color: var(--muted); }
.section-list { display:grid; gap:14px; }
.guide-box { background: var(--panel); border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:16px; }
.guide-box h2 { margin: 0 0 10px; }
.guide-box ul { margin: 10px 0 0 18px; color: var(--muted); }
.guide-box li { margin: 8px 0; }
.footer-note { margin-top: 18px; color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 8px 0; }
.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }


.compact-kv th:nth-child(1),
.compact-kv td:nth-child(1) {
  width: 250px;
  color: #dbe5ff;
}

.compact-kv th:nth-child(2),
.compact-kv td:nth-child(2) {
  width: auto;
  font-weight: 700;
}

.compact-kv th:nth-child(3),
.compact-kv td:nth-child(3) {
  display: none;
}

.tip-target {
  display: inline-block;
  position: relative;
  cursor: pointer;
  white-space: normal;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-bottom: 1px dashed rgba(115,176,255,.45);
  padding-bottom: 1px;
}

.tip-i {
  display: inline-block;
  margin-left: 6px;
  color: var(--info);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.tip-target::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 28px);
  min-width: 260px;
  max-width: min(520px, 78vw);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-family: Arial, sans-serif;
  font-weight: 400;
  white-space: normal;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: .15s ease;
  z-index: 40;
}

.tip-target:hover::after,
.tip-target:focus::after,
.tip-target.is-open::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .compact-kv th:nth-child(1),
  .compact-kv td:nth-child(1) {
    width: 170px;
  }

  .tip-target::after {
    left: 0;
    right: auto;
    max-width: min(310px, 78vw);
  }
}


.profile-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.profile-row label {
  color: var(--muted);
  font-weight: 700;
}
.textinput {
  flex: 1 1 360px;
  min-height: 44px;
  background: var(--code);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
}
.compact-actions {
  margin-bottom: 12px;
}
.smallbtn {
  margin-left: 8px;
  white-space: nowrap;
  background: var(--btn2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 8px;
  cursor: pointer;
  font-weight: 700;
}
.smallbtn:hover {
  border-color: var(--info);
}
.kv td .muted {
  font-size: 12px;
}
@media print {
  .topbar .nav, .hero, .footer-note, button, .actions { display: none !important; }
  body { background: #fff; color: #111; }
  .stat, .card { box-shadow: none; border-color: #aaa; background: #fff; color: #111; }
}


.login-main {
  text-transform: uppercase;
  min-width: 110px;
}
.big-check {
  min-width: 180px;
  font-size: 16px;
  letter-spacing: .04em;
}
.smallbtn.danger {
  border-color: rgba(255, 107, 107, .45);
  color: #ffd2d2;
}
.smallbtn.danger:hover {
  border-color: var(--bad);
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.filterbtn.active {
  background: var(--btn);
  border-color: transparent;
  color: #fff;
}
.security-details {
  margin-top: 8px;
}
.security-details summary {
  cursor: pointer;
  color: var(--info);
  font-weight: 700;
}
.security-details ul {
  margin: 8px 0 0 18px;
  padding: 0;
}
.security-details li {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

/* v19: базовая визуальная полировка */
.history-tools { display:flex; flex-wrap:wrap; gap:8px; margin: 0 0 12px; }
.textinput.small { flex: 1 1 320px; min-height: 38px; }
.textinput.date { flex: 0 0 160px; min-height: 38px; }
.selectinput { min-height: 38px; background: var(--code); color: var(--text); border:1px solid var(--line); border-radius:12px; padding:8px 10px; }
.log-card { position: relative; }
.log-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:6px; border-radius:16px 0 0 16px; }
.log-history::before { background: var(--good); }
.log-visits::before { background: var(--info); }
.log-security::before { background: var(--bad); }
.log-history .head { background: linear-gradient(90deg, rgba(66,209,127,.08), transparent); }
.log-visits .head { background: linear-gradient(90deg, rgba(115,176,255,.08), transparent); }
.log-security .head { background: linear-gradient(90deg, rgba(255,109,122,.08), transparent); }
.history-table tr.baseline-row td { background: rgba(66,209,127,.06); }
.history-table:not(.one-time-table) tr { grid-template-columns:260px minmax(0,1fr); }
.history-table:not(.one-time-table) .history-layout { display:block; }
.history-table:not(.one-time-table) .history-actions { margin-top:12px; padding-top:12px; border-top:1px solid rgba(41,56,92,.75); justify-content:flex-start; }
.history-table:not(.one-time-table) td:first-child { padding-right:18px; }
.history-table .record-title { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.history-table td:last-child { display:block; }
.history-layout { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:start; width:100%; }
.history-info { min-width:0; }
.history-summary { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.fact-chip { display:inline-flex; align-items:center; border:1px solid rgba(115,176,255,.25); background:rgba(115,176,255,.08); color:#dbe7ff; border-radius:999px; padding:5px 9px; font-family:Consolas,monospace; font-size:12px; font-weight:700; max-width:100%; }
.fact-chip.strong { border-color:rgba(66,209,127,.35); background:rgba(66,209,127,.10); color:#d8ffe9; }
.fact-chip.info { border-color:rgba(115,176,255,.35); }
.history-text { margin-top:6px; line-height:1.5; overflow-wrap:anywhere; }
.history-conclusion { margin-top:8px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.025); color:#c8d4ef; line-height:1.55; overflow-wrap:anywhere; word-break:normal; }
.history-label { display:block; margin-bottom:4px; color:#e8efff; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.risk-mini-grid { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.risk-mini { display:inline-flex; align-items:center; min-height:26px; padding:4px 8px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.025); color:#c9d6f1; font-family:Consolas,monospace; font-size:11px; font-weight:700; white-space:normal; }
.risk-mini.good { border-color:rgba(66,209,127,.30); background:rgba(66,209,127,.07); }
.risk-mini.warn { border-color:rgba(255,205,87,.35); background:rgba(255,205,87,.07); }
.risk-mini.bad { border-color:rgba(255,109,122,.35); background:rgba(255,109,122,.07); }
.history-actions { display:flex; flex-wrap:wrap; gap:8px; align-content:flex-start; justify-content:flex-end; }
.history-actions .smallbtn { margin-left:0; }
.one-time-meta-grid { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:10px; }
.meta-item { padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.02); min-width:0; }
.meta-label { display:block; color:var(--muted); font-size:12px; font-weight:700; margin-bottom:4px; }
.meta-value { display:block; color:var(--text); line-height:1.45; overflow-wrap:anywhere; word-break:break-word; }
.insight { border:1px solid var(--line); border-radius:14px; padding:12px; background: var(--panel-2); }
.insight.status-good { border-left: 5px solid var(--good); }
.insight.status-warn { border-left: 5px solid var(--warn); }
.insight.status-bad { border-left: 5px solid var(--bad); }
.insight.status-info { border-left: 5px solid var(--info); }
@media (max-width: 760px) {
  .history-tools .textinput, .history-tools .selectinput { flex: 1 1 100%; width: 100%; }
}


/* v19: подсказки предпочитают позицию сверху, чтобы крупный курсор не перекрывал текст. */
.tip-target::after { pointer-events: none; }
.filterbtn.active, .smallbtn.active { outline: 2px solid rgba(115,176,255,.45); }

/* v19: one-time full-check links */
.log-onetime::before { background: var(--warn); }
.log-onetime .head { background: linear-gradient(90deg, rgba(255,205,87,.08), transparent); }
.one-time-wrap { min-height: 100vh; display:flex; align-items:center; justify-content:center; }
.one-time-panel { width:min(720px, 96vw); background: var(--panel); border:1px solid var(--line); border-radius:20px; padding:28px; text-align:center; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.one-time-panel h1 { margin: 12px 0 8px; font-size: 34px; letter-spacing:.08em; }
.one-time-panel p { color: var(--muted); font-size: 16px; }
.loader { width: 56px; height:56px; border-radius:50%; border: 5px solid rgba(115,176,255,.22); border-top-color: var(--info); margin: 0 auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* v19: цветные заголовки журналов и блока одноразовых ссылок */
.log-onetime .head h2 { color: var(--warn); }
.log-history .head h2 { color: var(--good); }
.log-visits .head h2 { color: var(--info); }
.log-security .head h2 { color: var(--bad); }
.log-onetime .head { border-bottom-color: rgba(255,205,87,.55); }
.log-history .head { border-bottom-color: rgba(66,209,127,.55); }
.log-visits .head { border-bottom-color: rgba(115,176,255,.55); }
.log-security .head { border-bottom-color: rgba(255,109,122,.55); }
.log-onetime .badge { border: 1px solid rgba(255,205,87,.55); }
.log-history .badge { border: 1px solid rgba(66,209,127,.55); }
.log-visits .badge { border: 1px solid rgba(115,176,255,.55); }
.log-security .badge { border: 1px solid rgba(255,109,122,.55); }

/* v19: информационная архитектура, вкладки и понятные карточки */
.app-shell { max-width: 1380px; }
.nav a.active { border-color: var(--info); background: rgba(115,176,255,.12); }
.hero-compact { padding-bottom: 18px; }
.beginner-callout { padding: 12px 14px; border-radius: 12px; background: rgba(115,176,255,.08); border-left: 4px solid var(--info); color: #cbd8f4 !important; }
.primary-actions { align-items: flex-start; }
.main-run { min-width: 190px; font-size: 16px; }
.action-menu { position: relative; }
.action-menu > summary { list-style: none; user-select: none; }
.action-menu > summary::-webkit-details-marker { display:none; }
.action-menu[open] > summary { border-color: var(--info); background: rgba(115,176,255,.14); }
.action-menu-popover { position:absolute; z-index:80; top:56px; left:0; min-width:290px; display:grid; gap:4px; padding:8px; background:#111a2e; border:1px solid var(--line); border-radius:14px; box-shadow:0 18px 42px rgba(0,0,0,.45); }
.menu-action { appearance:none; border:0; border-radius:10px; padding:11px 12px; text-align:left; background:transparent; color:var(--text); cursor:pointer; font-weight:700; }
.menu-action:hover { background:var(--panel-2); }
.menu-action:disabled { opacity:.45; cursor:not-allowed; }

.workspace-tabs { position:sticky; top:8px; z-index:50; display:flex; gap:8px; overflow-x:auto; padding:8px; margin:0 0 16px; border:1px solid var(--line); border-radius:15px; background:rgba(12,18,34,.93); backdrop-filter: blur(12px); }
.workspace-tab { flex:0 0 auto; min-height:42px; padding:9px 14px; border:1px solid transparent; border-radius:11px; background:transparent; color:var(--muted); cursor:pointer; font-weight:800; }
.workspace-tab:hover { color:var(--text); background:var(--panel-2); }
.workspace-tab.active { color:#fff; background:var(--btn); box-shadow:0 6px 16px rgba(79,140,255,.25); }
.workspace-panel { display:none; }
.workspace-panel.active { display:block; animation:panelIn .18s ease; }
@keyframes panelIn { from { opacity:.4; transform:translateY(4px); } to { opacity:1; transform:none; } }

.overview-banner { display:flex; justify-content:space-between; align-items:center; gap:22px; margin-bottom:14px; padding:22px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(135deg, var(--panel), #101a31); }
.overview-banner h2 { margin:4px 0 7px; font-size:28px; }
.overview-banner p { margin:0; color:var(--muted); max-width:900px; }
.overview-eyebrow { color:var(--info); font-size:12px; letter-spacing:.12em; font-weight:900; }
.risk-dial { flex:0 0 auto; min-width:120px; min-height:120px; display:flex; align-items:baseline; justify-content:center; border-radius:50%; border:8px solid rgba(115,176,255,.25); background:rgba(0,0,0,.18); padding-top:36px; }
.risk-dial strong { font-size:36px; line-height:1; }
.risk-dial span { color:var(--muted); font-size:13px; }
.overview-banner.status-good .risk-dial { border-color:rgba(66,209,127,.65); }
.overview-banner.status-warn .risk-dial { border-color:rgba(255,205,87,.65); }
.overview-banner.status-bad .risk-dial { border-color:rgba(255,109,122,.65); }
.key-cards { grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:14px; }
.key-cards .stat { min-height:170px; }
.overview-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:14px; margin-bottom:14px; }
.overview-compare-card, .recommendations-card { margin-top:14px; }
.risk-bars { display:grid; gap:11px; }
.risk-row { display:grid; grid-template-columns:minmax(150px,1fr) 2fr auto; gap:10px; align-items:center; }
.risk-label { font-weight:700; }
.risk-track { height:10px; border-radius:999px; background:#0a1120; overflow:hidden; border:1px solid rgba(255,255,255,.06); }
.risk-fill { height:100%; min-width:2px; border-radius:999px; background:var(--info); }
.risk-fill.good { background:var(--good); }
.risk-fill.warn { background:var(--warn); }
.risk-fill.bad { background:var(--bad); }
.risk-number { min-width:52px; text-align:right; font-family:Consolas,monospace; }
.compare-summary { display:grid; gap:8px; }
.compare-row { display:grid; grid-template-columns:220px 1fr auto; gap:12px; align-items:start; padding:10px 0; border-bottom:1px solid var(--line); }
.compare-row:last-child { border-bottom:0; }
.compare-values { color:var(--muted); overflow-wrap:anywhere; }

.section-intro { margin-bottom:14px; padding:16px 18px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.section-intro h2 { margin:0 0 6px; }
.section-intro p { margin:0; color:var(--muted); }
.report-group-nav { display:flex; gap:8px; overflow-x:auto; margin-bottom:12px; padding-bottom:4px; }
.group-jump { flex:0 0 auto; border:1px solid var(--line); border-radius:999px; background:var(--panel); color:var(--muted); padding:8px 12px; cursor:pointer; font-weight:700; }
.group-jump:hover { color:var(--text); border-color:var(--info); }
.grouped-report { display:grid; gap:14px; }
.report-group { border:1px solid var(--line); border-radius:18px; background:rgba(19,27,47,.72); overflow:hidden; scroll-margin-top:80px; }
.report-group > summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:17px 18px; cursor:pointer; background:linear-gradient(90deg,rgba(115,176,255,.07),transparent); }
.report-group > summary::-webkit-details-marker { display:none; }
.report-group > summary:hover { background:linear-gradient(90deg,rgba(115,176,255,.13),transparent); }
.group-title-wrap h2 { margin:0; font-size:21px; }
.group-title-wrap p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.group-count { flex:0 0 auto; color:var(--info); font-weight:800; }
.group-caret { display:inline-block; transition:transform .18s ease; }
.report-group[open] .group-caret { transform:rotate(180deg); }
.report-group-body { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:14px; border-top:1px solid var(--line); }
.report-group-body .card { min-width:0; }

/* Пояснения параметров теперь видны постоянно, а не только во всплывающей подсказке. */
.compact-kv thead { display:none; }
.compact-kv tr { display:grid; grid-template-columns:minmax(220px,.9fr) minmax(0,1.35fr); border-bottom:1px solid var(--line); }
.compact-kv tr:last-child { border-bottom:0; }
.compact-kv td { border:0; width:auto !important; padding:11px 8px; }
.compact-kv td:first-child { display:block; }
.compact-kv td:last-child { display:flex; align-items:flex-start; }
.row-label { color:#e5ecff; font-weight:800; line-height:1.35; }
.row-help { margin-top:5px; color:var(--muted); font-size:12px; line-height:1.45; font-weight:400; }
.row-value { display:block; width:100%; font-family:Consolas,monospace; font-weight:700; line-height:1.5; overflow-wrap:anywhere; word-break:break-word; }
.tip-target { border-bottom:0; cursor:default; padding:0; }
.tip-i, .tip-target::after { display:none !important; }
.card .head { min-height:92px; }
.card .head h2 { line-height:1.25; }
.card .body { padding-top:8px; }
.section-kind { display:inline-flex; margin-top:8px; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }

.admin-grid { display:grid; gap:14px; }
.guide-toc { position:sticky; top:8px; z-index:40; display:flex; gap:8px; overflow-x:auto; padding:9px; margin-bottom:16px; border:1px solid var(--line); border-radius:14px; background:rgba(12,18,34,.94); }
.guide-toc a { flex:0 0 auto; padding:7px 11px; border-radius:999px; background:var(--panel-2); color:#cfe0ff; font-weight:700; font-size:13px; }
.guide-lead { font-size:16px; color:#cbd8f4; }
.guide-example { margin:10px 0 0; padding:11px 13px; border-radius:12px; background:#0a1120; border-left:4px solid var(--info); color:#cbd8f4; }
.guide-box details { margin-top:10px; border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:rgba(0,0,0,.12); }
.guide-box details summary { cursor:pointer; font-weight:800; color:#dbe6ff; }
.glossary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.glossary-item { padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--panel-2); }
.glossary-item b { display:block; margin-bottom:4px; }

@media (max-width: 1180px) {
  .history-layout { grid-template-columns:1fr; }
  .history-actions { justify-content:flex-start; }
  .one-time-meta-grid { grid-template-columns:repeat(2,minmax(150px,1fr)); }
}

@media (max-width: 1000px) {
  .key-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .overview-grid, .report-group-body { grid-template-columns:1fr; }
}
@media (max-width: 900px) {
  .history-table:not(.one-time-table) tr { display:block; padding:12px 0; }
  .history-table:not(.one-time-table) td { display:block !important; padding:6px 8px; }
  .history-table:not(.one-time-table) td:last-child { margin-top:8px; }
}

@media (max-width: 700px) {
  .wrap { padding:12px 10px 50px; }
  .brand h1 { font-size:23px; }
  .nav { width:100%; }
  .nav a { flex:1 1 auto; min-height:42px; padding:8px 10px; }
  .workspace-tabs { top:4px; border-radius:12px; }
  .workspace-tab { padding:8px 11px; }
  .key-cards { grid-template-columns:1fr; }
  .overview-banner { align-items:flex-start; padding:17px; }
  .overview-banner h2 { font-size:23px; }
  .risk-dial { min-width:82px; min-height:82px; border-width:6px; padding-top:25px; }
  .risk-dial strong { font-size:26px; }
  .compact-kv tr { display:block; padding:11px 0; }
  .compact-kv td { display:block !important; padding:2px 6px; }
  .compact-kv td:last-child { margin-top:8px; }
  .history-layout { grid-template-columns:1fr; }
  .history-actions { justify-content:flex-start; }
  .one-time-meta-grid { grid-template-columns:1fr; }
  .row-help { font-size:13px; }
  .compare-row { grid-template-columns:1fr; gap:5px; }
  .risk-row { grid-template-columns:1fr auto; }
  .risk-track { grid-column:1/-1; grid-row:2; }
  .action-menu { flex:1 1 100%; }
  .action-menu > summary { width:100%; }
  .action-menu-popover { position:static; margin-top:6px; min-width:0; }
  .main-run { width:100%; }
  .glossary-grid { grid-template-columns:1fr; }
}

/* v23: p0f и собственная база TCP/IP-отпечатков */
.p0f-import-row { display:grid; grid-template-columns:minmax(220px,1fr) minmax(240px,1fr) auto; gap:10px; align-items:center; margin:12px 0; }
.fileinput { width:100%; padding:9px; border:1px solid var(--line); border-radius:10px; background:var(--panel-2); color:var(--text); }
.p0f-db-summary { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:10px; margin:12px 0; }
.p0f-db-stat { padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--panel-2); }
.p0f-db-stat b { display:block; margin-top:5px; font-size:22px; }
.p0f-group { margin-top:12px; padding:13px; border:1px solid var(--line); border-radius:13px; background:rgba(0,0,0,.12); }
.p0f-group-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.p0f-signature { margin-top:8px; padding:9px; border-radius:9px; background:#0a1120; overflow-wrap:anywhere; font-family:Consolas,monospace; font-size:12px; }
.p0f-sample-row { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(220px,1.4fr) auto; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.p0f-sample-row:last-child { border-bottom:0; }
.p0f-sample-actions { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.p0f-dialog { width:min(920px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:auto; border:1px solid var(--line); border-radius:18px; background:var(--panel); color:var(--text); padding:0; box-shadow:0 24px 80px rgba(0,0,0,.55); }
.p0f-dialog::backdrop { background:rgba(0,0,0,.72); }
.p0f-dialog form { padding:20px; }
.dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:15px; }
.dialog-head h2 { margin:0 0 5px; }
.dialog-head p { margin:0; color:var(--muted); }
.p0f-metrics { display:grid; grid-template-columns:repeat(4,minmax(120px,1fr)); gap:9px; margin-bottom:15px; }
.p0f-metric { padding:10px; border:1px solid var(--line); border-radius:11px; background:var(--panel-2); }
.p0f-metric span { display:block; color:var(--muted); font-size:12px; }
.p0f-metric b { display:block; margin-top:4px; overflow-wrap:anywhere; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.form-grid label { display:grid; gap:6px; font-weight:700; }
.form-grid .wide-field { grid-column:1/-1; }
.form-grid textarea { min-height:80px; resize:vertical; }
.confirmation-box { display:grid; gap:8px; margin:16px 0; padding:13px; border:1px solid var(--line); border-radius:12px; }
.confirmation-box legend { padding:0 7px; font-weight:800; }
.confirmation-box label { display:flex; align-items:flex-start; gap:8px; }
.dialog-actions { justify-content:flex-end; margin-top:14px; }

@media (max-width: 900px) {
  .p0f-import-row { grid-template-columns:1fr; }
  .p0f-db-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .p0f-sample-row { grid-template-columns:1fr; }
  .p0f-sample-actions { justify-content:flex-start; }
}
@media (max-width: 600px) {
  .p0f-metrics, .form-grid { grid-template-columns:1fr; }
  .form-grid .wide-field { grid-column:auto; }
  .p0f-db-summary { grid-template-columns:1fr; }
}
