:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1c1f24; --muted: #6b7280; --line: #e3e6ea;
  --accent: #1f6feb; --ok: #1a7f37; --warn: #b26a00; --bad: #c62828;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* иначе .btn { display:inline-block } перебивает hidden */
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.top .brand { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.top nav a { margin-right: 16px; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
h1 { font-size: 22px; margin: 0 0 12px; } h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); } .error { color: var(--bad); } .ok { color: var(--ok); }
.banner { background: #fdecea; border: 1px solid #f5c6c2; padding: 10px 14px; border-radius: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.grid label { display: flex; flex-direction: column; gap: 4px; }
.grid label > span { font-weight: 600; font-size: 14px; }
.grid label small { color: var(--muted); font-size: 12px; }
.grid .span2 { grid-column: 1 / -1; }
.grid .check { flex-direction: row; align-items: flex-start; gap: 10px; }
.grid .check input { margin-top: 4px; }
.grid .check span { font-weight: 500; }
.row { display: flex; gap: 8px; }
input[type=text], input[type=number], select, input[type=file] {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; width: 100%;
}
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
button, .btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; cursor: pointer; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--bad); border-color: var(--bad); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #eef1f5; color: var(--muted); vertical-align: middle; }
.badge.st-running { background: #e3f0ff; color: var(--accent); }
.badge.st-done { background: #e6f5ea; color: var(--ok); }
.badge.st-failed { background: #fdecea; color: var(--bad); }
.badge.st-stopped { background: #fff4e0; color: var(--warn); }
.progress { height: 12px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.progress .bar { height: 100%; background: var(--accent); transition: width .5s; }
.counters { margin: 0 0 10px; }
.log { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; font-size: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; }
details { margin-top: 12px; } summary { cursor: pointer; font-weight: 600; }
.doc { background: #f8f9fb; color: var(--ink); border: 1px solid var(--line); padding: 16px; border-radius: 8px; font-size: 13px; white-space: pre-wrap; line-height: 1.5; }
table.jobs { width: 100%; border-collapse: collapse; }
table.jobs td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cards a { text-decoration: none; color: var(--muted); font-size: 12px; text-align: center; }
.cards img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 4px; }
/* --- сервис: шапка, шаги, наборы, проверка таблицы, итог --- */
.top .machine { margin-left: auto; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: #eef1f5; color: var(--muted); }
.top .machine.free { background: #e6f5ea; color: var(--ok); }
.top .machine.run { background: #e3f0ff; color: var(--accent); }
.top .machine.busy { background: #fff4e0; color: var(--warn); }
.hero h1 { font-size: 24px; } .hero p { margin: 0; }
.narrow { max-width: 420px; margin: 40px auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; }
.stack .check { flex-direction: row; align-items: center; gap: 8px; }
.step h2 { display: flex; align-items: center; gap: 10px; }
.step .num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-size: 15px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 2px dashed var(--line); border-radius: 12px; background: #fafbfc; cursor: pointer; text-align: center; padding: 16px; margin-bottom: 6px; }
.dropzone.over { border-color: var(--accent); background: #eef5ff; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .dz-file { font-weight: 600; }
.preview { margin-top: 12px; }
.preview .warn { color: var(--warn); margin: 6px 0; padding-left: 20px; }
table.sample { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.sample th, table.sample td { border-top: 1px solid var(--line); padding: 6px; text-align: left; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.preset { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.preset:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px #cfe3ff; }
.preset input { margin: 0 0 4px; }
.preset small { color: var(--muted); }
#advanced .grid { margin-top: 12px; }
button.big { font-size: 16px; padding: 12px 22px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { color: var(--muted); }
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 12px 0; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 8px; background: #eef1f5; color: var(--muted); font-size: 13px; text-align: center; }
.stepper li.now { background: #e3f0ff; color: var(--accent); font-weight: 600; }
.stepper li.done { background: #e6f5ea; color: var(--ok); }
.summary .big-line { font-size: 17px; margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cards a.att img { border-color: #f0c36d; }
.cards a em { display: block; font-style: normal; color: var(--warn); font-size: 11px; }
.fails { padding-left: 18px; font-size: 14px; } .fails li { margin: 4px 0; }
.lightbox { position: fixed; inset: 0; background: rgba(15, 23, 42, .85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 10; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; background: #fff; }
.lightbox span { color: #fff; font-size: 14px; }
@media (max-width: 720px) { .grid, .presets { grid-template-columns: 1fr; } .top { flex-wrap: wrap; gap: 8px; } }
.okbanner { background: #e6f5ea; border: 1px solid #b7e1c1; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.okbanner code, .banner code { font-size: 15px; background: #fff; padding: 1px 6px; border-radius: 4px; }
.row form { display: inline; }
