
:root {
  --bg: #f6f6f4; --raised: #ffffff; --line: #e3e3df; --fg: #1b1b1a; --fg2: #5f5f5a; --fg3: #8b8b85;
  --accent: #2563eb; --on-accent: #ffffff; --ok: #15803d; --bad: #b91c1c; --warn: #a16207; --chip: #eeeeea;
  --new: #2563eb; --investigating: #a16207; --fixed: #15803d; --wontfix: #6b7280;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fg); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213; --raised: #1a1b1d; --line: #2c2e31; --fg: #ececea; --fg2: #a3a39e; --fg3: #75756f;
    --accent: #7aa2ff; --on-accent: #0b1220; --ok: #4ade80; --bad: #f87171; --warn: #facc15; --chip: #25272a;
    --new: #7aa2ff; --investigating: #facc15; --fixed: #4ade80; --wontfix: #9ca3af;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
[hidden] { display: none !important; }
h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; margin: 0; }
h3 { font-size: 12px; font-weight: 600; margin: 0 0 8px; color: var(--fg2); text-transform: uppercase; letter-spacing: 0.06em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--fg3); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.quiet { background: transparent; border-color: transparent; color: var(--fg2); }
button.danger { color: var(--bad); }
input, select, textarea { border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 6px 10px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
code, pre, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.gate { display: grid; place-items: center; min-height: 100svh; padding: 16px; }
.gate-card { width: min(380px, 100%); display: grid; gap: 10px; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.gate-card p { margin: 0 0 6px; color: var(--fg2); }
.gate-card label { font-weight: 500; }
.error { color: var(--bad); min-height: 1.4em; margin: 0; }
.app { display: grid; grid-template-rows: auto auto 1fr; height: 100svh; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--raised); }
.top input { flex: 1; max-width: 420px; margin-left: auto; }
.filters { display: flex; gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.filters button { border-radius: 999px; padding: 4px 12px; background: transparent; white-space: nowrap; }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filters .count { color: var(--fg3); margin-left: 6px; }
.filters button[aria-pressed="true"] .count { color: inherit; opacity: 0.7; }
.panes { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; min-height: 0; }
.list { border-right: 1px solid var(--line); overflow-y: auto; }
.row { display: grid; gap: 3px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 20px; background: transparent; }
.row:hover { background: var(--chip); }
.row[aria-current="true"] { background: var(--raised); box-shadow: inset 3px 0 0 var(--accent); }
.row-head { display: flex; align-items: center; gap: 8px; }
.row-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { color: var(--fg3); font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 8px; font-size: 12px; background: var(--chip); color: var(--fg2); margin-left: auto; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--fg3)); }
.pill[data-status="new"] { --dot: var(--new); }
.pill[data-status="investigating"] { --dot: var(--investigating); }
.pill[data-status="fixed"] { --dot: var(--fixed); }
.pill[data-status="wontfix"] { --dot: var(--wontfix); }
.more { width: calc(100% - 40px); margin: 12px 20px; }
.empty { color: var(--fg3); padding: 32px 20px; }
.detail { overflow-y: auto; padding: 24px 28px 48px; display: grid; gap: 20px; align-content: start; }
.title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title h2 { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--fg2); }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.said { white-space: pre-wrap; margin: 0; }
.quiet-text { color: var(--fg3); margin: 0; }
h3.spaced { margin-top: 16px; }
.track { display: grid; gap: 10px; }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.track-head h3 { margin: 0; }
.track textarea { width: 100%; min-height: 88px; resize: vertical; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions .saved { color: var(--fg3); }
.actions .danger { margin-left: auto; }
dl.grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.grid dt { color: var(--fg2); }
dl.grid dd { margin: 0; overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 18px 180px 1fr; gap: 8px; }
.checks .mark { font-weight: 600; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--bad); }
.checks .detail-text { color: var(--fg2); overflow-wrap: anywhere; }
.task { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: grid; gap: 4px; }
.task:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.task ul { margin: 2px 0 0; padding-left: 18px; color: var(--fg2); }
details.log { border-top: 1px solid var(--line); padding: 8px 0; }
details.log:first-of-type { border-top: 0; }
details.log summary { cursor: pointer; font-weight: 500; }
details.log pre { margin: 8px 0 0; max-height: 420px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .app { height: auto; }
  .top { flex-wrap: wrap; padding: 12px 16px; }
  .top input { order: 3; max-width: none; flex-basis: 100%; }
  .top .quiet { margin-left: auto; }
  .filters { padding: 10px 16px; }
  .panes { grid-template-columns: 1fr; }
  .list { border-right: 0; max-height: 45svh; }
  .row { padding: 12px 16px; }
  .detail { padding: 20px 16px 40px; }
  .checks li { grid-template-columns: 18px 1fr; }
  .checks .detail-text { grid-column: 2; }
}
