/* ═══════════════════════════════════════════════════════════
   KILO MODELS — warm premium light interface.
   Space Grotesk (voice) · Inter (body) · JetBrains Mono (data).
   One accent: vermilion. Hairlines, soft shadows, honest type.
   ═══════════════════════════════════════════════════════════ */

/* ── self-hosted fonts (no Google dependency) ── */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/space-grotesk-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/space-grotesk-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/space-grotesk-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/space-grotesk-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/space-grotesk-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/space-grotesk-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/inter-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/inter-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/inter-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/inter-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #17150f;
  --ink-2: #5b564b;
  --ink-3: #948e80;
  --line: #e9e6df;
  --line-2: #d9d5cb;
  --accent: #ff4d2e;
  --accent-deep: #d93a1d;
  --accent-soft: #fff0ec;
  --green: #17834e;
  --green-soft: #e8f6ef;
  --ring: rgba(255, 77, 46, 0.35);

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(23, 21, 15, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(23, 21, 15, 0.14), 0 2px 6px rgba(23, 21, 15, 0.06);
  --shadow-lg: 0 24px 70px -18px rgba(23, 21, 15, 0.32);
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

/* soft ambient wash */
.bg-orn {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 420px at 85% -12%, rgba(255, 77, 46, 0.075), transparent 65%),
    radial-gradient(700px 380px at -8% 4%, rgba(23, 131, 78, 0.05), transparent 60%);
}

/* ── topbar ───────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 247, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1180px; margin: 0 auto;
  padding: 13px 24px;
  display: flex; align-items: center; gap: 18px;
}

.mark {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  flex-shrink: 0;
}
.mark__hex {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #ff6a45, var(--accent-deep));
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(255, 77, 46, 0.35);
}
.mark__name {
  font: 600 17px/1 var(--display);
  letter-spacing: -0.02em;
}
.mark__name em { font-style: normal; color: var(--accent); }

.search {
  position: relative; flex: 1; max-width: 430px;
}
.search__ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}
.search__in {
  width: 100%; height: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 40px 0 38px;
  font: 400 14px var(--sans);
  color: var(--ink);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.search__in::placeholder { color: var(--ink-3); }
.search__in:hover { border-color: var(--line-2); }
.search__in:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--ring), var(--shadow-sm);
}
.search__k {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 600 10.5px var(--mono); color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  pointer-events: none;
}

.pills { display: flex; gap: 6px; flex-shrink: 0; }
.pill {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: 500 12.5px var(--sans);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s var(--ease);
  white-space: nowrap;
}
.pill b {
  font: 600 11px var(--mono);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.pill:hover { border-color: var(--line-2); color: var(--ink); transform: translateY(-1px); }
.pill.is-on {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 3px 10px rgba(23, 21, 15, 0.22);
}
.pill.is-on b { color: rgba(255, 255, 255, 0.65); }
.pill--free.is-on { background: var(--green); border-color: var(--green); }
.pill--free.is-on b { color: rgba(255, 255, 255, 0.7); }

.sort { flex-shrink: 0; }
.sort select {
  appearance: none;
  height: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 30px 0 14px;
  font: 500 12.5px var(--sans);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23948e80' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.16s;
}
.sort select:hover { border-color: var(--line-2); }
.sort select:focus { border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--ring); }

/* ── stats strip ──────────────────────────── */
.stats {
  max-width: 1180px; margin: 26px auto 0;
  padding: 0 24px;
}
.stats__inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.stat {
  padding: 20px 24px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 1px; background: var(--line);
}
.stat__label {
  font: 600 10.5px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.stat__v {
  font: 700 clamp(22px, 2.6vw, 30px)/1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__v em { font-style: normal; font-size: 0.55em; color: var(--ink-3); font-weight: 600; }
.stat__v--free { color: var(--green); }
.stat__v--accent { color: var(--accent); }
.stat__sub { margin-top: 5px; font: 400 12px var(--sans); color: var(--ink-3); }

/* ── list ─────────────────────────────────── */
.listwrap {
  max-width: 1180px; margin: 0 auto;
  padding: 26px 24px 140px;
}

.colhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 130px 130px 58px;
  gap: 18px;
  padding: 0 18px 10px;
  font: 600 10.5px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ch--in, .ch--out, .ch--ctx { text-align: right; }

.rows {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 130px 130px 58px;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  transition: background 0.15s var(--ease);
  animation: rise 0.45s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.rows .row:last-child { border-bottom: 0; }

.row::before {
  content: "";
  position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s var(--ease);
}
.row:hover { background: #fdfcfa; }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.row--sel { background: var(--accent-soft); }
.row--sel::before { transform: scaleY(1); }
.row--sel:hover { background: var(--accent-soft); }

.row__model {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.ava {
  width: 42px; height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font: 600 17px var(--display);
  color: #fff;
  letter-spacing: -0.02em;
  background: hsl(var(--h) 45% 42%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 2px 6px hsla(var(--h), 50%, 35%, 0.25);
}
.row__idblock { min-width: 0; }
.row__name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.row__name h3 {
  margin: 0;
  font: 600 16px/1.25 var(--display);
  letter-spacing: -0.012em;
  color: var(--ink);
  transition: color 0.15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 420px;
}
.row:hover .row__name h3 { color: var(--accent-deep); }
.row__name mark {
  background: none; color: var(--accent-deep);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(255, 77, 46, 0.4);
}

.badge {
  font: 700 9.5px var(--sans);
  letter-spacing: 0.09em;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.badge--free {
  color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(23, 131, 78, 0.25);
}
.badge--star {
  color: #9a6b12;
  background: #fdf3dd;
  box-shadow: inset 0 0 0 1px rgba(183, 121, 31, 0.25);
}

.row__meta {
  margin-top: 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font: 400 11.5px var(--mono);
  color: var(--ink-3);
  min-width: 0;
}
.row__meta .pid {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 300px;
}
.tag {
  font: 500 10px var(--sans);
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: 0.02em;
}

.cellnum { text-align: right; }
.cellnum b {
  display: block;
  font: 600 14.5px var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cellnum b.is-free { color: var(--green); }
.cellnum b.is-none { color: var(--ink-3); font-weight: 500; }
.cellnum span {
  display: block;
  margin-top: 2px;
  font: 400 10.5px var(--sans);
  color: var(--ink-3);
}

.row__act { display: flex; justify-content: flex-end; }
.pick {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font: 600 15px var(--mono);
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s var(--ease);
}
.row:hover .pick { border-color: var(--accent); color: var(--accent); transform: scale(1.08); }
.pick:hover { transform: scale(1.1) !important; box-shadow: 0 4px 12px rgba(255, 77, 46, 0.25) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
.row--sel .pick {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-size: 13px;
  box-shadow: 0 4px 14px rgba(255, 77, 46, 0.4);
  transform: scale(1.05);
}

/* ── status / empty ───────────────────────── */
.status {
  text-align: center; padding: 70px 20px;
  background: var(--surface); border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  margin-top: 8px;
}
.status p { font: 500 15px var(--sans); color: var(--ink-2); margin: 0 0 16px; }

.empty {
  text-align: center; padding: 70px 20px; margin-top: 8px;
}
.empty__ic {
  font-size: 34px; color: var(--ink-3); margin-bottom: 10px;
  font-family: var(--display);
}
.empty h3 { font: 600 20px var(--display); margin: 0 0 6px; }
.empty p { margin: 0; color: var(--ink-3); }

.btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  font: 600 13.5px var(--sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn--primary {
  background: linear-gradient(180deg, #ff6242, var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 77, 46, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn--primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(255, 77, 46, 0.45), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--line-2); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 9px; }

.foot {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 0 26px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 400 11.5px var(--mono);
  color: var(--ink-3);
}

/* ── compare tray ─────────────────────────── */
.tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 0 20px 20px;
  pointer-events: none;
  animation: trayin 0.35s var(--ease);
}
@keyframes trayin { from { transform: translateY(110%); } to { transform: none; } }
.tray__inner {
  pointer-events: auto;
  max-width: 760px; margin: 0 auto;
  background: #1c1a15;
  color: #f5f2ea;
  border-radius: 16px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px 12px 18px;
}
.tray__slots { display: flex; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.tslot {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 8px 7px 9px;
  max-width: 240px;
  animation: rise 0.25s var(--ease);
}
.tslot__k {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: 700 11px var(--display);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tslot__n {
  font: 500 12.5px var(--sans);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tslot__x {
  background: none; border: 0; cursor: pointer;
  color: rgba(245, 242, 234, 0.45);
  font-size: 12px; padding: 3px;
  transition: color 0.15s;
}
.tslot__x:hover { color: #fff; }
.tray__act { display: flex; gap: 8px; flex-shrink: 0; }
.tray .btn--ghost { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: rgba(245,242,234,0.75); box-shadow: none; }
.tray .btn--ghost:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.tray__n { font: 600 11px var(--mono); opacity: 0.75; }

/* ── compare modal ────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(23, 21, 15, 0.5);
  backdrop-filter: blur(4px);
  animation: fade 0.25s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.modal__panel {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: pop 0.32s var(--ease);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
}
.modal__head {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.modal__kicker {
  font: 600 11px var(--sans);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.modal__head-r { display: flex; gap: 8px; align-items: center; }
.iconx {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px; cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.18s var(--ease);
}
.iconx:hover { border-color: var(--ink); color: var(--ink); transform: rotate(90deg); }
.modal__body { padding: 24px; }

/* two-up headers */
.cmp-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-bottom: 26px;
}
.cmp-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  background: linear-gradient(180deg, #fff, #fdfcfa);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.cmp-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.cmp-card--a::before { background: var(--accent); }
.cmp-card--b::before { background: var(--ink); }
.cmp-k {
  font: 700 10px var(--display); letter-spacing: 0.18em;
  color: var(--ink-3); margin-bottom: 8px;
}
.cmp-card h3 {
  margin: 0 0 4px;
  font: 700 21px/1.2 var(--display);
  letter-spacing: -0.02em;
}
.cmp-id {
  font: 400 11px var(--mono); color: var(--ink-3);
  margin: 0 0 10px; word-break: break-all;
}
.cmp-desc {
  margin: 0 0 14px;
  font: 400 12.5px/1.55 var(--sans);
  color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cmp-price {
  display: flex; align-items: baseline; gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.cmp-price b {
  font: 700 24px/1 var(--mono);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.cmp-price b.is-free { color: var(--green); font-size: 20px; }
.cmp-price span {
  font: 500 10.5px var(--sans);
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* metrics */
.metrics { border-top: 1px solid var(--line-2); }
.mrow {
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  gap: 14px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.4s var(--ease) both;
}
.mrow:last-child { border-bottom: 0; }
.mrow__v {
  font: 500 14px var(--mono);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.mrow__v--l { justify-content: flex-end; text-align: right; }
.mrow__k {
  text-align: center;
  font: 600 10.5px var(--sans);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}
.mrow .win { color: var(--green); font-weight: 700; }
.delta {
  font: 600 10px var(--mono);
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  padding: 3px 7px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(23, 131, 78, 0.2);
}

/* relative price bars */
.bars { margin-top: 22px; }
.bars__t {
  font: 600 10.5px var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; margin: 0 0 14px;
}
.bars__row {
  display: grid; grid-template-columns: 20px 1fr 72px;
  gap: 12px; align-items: center;
  margin-bottom: 10px;
}
.bars__k { font: 700 11px var(--display); color: var(--ink-3); }
.bars__track {
  height: 16px; background: var(--surface-2);
  border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(23,21,15,0.06);
}
.bars__fill {
  height: 100%; width: 0;
  border-radius: 6px;
  transition: width 0.9s var(--ease);
}
.bars__fill--a { background: linear-gradient(90deg, #ff7a5c, var(--accent)); }
.bars__fill--b { background: linear-gradient(90deg, #3a372f, var(--ink)); }
.bars__v { font: 600 11px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

.cmp-foot {
  margin-top: 22px; text-align: center;
  font: 400 11px var(--mono); color: var(--ink-3);
}

/* toast */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
  z-index: 90;
  background: #1c1a15; color: #f5f2ea;
  font: 500 12.5px var(--sans);
  padding: 10px 18px;
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  animation: toastin 0.3s var(--ease);
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -10px); } }

/* skeleton */
.row--skel { pointer-events: none; }
.sk {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, #eceae3 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* responsive */
@media (max-width: 900px) {
  .topbar__inner { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .pills { order: 2; margin-left: auto; }
  .sort { order: 2; }
  .stats__inner { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before { display: none; }
  .stat { padding: 14px 18px; }
  .stat + .stat::before { display: none; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }

  .colhead { display: none; }
  .row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "model model act"
      "nums nums  nums";
    gap: 12px 16px;
    padding: 14px 16px;
  }
  .row__model { grid-area: model; }
  .row__act { grid-area: act; align-self: start; }
  .row__nums {
    grid-area: nums;
    display: flex; gap: 22px;
  }
  .row__nums .cellnum { text-align: left; }
  .row__nums .cellnum span { display: inline; margin: 0 0 0 5px; }
  .row__name h3 { max-width: none; white-space: normal; }
  .cmp-cols { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 1fr; gap: 3px; padding: 11px 0; }
  .mrow__v--l { justify-content: flex-start; }
  .mrow__k { text-align: left; margin-bottom: 2px; }
  .tray__inner { flex-direction: column; align-items: stretch; }
  .tray__act { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
