:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6d6b66;
  --line: #e1e0d9;
  --axis: #c3c2b7;
  --accent: #2a78d6;
  --accent-ink: #1b5fb3;
  --on-accent: #ffffff;
  --series: #2a78d6;
  --good: #0ca30c;
  --good-ink: #006300;
  --warn: #fab219;
  --warn-bg: #fdf1d3;
  --sponsor-bg: #eef4fc;
  --danger: #d03b3b;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141413;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9b9a93;
    --line: #2c2c2a;
    --axis: #383835;
    --accent: #3987e5;
    --accent-ink: #79b0f0;
    --series: #3987e5;
    --good-ink: #3fc23f;
    --warn-bg: #3a2e12;
    --sponsor-bg: #1b2736;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141413;
  --surface: #1a1a19;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #9b9a93;
  --line: #2c2c2a;
  --axis: #383835;
  --accent: #3987e5;
  --accent-ink: #79b0f0;
  --series: #3987e5;
  --good-ink: #3fc23f;
  --warn-bg: #3a2e12;
  --sponsor-bg: #1b2736;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent-ink); text-underline-offset: 2px; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
h3 { font-size: 1rem; margin: 0 0 .2rem; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; overflow-x: auto; margin: .5rem 0; }
small { color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; margin: 0 auto; }
.narrow > h1:first-child { margin-top: 1.8rem; }
.muted { color: var(--muted); font-size: .92rem; }
.lead { color: var(--ink-2); font-size: 1.08rem; max-width: 62ch; margin: 0 0 .75rem; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .95rem; }
.top nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--ink); }
.theme { background: none; border: 1px solid var(--line); color: var(--ink-2); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.btn { display: inline-block; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: 8px; padding: .55rem .95rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: .3rem .65rem; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--axis); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hero { padding: 2rem 0 .5rem; }
.live { font-family: var(--mono); font-size: .92rem; color: var(--ink-2); margin: 0; }
.live b { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 1.1rem 0 .4rem; }
.filters label { display: grid; gap: 3px; font-size: .82rem; color: var(--muted); }
select, input, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 8px; padding: .45rem .55rem; max-width: 100%; }
.sort { margin: .4rem 0 .8rem; }

.list { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sponsored-list { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 96px 96px 96px; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row.sponsored { background: var(--sponsor-bg); }
.rank { font-family: var(--mono); color: var(--muted); font-size: 1rem; text-align: center; }
.sp { font: 600 .72rem/1 var(--sans); letter-spacing: .02em; color: var(--accent-ink); border: 1px solid currentColor; border-radius: 5px; padding: 3px 5px; }
.name { font-weight: 650; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.name:hover { text-decoration: underline; }
.desc, .banner { margin: .1rem 0 .25rem; color: var(--ink-2); font-size: .93rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.banner { color: var(--ink); font-weight: 500; }
.banner.big { font-size: 1.05rem; -webkit-line-clamp: unset; line-clamp: unset; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font-size: .82rem; color: var(--muted); }
.tag { background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); border-radius: 5px; padding: 1px 6px; text-decoration: none; }
.tag:hover { color: var(--ink); }
.num { display: grid; justify-items: end; text-align: right; line-height: 1.2; }
.num b { font: 600 1.1rem var(--mono); }
.num small { font-size: .72rem; }
.num.ver b { font-size: .9rem; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; letter-spacing: 0; }
.pill.good { color: var(--good-ink); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.pill.warn { color: var(--ink); background: var(--warn-bg); border-color: var(--warn); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.pager { display: flex; gap: 16px; justify-content: center; margin: 1rem 0; font-size: .95rem; color: var(--muted); }
.empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 1rem 0; }
.empty h1, .empty h2 { margin-top: 0; }

.crumb { color: var(--muted); font-size: .9rem; margin: 1.2rem 0 .6rem; }
.server-head { margin-bottom: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .8rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.stat { box-shadow: 0 0 0 1px var(--line); padding: 12px 14px; display: grid; gap: 1px; align-content: start; }
.stat b { font: 600 1.35rem var(--mono); overflow-wrap: anywhere; }
.stat small { font-size: .78rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px 14px; margin-bottom: 1.2rem; }
.panel h2:first-child { margin-top: .9rem; }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.c-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-axis { stroke: var(--axis); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-tick { fill: var(--muted); font: 11px var(--sans); }
.c-end { fill: var(--ink); font: 600 12px var(--mono); }
.c-line { fill: none; stroke: var(--series); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.c-area { fill: var(--series); opacity: .1; }
.c-dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.c-cross { stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-bar { fill: var(--series); }
.c-hit { fill: transparent; cursor: default; }
.c-hit:focus { outline: none; fill: color-mix(in srgb, var(--series) 12%, transparent); }
.tip { position: fixed; left: 0; top: 0; z-index: 9; display: grid; gap: 1px; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--axis); border-radius: 8px; padding: 6px 9px; font-size: .82rem; box-shadow: 0 4px 16px rgb(0 0 0 / .14); }
.tip span { color: var(--ink-2); }
.data { margin: .9rem 0; font-size: .92rem; }
.data summary { cursor: pointer; color: var(--accent-ink); }
.data table { border-collapse: collapse; margin-top: .5rem; width: 100%; font-family: var(--mono); font-size: .85rem; }
.data th, .data td { border-bottom: 1px solid var(--line); padding: 3px 6px; text-align: right; }
.data th:first-child, .data td:first-child { text-align: left; }

.form { display: grid; gap: 12px; margin: 1rem 0; }
.form label { display: grid; gap: 4px; font-size: .92rem; font-weight: 550; }
.form input:not([type="checkbox"]), .form textarea, .form select { width: 100%; font-weight: 400; }
.form.inline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 8px 12px 10px; }
legend { font-size: .92rem; font-weight: 550; padding: 0 4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 4px 10px; }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.trap { position: absolute; left: -9999px; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 8px; padding: .55rem .75rem; margin: .6rem 0; font-size: .94rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 14px; margin: 1rem 0; }
.lead-feature { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.feature { background: var(--surface); border-radius: 12px; border-width: 1px; border-style: solid; padding: 4px 16px 12px; margin: 1rem 0; }
.features { padding-left: 1.1rem; }
.features li { margin: .35rem 0; }
.steps { padding-left: 1.2rem; }
.steps li { margin: .4rem 0; }
.slots { font-size: .95rem; }
.code { font-weight: 600; }
.plain { padding-left: 1.1rem; margin: .4rem 0; font-size: .93rem; overflow-wrap: anywhere; }
.report { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .7rem; }
.prose h2 { margin-top: 1.8rem; font-size: 1.2rem; }
.prose p { color: var(--ink-2); }
.foot { color: var(--muted); font-size: .84rem; padding-top: 1.2rem; padding-bottom: 2rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.foot p { margin: .35rem 0; max-width: 80ch; }

@media (max-width: 720px) {
  .row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
  .rank { grid-column: 1 / -1; text-align: left; font-size: .85rem; }
  .who { grid-column: 1 / -1; }
  .num { justify-items: start; text-align: left; }
  .two, .form.inline { grid-template-columns: 1fr; }
  .top nav { gap: 10px; }
  .nav-home { display: none; }
  .c-tick { font-size: 21px; }
  .c-end { font-size: 22px; }
}

[hidden] { display: none !important; }

/* Update 8 page */
.compat .stats { margin: 1.2rem 0 .8rem; }
.compat h2 { margin-top: 2.2rem; }
.compat .n { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.compat-list details { border-top: 1px solid var(--line); padding: .7rem 0; }
.compat-list details:last-child { border-bottom: 1px solid var(--line); }
.compat-list summary { display: flex; justify-content: space-between; gap: 1rem; cursor: pointer; font-weight: 600; }
.compat-list code { overflow-wrap: anywhere; font-size: .8rem; }
.compat-grid { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 2rem; }
.compat-grid li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-top: 1px solid var(--line); min-width: 0; }
.compat-grid a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.compat h1 { text-wrap: balance; }
.compat-list summary { list-style: none; }
.compat-list summary::-webkit-details-marker { display: none; }
.compat-list summary > span:first-child::before { content: "›"; display: inline-block; width: 1em; color: var(--ink-2); transition: transform .15s; }
.compat-list details[open] summary > span:first-child::before { transform: rotate(90deg); }
.best-row { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; padding: .6rem 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.best-row small { grid-column: 1 / -1; color: var(--ink-2); line-height: 1.35; }
.best-row:hover b { text-decoration: underline; }
.answer { font-size: 1.5rem; font-weight: 600; margin: .8rem 0; padding-left: .7rem; border-left: 4px solid var(--line); }
.answer.risk { border-left-color: var(--warn); }
.answer.ready { border-left-color: var(--good-ink); }

.mod-find { margin: 1.4rem 0 .4rem; }
.mod-find[hidden] { display: none; }
.mod-find label { display: block; font-weight: 700; margin-bottom: .4rem; }
.mod-find input { width: 100%; font: inherit; padding: .7rem .8rem; color: var(--ink); background: transparent; border: 2px solid var(--line); border-radius: 0; }
.mod-find input:focus { outline: none; border-color: var(--ink); }
.mod-find p { margin: .5rem 0 0; }
.mod-hits { list-style: none; padding: 0; margin: .4rem 0 0; }
.mod-hits li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.mod-hits li span { color: var(--ink-2); text-align: right; }
.mod-hits .s-risk span { color: var(--ink); font-weight: 700; }
