:root {
  --bg: #0d1117;
  --panel: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --ok: #3fb950;
  --warn: #d29922;
  --err: #f85149;
  --active: #1f6feb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.muted { color: var(--muted); font-size: 0.8rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--border);
  text-transform: uppercase;
}
.badge.active { background: #132544; border-color: var(--active); color: var(--accent); }
.badge.done { background: #12261a; border-color: var(--ok); color: var(--ok); }

.overall { margin-bottom: 1.25rem; }
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.bar {
  height: 8px;
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--active), var(--accent));
  transition: width 0.4s ease;
}
.bar-fill.done { background: var(--ok); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.step {
  padding: 0.65rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
}
.step.done { border-color: #238636; opacity: 0.85; }
.step.active { border-color: var(--active); box-shadow: 0 0 0 1px #1f6feb33; }
.step.pending { opacity: 0.45; }
.step-id { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.stat-val { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }

.log-section { margin-top: 0.5rem; }
.log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.chk { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }

.log {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.log .ok { color: var(--ok); }
.log .warn { color: var(--warn); }
.log .err { color: var(--err); }
.log .info { color: var(--accent); }

.foot {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.foot a { color: var(--accent); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

.done-banner {
  background: #12261a;
  border: 1px solid var(--ok);
  color: var(--ok);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  header { flex-direction: column; }
  .stat-val { font-size: 1.15rem; }
}
