:root {
  --bg: #f6f7fb; --surface: #ffffff; --text: #141a2b; --muted: #5c6478; --line: #e3e6ef;
  --brand: #4b3ff2; --brand-ink: #ffffff;
  --pass: #127a43; --pass-bg: #e3f6ec; --fail: #b42318; --fail-bg: #fde8e7;
  --blocked: #9a5b00; --blocked-bg: #fff3dc; --nt: #4a5468; --nt-bg: #eef0f5;
  --mock: #6b3fa0; --mock-bg: #f1e9fb; --live: #0b5cad; --live-bg: #e3effc;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,26,43,.06), 0 4px 16px rgba(20,26,43,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220; --surface: #161b2c; --text: #e8eaf2; --muted: #9aa3b8; --line: #262d44;
    --brand: #8b80ff; --brand-ink: #0e1220;
    --pass: #5fd49a; --pass-bg: #12301f; --fail: #ff8a80; --fail-bg: #3a1513;
    --blocked: #ffc266; --blocked-bg: #33250c; --nt: #b5bdd0; --nt-bg: #222a3f;
    --mock: #c9a6ff; --mock-bg: #2a1d40; --live: #8cc3ff; --live-bg: #12263f;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.brand img { border-radius: 8px; object-fit: contain; }
.tag { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--nt-bg); color: var(--muted); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.who { color: var(--muted); font-size: 13px; margin: 0 6px 0 10px; }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); padding: 8px 14px; background: var(--surface); color: var(--text); }
button:disabled { opacity: .55; cursor: progress; }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; font-weight: 600; }
button.ghost { background: transparent; }
button.tab { border-color: transparent; background: transparent; color: var(--muted); }
button.tab.active { background: var(--nt-bg); color: var(--text); font-weight: 600; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.login { max-width: 420px; margin: 48px auto; }
form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input[type=email], input[type=password], input[type=search], input:not([type]), input[inputmode] { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.check { display: flex !important; gap: 8px; align-items: center; color: var(--text) !important; font-size: 14px; }
.err { color: var(--fail); min-height: 1.2em; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.toolbar input[type=search] { flex: 1 1 220px; width: auto; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mod { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); min-height: 170px; }
.mod:hover { border-color: var(--brand); }
.mod .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mod h3 { margin: 0; font-size: 16px; }
.mod p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.mod .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.pill.PASS { color: var(--pass); background: var(--pass-bg); }
.pill.FAIL { color: var(--fail); background: var(--fail-bg); }
.pill.BLOCKED { color: var(--blocked); background: var(--blocked-bg); }
.pill.NT, .pill.info { color: var(--nt); background: var(--nt-bg); }
.pill.MOCK { color: var(--mock); background: var(--mock-bg); }
.pill.LIVE { color: var(--live); background: var(--live-bg); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.cols .card { margin-bottom: 0; } .cols { margin-bottom: 16px; }
.checklist li { margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
table.checks { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
table.checks td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.checks td:first-child { width: 96px; }
table.checks .ev { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.hist { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hist button { padding: 2px 10px; font-size: 13px; }
dialog { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px 22px; }
dialog::backdrop { background: rgba(10, 12, 24, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-head h2 { margin: 0; }
.facts { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; font-size: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.dlg-actions { display: flex; gap: 12px; align-items: center; margin: 14px 0; }
.result-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; } .facts dt { margin-top: 6px; }
  table.checks td:first-child { width: 80px; }
  .who { display: none; }
}
