:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --ink: #1e1c19;
  --muted: #6b665d;
  --line: #e3ddd0;
  --accent: #2b55d6;
  --accent-ink: #ffffff;
  --yes: #1f7a4a;
  --yes-bg: #e3f3e9;
  --no: #8a8378;
  --no-bg: #efebe3;
  --warn: #9a5b00;
  --warn-bg: #fdf0d9;
  --cat-indie: #b0367a;
  --cat-simple: #2b55d6;
  --cat-developer: #157068;
  --cat-cloud: #6a4bc4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1e1d1a;
    --ink: #ece8df;
    --muted: #a39d92;
    --line: #34312c;
    --accent: #7d9cff;
    --accent-ink: #10121a;
    --yes: #6fd39c;
    --yes-bg: #183324;
    --no: #8f897f;
    --no-bg: #26241f;
    --warn: #f0b860;
    --warn-bg: #3a2a10;
    --cat-indie: #ef7fbf;
    --cat-simple: #7d9cff;
    --cat-developer: #5fcfc2;
    --cat-cloud: #b39dff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: .9em; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .2em 0 .3em; }
h2 { font-size: 1.45rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.15rem; margin: 0 0 .3rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand-mark { font-family: var(--mono); color: var(--accent); font-size: .95rem; }
.site-header nav { display: flex; gap: 18px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 4px 0; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; font-size: .9rem; }
.site-footer p { margin: .3rem 0; max-width: 72ch; }

main { padding-bottom: 1rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 68ch; margin: 0 0 1rem; }
.eyebrow { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0; }

/* hero */
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { max-width: 18ch; }
.stats { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .95rem; color: var(--muted); }
.stats strong { color: var(--ink); font-family: var(--serif); font-size: 1.3rem; margin-right: 4px; }

/* controls */
.controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 1rem 0; display: grid; gap: 12px; }
.search-row { display: flex; gap: 12px; align-items: center; }
#q { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.count { font-family: var(--mono); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { font: inherit; font-size: .9rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { font-size: .8rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; user-select: none; }
.chip input { accent-color: var(--accent); margin: 0; }
.chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.toggle { font-size: .85rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table#hosts { border-collapse: collapse; width: 100%; min-width: 980px; font-size: .9rem; }
#hosts th, #hosts td { text-align: left; vertical-align: top; padding: 12px 12px; border-bottom: 1px solid var(--line); }
#hosts thead th { position: sticky; top: 0; background: var(--surface); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; white-space: nowrap; }
#hosts thead button { all: unset; cursor: pointer; }
#hosts thead button:focus-visible { outline: 2px solid var(--accent); }
#hosts thead th[aria-sort="ascending"] button::after { content: " ↑"; }
#hosts thead th[aria-sort="descending"] button::after { content: " ↓"; }
#hosts tbody th { font-weight: 400; width: 30%; min-width: 260px; position: sticky; left: 0; background: var(--surface); }
#hosts tbody tr:hover th, #hosts tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
#hosts tbody tr:last-child > * { border-bottom: 0; }
.host-link { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.host-link:hover { color: var(--accent); text-decoration: underline; }
.tagline { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; line-height: 1.4; }
.uploads { max-width: 180px; color: var(--muted); }
.yes, .no, .unk { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.yes { color: var(--yes); background: var(--yes-bg); }
.no { color: var(--no); background: var(--no-bg); font-weight: 500; }
.unk { color: var(--muted); border: 1px dashed var(--line); }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
tr[hidden] { display: none; }

.badge { display: inline-block; font-size: .7rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 4px; border: 1px solid currentColor; vertical-align: middle; margin-top: 4px; }
.cat-indie { color: var(--cat-indie); }
.cat-simple { color: var(--cat-simple); }
.cat-developer { color: var(--cat-developer); }
.cat-cloud { color: var(--cat-cloud); }
.badge-warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }

.explainer { max-width: 72ch; margin-top: 3rem; }

/* host pages */
.crumbs { font-size: .85rem; color: var(--muted); margin: 1.5rem 0 0; }
.crumbs a { color: var(--muted); }
.host header { margin-bottom: 1rem; }
.host > p, .baseline p { max-width: 72ch; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; font-size: .9rem; max-width: 72ch; }
.note-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 1.5rem 0; }
.verdict > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.verdict h2 { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; }
.verdict p { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.facts { width: 100%; border-collapse: collapse; font-size: .92rem; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts th { font-weight: 500; color: var(--muted); width: 42%; padding-right: 12px; }
.facts td { overflow-wrap: anywhere; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.feat { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; }
.feat-no span:first-child { color: var(--muted); }
.sources { padding-left: 1.2rem; overflow-wrap: anywhere; }

.alt-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.alt-list.ranked { counter-reset: alt; }
.alt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ranked .alt { counter-increment: alt; }
.ranked .alt h3::before { content: counter(alt) ". "; color: var(--muted); }
.alt h3 a { color: var(--ink); text-decoration: none; }
.alt h3 a:hover { color: var(--accent); text-decoration: underline; }
.alt p { margin: .3rem 0; }
.diff { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .85rem; display: grid; gap: 4px; }
.plus, .minus { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; margin-right: 4px; }
.plus { color: var(--yes); background: var(--yes-bg); }
.minus { color: var(--no); background: var(--no-bg); }
.baseline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 10px; margin: 1rem 0 1.5rem; }
.baseline h2 { margin-top: 1rem; font-size: 1.1rem; }

/* guide / about */
.guide-step { max-width: 72ch; border-top: 1px solid var(--line); padding-top: .5rem; }
.guide-step h2 { margin-top: 1.2rem; }
.picks { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
section > ul { max-width: 72ch; }
.form { display: grid; gap: 14px; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.form label { display: grid; gap: 6px; font-size: .92rem; font-weight: 500; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); width: 100%; }
.form button { justify-self: start; font: inherit; font-weight: 600; padding: 10px 20px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }

@media (max-width: 640px) {
  .hero { padding-top: 2rem; }
  .search-row { flex-wrap: wrap; }
  #hosts tbody th { min-width: 200px; width: auto; }
  .site-header nav { gap: 14px; }
}
