/* agent-recall — dark theme, vanilla CSS, single file. */

:root {
  --bg: #0b1020;
  --bg-2: #111827;
  --panel: #151b2d;
  --panel-2: #1c2438;
  --border: #1f2a44;
  --text: #e5e7eb;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-2: #f472b6;
  --good: #22c55e;
  --warn: #facc15;
  --bad: #ef4444;
  --mono: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); font-family: var(--sans); margin: 0; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); background: rgba(255,255,255,0.06); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.9em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.site-header { background: linear-gradient(180deg, #0b1020 0%, #0e1428 100%); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; gap: 1rem; }
.brand { display: flex; align-items: baseline; gap: 0.6rem; }
.brand h1 { font-family: var(--mono); font-size: 1.3rem; margin: 0; color: var(--text); letter-spacing: -0.02em; }
.brand .logo { color: var(--accent); font-size: 1.2rem; }
.brand .tag { color: var(--text-dim); font-size: 0.9rem; }
nav { display: flex; gap: 1.2rem; }
nav a { color: var(--text-dim); font-size: 0.95rem; }
nav a:hover { color: var(--text); }
nav a.active { color: var(--accent); }

#hero { padding: 2rem 0 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.kicker { font-size: 1.4rem; color: var(--text); margin: 0 0 0.5rem; font-weight: 500; }
.sub { color: var(--text-dim); max-width: 820px; margin: 0; font-size: 1rem; }
.meta-strip { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { background: var(--panel); border: 1px solid var(--border); color: var(--text-dim); font-family: var(--mono); font-size: 0.8rem; padding: 0.3rem 0.7rem; border-radius: 999px; }

.view { padding: 1rem 0 3rem; }
.view.hidden { display: none; }
.view h2 { font-family: var(--mono); font-size: 1.4rem; margin: 0 0 0.4rem; }
.view h3 { font-family: var(--mono); font-size: 1.05rem; margin: 2rem 0 0.6rem; color: var(--text-dim); }
.hint { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 1rem; }
.hint .band { font-family: var(--mono); padding: 0.1rem 0.5rem; border-radius: 4px; margin-left: 0.5rem; }
.band.g { background: rgba(34,197,94,0.15); color: var(--good); }
.band.y { background: rgba(250,204,21,0.15); color: var(--warn); }
.band.r { background: rgba(239,68,68,0.15); color: var(--bad); }
.back { display: inline-block; color: var(--text-dim); margin-bottom: 1rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
thead th { text-align: left; font-weight: 600; color: var(--text-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.9rem 1rem; background: var(--panel-2); border-bottom: 1px solid var(--border); }
tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(56,189,248,0.05); }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
td .agent-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; }
td .agent-name { color: var(--text); cursor: pointer; }
td .agent-name:hover { color: var(--accent); }
.score-pill { display: inline-block; min-width: 3rem; text-align: center; padding: 0.25rem 0.6rem; border-radius: 999px; font-family: var(--mono); font-weight: 700; font-size: 0.95rem; }
.score-pill.g { background: rgba(34,197,94,0.18); color: var(--good); }
.score-pill.y { background: rgba(250,204,21,0.18); color: var(--warn); }
.score-pill.r { background: rgba(239,68,68,0.18); color: var(--bad); }
.share-link { color: var(--text-dim); font-size: 0.8rem; }
.share-link:hover { color: var(--accent); }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.2rem; }
.card.empty { color: var(--text-muted); font-style: italic; }
#biggest-regret { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
#biggest-regret .br-agent { font-family: var(--mono); font-weight: 700; }
#biggest-regret .br-hours { color: var(--bad); font-family: var(--mono); }
#biggest-regret .br-title { color: var(--text-dim); }

.feed { display: flex; flex-direction: column; gap: 0.6rem; }
.feed .row { display: grid; grid-template-columns: 6rem 1fr auto auto; gap: 1rem; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; }
.feed .kind { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.5rem; border-radius: 4px; text-align: center; }
.feed .kind.revert { background: rgba(239,68,68,0.18); color: var(--bad); }
.feed .kind.hotfix { background: rgba(250,204,21,0.18); color: var(--warn); }
.feed .body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.feed .title { color: var(--text); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .sub { color: var(--text-dim); font-size: 0.82rem; font-family: var(--mono); }
.feed .hours { font-family: var(--mono); color: var(--text-dim); font-size: 0.85rem; text-align: right; }
.feed .agent-tag { font-family: var(--mono); font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 4px; background: var(--panel-2); color: var(--text-dim); }

#agent-trend svg { width: 100%; height: 180px; display: block; }

footer { border-top: 1px solid var(--border); padding: 1rem 0 2rem; color: var(--text-muted); font-size: 0.85rem; font-family: var(--mono); }
footer .wrap { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
footer .dot { color: var(--text-muted); }

@media (max-width: 740px) {
  .kicker { font-size: 1.15rem; }
  table { font-size: 0.85rem; }
  thead th, tbody td { padding: 0.65rem 0.6rem; }
  .feed .row { grid-template-columns: 4rem 1fr; }
  .feed .hours, .feed .agent-tag { grid-column: 1 / -1; justify-self: start; }
}
