:root {
  --bg:#EDF2F4; --surface:#fff; --ink:#0F2A33; --muted:#566C75; --line:#D4DEE3;
  --brand:#E8820C; --brand-ink:#fff; --ok:#1E9E6A; --bad:#D8453F; --bad-soft:#F9DEDC; --focus:#3B82C4;
  --display:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  --body:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0B1A20; --surface:#112730; --ink:#E6F0F3; --muted:#8FA8B1; --line:#20404B; --bad-soft:#3F1E1E; --bad:#F26D68; --ok:#34C58A; }
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.5 var(--body);
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
.wrap { max-width:900px; margin:0 auto; padding:20px 16px 56px; }
.top { margin-bottom:32px; }
.brand { font:700 22px var(--display); color:var(--ink); text-decoration:none; }
.brand i { font-style:normal; color:var(--brand); }
.brand small { font:500 15px var(--body); color:var(--muted); margin-left:8px; }
:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }

.intro h1 { font:700 clamp(30px,6.5vw,46px)/1.1 var(--display); margin:0 0 10px; letter-spacing:-.01em; }
.intro p { margin:0 0 12px; color:var(--muted); max-width:58ch; }

.cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:24px; }
@media (max-width:720px) { .cols { grid-template-columns:1fr; } }
.box { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:18px; margin:0; min-width:0; }
.box legend { font:700 18px var(--display); padding:0 6px; margin-left:-6px; }
.box h2 { font:700 20px var(--display); margin:0 0 10px; }

.f { margin-top:14px; }
.f label { display:block; font-weight:600; font-size:15px; margin-bottom:5px; }
.opt { font-weight:400; color:var(--muted); }
.f small { display:block; color:var(--muted); font-size:13px; margin-top:4px; }
.inp { position:relative; }
input[type=text], input[type=password], input[type=number], input[type=email] {
  width:100%; font:inherit; color:var(--ink); background:var(--bg); border:1px solid var(--line);
  border-radius:8px; padding:11px 12px; }
input:focus { border-color:var(--focus); }
.inp input[type=password], .inp input[data-shown] { padding-right:64px; }
.eye { position:absolute; right:6px; top:50%; transform:translateY(-50%); font:600 13px var(--body); color:var(--muted);
  background:transparent; border:0; padding:8px; cursor:pointer; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

.check { display:flex; gap:10px; align-items:flex-start; margin:22px 0 16px; color:var(--muted); font-size:15px; }
.check input { margin-top:4px; width:18px; height:18px; flex:none; }
.cta { font:700 17px var(--display); color:var(--brand-ink); background:var(--brand); border:0; border-radius:10px; padding:14px 26px; cursor:pointer; width:100%; }
@media (min-width:721px) { .cta { width:auto; } }
.cta:hover { filter:brightness(1.06); }

.alert { background:var(--bad-soft); color:var(--bad); border-radius:8px; padding:12px 14px; margin-top:20px; font-weight:500; }
.notes { margin-top:36px; }
.notes h2 { font:700 18px var(--display); margin:0 0 8px; }
.notes ul { margin:0; padding-left:20px; color:var(--muted); max-width:70ch; }
.notes li { margin-bottom:6px; }

.linkbox { font-size:14px !important; }
.bar { height:12px; background:var(--line); border-radius:99px; overflow:hidden; margin-top:22px; }
.fill { height:100%; width:0; background:var(--brand); border-radius:99px; transition:width .5s ease; }
.fill.done { background:var(--ok); } .fill.failed { background:var(--bad); }
.step { margin:8px 0 0; color:var(--muted); }
#done { margin-top:22px; }
.log { margin-top:22px; }
.log summary { cursor:pointer; font-weight:600; }
.log pre { background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:12px; margin:10px 0 0;
  max-height:340px; overflow:auto; font:13px/1.5 ui-monospace,Menlo,Consolas,monospace; white-space:pre-wrap; word-break:break-word; }
.log .warn { color:#B7791F; } .log .error { color:var(--bad); }

.tablewrap { overflow-x:auto; margin:10px 0; }
table { border-collapse:collapse; width:100%; font-size:14px; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
td.mono { font-family:ui-monospace,Menlo,Consolas,monospace; }
#donebody ul { padding-left:20px; margin:8px 0; color:var(--muted); }
#donebody p { margin:8px 0; }

/* admin */
.adm-form { max-width:360px; margin-top:20px; }
.adm td form { display:inline; }
.adm button { font:600 13px var(--body); padding:5px 10px; border-radius:6px; border:1px solid var(--line); background:var(--surface); color:var(--ink); cursor:pointer; }
.badge { font-size:12px; font-weight:600; padding:2px 8px; border-radius:99px; background:var(--line); }
.badge.done { background:#DDF3EA; color:#1E7F58; } .badge.failed { background:var(--bad-soft); color:var(--bad); }
.badge.running { background:#FBF0D2; color:#9A6B00; }
@media (prefers-reduced-motion: reduce) { .fill { transition:none; } }
