:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-2: #eef1ee;
  --ink: #15201b;
  --ink-2: #4a5852;
  --ink-3: #7c8a84;
  --line: #dde3df;
  --accent: #0e7a5a;
  --accent-ink: #ffffff;
  --accent-soft: #dff2ea;
  --warn: #9a5b00;
  --warn-soft: #fff2db;
  --s-ads: #0e7a5a;
  --s-native: #6aa88f;
  --s-affiliate: #c27c0e;
  --s-commerce: #3b6fd1;
  --s-subscription: #8a4fc2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 4px 16px rgba(20, 30, 25, .05);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1412; --surface: #171e1b; --surface-2: #1f2824; --ink: #e8efeb; --ink-2: #aab8b1; --ink-3: #7d8c85;
    --line: #2a3530; --accent: #35c08f; --accent-ink: #06261b; --accent-soft: #163a2d; --warn: #f0b45a; --warn-soft: #3a2a12;
    --s-ads: #35c08f; --s-native: #7fbfa6; --s-affiliate: #e0a03c; --s-commerce: #6f9ef0; --s-subscription: #b58ae6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1412; --surface: #171e1b; --surface-2: #1f2824; --ink: #e8efeb; --ink-2: #aab8b1; --ink-3: #7d8c85;
  --line: #2a3530; --accent: #35c08f; --accent-ink: #06261b; --accent-soft: #163a2d; --warn: #f0b45a; --warn-soft: #3a2a12;
  --s-ads: #35c08f; --s-native: #7fbfa6; --s-affiliate: #e0a03c; --s-commerce: #6f9ef0; --s-subscription: #b58ae6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); 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.55 var(--font); font-feature-settings: "tnum" 1; }
a { color: var(--accent); }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.logo svg { width: 26px; height: 26px; display: block; }
.logo rect { fill: var(--accent); }
.logo path { stroke: var(--accent-ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
nav { display: flex; gap: 4px; }
nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; white-space: nowrap; }
nav a:hover { background: var(--surface-2); }
nav a.on { color: var(--ink); background: var(--surface-2); font-weight: 600; }

/* hero + search */
.hero { padding: 64px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 12px; }
.lede { color: var(--ink-2); max-width: 640px; margin: 0 auto 26px; font-size: 17px; }
.search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.search input, .cmp-form input, .assume select, .assume input {
  flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; outline: none;
}
.search input:focus, .cmp-form input:focus, .assume select:focus, .assume input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button { font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 10px; padding: 12px 20px; background: var(--accent); color: var(--accent-ink); }
button:hover { filter: brightness(1.06); }
button.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); padding: 7px 12px; font-weight: 500; font-size: 14px; }
.search.small { max-width: none; margin: 22px 0 18px; }
.search.small input { padding: 9px 12px; }
.search.small button { padding: 9px 16px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chips a { font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 11px; border-radius: 99px; text-decoration: none; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }

/* cards */
.board { margin-top: 40px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.board-head h2 { font-size: 22px; margin: 0 0 4px; }
.board-sub { color: var(--ink-3); font-size: 13.5px; margin: 0; max-width: 640px; }
.board-filter select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.board-table td { vertical-align: middle; }
.board-table td.rk { color: var(--ink-3); width: 44px; }
.board-table tbody tr:hover { background: var(--surface-2); }
.bsite { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.bsite:hover { color: var(--accent); }

.bsite small.aud { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.board-more { text-align: center; margin-top: 12px; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .board-head { flex-direction: column; align-items: stretch; }
  .board-table th, .board-table td { padding: 9px 8px; }
}
.recent-wrap h2 { font-size: 18px; margin: 34px 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow); display: block; }
.card:hover { border-color: var(--accent); }
.card .d { font-weight: 600; overflow-wrap: anywhere; }
.card .n { color: var(--ink-3); font-size: 13px; }
.card .v { font-size: 20px; font-weight: 700; margin-top: 6px; }
.card .v small { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* site page */
.site-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.slogo { position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 6px; width: 20px; height: 20px; }
.slogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slogo.letter { background: var(--lc); }
.slogo.letter::after { content: attr(data-l); color: #fff; font-weight: 700; font-size: 11px; line-height: 1; }
.slogo.logo-md { width: 24px; height: 24px; }
.slogo.logo-md.letter::after { font-size: 13px; }
.slogo.logo-lg { width: 44px; height: 44px; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 5px; }
.slogo.logo-lg.letter { background: var(--lc); border-color: transparent; padding: 0; }
.slogo.logo-lg.letter::after { font-size: 22px; }
.logo-sm:not(.letter) { background: #fff; padding: 2px; }
.site-head h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); overflow-wrap: anywhere; }
.site-sub { color: var(--ink-2); margin: 0 0 18px; font-size: 15px; }
.site-sub .dot { margin: 0 6px; color: var(--ink-3); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; }
.badge.conf { background: var(--accent-soft); color: var(--accent); }

.notice { background: var(--warn-soft); color: var(--ink); border-left: 3px solid var(--warn); border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-size: 14.5px; }

.kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .l { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.kpi .r { color: var(--ink-2); font-size: 13.5px; }
.kpi.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi.main .l, .kpi.main .r { color: var(--accent-ink); opacity: .85; }
.kpi.main .v { font-size: 34px; }

.parent { border-left: 3px solid var(--accent); }
.sec-h { font-size: 15px; margin: 4px 0 10px; color: var(--ink-2); font-weight: 600; }
.sec-h span { color: var(--ink); }
.parent-share { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.parent-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.parent-head .l, .parent-stats .l { color: var(--ink-3); font-size: 12.5px; font-weight: 500; display: block; }
.parent-head h2 { margin: 2px 0 0; font-size: 20px; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.parent-head .go { font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; padding-top: 4px; }
.parent-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.parent-stats > div { min-width: 0; }
.parent-stats strong { display: block; font-size: 20px; margin: 2px 0; }
.parent-stats strong.sm { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.parent-stats .r { color: var(--ink-2); font-size: 13px; }
@media (max-width: 860px) { .parent-stats { grid-template-columns: 1fr 1fr; } }
.grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; min-width: 0; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.panel h2 small { color: var(--ink-3); font-weight: 500; font-size: 13px; }

.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); margin-bottom: 14px; }
.stack span { display: block; height: 100%; }
.stream { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.stream:first-of-type { border-top: 0; }
.stream .sw { width: 10px; height: 10px; border-radius: 3px; align-self: center; }
.stream .nm { font-weight: 600; }
.stream .amt { font-weight: 700; text-align: right; }
.stream .dt, .stream .rg { grid-column: 2 / 4; color: var(--ink-3); font-size: 13px; }
.stream .rg { grid-column: 3; text-align: right; grid-row: 2; }
.stream .dt { grid-column: 2; grid-row: 2; }
.empty { color: var(--ink-2); font-size: 15px; }

.sigs { list-style: none; margin: 0; padding: 0; }
.sigs li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.sigs li:first-child { border-top: 0; }
.sigs .k { color: var(--ink-3); font-size: 12.5px; text-align: right; white-space: nowrap; }
.sig-group { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 2px; }
.sig-group:first-child { margin-top: 0; }

.rankbar { position: relative; height: 8px; background: linear-gradient(90deg, var(--accent), var(--surface-2)); border-radius: 99px; margin: 26px 0 8px; }
.rankbar .pin { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.rankbar .tag { position: absolute; bottom: 14px; transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.rankscale { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 12px; }

.assume { display: grid; gap: 12px; }
.assume label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.assume select, .assume input { padding: 9px 11px; font-size: 15px; }
.assume .toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.assume .toggles label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.assume .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.assume .hint { font-size: 12.5px; color: var(--ink-3); }

.loading { padding: 50px 0; text-align: center; color: var(--ink-2); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { background: var(--warn-soft); border-radius: var(--radius); padding: 16px; }

/* compare */
.compare h1, .method h1 { font-size: clamp(26px, 4vw, 36px); margin: 40px 0 8px; }
.compare .lede, .method .lede { margin: 0 0 22px; text-align: left; }
.cmp-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; margin-bottom: 20px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.hl td { font-weight: 700; }
.cmp th a { color: var(--ink); }

.prose { max-width: 720px; }
.prose h2 { font-size: 20px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose table { margin: 10px 0 14px; }

/* ad slots: fixed size so nothing shifts when an ad loads; only drawn when ads.js enables them */
.ad-slot { display: flex; flex-direction: column; align-items: center; margin: 18px auto; max-width: 100%; }
.ad-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.ad-box { width: var(--ad-w); height: var(--ad-h); max-width: 100%; overflow: hidden; display: grid; place-items: center;
  background: var(--surface-2); border-radius: 6px; }
.ad-box iframe { border: 0; display: block; max-width: 100%; }
.grid2 .ad-slot { margin: 0 0 14px; }
tr.ad-row td { padding: 4px 0; background: var(--surface); }
tr.ad-row:hover { background: var(--surface); }
.foot-links { display: flex; gap: 8px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-2); }
.foot {margin-top: 60px; border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--ink-3); font-size: 13.5px; }

@media (max-width: 860px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi.main { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
  .cmp-form { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  nav a { padding: 6px 7px; font-size: 14px; }
  .brand { font-size: 16px; }
  .hero { padding-top: 40px; }
  .search { flex-direction: column; }
  .kpi .v { font-size: 22px; }
  .kpi.main .v { font-size: 28px; }
}
