:root {
  --bg: #0b0e14;
  --panel: #11151f;
  --panel-2: #161b28;
  --line: #242b3d;
  --text: #e7eaf2;
  --text-dim: #9aa3b8;
  --text-faint: #8b94a8;
  --accent: #5a8dee;
  --accent-soft: #1c2740;
  --ok: #3fb97c;
  --ok-soft: #10281d;
  --warn: #d79a3a;
  --warn-soft: #2c2210;
  --bad: #de5c5c;
  --bad-soft: #2d1414;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  font-family: -apple-system, "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); }

header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0d111a, #0b0e14);
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px);
  flex-wrap: wrap;
}
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.brandmark {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 7px; background: linear-gradient(135deg, #c23f3f, #a02e2e); color: #fff; font-size: 13px;
}
.brandlight { color: var(--text-dim); font-weight: 500; }
.header-meta { color: var(--text-dim); font-size: 13px; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.sep { color: var(--text-faint); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
header a { font-size: 13px; text-decoration: none; }
header a:hover { text-decoration: underline; }

main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }
.intro { margin-bottom: 26px; }
h1 {
  font-size: 27px; line-height: 1.25; margin: 0 0 14px;
  font-weight: 700;
  color: #fff;
}
h2 { font-size: 19px; margin: 0 0 12px; }
.lede { color: var(--text-dim); max-width: 78ch; line-height: 1.6; }
code { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0 32px; }
.policy-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.policy-name { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--accent); margin-bottom: 10px; text-transform: uppercase; font-size: 12.5px; letter-spacing: .04em; }
.metric { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; }
.metric:first-of-type { border-top: none; }
.metric-label { color: var(--text-dim); }
.metric-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.metric-value.ok { color: var(--ok); }
.metric-value.warn { color: var(--warn); }
.metric-value.bad { color: var(--bad); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.tab.active { background: var(--accent-soft); border-color: #2c3f6b; color: #a9c0f5; }

#case-list { display: grid; gap: 14px; }
.case-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.case-head h3 { font-size: 16px; margin: 8px 0 0; }
.badge { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); margin-right: 6px; display: inline-block; }
.badge-ok { background: var(--ok-soft); border-color: #214a34; color: #8fe3b6; }
.badge-warn { background: var(--warn-soft); border-color: #4a3a16; color: #f0cf8e; }
.badge-bad { background: var(--bad-soft); border-color: #4a2323; color: #f0a0a0; }
.toggle { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.notes { margin: 10px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.trace-body { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.trace-meta { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }
.turn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.turn-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 6px; }
.turn-content { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; white-space: pre-wrap; }
.tool-call { font-size: 12px; margin: 4px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tool-call code { word-break: break-word; }
.tool-call.blocked code { border-color: #4a2323; }
.blocked-tag { color: var(--bad); font-size: 11px; font-weight: 600; }
.result { color: var(--text-faint); font-size: 11.5px; word-break: break-word; }

.finding { margin-top: 36px; background: var(--accent-soft); border: 1px solid #2c3f6b; border-radius: var(--radius); padding: 20px; }
.finding p { color: #cdd8f5; line-height: 1.6; max-width: 78ch; }

footer { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 24px; border-top: 1px solid var(--line); margin-top: 20px; }

@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
