/* The page follows the visitor's light or dark setting; every color below is a token of the two themes. */
:root {
  --ink: #111827;
  --text: #1f2937;
  --muted: #5b6472;
  --faint: #9aa3b2;
  --accent: #2f55d4;
  --violet: #8b5cf6;
  --ours: #e5484d;
  --ours-soft: #fdecec;
  --ours-note: #0f7b6c;
  --accent-soft: #eef2fd;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --card-text: #374151;
  --solid: #111827;
  --solid-text: #ffffff;
  --solid-hover: #2b3445;
  --thead-bg: #111827;
  --thead-text: #ffffff;
  --soon-bg: #d5d9e0;
  --soon-text: #3d444d;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --nav-border: rgba(229, 231, 235, 0.8);
  --pill-bg: rgba(255, 255, 255, 0.75);
  --hero-top: #f7f9ff;
  --glow-a: rgba(47, 85, 212, 0.14);
  --glow-b: rgba(139, 92, 246, 0.14);
  --featured-top: #fff8f8;
  --tab-on: #ffffff;
  --grid: #eceef2;
  --bar-bg: #f1f3f6;
  --bar: #9aa5b8;
  --yes: #0f9d8a;
  --no: #a3aab5;
  --half: #f08c00;
  --ok: #0f9d8a;
  --code-bg: #f6f8fa;
  --code-text: #1f2937;
  --code-border: #e5e7eb;
  --copy-bg: #ffffff;
  --copy-border: #d0d7de;
  --copy-text: #374151;
  --copy-hover: #eef1f4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.05), 0 16px 32px rgba(16, 24, 40, 0.1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f4f9;
    --text: #d5dbe5;
    --muted: #9aa5b8;
    --faint: #6b7588;
    --accent: #8aa2ff;
    --violet: #b197fc;
    --ours: #ff6b6f;
    --ours-soft: rgba(229, 72, 77, 0.14);
    --ours-note: #38d9a9;
    --accent-soft: rgba(91, 124, 250, 0.16);
    --border: #273246;
    --bg: #0b1120;
    --bg-alt: #111a2c;
    --card-text: #c3cad6;
    --solid: #e8ecf4;
    --solid-text: #0b1120;
    --solid-hover: #ffffff;
    --thead-bg: #1c2638;
    --thead-text: #e8ecf4;
    --soon-bg: #263043;
    --soon-text: #a5afc0;
    --nav-bg: rgba(11, 17, 32, 0.8);
    --nav-border: rgba(39, 50, 70, 0.9);
    --pill-bg: rgba(17, 26, 44, 0.75);
    --hero-top: #0f1830;
    --glow-a: rgba(91, 124, 250, 0.22);
    --glow-b: rgba(177, 151, 252, 0.18);
    --featured-top: rgba(229, 72, 77, 0.1);
    --tab-on: #1c2638;
    --grid: #1f2a3c;
    --bar-bg: #172033;
    --bar: #5e6b82;
    --yes: #38d9a9;
    --no: #5c6676;
    --half: #ffa94d;
    --ok: #38d9a9;
    --code-bg: #111a2c;
    --code-text: #e3e8f2;
    --code-border: #273246;
    --copy-bg: #1c2638;
    --copy-border: #334155;
    --copy-text: #cbd5e1;
    --copy-hover: #273449;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.86em; }
p code, li code, figcaption code {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 5px; padding: 0.05em 0.35em;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ---------- top navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--nav-border);
}
.nav-inner { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.nav-links a:hover { background: var(--bg-alt); color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.nav-gh { padding: 7px 14px; border-radius: 999px; background: var(--solid); color: var(--solid-text); font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.nav-gh:hover { background: var(--solid-hover); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 84px 0 64px;
  background:
    radial-gradient(900px 380px at 15% -10%, var(--glow-a), transparent 60%),
    radial-gradient(800px 360px at 90% 0%, var(--glow-b), transparent 60%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--bg) 100%);
}
#space { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px;
  border: 1px solid rgba(47, 85, 212, 0.22); border-radius: 999px; background: var(--pill-bg);
  color: var(--accent); font-size: 0.86rem; font-weight: 700;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #12b886; box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.2); }
.hero h1 { margin: 0; font-size: clamp(3rem, 9vw, 5.2rem); line-height: 1.02; font-weight: 850; letter-spacing: -0.035em; }
.grad {
  background: linear-gradient(92deg, var(--ink) 0%, var(--accent) 55%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { margin: 18px auto 0; max-width: 760px; font-size: clamp(1.1rem, 2.6vw, 1.45rem); line-height: 1.4; color: var(--muted); text-wrap: balance; }
.authors { margin: 22px auto 0; max-width: 860px; font-size: 1.08rem; line-height: 1.75; text-wrap: balance; }
.author { display: inline-block; white-space: nowrap; }
.authors a { font-weight: 600; }
.authors sup { margin-left: 1px; font-size: 0.68em; line-height: 0; color: var(--muted); }
.affils { margin: 4px auto 0; max-width: 860px; font-size: 0.96rem; line-height: 1.6; color: var(--muted); text-wrap: balance; }
.affils span { display: inline-block; margin: 0 10px; }
.affils sup { margin-right: 2px; font-size: 0.72em; line-height: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 19px; border-radius: 999px;
  background: var(--solid); color: var(--solid-text); font-weight: 700; font-size: 0.95rem; line-height: 1.2;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(17, 24, 39, 0.2); background: var(--solid-hover); }
.btn small { font-weight: 500; font-size: 0.76rem; opacity: 0.75; }
.btn .ico { display: inline-flex; align-items: center; }
.btn.primary { background: linear-gradient(92deg, #2f55d4, #8b5cf6); color: #fff; }
.btn.primary:hover { background: linear-gradient(92deg, #2747b8, #7c4ef0); }
.btn.soon { background: var(--soon-bg); color: var(--soon-text); box-shadow: none; cursor: default; }
.btn.soon:hover { transform: none; }

/* ---------- stats ---------- */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.stats-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { padding: 22px 12px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block; font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 850; letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 2px; font-size: 0.84rem; line-height: 1.35; color: var(--muted); }

/* ---------- sections ---------- */
main { padding-bottom: 40px; }
section { margin-top: 72px; }
h2 { margin: 0 0 14px; font-size: clamp(1.6rem, 3.2vw, 2.1rem); letter-spacing: -0.02em; color: var(--ink); }
h2::before {
  content: ""; display: block; width: 40px; height: 4px; margin-bottom: 14px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
}
h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--ink); }
.lead { margin: 0 0 22px; max-width: 820px; font-size: 1.08rem; color: var(--muted); }
.note { margin-top: 12px; font-size: 0.86rem; color: var(--muted); }

.tldr {
  margin-top: 48px; padding: 18px 22px; border-radius: var(--radius);
  background: linear-gradient(92deg, rgba(47, 85, 212, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(47, 85, 212, 0.18);
}
.tldr p { margin: 0; font-size: 1.04rem; }
.tldr b { color: var(--accent); margin-right: 6px; }

/* hidden only while scripts run, so the page reads without them */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- figures and the viewer: figures stay on white cards in both themes ---------- */
.figure { margin: 0; }
.figure img {
  display: block; width: 100%; height: auto; cursor: zoom-in;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
}
.figure figcaption { margin-top: 10px; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.teaser { margin-top: 28px; }
.narrow { max-width: 760px; margin: 28px auto 0; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(15, 20, 30, 0.82); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff; }

/* ---------- release matrix ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.matrix { max-width: 760px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.matrix th, .matrix td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.matrix thead th { background: var(--thead-bg); color: var(--thead-text); font-size: 0.85rem; font-weight: 700; text-align: center; }
.matrix thead th:first-child { text-align: left; }
.matrix tbody th { text-align: left; font-weight: 400; }
.matrix tbody th b { display: block; color: var(--ink); }
.matrix tbody th span { color: var(--muted); font-size: 0.9rem; }
.matrix td { text-align: center; font-size: 1.25rem; }
.matrix tr:last-child th, .matrix tr:last-child td { border-bottom: 0; }
.matrix tr.ours th, .matrix tr.ours td { background: var(--ours-soft); }
.matrix tr.ours th b { color: var(--ours); }
.matrix tr.ours th span { color: var(--ours-note); font-weight: 700; }
.yes { color: var(--yes); font-weight: 800; }
.no { color: var(--no); }
.half { color: var(--half); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.card {
  position: relative; padding: 22px 22px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-ico { font-size: 1.5rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--card-text); font-size: 0.96rem; }

/* ---------- model zoo ---------- */
.zoo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.model {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow); transition: transform 0.2s ease, border-color 0.2s ease;
}
.model:hover { transform: translateY(-3px); border-color: rgba(47, 85, 212, 0.45); }
.model.featured { border-color: rgba(229, 72, 77, 0.45); background: linear-gradient(180deg, var(--featured-top), var(--bg)); }
.model .size { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 0.82rem; }
.model.featured .size { background: var(--ours-soft); color: var(--ours); }
.model .mname { margin-top: 6px; font-weight: 800; color: var(--ink); }
.model .base { font-size: 0.82rem; color: var(--muted); }
.model .scores { display: flex; gap: 18px; margin-top: 10px; }
.model .scores span { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--muted); }
.model .scores b { font-size: 1.5rem; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.model-links { display: flex; gap: 8px; margin-top: 12px; }
.model-links a { flex: 1; padding: 6px 8px; border: 1px solid var(--border); border-radius: 9px; text-align: center;
  font-size: 0.82rem; font-weight: 700; color: var(--ink); background: var(--bg-alt); }
.model-links a:hover { text-decoration: none; border-color: rgba(47, 85, 212, 0.45); color: var(--accent); }

/* ---------- tabs and charts ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); }
.tabs [role=tab] {
  padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font: 700 0.9rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.tabs [role=tab][aria-selected=true] { background: var(--tab-on); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12); }
.tabs [role=tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--bg); box-shadow: var(--shadow); }

.chart-svg { display: block; width: 100%; height: auto; }
.chart-svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-svg .tick { fill: var(--muted); font-size: 13px; }
.chart-svg .axis { fill: var(--muted); font-size: 12px; font-weight: 600; }
.chart-svg .val.ours, .chart-svg .label.ours { fill: var(--ours); font-weight: 800; font-size: 14px; }
.chart-svg .label { font-size: 13px; font-weight: 700; }
.chart-svg .hit { cursor: pointer; }
.chart-svg .hollow { fill: var(--bg); }
.chart-svg .star { stroke: var(--bg); }

.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text); font: 600 0.82rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.legend-item[aria-pressed=false] { opacity: 0.4; }
.legend-item.ours { border-color: rgba(229, 72, 77, 0.5); color: var(--ours); }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }

.bar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bar-card h4 { margin: 0 0 6px; font-size: 0.95rem; color: var(--ink); }
.bars .bar-label { fill: var(--text); font-size: 12.5px; }
.bars .bar-label.ours { fill: var(--ours); font-weight: 800; }
.bars .bar-bg { fill: var(--bar-bg); }
.bars .bar { fill: var(--bar); cursor: pointer; }
.bars .bar.ours { fill: var(--ours); }
.bars .bar-val { fill: var(--ink); font-size: 12.5px; font-weight: 700; }
.bars .bar-val.ours { fill: var(--ours); }
.bars .mark { font-size: 9px; fill: var(--muted); }

.results thead th {
  padding: 10px 12px; border-bottom: 2px solid var(--border); text-align: right;
  font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.results thead th:first-child { text-align: left; }
.results td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.results td:first-child { text-align: left; font-weight: 700; color: var(--ink); }
.results td[style] {
  background: linear-gradient(90deg, transparent calc(100% - (var(--v) - 60) * 2.5%), rgba(91, 124, 250, 0.14) 0) no-repeat;
}
.results .key { font-weight: 800; color: var(--ink); background: var(--accent-soft); }

/* ---------- examples ---------- */
.ex-list { display: grid; }
.ex {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr); gap: 20px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.ex:first-child { padding-top: 0; }
.ex:last-child { padding-bottom: 0; border-bottom: 0; }
.ex-q { margin: 0; font-size: 0.97rem; line-height: 1.5; color: var(--ink); }
.ex-q small { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--muted); }
.ex-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ex-top li { position: relative; min-width: 0; }
.ex-img {
  display: block; width: 100%; height: 128px; object-fit: cover; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; cursor: zoom-in;
}
.ex-top.pages .ex-img { height: 188px; object-fit: contain; object-position: top; }
.ex-top li.ok .ex-img { box-shadow: 0 0 0 3px var(--ok); }
.ex-s {
  position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(13, 20, 36, 0.72);
  color: #fff; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ex-ok {
  position: absolute; top: 6px; right: 6px; display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 0.8rem; font-weight: 800;
}
.ex-src { display: block; margin-top: 4px; font-size: 0.76rem; color: var(--muted); }
.cls-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cls { margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); }
.cls .ex-img { height: 136px; }
.cls-top { display: grid; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.cls-top li { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.cls-top li.ok { color: var(--ink); font-weight: 700; }
.cls-l { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cls-bar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--bar-bg); }
.cls-bar span { display: block; height: 100%; border-radius: 3px; background: var(--bar); }
.cls-top li.ok .cls-bar span { background: var(--ok); }
.cls-top .ex-s { position: static; padding: 0; background: none; color: inherit; font-weight: 600; }
.credits { margin-top: 16px; }

/* ---------- method ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { position: relative; padding: 22px 20px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.step .num {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 10px;
  border-radius: 50%; background: linear-gradient(135deg, #2f55d4, #8b5cf6); color: #fff; font-weight: 800;
}
.step p { margin: 0; font-size: 0.95rem; color: var(--card-text); }

/* ---------- data ---------- */
.chart-svg.mix .seg { cursor: pointer; transition: opacity 0.15s ease; }
.chart-svg.mix .seg:hover { opacity: 0.85; }
.chart-svg.mix .seg-label { fill: #fff; font-size: 13px; font-weight: 800; pointer-events: none; }
.chart-svg.mix .mix-head { fill: var(--ink); font-size: 14px; font-weight: 800; }
.chart-svg.mix .mix-sub { fill: var(--muted); font-size: 12px; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.mix-item { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; white-space: nowrap; }
.mix-item b { color: var(--ink); font-weight: 700; }
.mix-item span:last-child { color: var(--muted); }

.ds-browser { margin-top: 36px; }
.ds-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ds-head h3 { margin: 0; font-size: 1.2rem; }
.ds-search {
  flex: 0 1 280px; min-width: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 0.9rem;
}
.ds-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ds-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text); font: 600 0.82rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.chip span { color: var(--muted); }
.chip[aria-pressed=true] { border-color: var(--solid); background: var(--solid); color: var(--solid-text); }
.chip[aria-pressed=true] span { color: inherit; opacity: 0.7; }
.chip:focus-visible, .ds-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ds {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease;
}
.ds:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(47, 85, 212, 0.45); }
.ds[hidden] { display: none; }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ds-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.lic { padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.lic-p { background: rgba(15, 157, 138, 0.13); color: var(--yes); }
.lic-tp { background: var(--accent-soft); color: var(--accent); }
.lic-nc { background: rgba(240, 140, 0, 0.14); color: var(--half); }
.lic-ns { border: 1px solid var(--border); background: var(--bg-alt); color: var(--muted); }
.ds-name { color: var(--ink); font-size: 0.95rem; line-height: 1.3; }
.ds-src { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.ds-meta { margin-top: auto; padding-top: 6px; font-size: 0.78rem; color: var(--text); }
.ds-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 0.86rem; color: var(--muted); }
.ds-more {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--ink);
  font: 700 0.85rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.ds-more:hover { border-color: rgba(47, 85, 212, 0.45); color: var(--accent); }
.ds-more[hidden] { display: none; }
html:not(.js) .ds-search, html:not(.js) .ds-filters, html:not(.js) .ds-foot { display: none; }

.release { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.rel {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.rel:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(47, 85, 212, 0.45); }
.rel-ico { grid-row: span 2; font-size: 1.5rem; }
.rel b { color: var(--ink); }
.rel span:last-child { font-size: 0.9rem; color: var(--muted); }

/* ---------- demo ---------- */
.demo {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: center; padding: 28px;
  border: 1px solid var(--border); border-radius: 18px;
  background:
    radial-gradient(600px 240px at 0% 0%, var(--glow-a), transparent 70%),
    radial-gradient(500px 240px at 100% 100%, var(--glow-b), transparent 70%),
    var(--bg-alt);
}
.demo h3 { font-size: 1.3rem; }
.demo p { color: var(--muted); }
.demo-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { padding: 18px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow); }
.tile b { display: block; font-size: 1.8rem; color: var(--ink); letter-spacing: -0.02em; }
.tile span { display: block; margin-top: 4px; font-size: 0.86rem; color: var(--text); }
.tile small { display: block; margin-top: 6px; font-size: 0.74rem; color: var(--muted); }

/* ---------- code ---------- */
#start .panel { padding: 14px; }
.code { position: relative; margin: 10px 0; }
.code pre {
  margin: 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--code-border); border-radius: 12px;
  background: var(--code-bg); color: var(--code-text); line-height: 1.55;
}
.copy {
  position: absolute; top: 10px; right: 10px; padding: 4px 10px; border: 1px solid var(--copy-border); border-radius: 6px;
  background: var(--copy-bg); color: var(--copy-text); font: 600 0.75rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.copy:hover { background: var(--copy-hover); }

/* ---------- tooltip ---------- */
.tip {
  position: fixed; z-index: 60; max-width: 280px; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
  pointer-events: none; background: rgba(13, 20, 36, 0.94); color: #eef1f7; font-size: 0.84rem; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); opacity: 0; transform: translateY(4px); transition: opacity 0.12s ease, transform 0.12s ease;
}
.tip.on { opacity: 1; transform: none; }
.tip span { color: #a6b0c4; }

/* ---------- footer ---------- */
footer { margin-top: 80px; padding: 34px 0 44px; border-top: 1px solid var(--border); background: var(--bg-alt); font-size: 0.88rem; color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--ink); font-size: 1rem; }
footer p { margin: 0 0 10px; }

@media (max-width: 860px) {
  .stats-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .zoo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .bar-grid { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .ex { grid-template-columns: 1fr; gap: 10px; }
  .cls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-gh { display: none; }
  .hero { padding: 56px 0 44px; }
  .stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat:last-child { grid-column: span 2; border-right: 0; border-bottom: 0; }
  .cards, .release { grid-template-columns: 1fr; }
  .zoo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .model { padding: 16px 12px; }
  .model .scores { flex-wrap: wrap; gap: 2px 14px; }
  .model-links { flex-wrap: wrap; gap: 6px; }
  .model-links a { white-space: nowrap; }
  .demo-tiles { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .ex-top { gap: 6px; }
  .ex-img { height: 92px; }
  .ex-top.pages .ex-img { height: 132px; }
  .ex-s { top: 4px; left: 4px; padding: 0 5px; font-size: 0.7rem; }
  .ex-ok { top: 4px; right: 4px; width: 18px; height: 18px; font-size: 0.7rem; }
  .cls .ex-img { height: 104px; }
  .cls-top li { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px; font-size: 0.76rem; }
  .ds-grid { grid-template-columns: 1fr; }
  .ds-search { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .model, .rel, .btn, .ds { transition: none; }
}
