:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0f1b2d;
  --muted: #5b6b80;
  --line: #e2e8f0;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --ok: #2b8a3e;
  --bad: #c92a2a;
  --warn: #e67700;
  --radius: 10px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.9em; background: #eef2f7; padding: 1px 5px; border-radius: 4px; }
a { color: var(--accent); }

.top { background: var(--ink); color: #fff; padding: 28px 0 22px; }
.top h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.01em; }
.top .sub { margin: 0; color: #b8c4d6; }

.steps { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.step { flex: 1 1 200px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--muted); text-align: left; }
.step span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 600; font-size: 13px; }
.step.active { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.step.active span { background: var(--accent); color: var(--accent-ink); }
.step.done span { background: var(--ok); color: #fff; }

.panel { display: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 14px 0 20px; }
.panel.active { display: block; }
.panel h2 { margin: 0 0 6px; font-size: 20px; }
.panel h3 { margin: 18px 0 8px; font-size: 15px; }
.hint { color: var(--muted); margin: 0 0 14px; }

.cards { display: grid; gap: 10px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.card summary { cursor: pointer; font-weight: 600; }
.card[open] summary { margin-bottom: 10px; }

label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 14px; margin-bottom: 10px; }
input, textarea, select { font: inherit; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.inline input { width: auto; }
.adv { margin: 4px 0 10px; font-size: 14px; }
.adv summary { cursor: pointer; color: var(--muted); }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 6px 0; }
.row label { margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

button, .filebtn { font: inherit; border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid transparent; }
.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { background: #a5b4d4; cursor: not-allowed; }
.ghost, .filebtn { background: #fff; border-color: #cbd5e1; color: var(--ink); }
.ghost:hover, .filebtn:hover { border-color: var(--accent); }
.big { padding: 12px 24px; font-size: 16px; margin-top: 8px; }
.filebtn { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.filebtn.wide { justify-content: space-between; margin-bottom: 10px; }
.fname { color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status { margin: 12px 0; padding: 10px 14px; border-radius: 8px; background: #eef2ff; }
.status.error { background: #fff0f0; color: var(--bad); }
.status.ok { background: #ebfbee; color: var(--ok); }

.summary { display: flex; gap: 24px; align-items: center; margin: 18px 0 10px; color: var(--muted); }
.summary strong { color: var(--ink); font-size: 20px; }
.summary .ghost { margin-left: auto; }

.tablewrap { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.tablewrap.short { max-height: 300px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f1f5f9; font-weight: 600; }
td.u { font-weight: 600; white-space: nowrap; }
td.t { color: var(--muted); max-width: 480px; overflow-wrap: anywhere; }
.more { color: var(--muted); font-size: 13px; }

.hashbox { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 14px 16px; background: #f1f5f9; border-radius: var(--radius); margin: 8px 0 4px; }
.hashbox .label { font-weight: 600; font-size: 13px; color: var(--muted); width: 100%; }
.hashbox code { background: none; padding: 0; font-size: 13px; overflow-wrap: anywhere; flex: 1 1 380px; }

.roundinfo { align-self: center; color: var(--muted); font-size: 13.5px; padding: 8px 0 18px; }
.callout { border-left: 4px solid var(--accent); background: #eef2ff; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.callout ol { margin: 6px 0 0; padding-left: 20px; }

.drawinfo { padding: 12px 16px; border-radius: 8px; background: #f1f5f9; margin: 10px 0; font-size: 14px; }
.drawinfo .countdown { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.checks { list-style: none; padding: 0; margin: 16px 0; }
.checks li { padding: 5px 0 5px 28px; position: relative; font-size: 14px; }
.checks li::before { position: absolute; left: 4px; font-weight: 700; }
.checks li.ok::before { content: "✓"; color: var(--ok); }
.checks li.bad::before { content: "✗"; color: var(--bad); }
.checks li.warn::before { content: "!"; color: var(--warn); left: 8px; }
.checks small { color: var(--muted); display: block; }

.winners { padding-left: 0; list-style: none; counter-reset: w; }
.winners li { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.winners li .pos { font-weight: 700; color: var(--accent); min-width: 110px; }
.winners li .user { font-size: 18px; font-weight: 700; }
.winners li.alt .pos { color: var(--muted); }
.winners li.alt .user { font-size: 15px; font-weight: 600; }

.foot { color: var(--muted); font-size: 13px; padding-bottom: 30px; }
