:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #14181f; --muted: #5b6472; --line: #dfe3e8;
  --brand: #14213d; --accent: #1f6feb; --ok: #127a3e; --warn: #9a6700; --bad: #b42318;
  --radius: 10px; --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0e1116; --surface: #161b22; --text: #e6edf3; --muted: #9aa4b2; --line: #2a313c; --brand: #0b1220; --accent: #4493f8; --ok: #3fb950; --warn: #d29922; --bad: #f85149; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--surface); padding: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.top { position: sticky; top: 0; display: flex; gap: 8px; align-items: center; padding: 10px 16px; background: var(--brand); color: #fff; z-index: 5; }
.top h1 { font-size: 1.05rem; margin: 0; flex: 1; }
.badge { font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.15); }
.badge.warn { background: var(--warn); color: #000; }
main { padding: 16px 16px 96px; max-width: 1100px; margin: 0 auto; }
h2 { font-size: 1.2rem; margin: 4px 0 12px; } h3 { font-size: 1rem; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 1.4rem; font-weight: 600; } .stat .k { color: var(--muted); font-size: .85rem; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.list li .title { font-weight: 600; flex: 1 1 200px; overflow-wrap: anywhere; }
.pill { font-size: .75rem; border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.pill.ok { color: var(--ok); border-color: currentColor; } .pill.bad { color: var(--bad); border-color: currentColor; } .pill.warn { color: var(--warn); border-color: currentColor; }
.btn { min-height: var(--tap); padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.spacer { height: 8px; } .mt { margin-top: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input, select, textarea { min-height: var(--tap); font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 100%; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 8px 0 4px; }
.empty { text-align: center; padding: 32px 12px; } .empty-title { font-weight: 600; margin: 0 0 4px; }
.error { border-left: 4px solid var(--bad); }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .75rem; }
.tabs a span { font-size: 1.1rem; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.subnav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.subnav a { white-space: nowrap; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.subnav a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; overflow-wrap: anywhere; }
@media (min-width: 900px) { .tabs { position: static; max-width: 1100px; margin: 0 auto; border: 0; background: transparent; } main { padding-bottom: 24px; } }
