:root {
  --bg: #f8fafc; --fg: #0f172a; --muted: #64748b; --card: #fff; --line: #e2e8f0;
  --accent: #2563eb; --ok: #15803d; --err: #dc2626;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f172a; --fg: #e2e8f0; --muted: #94a3b8; --card: #1e293b; --line: #334155; --accent: #60a5fa; --ok: #4ade80; --err: #f87171; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 20px 0 10px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.top nav { display: flex; align-items: center; gap: 16px; }
.top nav a { text-decoration: none; color: var(--fg); }
.top nav a[aria-current] { color: var(--accent); font-weight: 600; }
.top form { margin: 0; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 16px; }
.narrow { max-width: 360px; margin: 40px auto; }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .error { color: var(--err); }
.nowrap { white-space: nowrap; } .break { overflow-wrap: anywhere; }
label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 14px; }
label.check { font-weight: 400; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); font-weight: 400;
}
button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.filters select, .filters input { width: auto; margin: 0; }
.filters input[type=search] { flex: 1 1 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--fg); background: var(--card); font-size: 13px; }
.chip.on { border-color: var(--accent); color: var(--accent); }
.chip b { margin-left: 2px; color: var(--accent); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
form.inline { margin: 0; } form.inline select { margin: 0; width: auto; padding: 3px 6px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); }
.type-bug { background: #fee2e2; color: #991b1b; }
.type-feature { background: #dbeafe; color: #1e40af; }
.type-question { background: #fef9c3; color: #854d0e; }
.prio-high { background: #ffedd5; color: #9a3412; }
.prio-urgent { background: #dc2626; color: #fff; }
.prio-low { opacity: .7; }
.status-new { background: #dcfce7; color: #166534; }
.status-done, .status-wontfix, .status-spam { opacity: .7; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.body { white-space: normal; overflow-wrap: anywhere; }
.notes { list-style: none; padding: 0; margin: 0 0 12px; }
.notes li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.notes li.status { color: var(--muted); font-size: 14px; }
.details dt { font-size: 12px; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.details dd { margin: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--bg); padding: 8px; border-radius: 6px; margin: 4px 0 0; }
.pager { display: flex; gap: 16px; }
[hidden] { display: none !important; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.top { flex-wrap: wrap; row-gap: 6px; }
.top nav { flex-wrap: wrap; gap: 6px 14px; }
@media (max-width: 560px) { .hide-sm { display: none; } }
