:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1a1d21; --muted: #6b7280;
  --accent: #2563eb; --ok: #16a34a; --warn: #d97706; --err: #dc2626;
  --line: #e5e7eb; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex;
  align-items: center; gap: 16px; padding: 10px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px;
  border-radius: 8px; }
nav a.active { color: var(--accent); background: #eff6ff; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
h1 { font-size: 20px; margin: 4px 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: #eef2f7; color: var(--muted); }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.running { background: #dbeafe; color: #1e40af; }
.pill.done { background: #dcfce7; color: #166534; }
.pill.failed, .pill.cancelled { background: #fee2e2; color: #991b1b; }
form label { display: block; margin: 10px 0 4px; font-size: 13px;
  color: var(--muted); }
input, select { width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff; }
input[type=range] { padding: 0; }
.err-text { color: var(--err); font-size: 12px; min-height: 16px;
  display: block; }
button, .btn { background: var(--accent); color: #fff; border: 0;
  border-radius: 8px; padding: 9px 16px; font: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--accent);
  border: 1px solid var(--line); }
button.danger { background: var(--err); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit,
  minmax(160px, 1fr)); }
.metric { text-align: center; }
.metric .v { font-size: 20px; font-weight: 700; }
.metric .v.pos { color: var(--ok); }
.metric .v.neg { color: var(--err); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line);
  white-space: nowrap; }
th { color: var(--muted); font-weight: 500; user-select: none; cursor: pointer; }
.bar { height: 6px; background: #eef2f7; border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent);
  transition: width .4s; }
#toast-box { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 99; width: min(92vw, 480px); }
.toast { background: #111827; color: #fff; padding: 10px 14px;
  border-radius: 10px; font-size: 13px; }
.toast.err { background: var(--err); }
.plot { width: 100%; min-height: 320px; }
@media (max-width: 480px) { main { padding: 10px; }
  th, td { padding: 6px 5px; } }
