/* ==========================================================================
   General Bots — Features & Parity
   Design tokens follow botui/ui/suite/css/identity-tokens.css
   (DESIGN-SYSTEM.md): orange accent, 4px spacing, 12/20px radii, Fira Sans
   headings + Inter body, shared motion and focus ring. The surface language
   (near-black paper, glass cards, prism edge) follows generalbots.org.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("fonts/fira-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("fonts/fira-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fira Sans", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --accent: #f28c28;
  --accent-hover: #d4751c;
  --accent-text: #f5a45b;
  --accent-soft: rgb(242 140 40 / .12);
  --accent-glow: rgb(242 140 40 / .3);
  --on-accent: #2c2c2c;
  --focus: 0 0 0 2px var(--accent-text);

  --bg: #050505;
  --bg-elev: #09090b;
  --paper: #050505;
  --band: #0b0b0d;
  --surface: rgb(10 10 12 / .72);
  --surface-solid: #111114;
  --surface-2: #17171b;
  --fill: rgb(255 255 255 / .045);
  --fill-strong: rgb(255 255 255 / .08);
  --line: rgb(255 255 255 / .11);
  --line-soft: rgb(255 255 255 / .065);
  --ink: #ededed;
  --text: #b5b5bd;
  --muted: #85858f;
  --faint: #5f5f68;

  --ok: #4ade80;
  --ok-text: #86efac;
  --ok-soft: rgb(74 222 128 / .1);
  --warn: #fbbf24;
  --warn-text: #fde68a;
  --warn-soft: rgb(251 191 36 / .1);
  --danger: #f87171;
  --danger-text: #fca5a5;
  --danger-soft: rgb(248 113 113 / .1);
  --info: #7dd3fc;
  --info-text: #bae6fd;
  --info-soft: rgb(125 211 252 / .1);

  --radius-control: 12px;
  --radius-card: 20px;
  --radius-panel: 16px;
  --radius-pill: 999px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 2px rgb(0 0 0 / .3);
  --shadow-float: 0 18px 40px -18px rgb(0 0 0 / .65), 0 2px 8px rgb(0 0 0 / .35);
  --shadow-glow: 0 0 0 1px var(--line), 0 30px 80px -40px var(--accent-glow);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 150ms;
  --dur-normal: 200ms;
  --dur-medium: 350ms;

  --prism: linear-gradient(90deg, #ff5a1f 0%, #ffd31a 25%, #2fe33a 50%, #1a5cff 75%, #8a2be2 100%);
  --prism-soft: linear-gradient(90deg, rgb(255 90 31 / .55), rgb(255 211 26 / .55) 25%, rgb(47 227 58 / .55) 50%, rgb(26 92 255 / .55) 75%, rgb(138 43 226 / .55) 100%);
  --grid: rgb(255 255 255 / .035);
  --dot: rgb(255 255 255 / .1);
  --logo-filter: invert(.93);
  --hero-wash: radial-gradient(60% 55% at 22% 12%, rgb(242 140 40 / .16), transparent 70%),
               radial-gradient(50% 55% at 88% 8%, rgb(26 92 255 / .14), transparent 70%);
}

html[data-theme="light"] {
  color-scheme: light;
  --accent: #f28c28;
  --accent-hover: #d4751c;
  --accent-text: #b45309;
  --accent-soft: rgb(242 140 40 / .12);
  --accent-glow: rgb(242 140 40 / .22);
  --on-accent: #2c2c2c;

  --bg: #fff8f2;
  --bg-elev: #fffdfa;
  --paper: #fff8f2;
  --band: #f7f0e9;
  --surface: rgb(255 255 255 / .78);
  --surface-solid: #ffffff;
  --surface-2: #f3f4f6;
  --fill: rgb(15 23 42 / .045);
  --fill-strong: rgb(15 23 42 / .075);
  --line: rgb(44 44 44 / .14);
  --line-soft: rgb(44 44 44 / .08);
  --ink: #2c2c2c;
  --text: #4b5563;
  --muted: #5f6673;
  --faint: #8a8f99;

  --ok: #16a34a;
  --ok-text: #15803d;
  --ok-soft: rgb(22 163 74 / .1);
  --warn: #d97706;
  --warn-text: #92400e;
  --warn-soft: rgb(217 119 6 / .1);
  --danger: #dc2626;
  --danger-text: #b91c1c;
  --danger-soft: rgb(220 38 38 / .08);
  --info: #0284c7;
  --info-text: #0369a1;
  --info-soft: rgb(2 132 199 / .08);

  --shadow-card: 0 1px 2px rgb(15 23 42 / .06);
  --shadow-float: 0 18px 40px -22px rgb(15 23 42 / .22), 0 2px 8px rgb(15 23 42 / .06);
  --shadow-glow: 0 0 0 1px var(--line), 0 30px 80px -50px var(--accent-glow);
  --grid: rgb(44 44 44 / .04);
  --dot: rgb(44 44 44 / .1);
  --logo-filter: none;
  --hero-wash: radial-gradient(60% 55% at 22% 12%, rgb(242 140 40 / .11), transparent 70%),
               radial-gradient(50% 55% at 88% 8%, rgb(26 92 255 / .07), transparent 70%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot) .7px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px, 140px 140px, 140px 140px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 80%);
  opacity: .7;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 1000;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.topbar-inner {
  max-width: 1560px; margin: 0 auto; padding: 0 var(--space-6);
  height: 68px; display: flex; align-items: center; gap: var(--space-5);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; }
.brand img { height: 20px; width: auto; filter: var(--logo-filter); }
.brand .slash { color: var(--faint); font-weight: 400; }
.brand .tag {
  font: 600 10px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text); border: 1px solid var(--line); background: var(--accent-soft);
  padding: 6px 8px; border-radius: var(--radius-pill);
}
.nav { display: flex; align-items: center; gap: 2px; margin-left: var(--space-4); }
.nav a {
  color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 8px 12px;
  border-radius: var(--radius-sm); transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--fill); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.control {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); border-radius: var(--radius-control);
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.control:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--ink); }
.control.icon { width: 36px; padding: 0; }
.control svg { width: 17px; height: 17px; display: block; }
.lang-select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.gh-link { font-size: 13px; font-weight: 600; }
.mobile-only { display: none; }

/* ---------- layout ---------- */
.shell {
  position: relative; z-index: 1;
  max-width: 1560px; margin: 0 auto; padding: var(--space-8) var(--space-6) 80px;
  display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: var(--space-8);
  align-items: start;
}
.main { min-width: 0; }
.rail {
  position: sticky; top: 92px; max-height: calc(100vh - 108px); overflow: auto;
  padding-right: 4px; scrollbar-width: thin;
}
.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 26px;
  background: var(--hero-wash), linear-gradient(160deg, var(--surface-solid), var(--bg-elev));
  padding: var(--space-10) var(--space-10) var(--space-8);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-6);
}
.hero::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: var(--prism); opacity: .75;
}
.hero::before {
  content: ""; position: absolute; right: -160px; top: -190px; width: 520px; height: 520px;
  border-radius: 50%; border: 1px solid rgb(242 140 40 / .22);
  box-shadow: inset 0 0 120px rgb(242 140 40 / .08);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 16px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.03; font-weight: 600; max-width: 18ch; }
h1 .prism-text {
  background: var(--prism); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: hue-sweep 18s linear infinite;
}
@keyframes hue-sweep { to { background-position: 200% 0; } }
.lede { color: var(--text); font-size: 16.5px; line-height: 1.6; max-width: 76ch; margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius-control);
  background: var(--fill); color: var(--ink); font-size: 13.5px; font-weight: 600;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast), background var(--dur-fast);
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--fill-strong); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn svg { width: 16px; height: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 30px; }
.stat {
  border: 1px solid var(--line-soft); border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent);
  padding: 16px 18px;
}
.stat .num { font-family: var(--font-head); font-size: 30px; line-height: 1; color: var(--ink); font-weight: 600; letter-spacing: -.03em; }
.stat .lbl { margin-top: 7px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat.adv .num { color: var(--accent-text); }
.stat.par .num { color: var(--ok-text); }
.stat.gap .num { color: var(--danger-text); }

/* ---------- section headings ---------- */
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 14px; }
.section-head h2 { font-size: 21px; font-weight: 600; }
.section-head .hint { color: var(--muted); font-size: 13px; }
.section-head .line { flex: 1; height: 1px; background: var(--line-soft); }

/* ---------- app cards ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app-grid.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  min-height: 184px; padding: 18px; border: 1px solid var(--line);
  border-radius: var(--radius-card); background: var(--surface);
  box-shadow: var(--shadow-card); color: inherit;
  transition: transform var(--dur-normal) var(--ease), border-color var(--dur-normal), box-shadow var(--dur-normal);
  overflow: hidden;
}
.app-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--prism);
  opacity: 0; transition: opacity var(--dur-normal);
}
.app-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-float); color: inherit; }
.app-card:hover::after { opacity: .8; }
.app-card-top { display: flex; align-items: flex-start; gap: 12px; }
.app-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--app-color, var(--accent)) 15%, var(--surface-solid));
  color: var(--app-color, var(--accent));
}
.app-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-card h3 { font-size: 16px; font-weight: 600; line-height: 1.25; }
.app-card .cat { margin-top: 3px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.app-card p { margin: 0; color: var(--muted); font-size: 12.8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.app-card .meta { margin-top: auto; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px;
  border-radius: var(--radius-pill); border: 1px solid var(--line);
  font: 600 10.5px/1 var(--font-mono); letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: var(--fill); white-space: nowrap;
}
.badge.ga { color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.badge.preview { color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.badge.deprecated { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.count { font: 600 11px/1 var(--font-mono); color: var(--faint); }
.meter { display: flex; height: 3px; gap: 2px; margin-top: 10px; }
.meter span { height: 3px; border-radius: 3px; }
.meter .a { background: var(--accent); }
.meter .p { background: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.meter .g { background: color-mix(in srgb, var(--danger) 55%, var(--line)); }

/* ---------- sidebar filters ---------- */
.rail-panel { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 14px; box-shadow: var(--shadow-card); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search-input {
  width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid var(--line);
  border-radius: var(--radius-control); background: var(--bg-elev); color: var(--ink);
  transition: border-color var(--dur-fast);
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--accent); outline: none; box-shadow: var(--focus); }
.filter-group { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 12px; }
.filter-group summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font: 600 10.5px/1 var(--font-mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding: 4px 0;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "+"; color: var(--faint); font-size: 14px; }
.filter-group[open] summary::after { content: "−"; }
.filter-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.check {
  display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 7px;
  color: var(--text); font-size: 12.5px; cursor: pointer; user-select: none;
}
.check:hover { background: var(--fill); }
.check input { appearance: none; width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-elev); display: grid; place-items: center; flex: 0 0 auto; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 7px; height: 4px; border-left: 1.6px solid var(--on-accent); border-bottom: 1.6px solid var(--on-accent); transform: rotate(-45deg) translateY(-1px); }
.check .c { margin-left: auto; font: 500 10.5px/1 var(--font-mono); color: var(--faint); }
.app-filter-list { max-height: 220px; overflow: auto; scrollbar-width: thin; padding-right: 2px; }
.rail-actions { margin-top: 12px; display: flex; gap: 8px; }
.rail-actions .btn { flex: 1; justify-content: center; height: 34px; font-size: 12px; }
.rail-note { margin: 12px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--faint); }

/* ---------- table ---------- */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 8px; }
.seg button[aria-pressed="true"] { background: var(--fill-strong); color: var(--ink); }
.result-count { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface);
  overflow: auto; max-height: 72vh; box-shadow: var(--shadow-card); scrollbar-width: thin;
}
table.features { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; }
table.features caption { text-align: left; padding: 0; }
table.features thead th {
  position: sticky; top: 0; z-index: 3; text-align: left; vertical-align: bottom;
  padding: 13px 14px; background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  font: 600 10.5px/1.3 var(--font-mono); letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
table.features td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 13px; }
table.features tbody tr:hover td { background: var(--fill); }
table.features tbody tr:last-child td { border-bottom: 0; }
.cap { min-width: 260px; }
.cap .name { color: var(--ink); font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.cap .desc { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 4px; max-width: 62ch; }
.cap .appref { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 3px; font: 600 10px/1 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.cap .appref svg { width: 12px; height: 12px; }
.cell-center { text-align: center; }
.state {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: var(--radius-pill);
  font: 600 10.5px/1 var(--font-mono); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--line); color: var(--muted); background: var(--fill);
}
.state.yes, .state.shipped, .state.advantage { color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.state.partial { color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.state.preview { color: var(--info-text); border-color: color-mix(in srgb, var(--info) 35%, transparent); background: var(--info-soft); }
.state.no, .state.gap { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); }
.state.parity { color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: var(--ok-soft); }
.state.advantage { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.state.gap { color: var(--danger-text); }
.ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.ico.yes { color: var(--ok-text); background: var(--ok-soft); }
.ico.partial { color: var(--warn-text); background: var(--warn-soft); }
.ico.no { color: var(--faint); background: var(--fill); }
.ico-cell { display: flex; align-items: center; justify-content: center; gap: 6px; }
.ico-cell .lbl { font: 500 10px/1 var(--font-mono); color: var(--faint); text-transform: uppercase; }
.evidence { font: 500 10px/1.4 var(--font-mono); color: var(--faint); white-space: nowrap; }
.evidence:hover { color: var(--accent-text); }
.row-app { display: inline-flex; align-items: center; gap: 6px; }
.row-app .swatch { width: 7px; height: 7px; border-radius: 2px; background: var(--app-color, var(--accent)); }
.more-wrap { display: flex; justify-content: center; padding: 16px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.empty strong { color: var(--ink); display: block; margin-bottom: 6px; }

/* ---------- per-app page ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { opacity: .6; }
.app-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px; align-items: start; }
.app-hero h1 { font-size: clamp(32px, 4vw, 46px); max-width: none; }
.app-lede { color: var(--text); font-size: 16px; max-width: 70ch; margin-top: 14px; }
.app-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.app-side { display: flex; flex-direction: column; gap: 10px; }
.score-card { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); padding: 16px; }
.score-card .k { font: 600 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.score-card .v { font: 600 26px/1.1 var(--font-head); color: var(--ink); margin-top: 7px; }
.score-card .s { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.lineup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0 28px; }
.who {
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface);
  padding: 15px; position: relative; overflow: hidden;
}
.who.gb { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(160deg, var(--accent-soft), var(--surface)); }
.who .top { display: flex; align-items: center; gap: 9px; }
.who .mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font: 700 12px/1 var(--font-head); color: var(--ink);
  border: 1px solid var(--line); background: var(--fill);
}
.who.gb .mark { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.who .nm { font-weight: 600; color: var(--ink); font-size: 13px; line-height: 1.2; }
.who .vd { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.who .type { margin-top: 10px; font: 600 9.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.who .bar { display: flex; gap: 2px; height: 3px; margin-top: 10px; }
.who .bar span { height: 3px; border-radius: 3px; }
.who .sub { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); font-size: 10px; }
.who a { color: var(--muted); }
.who a:hover { color: var(--accent-text); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 2px 0; color: var(--muted); font-size: 11.5px; }
.legend .it { display: inline-flex; align-items: center; gap: 5px; }
.note {
  margin-top: 22px; padding: 16px 18px; border: 1px solid var(--line-soft);
  border-radius: var(--radius-panel); background: var(--fill); color: var(--muted); font-size: 12.5px; line-height: 1.6;
}
.note strong { color: var(--ink); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.pager a { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); padding: 14px 16px; }
.pager a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pager .dir { font: 600 9.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.pager .nm { color: var(--ink); font-weight: 600; margin-top: 5px; }
.pager .next { text-align: right; }

/* ---------- methodology / prose ---------- */
.prose { max-width: 78ch; }
.prose h2 { font-size: 24px; margin: 34px 0 10px; }
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--text); font-size: 14.5px; line-height: 1.75; }
.prose ul { padding-left: 20px; }
.prose code { font: 500 12px/1.5 var(--font-mono); background: var(--fill); border: 1px solid var(--line-soft); padding: 2px 5px; border-radius: 5px; color: var(--ink); }
.prose blockquote { margin: 18px 0; padding: 12px 18px; border-left: 2px solid var(--accent); background: var(--accent-soft); color: var(--text); border-radius: 0 10px 10px 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.mini-card { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); padding: 16px; }
.mini-card .k { font: 600 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.mini-card .v { color: var(--ink); font-weight: 600; margin-top: 8px; font-size: 15px; }
.mini-card p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 1; border-top: 1px solid var(--line-soft);
  background: var(--band);
}
.footer-inner { max-width: 1560px; margin: 0 auto; padding: 28px var(--space-6); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.footer .left { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.footer .left img { height: 18px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.footer .links a { color: var(--muted); }
.footer .links a:hover { color: var(--ink); }
.prism-line { height: 1px; background: var(--prism); opacity: .55; }

/* ---------- translation banner ---------- */
.translation-banner {
  display: none; align-items: center; gap: 10px; margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
  background: var(--info-soft); color: var(--info-text);
  border-radius: var(--radius-panel); padding: 10px 14px; font-size: 12.5px;
}
html[data-lang]:not([data-lang="en"]) .translation-banner { display: flex; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .app-grid, .app-grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); gap: var(--space-5); }
  .app-grid, .app-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-top: var(--space-5); }
  .rail {
    position: fixed; inset: 68px auto 0 0; width: min(340px, 88vw); z-index: 55;
    background: var(--bg); border-right: 1px solid var(--line);
    padding: 16px; transform: translateX(-102%); transition: transform var(--dur-medium) var(--ease);
    max-height: none; box-shadow: var(--shadow-float);
  }
  .rail.open { transform: none; }
  .rail-panel { background: transparent; border: 0; box-shadow: none; padding: 0; }
  .mobile-only { display: inline-flex; }
  .nav { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .app-hero { grid-template-columns: 1fr; }
  .hero { padding: 30px 22px 24px; }
  .footer-inner { padding: 24px 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .table-wrap { max-height: none; }
}
@media (max-width: 560px) {
  .app-grid, .app-grid.wide { grid-template-columns: 1fr; }
  .top-actions .gh-link { display: none; }
  .brand .slash, .brand .tag { display: none; }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .shell { padding: 18px 16px 60px; }
  .lineup { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .rail, .footer, .hero-actions, .table-toolbar { display: none !important; }
  .shell { display: block; max-width: none; padding: 0; }
  body { background: #fff; color: #000; }
  .table-wrap { max-height: none; border-color: #ccc; }
}
