:root {
  --bg: #f7f5f0; --panel: #ffffff; --ink: #1f2328; --muted: #6b6f76; --line: #e4e0d6;
  --accent: #b4541a; --accent-ink: #ffffff; --ok: #2f7d4f; --warn: #b7791f; --bad: #b42318; --chip: #f1ece2;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16171a; --panel: #1f2125; --ink: #e8e6e1; --muted: #9a9ea6; --line: #33363c;
          --accent: #e0864a; --accent-ink: #1a1a1a; --chip: #2a2d32; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
header.top { display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header.top .brand { font-weight: 700; font-size: 18px; color: var(--ink); }
header.top .brand span { color: var(--accent); }
header.top nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
header.top nav a { color: var(--muted); font-weight: 500; } header.top nav a.on { color: var(--ink); }
header.top .who { color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
h1 { font-size: 24px; margin: 0 0 16px; } h2 { font-size: 18px; margin: 24px 0 10px; } h3 { font-size: 15px; margin: 0 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.flash { background: var(--chip); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; } .row > * { flex: 1; min-width: 140px; }
button, .btn { font: inherit; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; font-weight: 600; display: inline-block; white-space: nowrap; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--bad); color: #fff; } button.ok { background: var(--ok); color: #fff; } button.warn { background: var(--warn); color: #fff; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.chip { display: inline-block; background: var(--chip); border-radius: 999px; padding: 1px 9px; font-size: 12px; margin: 1px 2px 1px 0; }
.chip.urgent, .chip.high { background: var(--bad); color: #fff; } .chip.review { background: var(--accent); color: var(--accent-ink); }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.kanban .col { background: var(--chip); border-radius: 10px; padding: 10px; min-height: 200px; }
.kanban .col h3 { font-size: 13px; text-transform: uppercase; color: var(--muted); }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; color: var(--ink); }
.card:hover { border-color: var(--accent); text-decoration: none; }
.prose { overflow-wrap: anywhere; } .prose table { margin: 10px 0; } .prose p { margin: 8px 0; }
.sources li { margin-bottom: 8px; } .sources .excerpt { color: var(--muted); font-size: 13px; }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { border-left: 2px solid var(--line); padding: 4px 0 10px 12px; }
.matrix td, .matrix th { text-align: center; } .matrix th.rowh { text-align: left; }
.inline { display: inline; } code, pre { background: var(--chip); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
pre { padding: 12px; overflow-x: auto; white-space: pre-wrap; }
.login { max-width: 420px; margin: 10vh auto; }
@media (max-width: 700px) { .kanban { grid-template-columns: repeat(6, 80vw); } header.top { padding: 10px 16px; } }
