:root {
  --bg: #0d1117; --bg-panel: #161b22; --bg-input: #0d1117;
  --border: #30363d; --text: #c9d1d9; --text-dim: #8b949e;
  --accent: #58a6ff; --green: #3fb950; --red: #f85149; --yellow: #d29922;
  --mono: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex; min-height: 100vh;
}
#sidebar {
  width: 220px; flex-shrink: 0; background: var(--bg-panel); border-right: 1px solid var(--border);
  padding: 16px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
#sidebar .brand { padding: 0 16px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
#sidebar .brand small { display: block; color: var(--text-dim); font-weight: 400; font-size: 11px; margin-top: 2px; }
#sidebar a {
  display: block; padding: 8px 16px; color: var(--text-dim); text-decoration: none; font-size: 13px; border-left: 3px solid transparent;
}
#sidebar a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
#sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(88,166,255,0.08); }
#sidebar .honesty-link { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
#main { flex: 1; padding: 24px 32px; max-width: 1200px; overflow-x: auto; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 24px 0 8px; color: var(--text); }
.subtitle { color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }
.mono { font-family: var(--mono); }
.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.stat .n { font-size: 24px; font-weight: 700; font-family: var(--mono); }
.stat .label { color: var(--text-dim); font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-dim); font-weight: 500; font-size: 11px; text-transform: uppercase; }
tr:hover { background: rgba(255,255,255,0.02); }
a { color: var(--accent); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-family: var(--mono); }
.badge.ok { background: rgba(63,185,80,0.15); color: var(--green); }
.badge.warn { background: rgba(210,153,34,0.15); color: var(--yellow); }
.badge.bad { background: rgba(248,81,73,0.15); color: var(--red); }
.badge.neutral { background: rgba(139,148,158,0.15); color: var(--text-dim); }
.caveat { color: var(--yellow); font-size: 12px; margin-top: 4px; }
button, input[type=text], select {
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 6px; font-size: 13px; font-family: inherit;
}
button { cursor: pointer; background: var(--accent); color: #0d1117; border: none; font-weight: 600; }
button:hover { opacity: 0.9; }
button.secondary { background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); }
input[type=text] { width: 100%; }
.row { display: flex; gap: 8px; align-items: center; }
.stage { border-left: 3px solid var(--border); padding: 10px 14px; margin-bottom: 8px; background: rgba(255,255,255,0.015); }
.stage.fired { border-left-color: var(--accent); }
.stage summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.progress-bar { background: var(--bg-input); border-radius: 4px; height: 8px; overflow: hidden; margin: 6px 0; }
.progress-bar > div { background: var(--accent); height: 100%; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--bg-input); padding: 10px; border-radius: 6px; font-size: 12px; border: 1px solid var(--border); }
.quote { background: rgba(63,185,80,0.08); border-left: 3px solid var(--green); padding: 6px 10px; margin: 4px 0; font-size: 13px; }
.quote.fail { background: rgba(248,81,73,0.08); border-left-color: var(--red); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.banner { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.banner.red { background: rgba(248,81,73,0.12); border: 1px solid var(--red); color: #ffb3ae; }
.banner.yellow { background: rgba(210,153,34,0.12); border: 1px solid var(--yellow); color: #f0c674; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button { background: none; color: var(--text-dim); border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 14px; font-weight: 500; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.loading { color: var(--text-dim); font-style: italic; }
.helptext { color: var(--text-dim); font-size: 12px; }
