:root { --bg: #f7f7f5; --card: #fff; --text: #1d1d1b; --muted: #6b6b66; --line: #e2e2dc; --accent: #2f5bd3; --on: #e7eefc; --bad: #b42318; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --card: #20201e; --text: #ececea; --muted: #9b9b95; --line: #34342f; --accent: #7c9cf0; --on: #26324f; --bad: #f97066; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
header nav, .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
header nav form { margin: 0; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0; }
h2 { font-size: 1.1rem; margin: 8px 0; }
a { color: var(--accent); }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 12px 0; color: inherit; text-decoration: none; }
.card.list:hover { border-color: var(--accent); }
.narrow { max-width: 420px; margin: 32px auto; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--bad); }
label { display: block; margin: 10px 0; }
label.check { display: inline-flex; gap: 4px; margin: 4px 8px 4px 0; align-items: center; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
button, .button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
.chip { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; margin: 2px 4px 2px 0; font-size: .85rem; }
.item { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item .types { grid-column: 1 / -1; }
.item .remove { justify-self: start; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 8px; overflow-x: auto; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.claim .statement { font-weight: 600; margin: 0 0 6px; }
blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--line); }
audio { height: 36px; max-width: 100%; }
.feedback { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.feedback button { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 4px 10px; font-size: .85rem; }
.feedback button.on { background: var(--on); border-color: var(--accent); }
.feedback .comment { flex: 1 1 200px; }
.weekly .row { margin: 6px 0; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); width: min(520px, calc(100% - 32px)); }
@media (max-width: 560px) { .item { grid-template-columns: 1fr; } }
#add-item { margin: 12px 0 16px; }
header nav a { text-decoration: none; }
