/* ==========================================================================
   ReleasedModels public site stylesheet (no framework).
   Tokens on :root, light/dark via <html data-bs-theme>, skins via
   <html data-rm-theme> (default | forest | scarlet | sepia | neon).
   The admin panel keeps Bootstrap + themes.css and does not load this file.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #ebebe8;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-2: #44403c;
  --muted: #6f6a66;
  --faint: #a8a29e;

  --accent: #5b4cf0;
  --accent-text: #4636d8;
  --accent-ink: #ffffff;
  --accent-2: #0ea5b7;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --focus: color-mix(in srgb, var(--accent) 45%, transparent);

  --open: #15803d;
  --open-soft: #e3f6e8;
  --closed: #57534e;
  --closed-soft: #efeeec;
  --preview: #1d4ed8;
  --preview-soft: #e5ecfe;
  --warn: #a16207;
  --warn-soft: #fbf1d9;
  --danger: #b91c1c;
  --danger-soft: #fde8e8;

  --c-open: #22a35a;
  --c-closed: #a5a0e8;
  --c-in: var(--accent);
  --c-out: var(--accent-2);

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, .06);
  --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 6px 20px -8px rgba(28, 25, 23, .12);
  --radius: 10px;
  --radius-lg: 14px;
  --header-h: 60px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0e;
  --surface: #141417;
  --surface-2: #1a1a1e;
  --surface-3: #232328;
  --border: #26262c;
  --border-strong: #36363d;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #6b6b74;

  --accent: #8b80ff;
  --accent-text: #a79eff;
  --accent-ink: #0c0c0e;
  --accent-2: #3cc6d6;

  --open: #4ade80;
  --open-soft: rgba(74, 222, 128, .12);
  --closed: #b4b4bc;
  --closed-soft: rgba(255, 255, 255, .07);
  --preview: #8fb2ff;
  --preview-soft: rgba(96, 140, 255, .14);
  --warn: #f2c25b;
  --warn-soft: rgba(242, 194, 91, .13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .13);

  --c-open: #3ecf75;
  --c-closed: #6c63c9;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -10px rgba(0, 0, 0, .6);
}

/* Skins: accent colors (and paper tones for sepia, deep ink for neon). */
[data-rm-theme="forest"] { --accent: #15803d; --accent-text: #166534; --accent-2: #0e7490; --c-closed: #9cc7b0; }
[data-rm-theme="forest"][data-bs-theme="dark"] { --accent: #4ade80; --accent-text: #6ee7a0; --accent-2: #38bdf8; --c-closed: #2f6b4a; }
[data-rm-theme="scarlet"] { --accent: #dc2626; --accent-text: #b91c1c; --accent-2: #f59e0b; --c-closed: #f0a8a8; }
[data-rm-theme="scarlet"][data-bs-theme="dark"] { --accent: #f87171; --accent-text: #fca5a5; --accent-2: #fbbf24; --c-closed: #8a3838; }
[data-rm-theme="sepia"] {
  --bg: #f8f4ec; --surface: #fffdf8; --surface-2: #f3eee3; --surface-3: #e9e2d3; --border: #e6dece; --border-strong: #d6cbb5;
  --text: #2b2418; --text-2: #4a3f2e; --muted: #7a6c55; --faint: #ad9f86;
  --accent: #9a5b13; --accent-text: #85500f; --accent-2: #3f7d6e; --c-closed: #d9bf95;
}
[data-rm-theme="sepia"][data-bs-theme="dark"] {
  --bg: #15120d; --surface: #1c1812; --surface-2: #231e16; --surface-3: #2c261c; --border: #2f281e; --border-strong: #40372a;
  --text: #f1e9da; --text-2: #dbd0bb; --muted: #b0a28a; --faint: #7d705c;
  --accent: #e0a85a; --accent-text: #ebbd7c; --accent-2: #7cc2b0; --c-closed: #7a5a30;
}
[data-rm-theme="neon"] { --accent: #c026d3; --accent-text: #a21caf; --accent-2: #0891b2; --c-open: #16a34a; --c-closed: #e7a4ef; }
[data-rm-theme="neon"][data-bs-theme="dark"] {
  --bg: #07070c; --surface: #0e0e16; --surface-2: #14141f; --surface-3: #1c1c2a; --border: #22223a; --border-strong: #31314f;
  --accent: #3dff9a; --accent-text: #6dffb4; --accent-ink: #07070c; --accent-2: #ff4fd8; --c-open: #3dff9a; --c-closed: #b03fa0;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); letter-spacing: -.03em; font-weight: 700; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: .875em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: .08em .35em; border-radius: 5px; }
pre { margin: 0 0 1rem; }
pre code { display: block; padding: 14px 16px; overflow-x: auto; line-height: 1.6; border-radius: var(--radius); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.lead { font-size: 1.125rem; color: var(--text-2); line-height: 1.6; }
.stack > * + * { margin-top: 2.5rem; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { top: 8px; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); }
}
@media (min-width: 900px) { .site-header { position: sticky; top: 0; } }
.site-header__row { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; letter-spacing: -.02em; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a {
  color: var(--text-2); font-size: .925rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search input {
  width: 230px; height: 36px; padding: 0 34px 0 32px; font: inherit; font-size: .9rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  transition: border-color .15s, box-shadow .15s, width .2s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: .72rem; color: var(--muted);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; line-height: 1.4; background: var(--surface-2);
}
.search input:focus + kbd { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; flex: none;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-moon, [data-bs-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-bs-theme="dark"] .theme-toggle .i-moon { display: block; }

@media (max-width: 899.98px) {
  .site-header__row { flex-wrap: wrap; gap: 10px; padding-top: 10px; }
  .header-tools { margin-left: auto; }
  .site-header .search { order: 3; flex: 1 1 100%; }
  .page-home .site-header .search { display: none; }
  .site-header .search input { width: 100%; height: 40px; font-size: 16px; }
  .site-header .search kbd { display: none; }
  .nav {
    order: 4; flex: 0 0 calc(100% + 32px); margin: 0 -16px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; }
}

/* ------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px;
  font: inherit; font-size: .9rem; font-weight: 550; line-height: 1; white-space: nowrap; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
[data-bs-theme="dark"] .btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { height: 32px; padding: 0 10px; font-size: .85rem; }
.link-arrow { font-weight: 550; font-size: .9rem; white-space: nowrap; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.input, .select {
  width: 100%; height: 38px; padding: 0 11px; font: inherit; font-size: .9rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px;
}
.select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.input::placeholder { color: var(--faint); }
@media (max-width: 767.98px) { .input, .select { font-size: 16px; height: 42px; } }

/* ----------------------------------------------------------------- pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; line-height: 1; white-space: nowrap; letter-spacing: .01em;
  background: var(--closed-soft); color: var(--closed);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill--plain::before { display: none; }
.pill--open { background: var(--open-soft); color: var(--open); }
.pill--preview { background: var(--preview-soft); color: var(--preview); }
.pill--deprecated { background: var(--warn-soft); color: var(--warn); }
.pill--retired { background: var(--danger-soft); color: var(--danger); }
.pill--accent { background: var(--accent-soft); color: var(--accent-text); }
.pill--lg { height: 26px; padding: 0 11px; font-size: .8rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .85rem; font-weight: 500; white-space: nowrap;
}
a.chip:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); text-decoration: none; }
.chip--active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.chip__x { font-size: 1rem; line-height: 1; opacity: .7; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
a.tag:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card__body { padding: 18px 20px; }
.card__title { font-size: 1rem; font-weight: 650; margin: 0 0 2px; }
.card__title--gap { margin-bottom: 10px; }
.card__sub { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
@media (max-width: 575.98px) { .card__body { padding: 16px; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

.page-head { padding: 32px 0 20px; }
.page-head h1 { margin-bottom: 6px; }
.page-head .lead { margin: 0; max-width: 62ch; }
.page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: .92rem; }
.page-head__meta > * + *::before { content: "\00b7"; margin-right: 8px; color: var(--faint); }
.page-head--tight { padding-top: 0; }
.page-head__lead { margin-top: 12px !important; }
.section-gap { margin-top: 28px; }
.count { font-size: .55em; font-weight: 600; color: var(--muted); letter-spacing: 0; vertical-align: middle; margin-left: 6px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs--top { padding-top: 24px; }
.model-summary { margin-top: 16px; max-width: 72ch; }
.split--after-facts { margin-top: 28px; }
.price-history { margin-top: 14px; }
.crumbs a:hover { color: var(--text); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; } }

.notice { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .92rem; }
.notice--warn { background: var(--warn-soft); border-color: transparent; color: var(--text); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 48px 0 36px; }
.hero::before {
  content: ""; position: absolute; top: -80px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 300px at 22% 12%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(600px 280px at 82% 0%, color-mix(in srgb, var(--accent-2) 11%, transparent), transparent 70%);
}
.hero__grid { display: grid; gap: 32px; align-items: end; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-open); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-open) 20%, transparent); }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); line-height: 1.05; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero .lead { max-width: 54ch; margin-bottom: 22px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search .search { flex: 1; }
.hero-search .search input { width: 100%; height: 46px; font-size: 1rem; border-radius: 11px; padding-left: 38px; box-shadow: var(--shadow-sm); }
.hero-search .search svg { left: 13px; width: 18px; height: 18px; }
.hero-search .btn { height: 46px; padding: 0 18px; border-radius: 11px; }
.hero .chips { margin-top: 14px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.tile__value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile__label { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.tiles--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile__value--sm { font-size: 1.25rem; line-height: 1.5; }
@media (min-width: 768px) { .tiles--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* -------------------------------------------------------------- timeline */
.feed { list-style: none; margin: 0; padding: 0; }
.feed__month { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 18px 0 8px; }
.feed__month:first-child { padding-top: 0; }
.feed__item {
  position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
  padding: 12px 14px; margin: 0 -14px; border-radius: var(--radius);
}
.feed__item:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.feed__date { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.2; }
.feed__date b { display: block; font-size: 1.15rem; color: var(--text); font-weight: 650; }
.feed__name { font-weight: 620; color: var(--text); }
.feed__name::after { content: ""; position: absolute; inset: 0; }
.feed__name:hover { text-decoration: none; }
.feed__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .84rem; color: var(--muted); margin-top: 2px; }
.feed__meta .sep { color: var(--faint); }
.feed__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.feed__price { font-size: .82rem; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 575.98px) {
  .feed__item { grid-template-columns: 42px minmax(0, 1fr); }
  .feed__side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
}

/* ----------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted);
  font-size: .76rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: var(--radius-lg); }
.table thead th:last-child { border-top-right-radius: var(--radius-lg); }
.table thead th a { color: inherit; }
.table thead th a:hover { color: var(--text); text-decoration: none; }
.table thead th a[aria-sort] { color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.cell-model { min-width: 220px; }
.cell-model a { font-weight: 620; color: var(--text); }
.cell-model a:hover { color: var(--accent-text); }
.cell-sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 1px; }
.cell-sub a { color: var(--muted); font-weight: 400; }
.dash { color: var(--faint); }

/* Catalog table collapses into cards on phones. */
@media (max-width: 719.98px) {
  .table-wrap--stack { border: 0; background: none; box-shadow: none; overflow: visible; }
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody { display: block; }
  .table--stack tr {
    position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 10px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  }
  .table--stack tbody tr:hover td { background: none; }
  .table--stack td { display: block; padding: 0; border: 0; text-align: left !important; min-width: 0; }
  .table--stack td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 1px; }
  .table--stack td.cell-model { grid-column: 1 / -1; padding-right: 104px; }
  .table--stack td.cell-weights { position: absolute; top: 14px; right: 16px; }
  .table--stack td.is-empty { display: none; }
  .table--stack td .cell-sub { display: inline; margin-left: 4px; }
  .table--stack td.cell-model .cell-sub { display: block; margin-left: 0; }
  .table--stack td.hide-stack { display: none; }
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pagination__pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span.cur, .pagination span.gap {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: .9rem; font-variant-numeric: tabular-nums;
}
.pagination a { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.pagination a:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.pagination span.cur { background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.pagination span.gap { color: var(--faint); min-width: 20px; padding: 0; }

/* --------------------------------------------------------------- filters */
.filters { margin-bottom: 18px; }
.filters__grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.filters__grid .field--wide { grid-column: 1 / -1; }
@media (min-width: 720px) { .filters__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .filters__grid .field--wide { grid-column: span 2; } }
@media (min-width: 1100px) { .filters__grid { grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); } .filters__grid .field--wide { grid-column: auto; } }
.filters__more { margin-top: 12px; }
.filters__more-toggle { display: inline-flex; cursor: pointer; font-size: .88rem; font-weight: 550; color: var(--accent-text); }
.filters__grid--more { margin-top: 12px; }
.filters__actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.filters__label { margin: 0 auto 0 8px; }
.filters__toggle > span:first-child { display: inline-grid; }
.filters summary { list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters__toggle { display: none; }
@media (max-width: 719.98px) {
  .filters__toggle { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 12px 16px; font-weight: 600; }
  .filters__toggle svg { width: 16px; height: 16px; transition: transform .2s; }
  details.filters[open] .filters__toggle svg { transform: rotate(180deg); }
  details.filters:not([open]) .filters__panel { display: none; }
  .filters__panel { border-top: 1px solid var(--border); }
}
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.result-bar__count { font-size: .92rem; color: var(--muted); }
.result-bar__count b { color: var(--text); }

/* ---------------------------------------------------------- model page */
.model-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.model-head__by { font-size: .92rem; color: var(--muted); margin-bottom: 6px; }
.model-head__by a { color: var(--text-2); font-weight: 550; }
.model-head h1 { margin-bottom: 8px; }
.model-head__badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.model-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.slug { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: .82rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 4px 2px 8px; }
.slug button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 4px; display: grid; place-items: center; }
.slug button:hover { color: var(--text); background: var(--surface-3); }
.slug button svg { width: 14px; height: 14px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: 22px 0 8px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fact { background: var(--surface); padding: 14px 16px; min-width: 0; }
.fact__label { font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fact__value { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; margin-top: 3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact__value small { font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.fact__value.is-empty { color: var(--faint); font-weight: 500; font-size: 1rem; }

.dl { display: grid; grid-template-columns: minmax(130px, 34%) minmax(0, 1fr); margin: 0; font-size: .93rem; }
.dl dt, .dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dl dt { color: var(--muted); padding-right: 12px; }
.dl dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.dl dd .tag, .dl dd .chip { margin: 0 4px 4px 0; }
.dl > :nth-last-child(-n+2) { border-bottom: 0; }

.price-cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .price-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; background: var(--surface); }
.price-card--now { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft); }
.price-card__label { font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.price-card__value { font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.price-card__value small { font-size: .8rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price-card__extra { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.delta { font-size: .78rem; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--open-soft); color: var(--open); white-space: nowrap; }
.delta--up { background: var(--danger-soft); color: var(--danger); }

.bench { list-style: none; margin: 0; padding: 0; }
.bench li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.bench li:last-child { border-bottom: 0; }
.bench__score { font-weight: 650; font-variant-numeric: tabular-nums; }
.bench__bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bench__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); }

.versions { list-style: none; margin: 0; padding: 0; position: relative; }
.versions::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; background: var(--border); border-radius: 2px; }
.versions li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 7px 0 7px 22px; font-size: .92rem; }
.versions li::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.versions li.is-current::before { background: var(--accent); border-color: var(--accent); }
.versions li.is-current a { color: var(--text); font-weight: 650; }
.versions a { color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.versions time { color: var(--muted); font-size: .84rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- directory cards */
.dir-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.dir-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.dir-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dir-card__name { font-weight: 650; color: var(--text); font-size: 1rem; }
.dir-card__name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dir-card__name:hover { text-decoration: none; }
.dir-card__meta { font-size: .84rem; color: var(--muted); }
.dir-card__n { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.dir-card__n small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 3px; text-transform: uppercase; }
.dir-card__latest { font-size: .84rem; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-card__latest span { color: var(--muted); }
.share { height: 6px; border-radius: 999px; background: var(--c-closed); overflow: hidden; display: flex; }
.share span { background: var(--c-open); }
.dir-filter { max-width: 340px; margin-bottom: 16px; }
.dir-filter .search input { width: 100%; height: 40px; }
.share-label { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.dir-group + .dir-group { margin-top: 32px; }
.dir-group h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- charts */
.chart { margin: 0; --plot-h: 200px; }
.chart__plot { position: relative; height: var(--plot-h); margin-left: 34px; }
.chart__grid span { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border); }
.chart__grid span:first-child { border-top: 1px solid var(--border-strong); }
.chart__grid b { position: absolute; right: calc(100% + 8px); top: -.65em; font-size: .72rem; font-weight: 500; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart__cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); align-items: end; gap: clamp(1px, .5vw, 4px); }
.chart__col { position: relative; height: 100%; display: flex; flex-direction: column-reverse; align-items: center; outline: none; cursor: default; }
.chart__col::before { content: ""; position: absolute; inset: 0 -1px; border-radius: 4px; background: var(--surface-2); opacity: 0; transition: opacity .12s; }
.chart__col:hover::before, .chart__col:focus-visible::before { opacity: 1; }
.chart__seg { position: relative; display: block; width: 100%; max-width: 64px; min-height: 1px; }
.chart__seg:last-child { border-radius: 3px 3px 0 0; }
.chart__x { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); margin: 8px 0 0 34px; font-size: .72rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.chart--columns .chart__x { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.chart--columns { --cols: 1; }
.chart__x span { text-align: center; white-space: nowrap; overflow: visible; display: flex; justify-content: center; }
.chart__x span.is-hidden { visibility: hidden; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.chart__legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart__legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: currentColor; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5;
  width: max-content; max-width: 220px; padding: 6px 9px; border-radius: 7px; font-size: .76rem; font-weight: 500; line-height: 1.35; text-align: center;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow); pointer-events: none;
}
.chart__col[data-tip]:hover::after, .chart__col[data-tip]:focus-visible::after { bottom: calc(100% + 6px); }
.chart__cols .chart__col:nth-child(-n+3)[data-tip]::after { left: 0; transform: none; }
.chart__cols .chart__col:nth-last-child(-n+3)[data-tip]::after { left: auto; right: 0; transform: none; }
.chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart__svg polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart__dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--surface); outline: none; }
.chart__dot:hover, .chart__dot:focus-visible { transform: scale(1.35); }
.chart-s-open { background: var(--c-open); color: var(--c-open); stroke: var(--c-open); }
.chart-s-closed { background: var(--c-closed); color: var(--c-closed); stroke: var(--c-closed); }
.chart-s-total { background: var(--accent); color: var(--accent); stroke: var(--accent); }
.chart-s-in { background: var(--c-in); color: var(--c-in); stroke: var(--c-in); }
.chart-s-out { background: var(--c-out); color: var(--c-out); stroke: var(--c-out); }
@media (max-width: 575.98px) { .chart { --plot-h: 170px; } .chart__x { font-size: .66rem; } }

.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.barlist li { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: .9rem; }
.barlist__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist__label a { color: var(--text); }
.barlist__track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.barlist__bar { display: flex; height: 100%; border-radius: inherit; background: var(--c-closed); overflow: hidden; min-width: 4px; }
.barlist--single .barlist__bar { background: var(--accent); }
.barlist__part { background: var(--c-open); height: 100%; }
.barlist__value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* --------------------------------------------------------------- compare */
.compare-picker { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .compare-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .compare-picker { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; } }
.compare-table th[scope="row"] { color: var(--muted); font-weight: 500; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.compare-table thead th { text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--text); vertical-align: bottom; min-width: 170px; }
.compare-table thead th:first-child { min-width: 140px; position: sticky; left: 0; z-index: 2; }
.compare-table thead th a { color: var(--text); font-weight: 650; }
.compare-table .group td, .compare-table .group th { background: var(--surface-2); font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.compare-table tbody tr:last-child th { border-bottom-left-radius: var(--radius-lg); }
.best { color: var(--open); font-weight: 650; }
.best::after { content: " ★"; font-size: .75em; }

/* ------------------------------------------------------------- api docs */
.endpoint { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .endpoint { grid-template-columns: minmax(280px, 38%) minmax(0, 1fr); } }
.endpoint:last-child { border-bottom: 0; }
.endpoint code { background: none; border: 0; padding: 0; font-size: .86rem; color: var(--text); }
.endpoint .method { font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--open); background: var(--open-soft); padding: 2px 6px; border-radius: 5px; margin-right: 8px; }
.endpoint p { margin: 0; color: var(--text-2); font-size: .92rem; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .3em 0; }

/* ----------------------------------------------------------------- empty */
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty__code { font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; letter-spacing: -.06em; line-height: 1; color: var(--border-strong); margin-bottom: 10px; }
.empty h1 { font-size: 1.5rem; }
.empty .btn { margin-top: 12px; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); font-size: .88rem; color: var(--muted); }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; padding-top: 28px; padding-bottom: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--text-2); }
.site-footer .brand { font-size: .95rem; }
.site-footer p { margin: 6px 0 0; max-width: 46ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .filters, .pagination, .model-head__actions { display: none !important; }
  body { background: #fff; }
}
