:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d2125;
  --muted: #6b7178;
  --line: #e3e1dc;
  --accent: #0b5cad;
  --accent-ink: #ffffff;
  --ok-bg: #e6f4ea; --ok: #1e6b34;
  --err-bg: #fbe9e7; --err: #a1291b;
  --pill: #eef2f7;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b; --card: #1d2125; --text: #e7e9eb; --muted: #9aa1a8; --line: #2e3439;
    --accent: #6aa8ec; --accent-ink: #0d1013;
    --ok-bg: #173323; --ok: #8fd6a4; --err-bg: #3b1d19; --err: #f3a597; --pill: #262c32;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 16px 0; }
.top > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; text-decoration: none; color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.subtitle { margin: 2px 0 10px; color: var(--muted); font-size: 14px; }
.nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.nav a { padding: 8px 10px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
.nav .who { color: var(--text); }
.spacer { flex: 1; }
h1 { font-size: 24px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 18px 0 10px; }
.card > h2:first-child { margin-top: 0; }
h3 { font-size: 15px; margin: 16px 0 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin: 32px auto; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid .card { margin: 0; }
.grid .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 180px; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 550; }
input, select, textarea, button, .button {
  font: inherit; font-size: 15px; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
textarea { width: 100%; resize: vertical; }
.mono, textarea.mono { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
button, .button { cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--accent); }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: 14px; }
.danger { color: var(--err); }
.inline { display: inline; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.big { font-size: 18px; font-weight: 600; margin: 10px 0; }
.count { font-size: 13px; color: var(--muted); font-weight: 500; }
.pill { background: var(--pill); border-radius: 99px; padding: 2px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.flash { padding: 10px 12px; border-radius: 8px; margin: 0 0 16px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.items { list-style: none; padding: 0; margin: 0 0 10px; }
.items li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items li > span:first-child { flex: 1; }
.items small { display: block; }
.items li.done .grow { text-decoration: line-through; color: var(--muted); }
.check { width: 22px; height: 22px; padding: 0; border-radius: 6px; line-height: 20px; text-align: center; font-size: 14px; flex: none; }
.done .check { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
table.list { width: 100%; border-collapse: collapse; }
table.list td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
td.date { color: var(--muted); white-space: nowrap; width: 1%; font-variant-numeric: tabular-nums; }
td.num { text-align: right; width: 1%; }
.doc .meta { margin-bottom: 8px; }
.markdown { overflow-wrap: anywhere; }
.markdown table { border-collapse: collapse; display: block; overflow-x: auto; margin: 12px 0; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.markdown pre { background: var(--pill); padding: 12px; border-radius: 8px; overflow-x: auto; }
.markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
.markdown blockquote { margin: 12px 0; padding: 4px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.markdown img { max-width: 100%; }
.comment { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.comment.resolved { opacity: 0.6; }
.comment .markdown > :first-child { margin-top: 4px; }
.comment .markdown > :last-child { margin-bottom: 0; }
pre.current { white-space: pre-wrap; background: var(--pill); padding: 12px; border-radius: 8px; }
