:root {
  --bg: #ffffff; --fg: #1b1b1b; --muted: #666; --border: #d6d6d6; --head: #f0f0f0;
  --stripe: #f8f8f8; --link: #0b57d0; --accent: #e8f0fe; --warn: #8a5a00; --warnbg: #fff4d6;
  --bad: #b00020; --badge: #eaeaea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a; --fg: #e3e3e3; --muted: #9a9a9a; --border: #3a3c40; --head: #24262a;
    --stripe: #1d1f22; --link: #8ab4f8; --accent: #233046; --warn: #ffd27a; --warnbg: #3a2f12;
    --bad: #ff6b81; --badge: #2c2e33;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
header {
  display: flex; align-items: center; gap: 16px; padding: 6px 12px;
  border-bottom: 1px solid var(--border); background: var(--head); position: sticky; top: 0; z-index: 5;
}
header .brand { font-weight: 600; color: var(--fg); }
header nav a { margin-right: 12px; }
header nav a.active { font-weight: 600; text-decoration: underline; }
#gsearch { margin-left: auto; width: 320px; }
main { padding: 8px 14px 40px; max-width: 1600px; }
h1 { font-size: 20px; margin: 8px 0 4px; }
h2 { font-size: 15px; margin: 18px 0 6px; border-bottom: 1px solid var(--border); padding-bottom: 2px; }
h3 { font-size: 13px; margin: 12px 0 4px; }
.sub { color: var(--muted); }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; }
input, select, button {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
  border-radius: 3px; padding: 3px 6px;
}
button { cursor: pointer; background: var(--head); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.filters label { display: inline-flex; gap: 4px; align-items: center; }
.filters input[type=search] { width: 260px; }
table { border-collapse: collapse; margin: 4px 0; }
table.data { width: 100%; }
th, td { border: 1px solid var(--border); padding: 2px 6px; text-align: left; vertical-align: top; }
th { background: var(--head); font-weight: 600; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: var(--accent); }
th .arrow { color: var(--muted); font-size: 10px; }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr:hover { background: var(--accent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 600; background: var(--head); }
table.kv th { text-align: right; width: 1%; }
table.kv td { white-space: pre-wrap; }
.props td:last-child { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.count { color: var(--muted); margin: 4px 0; }
.more { margin: 6px 0; }
.badge { display: inline-block; background: var(--badge); border-radius: 3px; padding: 0 5px; margin: 0 2px 1px 0; font-size: 12px; }
.badge.hidden { color: var(--warn); }
.badge.crit { background: var(--warnbg); color: var(--warn); }
.warn { background: var(--warnbg); color: var(--warn); padding: 6px 10px; border-radius: 3px; }
.desc { white-space: pre-wrap; max-width: 900px; margin: 6px 0; }
.icon { width: 64px; height: 64px; float: right; image-rendering: auto; }
.icon.sm { width: 20px; height: 20px; float: none; vertical-align: middle; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > div { min-width: 320px; }
.muted { color: var(--muted); }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.stats div { border: 1px solid var(--border); padding: 4px 10px; border-radius: 3px; }
.stats b { font-size: 16px; display: block; }
#errbanner {
  display: none; background: var(--bad); color: #fff; padding: 6px 12px; white-space: pre-wrap;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; position: sticky; top: 0; z-index: 10;
}
.nw { white-space: nowrap; }
ul.compact { margin: 2px 0; padding-left: 20px; }
.small { font-size: 12px; margin-top: 8px; }
.hidden-note { font-style: italic; margin: 2px 0 4px; }
.instead { margin: 0 0 6px; padding: 3px 8px; border-left: 3px solid var(--warn); background: var(--warnbg); display: inline-block; }
.instead-sm { font-size: 12px; white-space: nowrap; }
.badge.type { background: var(--accent); color: var(--fg); font-size: 12px; }
.desc.gen { color: var(--muted); font-style: italic; }
.howto { max-width: 900px; border: 1px solid var(--border); border-radius: 4px; padding: 0 12px 8px; margin: 10px 0; background: var(--stripe); }
.howto h2 { border-bottom: none; margin: 8px 0 4px; }
.howto > div { margin: 3px 0; }
.desc-cell { display: inline-block; max-width: 420px; font-size: 12px; }
details.tech { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 6px; }
details.tech summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.lead { font-size: 15px; max-width: 900px; margin: 8px 0 4px; }
.avail { max-width: 900px; margin: 8px 0; padding: 4px 10px; border-left: 3px solid var(--link); background: var(--accent); display: inline-block; }
table.stats th { font-weight: normal; }
table.stats tr.main th { font-weight: 600; }
table.stats tr.grp th { text-align: left; font-weight: 600; background: var(--accent); }
table.stats td { font-variant-numeric: tabular-nums; }
.small-note { font-size: 12px; margin-bottom: 2px; }
details.tech h3:first-child { margin-top: 8px; }
.catchips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 4px; }
.catchips .chip { border: 1px solid var(--border); border-radius: 12px; padding: 1px 9px; background: var(--stripe); font-size: 12px; white-space: nowrap; }
.catchips .chip:hover { background: var(--accent); text-decoration: none; }
.cat-count { font-size: 14px; font-weight: normal; }
.cattiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-width: 1100px; margin: 6px 0; }
.cattiles a { display: block; border: 1px solid var(--border); border-radius: 4px; padding: 6px 10px; background: var(--stripe); color: var(--fg); }
.cattiles a:hover { background: var(--accent); text-decoration: none; }
.cattiles b { display: block; color: var(--link); }
.cattiles span { color: var(--muted); font-size: 12px; }
a.badge.type:hover { text-decoration: none; background: var(--border); }
