:root { --bg:#0e1420; --card:#151d2e; --line:#26324a; --txt:#e6e9ef; --muted:#8b93a7;
        --green:#2fd87f; --yellow:#e8c34c; --orange:#f08b37; --red:#f1505f; }
* { box-sizing:border-box; }
body { background:var(--bg); color:var(--txt); font:15.5px/1.5 system-ui, sans-serif; margin:0; }
.topbar { display:flex; align-items:center; gap:14px; padding:18px 32px; border-bottom:1px solid var(--line); }
.topbar h1 { font-size:22px; margin:0; }
.topbar-right { margin-left:auto; font-size:13.5px; }
.muted { color:var(--muted); font-size:13px; }
main { max-width:1340px; margin:0 auto; padding:22px 18px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px; margin-bottom:18px; }
.card h3 { margin:0 0 12px; font-size:15px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); }
.form-card label { font-size:13px; color:var(--muted); display:block; margin:6px 0 5px; }
.form-card select, .form-card input { background:#0b1120; color:var(--txt); border:1px solid var(--line); border-radius:8px; padding:11px 12px; font-size:15px; }
.form-card select { width:100%; }
.form-card input { flex:1; min-width:0; }
.row { display:flex; gap:10px; }
#run { background:#1d4f8b; color:#fff; border:none; border-radius:8px; padding:11px 20px; font-weight:600; font-size:15px; cursor:pointer; }
#run:disabled { opacity:.55; }
.rep-btn { display:inline-block; background:#1d4f8b; color:#fff; border-radius:6px; padding:3px 10px; font-size:12.5px; text-decoration:none; }
.error-card { background:#3a1620; border-color:var(--red); color:#ffd7da; }
.result-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.result-head h2 { margin:0; font-size:17px; word-break:break-all; }
.badge { display:inline-flex; align-items:center; gap:8px; font-size:16px; }
.badge-inner { display:inline-block; padding:4px 10px; border-radius:20px; font-weight:700; font-size:13.5px; }
.low { background:#123d20; color:#7fe2a8; }
.med { background:#3a2f14; color:#f2d96b; }
.high { background:#4a1a16; color:#ff8b7a; }
.crit { background:#5c0f1c; color:#ff7b8a; }
#r-bar { height:8px; border-radius:4px; transition:width .4s; }
.score-bar { height:10px; background:#1c2740; border-radius:5px; margin-top:12px; }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(120px,1fr)); gap:12px; margin-top:12px; }
.stats-grid div { background:#0b1120; border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.stats-grid dt { font-size:11px; color:var(--muted); text-transform:uppercase; }
.stats-grid dd { font-size:15px; font-weight:700; margin:3px 0 0; }
.sanction-box { background:#4b1420; color:#ffd7da; border:1px solid var(--red); border-radius:10px; padding:12px 14px; font-weight:600; margin-top:12px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.grid2 .card { margin:0; }
.findings li, .labels li { padding:6px 4px; border-bottom:1px solid var(--line); display:flex; flex-direction:column;
                           align-items:flex-start; gap:4px; min-width:0; overflow-wrap:anywhere; word-break:break-word; }
.findings li em { color:var(--orange); font-weight:700; }
.findings li small { display:block; color:var(--muted); }
.note { color:var(--muted); font-size:12px; overflow-wrap:anywhere; word-break:break-word; max-width:100%; }
.f-sanction { background:#3a1620; color:#ffd7da; }
.cat { display:inline-block; background:#24314f; border-radius:4px; padding:0 7px; font-size:11px; color:#c3cde7; }
.tx-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.tx-table th { color:var(--muted); text-align:left; padding:7px 11px; border-bottom:1px solid var(--line); }
.tx-table td { padding:8px 11px; border-bottom:1px solid var(--line); word-break:break-all; }
.table-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.mono { font-family:ui-monospace, monospace; font-size:12.5px; }
code { background:#0b1120; padding:1px 5px; border-radius:4px; font-size:12.5px; }

/* ---- адаптив: телефоны и планшеты ---- */
@media (max-width: 860px) {
  body { font-size:15px; }
  .topbar { flex-wrap:wrap; gap:6px 12px; padding:12px 14px; }
  .topbar h1 { font-size:18px; }
  .topbar-right { margin-left:0; width:100%; font-size:12.5px; }
  main { padding:14px 10px; }
  .card { padding:14px; border-radius:10px; margin-bottom:12px; }
  .result-head { flex-wrap:wrap; gap:8px; }
  .stats-grid { grid-template-columns:repeat(auto-fit, minmax(104px,1fr)); gap:8px; }
  .stats-grid dd { font-size:14px; }
  .grid2 { grid-template-columns:1fr; gap:12px; }
  .row { flex-wrap:wrap; }
  .form-card select, .form-card input { font-size:16px; }  /* iOS не зумит поля */
  .tx-table { min-width:620px; }
  .tx-table th, .tx-table td { padding:7px 9px; font-size:12.5px; }
}
@media (max-width: 480px) {
  main { padding:12px 8px; }
  .card { padding:12px; }
  .badge { font-size:14px; }
  .badge-inner { font-size:12px; padding:3px 8px; }
  .stats-grid { grid-template-columns:repeat(auto-fit, minmax(92px,1fr)); }
}