:root {
  --bg: #f4f2ec;
  --panel: #fffdf8;
  --ink: #1f2420;
  --muted: #6b716b;
  --line: #ddd8cc;
  --accent: #2f6b4f;
  --accent-soft: #dcebe2;
  --warn: #f6e6cc;
  --bad: #a23b2a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161917;
    --panel: #1f2320;
    --ink: #e7e9e4;
    --muted: #9aa198;
    --line: #333a35;
    --accent: #7cc39b;
    --accent-soft: #24382c;
    --warn: #3d311f;
    --bad: #e07a68;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0 16px 48px; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
header { padding: 18px 0 4px; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.card.warn { background: var(--warn); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14px; }
label.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
input, button { font: inherit; }
input[type=text], input:not([type]) {
  width: 100%; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
button {
  width: 100%; min-height: 48px; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-weight: 600;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--panel); }
button:disabled { opacity: .5; }
progress { width: 100%; height: 10px; margin: 8px 0 0; accent-color: var(--accent); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.facts .bad { color: var(--bad); font-weight: 600; }
.result { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.result .big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.result.bad { background: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
th, td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.pick td:first-child { font-weight: 700; }
.diff { color: var(--bad); }
.log { margin: 0; padding-left: 28px; font-size: 12px; color: var(--muted); max-height: 220px; overflow: auto; }
.log li.err { color: var(--bad); }

.steps { list-style: none; margin: 12px 0 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.steps li:last-child { border-bottom: 0; }
.steps .ico { grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.steps .d { grid-column: 2; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.steps .d:empty { display: none; }
.steps li.wait .t { color: var(--muted); }
.steps li.run .ico { border-color: var(--accent); border-right-color: transparent; animation: spin 0.9s linear infinite; }
.steps li.run .t { font-weight: 600; }
.steps li.done .ico { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.steps li.done .ico::after { content: "✓"; }
.steps li.fail .ico { background: var(--bad); border-color: var(--bad); color: var(--panel); }
.steps li.fail .ico::after { content: "!"; }
.steps li.fail .d { color: var(--bad); }
.steps li.skip .ico::after { content: "–"; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.run .ico { animation: none; } }
tr.running td { color: var(--accent); }
.now { margin: 10px 0 0; font-weight: 600; color: var(--ink); }
.verdict { margin: 10px 0 0; }
details summary { cursor: pointer; font-weight: 600; }
details .log { margin-top: 8px; }
