/* Ruta Cero · sistema visual
   Concepto: foto de ruta a pantalla completa, tipografía blanca gigante, barra de vidrio oscuro y fotos redondeadas escalonadas.
   Para sumar una marca o un contenido nuevo basta con editar los datos: todo se arma con estos tokens y componentes (ver README). */

:root {
  /* color (oscuro por defecto: la identidad es fotográfica) */
  --bg: #0a1217;
  --surface: #111d25;
  --surface-2: #17272f;
  --line: rgba(190, 225, 238, .13);
  --fg: #eaf3f6;
  --muted: #93a8b1;
  --accent: #67e0f5;
  --accent-ink: #032029;
  --warm: #ffb36b;
  --good: #7fe3a1;
  --warn: #ffc857;
  --bad: #ff8b7a;
  --glass: rgba(9, 17, 22, .52);
  --glass-line: rgba(255, 255, 255, .2);
  --on-photo: #ffffff;
  /* energía */
  --c-ev: #5fd6f2;
  --c-phev: #8be58c;
  --c-hev: #ffc857;
  --c-nafta: #b3bec6;
  --c-diesel: #d6a37e;
  /* tipografía */
  --f-display: "Bricolage Grotesque", "Arial Narrow", Impact, system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* forma */
  --r-photo: 30px;
  --r-card: 22px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7);
  --tint-s: 55%; --tint-l: 22%; --tint-a: .55;
  --logo-filter: invert(1); /* el logo de Nina labs es negro: se invierte sobre fondo oscuro */
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f1f6f8; --surface: #ffffff; --surface-2: #e6eff2; --line: rgba(10, 40, 55, .13);
    --fg: #0b1a21; --muted: #4e636c; --accent: #0a8aa6; --accent-ink: #ffffff; --warm: #b45f12;
    --good: #14803f; --warn: #946200; --bad: #b3361f;
    --c-ev: #0a86a3; --c-phev: #2c8a35; --c-hev: #a56a00; --c-nafta: #566872; --c-diesel: #96592f;
    --shadow: 0 24px 60px -30px rgba(10, 40, 55, .35);
    --tint-s: 70%; --tint-l: 88%; --tint-a: .9; --logo-filter: none;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f1f6f8; --surface: #ffffff; --surface-2: #e6eff2; --line: rgba(10, 40, 55, .13);
  --fg: #0b1a21; --muted: #4e636c; --accent: #0a8aa6; --accent-ink: #ffffff; --warm: #b45f12;
  --good: #14803f; --warn: #946200; --bad: #b3361f;
  --c-ev: #0a86a3; --c-phev: #2c8a35; --c-hev: #a56a00; --c-nafta: #566872; --c-diesel: #96592f;
  --shadow: 0 24px 60px -30px rgba(10, 40, 55, .35);
  --tint-s: 70%; --tint-l: 88%; --tint-a: .9; --logo-filter: none;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; --tint-s: 55%; --tint-l: 22%; --tint-a: .55; --logo-filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

/* base */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--f-body); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); }
.eyebrow { font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.display { font-family: var(--f-display); font-weight: 800; font-stretch: 78%; letter-spacing: -.035em; line-height: .9; text-wrap: balance; margin: 0; }
h2.display { font-size: clamp(2.4rem, 6.2vw, 5.2rem); }
h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
.lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 58ch; }
.num { font-variant-numeric: tabular-nums; }

/* encabezado */
.site-header { position: relative; z-index: 20; }
.site-header .bar { display: flex; align-items: center; gap: 24px; padding-block: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--f-display); font-stretch: 80%; letter-spacing: -.03em; }
.logo i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--accent) 9% 52%, transparent 53%), conic-gradient(from 200deg, var(--accent), #2b6c8c, var(--accent)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) inset; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 9px 14px; border-radius: var(--r-pill); font-weight: 500; font-size: .95rem; opacity: .88; position: relative; }
.nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.nav a[aria-current="page"] { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.nav .cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 5px; margin-left: 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 600 .72rem/1 var(--f-mono); }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 18px; height: 18px; }
.site-header.on-photo { position: absolute; inset: 0 0 auto 0; color: var(--on-photo); }
.site-header.solid { position: sticky; top: env(safe-area-inset-top, 0px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; color: inherit; cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 820px) {
  .site-header .bar { flex-wrap: wrap; gap: 8px 10px; }
  .theme-btn { margin-left: auto; }
  .menu-btn { display: grid; }
  .nav { display: none; order: 3; width: 100%; margin: 0; flex-direction: column; gap: 2px; padding: 8px; border-radius: 20px; }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 14px 16px; font-size: 1.02rem; opacity: 1; }
  .site-header.on-photo .nav { background: rgba(9, 17, 22, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--glass-line); color: #fff; }
  .site-header.solid .nav { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
}

/* botones y chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none; padding: 13px 22px; border-radius: var(--r-pill); font-weight: 600; background: var(--accent); color: var(--accent-ink); transition: transform .15s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--fg); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-size: .9rem; font-weight: 500; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font: 500 .72rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(8, 16, 21, .62); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .22); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--accent)); }
.badge.inline { color: var(--fg); background: var(--surface-2); border-color: var(--line); }

/* portada */
.hero { position: relative; isolation: isolate; color: var(--on-photo); min-height: clamp(660px, 94svh, 1000px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: #0d1a26; }
.hero > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; z-index: -2; animation: settle 2.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
    linear-gradient(90deg, rgba(5, 10, 16, .62) 0, rgba(5, 10, 16, .38) 42%, rgba(5, 10, 16, 0) 74%),
    linear-gradient(180deg, rgba(5, 10, 16, .55) 0, rgba(5, 10, 16, 0) 26%, rgba(5, 10, 16, .1) 44%, rgba(5, 10, 16, .78) 100%); }
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero .inner { padding-block: clamp(110px, 18vh, 200px) clamp(26px, 5vh, 56px); display: grid; gap: clamp(20px, 3.4vh, 36px); }
.hero h1 { font-size: clamp(3.6rem, 14vw, 14rem); color: #fff; text-shadow: 0 6px 60px rgba(0, 0, 0, .35); margin-left: -.04em; }
.hero .sub { max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #fff; margin: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 0 22px rgba(0, 0, 0, .6); }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.page-hero { min-height: clamp(380px, 54svh, 560px); }
.page-hero h1 { font-size: clamp(3.2rem, 11vw, 10rem); }
.page-hero .inner { padding-top: clamp(100px, 16vh, 170px); }

/* barra de vidrio oscuro */
.glass-bar { position: relative; display: flex; align-items: stretch; background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--glass-line); border-radius: var(--r-pill); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .75), 0 1px 0 rgba(255, 255, 255, .18) inset; color: #fff; padding: 8px; max-width: 980px; }
.glass-bar .seg { display: flex; flex-direction: column; justify-content: center; padding: 6px 22px; min-width: 0; border-right: 1px solid rgba(255, 255, 255, .14); }
.glass-bar .seg:last-of-type { border-right: 0; }
.glass-bar .seg.grow { flex: 1 1 280px; }
.glass-bar label { font: 500 .66rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .62); margin-bottom: 5px; }
.glass-bar input, .glass-bar select { background: transparent; border: 0; color: #fff; padding: 0; width: 100%; font-size: 1.02rem; font-weight: 500; outline: none; text-overflow: ellipsis; }
.glass-bar input::placeholder { color: rgba(255, 255, 255, .45); }
.glass-bar select option { color: #111; }
.glass-bar .go { align-self: stretch; border-radius: var(--r-pill); padding-inline: 28px; }
.glass-bar:focus-within { border-color: rgba(255, 255, 255, .5); }
.suggest { position: absolute; left: 8px; top: calc(100% + 10px); width: min(460px, calc(100% - 16px)); background: rgba(9, 17, 22, .86); backdrop-filter: blur(22px); border: 1px solid var(--glass-line); border-radius: 22px; padding: 8px; z-index: 30; max-height: 340px; overflow: auto; color: #fff; }
.suggest button { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 12px; text-align: left; background: transparent; border: 0; color: inherit; padding: 10px 14px; border-radius: 14px; cursor: pointer; }
.suggest button:hover, .suggest button[aria-selected="true"] { background: rgba(255, 255, 255, .12); }
.suggest small { font: 400 .72rem var(--f-mono); color: rgba(255, 255, 255, .55); letter-spacing: .08em; text-transform: uppercase; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick a { text-decoration: none; padding: 8px 15px; border-radius: var(--r-pill); font-size: .9rem; font-weight: 500; color: #fff; background: rgba(9, 17, 22, .4); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .22); transition: background .15s; }
.quick a:hover { background: rgba(255, 255, 255, .2); }
@media (max-width: 760px) {
  .glass-bar { flex-direction: column; border-radius: 28px; gap: 2px; }
  .glass-bar .seg { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); padding: 12px 18px; }
  .glass-bar .seg:last-of-type { border-bottom: 0; }
  .glass-bar .seg.grow { flex: 0 0 auto; }
  .glass-bar .go { padding-block: 15px; margin-top: 4px; }
}

/* secciones */
section.block { padding-block: clamp(64px, 10vw, 128px); }
.head { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 64px); }
.head .row { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* fotos redondeadas escalonadas */
.photo { position: relative; display: block; border-radius: var(--r-photo); overflow: hidden; isolation: isolate; text-decoration: none; color: #fff; background: #12202c; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); z-index: -2; }
.photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 9, 14, 0) 45%, rgba(4, 9, 14, .78) 100%); }
.photo:hover img { transform: scale(1.05); }
.photo .cap { position: absolute; inset: auto 0 0 0; padding: 22px 24px; display: grid; gap: 4px; }
.photo .cap b { font: 800 clamp(1.5rem, 2.6vw, 2.3rem)/1 var(--f-display); font-stretch: 80%; letter-spacing: -.03em; }
.photo .cap span { font-size: .95rem; color: rgba(255, 255, 255, .8); }
.photo .tag { position: absolute; top: 18px; left: 18px; }
.photo .arrow { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #06121a; transition: transform .25s; }
.photo:hover .arrow { transform: rotate(-45deg); }
.stagger { display: grid; grid-template-columns: 1.15fr .85fr 1fr; gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.stagger > :nth-child(3n + 2) { margin-top: clamp(40px, 7vw, 110px); }
.stagger > :nth-child(3n + 3) { margin-top: clamp(16px, 3vw, 48px); }
.stagger > :nth-child(3n + 2) .photo { aspect-ratio: 4 / 3.5; }
@media (max-width: 900px) {
  .stagger { grid-template-columns: 1fr 1fr; }
  .stagger > :nth-child(n) { margin-top: 0; }
  .stagger > :nth-child(2n) { margin-top: 48px; }
}
@media (max-width: 560px) {
  .stagger { grid-template-columns: 1fr; }
  .stagger > :nth-child(n) { margin-top: 0; }
  .stagger > :nth-child(2n) { margin-left: 24px; }
}

/* tarjetas de auto */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.car { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; min-width: 0; transition: transform .2s, border-color .2s; }
.car:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.car .ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #12202c; }
.car .ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.car .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 9, 14, .3) 0, transparent 40%, rgba(4, 9, 14, .55) 100%); }
.car .ph img.real { transform: none; object-position: center; }
.car .ph.has-photo::after { background: linear-gradient(180deg, rgba(4, 9, 14, .28) 0, transparent 32%, transparent 68%, rgba(4, 9, 14, .5) 100%); }
.foto-ficha { margin: 0; border-radius: var(--r-photo); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.foto-ficha figcaption a { color: inherit; text-underline-offset: 3px; }
.foto-ficha figcaption { padding: 8px 16px; font-size: .78rem; color: var(--muted); }
.foto-ficha img { width: 100%; max-height: 560px; aspect-ratio: 16 / 9; object-fit: cover; }
.car .ph .badge { position: absolute; top: 12px; left: 12px; z-index: 1; }
.car .ph .brandmark { position: absolute; right: 12px; bottom: 10px; z-index: 1; font: 800 1.15rem/1 var(--f-display); font-stretch: 80%; letter-spacing: -.02em; color: #fff; opacity: .92; }
.car .body { padding: 16px 18px 18px; display: grid; gap: 12px; flex: 1; align-content: start; }
.car h3 { font-size: 1.25rem; }
.car .ver { color: var(--muted); font-size: .9rem; margin-top: 3px; overflow-wrap: anywhere; }
.car .price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.car .price b { font: 700 1.5rem/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.car .price small { color: var(--muted); font-size: .8rem; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.specs div { background: var(--surface); padding: 9px 10px; display: grid; gap: 2px; min-width: 0; }
.specs span { font: 500 .62rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.specs b { font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.car .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 500 .72rem/1 var(--f-mono); letter-spacing: .04em; padding: 5px 9px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.tag.ok { color: var(--good); } .tag.mid { color: var(--warn); } .tag.no { color: var(--bad); }
.car .acts { display: flex; gap: 8px; margin-top: auto; }
.car .acts .btn { flex: 1; }
.car .acts .sel[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* catálogo */
.catalog { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; padding-block: 40px 120px; }
.filters { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: grid; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; max-height: calc(100svh - 100px); overflow: auto; }
.filters h4 { margin: 0 0 10px; font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.field output { color: var(--fg); font-family: var(--f-mono); font-size: .8rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.in, select.in { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--fg); min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.toolbar .count { font: 700 1.6rem/1 var(--f-display); letter-spacing: -.02em; }
.toolbar .count small { font: 400 .95rem var(--f-body); color: var(--muted); letter-spacing: 0; }
.filters-toggle { display: none; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-card); }
@media (max-width: 980px) {
  .catalog { grid-template-columns: 1fr; padding-top: 24px; }
  .filters { position: static; max-height: none; }
  .filters-toggle { display: inline-flex; }
  .filters[data-open="false"] { display: none; }
}
.tray { position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(780px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: var(--r-pill); background: rgba(9, 17, 22, .78); backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--glass-line); color: #fff; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.tray .items { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; }
.tray .it { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); font-size: .85rem; white-space: nowrap; }
.tray .it button { border: 0; background: rgba(255, 255, 255, .18); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.tray .lbl { font: 500 .68rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); white-space: nowrap; }

/* comparar */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
table.cmp { border-collapse: collapse; width: 100%; min-width: var(--min, 720px); }
table.cmp th, table.cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
table.cmp thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; padding-block: 18px; vertical-align: bottom; }
table.cmp th.rowh { font-weight: 500; color: var(--muted); font-size: .9rem; width: 190px; }
table.cmp tr.grp td { padding: 26px 16px 10px; font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--line); background: var(--surface-2); }
table.cmp td.best { color: var(--good); font-weight: 700; }
table.cmp td.best::after { content: " ●"; font-size: .6rem; vertical-align: middle; }
table.cmp .ch b { display: block; font: 800 1.25rem/1.05 var(--f-display); letter-spacing: -.02em; }
table.cmp .ch span { color: var(--muted); font-size: .85rem; font-weight: 400; }
table.cmp .ch button { margin-top: 8px; }
.picker { position: relative; max-width: 520px; }
.picker .in { padding: 14px 18px; border-radius: var(--r-pill); }
.picker .suggest { background: var(--surface); color: var(--fg); border-color: var(--line); left: 0; width: 100%; }
.picker .suggest button:hover, .picker .suggest button[aria-selected="true"] { background: var(--surface-2); }
.picker .suggest small { color: var(--muted); }

/* ficha */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.panel h3 { font-size: 1.1rem; margin-bottom: 12px; }
dl.kv { margin: 0; display: grid; }
dl.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
dl.kv div:last-child { border-bottom: 0; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--surface-2); margin-block: 8px 14px; }
.stack i { display: block; height: 100%; }
.legend { display: grid; gap: 8px; font-size: .92rem; }
.legend div { display: flex; align-items: center; gap: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.bar-list { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto; gap: 14px; align-items: center; }
.bar-row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff)); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.bar-row b { font-variant-numeric: tabular-nums; font-family: var(--f-mono); font-size: .9rem; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr auto; } .bar-row .track { grid-column: 1 / -1; order: 3; } }

/* marcas */
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.brand { --h: 200; display: grid; gap: 16px; text-decoration: none; padding: 22px; border-radius: var(--r-card); background: linear-gradient(160deg, hsl(var(--h) var(--tint-s) var(--tint-l) / var(--tint-a)), var(--surface) 62%); border: 1px solid var(--line); min-width: 0; transition: transform .2s, border-color .2s; }
.brand:hover { transform: translateY(-3px); border-color: hsl(var(--h) 70% 55% / .7); }
.brand .mono-mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font: 800 1.35rem/1 var(--f-display); font-stretch: 80%; background: hsl(var(--h) 70% 52%); color: #05131a; }
.brand .mono-mark.logo { width: auto; min-width: 54px; max-width: 120px; height: 54px; padding: 9px 12px; background: #fff; justify-self: start; box-shadow: 0 1px 0 rgba(0, 0, 0, .06) inset; }
.brand .mono-mark.logo img { height: 36px; width: auto; max-width: 96px; object-fit: contain; display: block; }
.brand b { font: 800 1.45rem/1 var(--f-display); font-stretch: 85%; letter-spacing: -.02em; }
.brand small { color: var(--muted); display: block; margin-top: 6px; }
.brand .dots { display: flex; gap: 6px; flex-wrap: wrap; }

/* guía / documentación */
.prose { max-width: 70ch; display: grid; gap: 16px; }
.prose p { margin: 0; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
details.faq { border-bottom: 1px solid var(--line); padding-block: 18px; }
details.faq summary { cursor: pointer; font: 700 1.15rem/1.3 var(--f-display); letter-spacing: -.01em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--accent); }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); max-width: 70ch; margin: 12px 0 0; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sw { border-radius: 16px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.sw i { display: block; height: 64px; }
.sw div { padding: 10px 12px; font: 400 .78rem/1.4 var(--f-mono); color: var(--muted); }
.sw b { color: var(--fg); display: block; font-weight: 500; }
pre.code { margin: 0; padding: 18px 20px; border-radius: 16px; background: #07121a; color: #cfe7ef; font: 400 .82rem/1.6 var(--f-mono); overflow-x: auto; border: 1px solid var(--line); }
.code-note { color: var(--muted); font-size: .9rem; }

/* pie */
footer.site { border-top: 1px solid var(--line); padding-block: 56px 100px; margin-top: 40px; }
footer.site .cols { align-items: start; }
footer.site a { color: var(--muted); text-decoration: none; display: block; padding-block: 4px; }
footer.site a:hover { color: var(--fg); }
footer.site .nina { display: inline-block; margin-top: 44px; opacity: .8; transition: opacity .15s; }
footer.site .nina:hover, footer.site .nina:focus-visible { opacity: 1; }
footer.site .nina img { height: 84px; width: auto; filter: var(--logo-filter); }
footer.site p { color: var(--muted); font-size: .9rem; max-width: 46ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > img.bg { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Celulares: la tabla de comparación se apila (una fila por característica, un valor por auto) en vez de pedir deslizar de costado */
@media (max-width: 720px) {
  .cmp-wrap { overflow: hidden; }
  table.cmp, table.cmp thead, table.cmp tbody { display: block; min-width: 0; width: 100%; }
  table.cmp tr { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
  table.cmp thead th.rowh { display: none; }
  table.cmp th.rowh { grid-column: 1 / -1; width: auto; padding: 12px 10px 2px; border-bottom: 0; font: 500 .68rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
  table.cmp td { padding: 2px 10px 12px; border-bottom: 1px solid var(--line); font-size: .88rem; overflow-wrap: anywhere; }
  table.cmp thead th.ch { position: static; padding: 14px 10px; min-width: 0; overflow-wrap: anywhere; }
  table.cmp .ch b { font-size: 1rem; }
  table.cmp .ch .btn { display: flex; width: 100%; margin-top: 6px; padding-inline: 6px; }
  table.cmp .ch br { display: none; }
  table.cmp tr.grp { display: block; }
  table.cmp tr.grp td { display: block; padding: 18px 10px 8px; }
}
/* Barra inferior de comparación: en celular solo el contador y el botón (los autos se quitan desde Comparar) */
@media (max-width: 640px) {
  .tray { padding: 8px 8px 8px 16px; }
  .tray .items { display: none; }
  .tray .lbl { flex: 1; }
}
