/* ==========================================================================
   LEVANTE V12 — styles.css (V2)
   Dirección: blanco, luminoso, redondeado, azul corporativo, sensación
   de producto digital. Sin dependencias, sin build.
   La versión anterior queda archivada en styles-v1.css.
   ========================================================================== */

/* --- TOKENS ------------------------------------------------------------- */
:root {
  --white: #ffffff;
  --surface: #f6f8fc;
  --surface-2: #f1f5fc;
  --tint: #eef4ff;

  --ink: #0b172a;
  --ink-2: #101828;
  --body: #475569;
  --muted: #6b7b93;
  --line: #e5eaf3;
  --line-2: #eef1f7;

  --blue: #2563eb;
  --blue-hi: #1d4ed8;
  --blue-lo: #1e40af;
  --blue-soft: #dbe6ff;
  --blue-glow: rgba(37, 99, 235, 0.16);

  --navy: #0b172a;
  --navy-2: #13233c;

  --ok: #0f9d63;
  --amber: #b7791f;

  --pill: 999px;
  --r-card: 22px;
  --r-card-lg: 28px;
  --r-input: 16px;
  --r-sm: 12px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, 0.06);
  --sh-2: 0 10px 28px -14px rgba(11, 23, 42, 0.18), 0 2px 6px rgba(16, 24, 40, 0.04);
  --sh-3: 0 28px 64px -28px rgba(11, 23, 42, 0.32);
  --sh-blue: 0 12px 26px -12px rgba(37, 99, 235, 0.55);

  --font: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --wrap: 1400px;
  --gut: clamp(1.15rem, 4vw, 3rem);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- RESET -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
a { color: var(--blue); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--blue-hi); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }

/* --- TIPOGRAFÍA --------------------------------------------------------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.03; }
.h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
.h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 700; letter-spacing: -0.025em; }
.h4 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--body); max-width: 58ch; text-wrap: pretty; }
.p { color: var(--body); text-wrap: pretty; max-width: 66ch; }
.small { font-size: 0.9rem; line-height: 1.55; }
.tiny { font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--blue);
}
.eyebrow svg { width: 16px; height: 16px; }

/* Sobre azul marino */
.on-navy { background: var(--navy); color: #e6ecf7; }
.on-navy h1, .on-navy h2, .on-navy h3, .on-navy h4 { color: #fff; }
.on-navy .lead, .on-navy .p { color: #b9c6dc; }
.on-navy .eyebrow { color: #8fb4ff; }
.on-navy a { color: #a7c4ff; }
.on-navy a:hover { color: #fff; }

/* --- LAYOUT ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(3.25rem, 6.5vw, 6rem); }
.section--tight { padding-block: clamp(2.25rem, 4vw, 3.5rem); }
.section--surface { background: var(--surface); }
.stack { display: grid; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.sec-head { display: grid; gap: 0.9rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
@media (min-width: 880px) {
  .sec-head--split {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 2.5rem;
  }
  .sec-head--split .sec-head__aside { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
}

/* --- BOTONES ------------------------------------------------------------ */
.btn {
  --bg: var(--blue);
  --fg: #fff;
  --bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--bd);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              box-shadow 0.25s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { --bg: var(--blue-hi); color: var(--fg); transform: translateY(-1px); box-shadow: var(--sh-blue); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--lg { min-height: 56px; padding-inline: 1.9rem; font-size: 1.02rem; }
.btn--sm { min-height: 40px; padding: 0.4rem 1rem; font-size: 0.875rem; }
.btn--white { --bg: #fff; --fg: var(--ink); --bd: var(--line); box-shadow: var(--sh-1); }
.btn--white:hover { --bg: #fff; --fg: var(--blue); --bd: var(--blue-soft); box-shadow: var(--sh-2); }
.btn--navy { --bg: var(--navy); --fg: #fff; }
.btn--navy:hover { --bg: #17294a; box-shadow: 0 12px 26px -12px rgba(11, 23, 42, 0.6); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line); }
.btn--ghost:hover { --bg: var(--tint); --fg: var(--blue); --bd: var(--blue-soft); box-shadow: none; }
.on-navy .btn--ghost { --fg: #fff; --bd: rgba(255, 255, 255, 0.28); }
.on-navy .btn--ghost:hover { --bg: rgba(255, 255, 255, 0.1); --fg: #fff; --bd: rgba(255, 255, 255, 0.5); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.btn--ai {
  --bg: linear-gradient(120deg, #2563eb, #4f7dff 55%, #6f5cff);
  --fg: #fff;
  background-image: var(--bg);
  position: relative;
}
.btn--ai:hover { box-shadow: 0 14px 30px -12px rgba(63, 90, 235, 0.7); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue);
}
.link-more::after { content: "→"; transition: transform 0.22s var(--ease); }
.link-more:hover::after { transform: translateX(4px); }

/* --- CHIPS / BADGES ----------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: var(--pill);
  background: var(--white);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--sh-1);
  white-space: nowrap;
}
.badge--blue { background: var(--blue); color: #fff; box-shadow: none; }
.badge--soft { background: var(--tint); color: var(--blue-lo); box-shadow: none; }
.badge--demo { background: rgba(255, 255, 255, 0.86); color: var(--muted); backdrop-filter: blur(6px); font-weight: 600; }
.badge--soon { background: var(--surface); color: var(--muted); box-shadow: none; font-weight: 600; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--white);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--tint); }
.chip--blue { background: var(--tint); border-color: var(--blue-soft); color: var(--blue-lo); }

/* --- IMÁGENES ----------------------------------------------------------- */
/* Cada hueco es un <img> con su ruta real en assets/images/. Mientras el
   archivo no exista, script.js marca el contenedor .imgbox como .is-empty
   y se muestra el fondo preparado (sin textos técnicos en pantalla). */
.imgbox {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 72% 14%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%),
    linear-gradient(145deg, #e9eff8 0%, #dde5f2 48%, #ccd8ea 100%);
}
.imgbox > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
}
.imgbox--ratio-16x9 { aspect-ratio: 16 / 9; }
.imgbox--ratio-4x3 { aspect-ratio: 4 / 3; }
.imgbox--ratio-3x2 { aspect-ratio: 3 / 2; }
.imgbox--ratio-1x1 { aspect-ratio: 1 / 1; }
.imgbox--ratio-4x5 { aspect-ratio: 4 / 5; }
.imgbox--fill { position: absolute; inset: 0; }
.imgbox.is-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 118%, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0) 70%);
}
.imgbox.is-empty::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(28px, 14%, 54px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7b93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 15.5v-2l2-5.5h13l2 5.5v2'/%3E%3Cpath d='M3.5 13.5h17M7 15.5v2M17 15.5v2'/%3E%3Ccircle cx='7.5' cy='15.5' r='1.6'/%3E%3Ccircle cx='16.5' cy='15.5' r='1.6'/%3E%3C/svg%3E") center / 58% no-repeat;
}
.imgbox--dark { background: linear-gradient(150deg, #16294a 0%, #0d1b31 55%, #0a1424 100%); }
.imgbox--dark.is-empty::after { background-color: rgba(255, 255, 255, 0.18); }

/* Compatibilidad con los huecos decorativos sin foto */
.img {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(120% 90% at 72% 18%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 55%),
    radial-gradient(90% 70% at 18% 88%, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0) 60%),
    linear-gradient(140deg, #e8eef8 0%, #dde5f2 46%, #cfd9ea 100%);
}
.img::after {
  content: "";
  position: absolute;
  inset: auto -10% -32% -10%;
  height: 62%;
  background: radial-gradient(60% 100% at 50% 0%, rgba(11, 23, 42, 0.1), rgba(11, 23, 42, 0) 70%);
}
.img--16x9 { aspect-ratio: 16 / 9; }
.img--4x3 { aspect-ratio: 4 / 3; }
.img--3x2 { aspect-ratio: 3 / 2; }
.img--1x1 { aspect-ratio: 1 / 1; }
.img--fill { position: absolute; inset: 0; }
.img--dark {
  background:
    radial-gradient(110% 80% at 78% 12%, rgba(120, 160, 255, 0.28), rgba(120, 160, 255, 0) 58%),
    linear-gradient(150deg, #16294a 0%, #0d1b31 55%, #0a1424 100%);
}

/* --- HEADER ------------------------------------------------------------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hdr.is-stuck { border-bottom-color: var(--line-2); box-shadow: 0 4px 20px -14px rgba(11, 23, 42, 0.3); }
.hdr__in {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex: none;
}
.mark b { color: var(--blue); font-weight: 800; }
.mark:hover { color: var(--ink); }
.mark--lg { font-size: clamp(1.5rem, 3vw, 2rem); }
.on-navy .mark { color: #fff; }
.on-navy .mark b { color: #7ea6ff; }

.nav { display: none; }
@media (min-width: 1000px) {
  .nav { display: flex; align-items: center; gap: 0.35rem; margin-inline: auto; }
  .nav a {
    padding: 0.5rem 0.9rem;
    border-radius: var(--pill);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
  }
  .nav a:hover { background: var(--surface); color: var(--blue); }
  .nav a[aria-current="page"] { background: var(--tint); color: var(--blue-lo); }
}
.hdr__act { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; flex: none; }
.hdr__act .btn--cta { display: none; }
@media (min-width: 560px) { .hdr__act .btn--cta { display: inline-flex; } }

.burger {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}
@media (min-width: 1000px) { .burger { display: none; } }
.burger span { display: block; width: 16px; height: 1.8px; border-radius: 2px; background: var(--ink); position: relative; transition: 0.25s var(--ease); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.8px; border-radius: 2px; background: var(--ink); transition: 0.25s var(--ease); }
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* Selector de idioma */
.lang { position: relative; flex: none; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 40px; padding: 0.4rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: #fff; color: var(--ink);
  font-size: 0.88rem; font-weight: 700;
}
.lang__btn::after { content: ""; width: 5px; height: 5px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-1px); }
.lang__btn:hover { border-color: var(--blue-soft); color: var(--blue); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  min-width: 210px; display: grid; gap: 0.15rem; padding: 0.4rem;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu li > * {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.55rem 0.7rem; border-radius: 12px;
  font-size: 0.94rem; font-weight: 600; color: var(--ink);
}
.lang__menu a:hover { background: var(--surface); }
.lang__menu [aria-current="true"] { background: var(--tint); color: var(--blue-lo); }
.lang__menu [aria-disabled="true"] { color: var(--muted); font-weight: 500; cursor: default; }
.lang--inline ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lang--inline li > * {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.8rem; border-radius: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.82rem; font-weight: 700; color: #b9c6dc;
}
.lang--inline [aria-current="true"] { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: transparent; }
.lang--inline [aria-disabled="true"] { color: #8496b3; font-weight: 500; }

/* Drawer móvil */
.drawer {
  position: fixed; inset: 0; z-index: 88;
  background: #fff;
  padding: calc(var(--header-h) + 1.25rem) var(--gut) 2rem;
  display: grid; align-content: start; gap: 0.2rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--line-2);
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.025em; color: var(--ink);
}
.drawer a:hover { color: var(--blue); }
.drawer__foot { display: grid; gap: 0.7rem; margin-top: 1.5rem; }

/* --- HERO --------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(1.75rem, 3.5vw, 3.25rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  isolation: isolate;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -6rem -10% auto -10%;
  height: 70%;
  background:
    radial-gradient(50% 60% at 78% 30%, rgba(37, 99, 235, 0.13), rgba(37, 99, 235, 0) 70%),
    radial-gradient(40% 50% at 12% 8%, rgba(111, 92, 255, 0.1), rgba(111, 92, 255, 0) 70%);
  pointer-events: none;
}
.hero__top { display: grid; gap: clamp(1.75rem, 3vw, 3rem); align-items: center; }
@media (min-width: 1000px) {
  .hero__top { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(2rem, 4vw, 4rem); }
}
.hero__copy { display: grid; gap: 1.15rem; justify-items: start; }
.hero__copy .lead { max-width: 44ch; }
.hero h1 span { color: var(--blue); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.35rem; }

.hero__media { position: relative; }
.hero__shot {
  position: relative;
  border-radius: var(--r-card-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--sh-3);
}
@media (min-width: 1000px) { .hero__shot { aspect-ratio: 16 / 11; } }
.hero__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(11, 23, 42, 0) 58%, rgba(11, 23, 42, 0.14));
  pointer-events: none;
}
.hero__tag {
  position: absolute; z-index: 2; left: 1rem; top: 1rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.hero__note {
  position: absolute; z-index: 2; right: clamp(0.75rem, 2vw, 1.15rem); bottom: clamp(0.75rem, 2vw, 1.15rem);
  display: grid; gap: 0.15rem;
  padding: 0.7rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: var(--sh-2);
  max-width: 15rem;
}
.hero__note strong { font-size: 0.9rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 0.4rem; }
.hero__note strong svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.hero__note span { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* Buscador */
.finder {
  position: relative;
  z-index: 3;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card-lg);
  box-shadow: var(--sh-3);
  padding: clamp(0.9rem, 1.6vw, 1.15rem);
  margin-top: clamp(-2.5rem, -3vw, -1rem);
  margin-inline: clamp(0px, 2vw, 1.5rem);
}
.finder__grid { display: grid; gap: 0.6rem; }
@media (min-width: 720px) { .finder__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) {
  .finder__grid { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: end; gap: 0.5rem; }
  .finder__grid > .btn { min-height: 60px; }
}
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field > label, .field__label { font-size: 0.8rem; font-weight: 700; color: var(--ink); padding-left: 0.15rem; }
.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); font-weight: 500; }
.input:hover, .select:hover, .textarea:hover { border-color: #cdd8ea; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-glow);
}
.select {
  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' stroke='%236b7b93' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}
.textarea { min-height: 120px; resize: vertical; }
.finder__alt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  margin-top: 0.85rem; padding-top: 0.85rem;
  border-top: 1px solid var(--line-2);
}
.finder__alt p { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.finder__alt .btn { margin-left: auto; }
@media (max-width: 559px) { .finder__alt .btn { margin-left: 0; width: 100%; } }

/* Micromensajes integrados en el propio buscador */
.trust-row {
  display: grid;
  gap: 0.85rem 1.5rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-2);
}
@media (min-width: 720px) { .trust-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trust {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.7rem;
  align-items: center;
}
.trust__ico {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--tint);
  color: var(--blue);
  grid-row: span 2;
}
.trust__ico svg { width: 18px; height: 18px; }
.trust h3 { font-size: 0.9rem; font-weight: 800; letter-spacing: -0.01em; }
.trust p { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

/* --- RAIL / CATEGORÍAS -------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.25rem 0 1rem;
  margin-inline: calc(var(--gut) * -1);
  padding-inline: var(--gut);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 760px) { .rail { grid-auto-columns: 186px; } }

.cat {
  position: relative;
  display: grid;
  align-content: end;
  gap: 0.35rem;
  aspect-ratio: 4 / 5;
  padding: 0.9rem;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--sh-2); color: var(--ink); }
.cat .imgbox--fill, .cat .img--fill { border-radius: 0; z-index: 0; }
.cat::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.97) 20%, rgba(255, 255, 255, 0.4) 56%, rgba(255, 255, 255, 0) 100%);
}
.cat:hover .imgbox > img { transform: scale(1.05); }
.cat > * { position: relative; z-index: 2; }
.cat strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; }
.cat span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.promo-card {
  position: relative;
  display: grid;
  align-content: end;
  gap: 0.5rem;
  aspect-ratio: 4 / 5;
  padding: 1.1rem;
  border-radius: var(--r-card);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, #2563eb 0%, #1e40af 58%, #12235c 100%);
  box-shadow: var(--sh-2);
}
.promo-card strong { font-size: 1.08rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.promo-card span { font-size: 0.85rem; color: #cddcff; }
.promo-card .link-more { color: #fff; margin-top: 0.35rem; }

/* --- CARD VEHÍCULO ------------------------------------------------------ */
.cars {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.35rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr));
}
.car {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.car:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--line); }
.car__media { position: relative; }
.car__media .img, .car__media .imgbox { border-radius: 0; }
.car:hover .car__media .imgbox > img { transform: scale(1.04); }
.car__flags { position: absolute; top: 0.7rem; left: 0.7rem; display: flex; gap: 0.35rem; flex-wrap: wrap; z-index: 2; }
.fav {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--ink);
  box-shadow: var(--sh-1);
  transition: all 0.2s var(--ease);
}
.fav svg { width: 18px; height: 18px; }
.fav:hover { color: var(--blue); transform: scale(1.06); }
.fav.is-on { color: #e0364f; }
.fav.is-on svg { fill: currentColor; }

.car__body { display: grid; gap: 0.7rem; padding: 0.95rem 1rem 1.05rem; flex: 1; }
.car__brand { font-size: 0.78rem; font-weight: 700; color: var(--muted); letter-spacing: 0.01em; }
.car__name { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.25; color: var(--ink); }
.car__name a { color: inherit; }
.car__name a:hover { color: var(--blue); }
.car__price { display: flex; align-items: baseline; gap: 0.4rem; }
.car__price strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.car__price span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

.car__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-2);
}
.car__specs li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}
.car__specs svg { width: 17px; height: 17px; color: var(--blue); flex: none; }
.car__specs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car__foot { display: flex; align-items: center; gap: 0.6rem; margin-top: auto; padding-top: 0.85rem; }
.car__loc { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.car__loc svg { width: 15px; height: 15px; }
.car__foot .btn { margin-left: auto; }

/* --- LEVANTE AI --------------------------------------------------------- */
.ai {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card-lg);
  background:
    radial-gradient(90% 120% at 88% 8%, rgba(79, 125, 255, 0.35), rgba(79, 125, 255, 0) 55%),
    radial-gradient(70% 90% at 4% 96%, rgba(111, 92, 255, 0.28), rgba(111, 92, 255, 0) 60%),
    var(--navy);
  color: #e6ecf7;
  padding: clamp(1.5rem, 3.5vw, 3.25rem);
}
.ai__grid { display: grid; gap: clamp(1.75rem, 3vw, 3rem); align-items: center; }
@media (min-width: 1000px) { .ai__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); } }
.ai__copy { display: grid; gap: 1.1rem; justify-items: start; }
.ai__copy h2 { color: #fff; }
.ai__copy .lead { color: #c3d0e6; }
.ai__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ai__pills li {
  padding: 0.4rem 0.85rem;
  border-radius: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.85rem;
  font-weight: 600;
  color: #dbe4f5;
}

/* Ventana de chat */
.chat {
  background: #fff;
  border-radius: var(--r-card-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 460px;
}
.chat__bar {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line-2);
  background: #fff;
}
.chat__avatar {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #2563eb, #6f5cff);
  color: #fff;
}
.chat__avatar svg { width: 18px; height: 18px; }
.chat__who { display: grid; }
.chat__who strong { font-size: 0.95rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.chat__who span { font-size: 0.78rem; color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.chat__who span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chat__bar .badge { margin-left: auto; }

.chat__body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface-2);
  overflow-y: auto;
  max-height: 420px;
}
.msg {
  max-width: 86%;
  padding: 0.7rem 0.95rem;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: msgIn 0.35s var(--ease) both;
}
.msg--ai { background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg--me { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 0.85rem 1rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.criteria {
  align-self: flex-start;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.6rem;
  animation: msgIn 0.35s var(--ease) both;
}
.criteria strong { font-size: 0.86rem; font-weight: 700; color: var(--muted); }
.criteria ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.criteria li {
  padding: 0.32rem 0.7rem;
  border-radius: var(--pill);
  background: var(--tint);
  color: var(--blue-lo);
  font-size: 0.85rem;
  font-weight: 700;
  animation: chipIn 0.3s var(--ease) both;
}
@keyframes chipIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
.criteria .btn { justify-self: start; }

.chat__foot { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border-top: 1px solid var(--line-2); background: #fff; }
.chat__foot .input { min-height: 46px; border-radius: var(--pill); }
.chat__send {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  transition: all 0.2s var(--ease);
}
.chat__send:hover { background: var(--blue-hi); }
.chat__send svg { width: 18px; height: 18px; }
.chat__replay {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 700; color: var(--blue);
}

/* --- PASOS -------------------------------------------------------------- */
.steps { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card-lg);
  box-shadow: var(--sh-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.step__viz {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-card);
  overflow: hidden;
  background: linear-gradient(150deg, #eef4ff, #e3ecff 60%, #dbe6ff);
  display: grid;
  place-items: center;
}
.step__viz svg { width: 56%; height: auto; color: var(--blue); }
.step__n {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}
.step h3 { font-size: 1.18rem; font-weight: 800; }
.step p { font-size: 0.96rem; color: var(--body); }

/* --- BANNER ------------------------------------------------------------- */
.banner {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border-radius: var(--r-card-lg);
  background:
    radial-gradient(80% 130% at 92% 12%, rgba(111, 92, 255, 0.35), rgba(111, 92, 255, 0) 60%),
    linear-gradient(120deg, #1e40af, #2563eb 70%);
  color: #fff;
}
@media (min-width: 860px) { .banner { grid-template-columns: minmax(0, 1fr) auto; } }
.banner h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.banner p { color: #d7e2ff; max-width: 52ch; }
.banner__deco { position: absolute; inset: 0; opacity: 0.5; pointer-events: none; }

/* --- PILARES ------------------------------------------------------------ */
.pillars { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 780px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pillar { display: grid; gap: 0.7rem; align-content: start; }
.pillar__ico {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--tint);
  color: var(--blue);
}
.pillar__ico svg { width: 24px; height: 24px; }
.pillar h3 { font-size: 1.15rem; font-weight: 800; }
.pillar p { font-size: 0.98rem; color: var(--body); }

/* --- BLOG --------------------------------------------------------------- */
.posts { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); }
.post {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.post:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.post .img { border-radius: 0; }
.post__body { display: grid; gap: 0.55rem; padding: 0 1.1rem 1.25rem; }
.post__cat { font-size: 0.78rem; font-weight: 800; color: var(--blue); letter-spacing: 0.01em; }
.post h3 { font-size: 1.06rem; font-weight: 800; line-height: 1.3; }
.post h3 a { color: inherit; }
.post h3 a:hover { color: var(--blue); }
.post p { font-size: 0.92rem; color: var(--body); }

/* --- CTA FINAL ---------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card-lg);
  padding: clamp(2.25rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
  background:
    radial-gradient(70% 120% at 12% 8%, rgba(79, 125, 255, 0.4), rgba(79, 125, 255, 0) 55%),
    radial-gradient(60% 100% at 90% 92%, rgba(111, 92, 255, 0.35), rgba(111, 92, 255, 0) 60%),
    var(--navy);
}
.cta__in { display: grid; gap: 1.25rem; justify-items: center; max-width: 720px; margin-inline: auto; }
.cta h2 { color: #fff; }
.cta .lead { color: #c3d0e6; text-align: center; }

/* --- FOOTER ------------------------------------------------------------- */
.ftr { background: var(--navy); color: #b9c6dc; padding-block: clamp(2.5rem, 5vw, 4rem) 1.75rem; }
.ftr__grid { display: grid; gap: 2.25rem; }
@media (min-width: 700px) { .ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ftr__grid { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 2.5rem; } }
.ftr__brand { display: grid; gap: 1rem; align-content: start; }
.ftr__brand p { font-size: 0.94rem; color: #9fb0cb; max-width: 34ch; }
.ftr__col h4 { font-size: 0.86rem; font-weight: 800; color: #fff; margin-bottom: 0.9rem; letter-spacing: -0.01em; }
.ftr__col ul { display: grid; gap: 0.6rem; }
.ftr__col a { font-size: 0.94rem; color: #b9c6dc; font-weight: 500; }
.ftr__col a:hover { color: #fff; }
.ftr__col .soon { font-size: 0.94rem; color: #8496b3; display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.ftr__legal {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between;
  font-size: 0.85rem; color: #8496b3;
}

/* --- ASISTENTE FLOTANTE ------------------------------------------------- */
.assist { position: fixed; right: clamp(0.85rem, 2vw, 1.6rem); bottom: clamp(0.85rem, 2vw, 1.6rem); z-index: 95; display: grid; justify-items: end; gap: 0.7rem; }
.assist__btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 54px; padding: 0.5rem 1.15rem 0.5rem 0.55rem;
  border-radius: var(--pill);
  background: linear-gradient(130deg, #2563eb, #4f7dff 55%, #6f5cff);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 16px 34px -14px rgba(37, 99, 235, 0.75);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.assist__btn:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 20px 40px -14px rgba(37, 99, 235, 0.85); }
.assist__btn i {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.assist__btn i svg { width: 20px; height: 20px; }
.assist__btn span { display: none; }
@media (min-width: 620px) { .assist__btn span { display: inline; } }

.assist__panel {
  width: min(370px, calc(100vw - 1.7rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.97);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
}
.assist.is-open .assist__panel { opacity: 1; visibility: visible; transform: none; }
.assist__panel .chat { min-height: 0; box-shadow: none; border-radius: 0; }
.assist__panel .chat__body { max-height: 300px; min-height: 220px; }
.assist__quick { display: grid; gap: 0.4rem; padding: 0.85rem 1rem 1rem; border-top: 1px solid var(--line-2); }
.assist__quick button {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: all 0.18s var(--ease);
}
.assist__quick button:hover { border-color: var(--blue-soft); background: var(--tint); color: var(--blue-lo); }
.assist__quick svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.assist__close { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.assist__close:hover { background: var(--surface); color: var(--ink); }

/* --- REVEAL ------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.07s; }
.reveal-d2 { transition-delay: 0.14s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* --- UTILIDADES --------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 200; padding: 0.7rem 1rem; background: var(--navy); color: #fff; border-radius: var(--pill); transform: translateY(-200%); }
.skip:focus { transform: none; color: #fff; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
/* Módulos aún no contratados: añadir la clase para retirarlos por completo. */
.module-off { display: none !important; }

/* ==========================================================================
   PÁGINAS INTERIORES
   ========================================================================== */

/* --- CABECERA DE PÁGINA + BREADCRUMB ----------------------------------- */
.phead { padding-block: clamp(1.5rem, 3vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem); }
.phead--surface { background: var(--surface); border-bottom: 1px solid var(--line-2); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.84rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--blue); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: #c3ccdb; }
.phead__grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .phead__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 2.5rem; } }

/* --- BARRA DE BÚSQUEDA RÁPIDA ------------------------------------------ */
.quickbar {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-2);
}
@media (min-width: 900px) { .quickbar { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; } }

/* --- AVISO LEVANTE AI -------------------------------------------------- */
.ai-hint {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: var(--r-card);
  background: linear-gradient(120deg, var(--tint), #e7efff);
  border: 1px solid var(--blue-soft);
}
@media (min-width: 780px) { .ai-hint { grid-template-columns: auto minmax(0, 1fr) auto; } }
.ai-hint__ico {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 14px; background: #fff; color: var(--blue); box-shadow: var(--sh-1);
}
.ai-hint__ico svg { width: 20px; height: 20px; }
.ai-hint strong { display: block; font-size: 1rem; font-weight: 800; color: var(--ink); letter-spacing: -0.015em; }
.ai-hint p { font-size: 0.9rem; color: var(--body); }
.ai-hint em { font-style: normal; color: var(--blue-lo); font-weight: 700; }

/* --- LISTADO: LAYOUT --------------------------------------------------- */
.listing { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); align-items: start; }
@media (min-width: 1040px) { .listing { grid-template-columns: 296px minmax(0, 1fr); } }

.filters { display: grid; gap: 0; }
@media (max-width: 1039px) {
  .filters {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 96;
    max-height: 88svh;
    background: #fff;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -20px 50px -20px rgba(11, 23, 42, 0.4);
    padding: 0 var(--gut) calc(5.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    transform: translateY(102%);
    transition: transform 0.35s var(--ease);
    align-content: start;
  }
  .filters.is-open { transform: none; }
  .fscrim {
    position: fixed; inset: 0; z-index: 95;
    background: rgba(11, 23, 42, 0.42);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .fscrim.is-open { opacity: 1; visibility: visible; }
}
@media (min-width: 1040px) {
  .filters {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    max-height: calc(100svh - var(--header-h) - 2rem);
    overflow-y: auto;
    padding: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--sh-1);
  }
  .fhead, .ffoot { display: none; }
  .fscrim { display: none; }
}
.fhead {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0 0.85rem;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
}
.fhead::before {
  content: "";
  position: absolute; top: 0.45rem; left: 50%; transform: translateX(-50%);
  width: 42px; height: 4px; border-radius: 4px; background: var(--line);
}
.ffoot {
  position: sticky; bottom: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem;
  padding: 0.85rem 0 1rem;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 40%);
}
.fgroup { border-bottom: 1px solid var(--line-2); padding-block: 1rem; }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup > h3 { font-size: 0.92rem; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 0.75rem; }
.fbody { display: grid; gap: 0.55rem; }
.fbody--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.fbody .input, .fbody .select { min-height: 46px; font-size: 0.94rem; }
.check { display: flex; align-items: center; gap: 0.6rem; font-size: 0.94rem; font-weight: 500; color: var(--ink); cursor: pointer; min-height: 32px; }
.check input {
  appearance: none;
  width: 20px; height: 20px; flex: none;
  border: 1.6px solid #c9d4e6; border-radius: 6px;
  background: #fff;
  transition: all 0.18s var(--ease);
}
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { content: ""; display: block; width: 100%; height: 100%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 76% no-repeat; }
.check:hover input { border-color: var(--blue); }
.swatch { display: inline-flex; align-items: center; gap: 0.5rem; }
.swatch i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(11, 23, 42, 0.12); flex: none; }

/* --- LISTADO: RESULTADOS ----------------------------------------------- */
.rbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem;
  padding-bottom: 1rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--line-2);
}
.rbar__count { font-size: 0.98rem; font-weight: 700; color: var(--ink); }
.rbar__count b { color: var(--blue); }
.rbar__tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.rbar__tools .select { min-height: 44px; width: auto; min-width: 186px; font-size: 0.92rem; border-radius: var(--pill); }
.mobile-only { display: inline-flex; }
@media (min-width: 1040px) { .mobile-only { display: none; } }

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.1rem; }
.tags:empty { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.35rem 0.8rem;
  border-radius: var(--pill);
  background: var(--tint);
  color: var(--blue-lo);
  font-size: 0.85rem;
  font-weight: 700;
}
.tag button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-lo); font-size: 0.8rem; }
.tag button:hover { background: rgba(37, 99, 235, 0.14); }

.results { display: grid; gap: clamp(0.85rem, 1.6vw, 1.2rem); }
.results--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); }

/* Card horizontal */
.lcard {
  display: grid;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.lcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line); }
@media (min-width: 620px) { .lcard { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); } }
.lcard__media { position: relative; }
.lcard__media .imgbox { height: 100%; min-height: 200px; }
.lcard:hover .lcard__media .imgbox > img { transform: scale(1.04); }
.lcard__flags { position: absolute; top: 0.7rem; left: 0.7rem; display: flex; gap: 0.35rem; flex-wrap: wrap; z-index: 2; }
.lcard__body { display: grid; gap: 0.75rem; padding: clamp(1rem, 2vw, 1.35rem); align-content: start; }
.lcard__top { display: flex; align-items: flex-start; gap: 1rem; }
.lcard__title { display: grid; gap: 0.15rem; }
.lcard__title p { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.lcard__title h3 { font-size: clamp(1.1rem, 1.6vw, 1.32rem); font-weight: 800; letter-spacing: -0.025em; }
.lcard__title h3 a { color: inherit; }
.lcard__title h3 a:hover { color: var(--blue); }
.lcard__price { margin-left: auto; text-align: right; display: grid; gap: 0.1rem; }
.lcard__price strong { font-size: clamp(1.2rem, 1.8vw, 1.45rem); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.lcard__price span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.lcard__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  padding-block: 0.35rem;
}
@media (min-width: 860px) { .lcard__specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lcard__specs li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.45rem; align-items: center; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.lcard__specs svg { width: 17px; height: 17px; color: var(--blue); flex: none; }
.lcard__specs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--line-2); }
.lcard__foot .btn { margin-left: auto; }
.iconbtn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--ink);
  transition: all 0.18s var(--ease);
}
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--tint); }
.iconbtn.is-on { border-color: var(--blue); background: var(--tint); color: var(--blue); }
.iconbtn.is-on.fav-like { color: #e0364f; border-color: #f6c6cd; background: #fff1f3; }
.iconbtn.is-on.fav-like svg { fill: currentColor; }

.empty {
  display: grid; gap: 1rem; justify-items: start;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

/* --- COMPARADOR -------------------------------------------------------- */
.ctray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 92;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -20px rgba(11, 23, 42, 0.35);
  padding: 0.75rem var(--gut) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.32s var(--ease);
}
.ctray.is-open { transform: none; }
.ctray__in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; max-width: var(--wrap); margin-inline: auto; }
.cslots { display: flex; gap: 0.5rem; flex: 1; flex-wrap: wrap; }
.cslot {
  display: flex; align-items: center; gap: 0.5rem;
  min-width: 150px; min-height: 44px;
  padding: 0.4rem 0.7rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  font-size: 0.86rem;
  color: var(--muted);
}
.cslot.is-filled { border-style: solid; border-color: var(--blue-soft); background: var(--tint); color: var(--ink); font-weight: 700; }
.cslot button { margin-left: auto; color: var(--muted); }
.cslot button:hover { color: var(--blue); }

/* --- MODAL ------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: clamp(0.6rem, 3vw, 2rem);
  background: rgba(11, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 1060px;
  max-height: 92svh;
  overflow: auto;
  background: #fff;
  border-radius: var(--r-card-lg);
  box-shadow: var(--sh-3);
  transform: translateY(12px) scale(0.99);
  transition: transform 0.28s var(--ease);
}
.modal.is-open .modal__panel { transform: none; }
.modal__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.modal__head h2 { font-size: 1.1rem; font-weight: 800; }
.modal__head .iconbtn { margin-left: auto; }
.modal__body { padding: clamp(1rem, 2.5vw, 1.75rem); }

.cmp { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.cmp th, .cmp td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.cmp thead th { font-size: 0.86rem; font-weight: 800; color: var(--ink); }
.cmp tbody th { font-size: 0.86rem; font-weight: 600; color: var(--muted); width: 30%; }
.cmp td { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp-scroll { overflow-x: auto; }

/* --- FICHA DE VEHÍCULO ------------------------------------------------- */
.gallery { display: grid; gap: 0.55rem; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); grid-template-rows: repeat(2, 1fr); }
  .gallery__main { grid-row: span 2; }
  .gallery > .imgbox { border-radius: var(--r-card); }
}
.gallery__main { position: relative; border-radius: var(--r-card); overflow: hidden; }
.gallery__main .imgbox { border-radius: 0; }
.gallery .imgbox { border-radius: var(--r-card); cursor: zoom-in; }
.gallery__more {
  position: absolute; right: 0.85rem; bottom: 0.85rem; z-index: 3;
}
.gallery__swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-card); }
.gallery__swipe::-webkit-scrollbar { display: none; }
.gallery__swipe > * { flex: 0 0 100%; scroll-snap-align: center; }
.gallery__dots { display: flex; justify-content: center; gap: 0.35rem; }
.gallery__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: all 0.2s var(--ease); }
.gallery__dots i.is-on { background: var(--blue); width: 18px; border-radius: 3px; }

.vlayout { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
@media (min-width: 1040px) { .vlayout { grid-template-columns: minmax(0, 1fr) 372px; } }

.vhead { display: grid; gap: 0.6rem; }
.vhead__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.vhead h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.vhead__sub { font-size: 1.02rem; font-weight: 600; color: var(--muted); }

.keyspecs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
@media (min-width: 700px) { .keyspecs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.keyspec {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.15rem 0.7rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: 16px;
}
.keyspec svg { width: 22px; height: 22px; color: var(--blue); grid-row: span 2; }
.keyspec span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.keyspec strong { font-size: 1rem; font-weight: 800; color: var(--ink); letter-spacing: -0.015em; }

.vaside {
  display: grid; gap: 0.9rem;
  padding: clamp(1.15rem, 2.2vw, 1.6rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card-lg);
  box-shadow: var(--sh-2);
}
@media (min-width: 1040px) { .vaside { position: sticky; top: calc(var(--header-h) + 1rem); } }
.vprice { display: grid; gap: 0.2rem; }
.vprice strong { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.035em; color: var(--ink); }
.vprice span { font-size: 0.86rem; color: var(--muted); font-weight: 600; }

.vblock { padding-block: clamp(1.75rem, 3vw, 2.5rem); border-top: 1px solid var(--line-2); }
.vblock > h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin-bottom: 1.1rem; }
.deflist { display: grid; gap: 0; }
@media (min-width: 600px) { .deflist { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; } }
.deflist > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-2); }
.deflist dt { font-size: 0.94rem; color: var(--muted); font-weight: 500; }
.deflist dd { font-size: 0.94rem; color: var(--ink); font-weight: 700; text-align: right; }

.eqtabs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.eqtab {
  min-height: 40px; padding: 0.4rem 0.95rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: #fff; color: var(--ink);
  font-size: 0.9rem; font-weight: 700;
  transition: all 0.18s var(--ease);
}
.eqtab:hover { border-color: var(--blue-soft); color: var(--blue); }
.eqtab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.eqlist { display: grid; gap: 0.15rem 1.75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 680px) { .eqlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.eqlist li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--line-2); font-size: 0.94rem; color: var(--ink); font-weight: 500; }
.eqlist svg { width: 17px; height: 17px; color: var(--blue); }
.eqlist li[hidden] { display: none; }

.checkgrid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.checkitem {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem; align-items: start;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border-radius: 16px;
  font-size: 0.94rem;
}
.checkitem svg { width: 18px; height: 18px; color: var(--blue); margin-top: 2px; }
.checkitem strong { display: block; font-weight: 800; color: var(--ink); font-size: 0.96rem; }
.checkitem span { font-size: 0.86rem; color: var(--muted); }

.costs { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.costs > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--line-2); }
.costs > div:last-child { border-bottom: 0; }
.costs dt { font-size: 0.94rem; color: var(--body); }
.costs dd { font-size: 0.94rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.costs .is-total { background: var(--tint); }
.costs .is-total dt { font-weight: 800; color: var(--ink); }
.costs .is-total dd { font-size: 1.15rem; font-weight: 800; color: var(--blue-lo); }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem var(--gut) calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.32s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
@media (min-width: 1040px) { .sticky-cta { display: none; } }
.sticky-cta__price { display: grid; }
.sticky-cta__price small { font-size: 0.68rem; color: var(--muted); font-weight: 600; }
.sticky-cta__price strong { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.sticky-cta .btn { margin-left: auto; }
body.has-sticky-cta .assist { bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1040px) { body.has-sticky-cta .assist { bottom: clamp(0.85rem, 2vw, 1.6rem); } }

/* --- PROCESO ALTERNADO ------------------------------------------------- */
.flow { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.flowstep { display: grid; gap: clamp(1rem, 2.5vw, 2.25rem); align-items: center; }
@media (min-width: 860px) {
  .flowstep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flowstep:nth-child(even) .flowstep__media { order: -1; }
}
.flowstep__media { border-radius: var(--r-card-lg); overflow: hidden; box-shadow: var(--sh-2); }
.flowstep__body { display: grid; gap: 0.7rem; justify-items: start; }
.flowstep__n {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.3rem 0.35rem;
  border-radius: var(--pill);
  background: var(--tint);
  color: var(--blue-lo);
  font-size: 0.82rem;
  font-weight: 800;
}
.flowstep__n b {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; background: var(--blue); color: #fff; font-size: 0.78rem;
}
.flowstep h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }

/* --- FAQ --------------------------------------------------------------- */
.faq { display: grid; gap: 0.6rem; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.faq__item:hover { border-color: var(--blue-soft); }
.faq__item.is-open { border-color: var(--blue-soft); box-shadow: var(--sh-1); }
.faq__q {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: 1.05rem 1.2rem;
  text-align: left;
  font-size: 1.02rem; font-weight: 700; color: var(--ink); letter-spacing: -0.015em;
}
.faq__q:hover { color: var(--blue); }
.faq__q i { position: relative; width: 16px; height: 16px; flex: none; }
.faq__q i::before, .faq__q i::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; transition: transform 0.28s var(--ease); }
.faq__q i::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq__q i::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq__q[aria-expanded="true"] i::after { transform: scaleY(0); }
.faq__a { overflow: hidden; height: 0; transition: height 0.28s var(--ease); }
.faq__a > div { padding: 0 1.2rem 1.15rem; }
.faq__a p { font-size: 0.96rem; color: var(--body); max-width: 72ch; }

/* --- CHAT A PANTALLA COMPLETA (importamos tu coche) -------------------- */
.chat--page { min-height: 0; }
.chat--page .chat__body { max-height: min(62svh, 560px); min-height: 340px; }
.chat__suggest { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0 1rem 0.85rem; }
.chat__suggest button {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: #fff; color: var(--ink);
  font-size: 0.86rem; font-weight: 600;
  transition: all 0.18s var(--ease);
}
.chat__suggest button:hover { border-color: var(--blue-soft); background: var(--tint); color: var(--blue-lo); }
.leadform { display: grid; gap: 0.85rem; }
@media (min-width: 640px) { .leadform__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; } }
.segments { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.segment {
  position: relative;
  flex: 1 1 auto; min-width: 116px; min-height: 46px;
  display: grid; place-items: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--r-input);
  background: #fff;
  font-size: 0.94rem; font-weight: 600; color: var(--ink);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment:hover { border-color: var(--blue-soft); }
.segment:has(input:checked) { border-color: var(--blue); background: var(--tint); color: var(--blue-lo); font-weight: 700; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-pick {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 42px; padding: 0.45rem 1rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: #fff; color: var(--ink);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick:hover { border-color: var(--blue-soft); }
.chip-pick:has(input:checked) { border-color: var(--blue); background: var(--tint); color: var(--blue-lo); font-weight: 700; }
.chip-pick:has(input:checked)::before { content: "✓"; font-size: 0.8rem; }
.done {
  display: grid; gap: 1rem; justify-items: center; text-align: center;
  padding: clamp(1.75rem, 4vw, 3rem);
}
.done__tick {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; background: var(--tint); color: var(--blue);
}
.done__tick svg { width: 28px; height: 28px; }

/* --- BLOG -------------------------------------------------------------- */
.catbar { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.catbar button, .catbar a {
  min-height: 40px; padding: 0.4rem 1rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: #fff; color: var(--ink);
  font-size: 0.9rem; font-weight: 700;
  display: inline-flex; align-items: center;
  transition: all 0.18s var(--ease);
}
.catbar button:hover, .catbar a:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--tint); }
.catbar [aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.feature {
  display: grid; gap: 0;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card-lg);
  overflow: hidden;
  box-shadow: var(--sh-2);
}
@media (min-width: 900px) { .feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.feature__body { display: grid; gap: 0.85rem; align-content: center; padding: clamp(1.35rem, 3vw, 2.5rem); justify-items: start; }
.feature__body h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.post__meta li:not(:last-child)::after { content: "·"; margin-left: 0.5rem; }
.post[hidden] { display: none; }

/* --- ARTÍCULO ---------------------------------------------------------- */
.article { display: grid; gap: clamp(1.75rem, 3vw, 3rem); align-items: start; }
@media (min-width: 1040px) { .article { grid-template-columns: 254px minmax(0, 1fr); } }
.toc { display: none; }
@media (min-width: 1040px) {
  .toc {
    display: grid; gap: 0.5rem;
    position: sticky; top: calc(var(--header-h) + 1.25rem);
    padding: 1.15rem;
    background: var(--surface);
    border-radius: var(--r-card);
  }
}
.toc strong { font-size: 0.86rem; font-weight: 800; color: var(--ink); }
.toc a { font-size: 0.92rem; color: var(--body); font-weight: 500; padding: 0.3rem 0; border-left: 2px solid var(--line); padding-left: 0.7rem; }
.toc a:hover { color: var(--blue); border-color: var(--blue-soft); }
.toc a.is-active { color: var(--blue-lo); font-weight: 700; border-color: var(--blue); }

.prose { max-width: 72ch; display: grid; gap: 1.15rem; }
.article > *, .prose > * { min-width: 0; }
.prose { overflow-wrap: break-word; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin-top: 1.25rem; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose h3 { font-size: clamp(1.12rem, 1.8vw, 1.35rem); margin-top: 0.5rem; }
.prose p { font-size: 1.04rem; line-height: 1.7; color: var(--body); }
.prose ul, .prose ol { display: grid; gap: 0.6rem; }
.prose ul li, .prose ol li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.65rem; font-size: 1.02rem; line-height: 1.65; color: var(--body); }
.prose ul li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-top: 0.62rem; }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--tint); color: var(--blue-lo); font-size: 0.8rem; font-weight: 800; margin-top: 0.15rem; }
.prose figure { display: grid; gap: 0.55rem; }
.prose figcaption { font-size: 0.85rem; color: var(--muted); }
.prose .imgbox { border-radius: var(--r-card); }
.callout {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--r-card);
  background: var(--tint);
  border: 1px solid var(--blue-soft);
}
.callout svg { width: 22px; height: 22px; color: var(--blue); margin-top: 2px; }
.callout strong { display: block; color: var(--ink); font-weight: 800; margin-bottom: 0.2rem; }
.callout p { font-size: 0.96rem; color: var(--body); }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-2); }

/* --- CTA BAND (común a todas las páginas) ------------------------------ */
.ctaband {
  position: relative; overflow: hidden;
  border-radius: var(--r-card-lg);
  padding: clamp(2rem, 4.5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
  background:
    radial-gradient(70% 120% at 12% 8%, rgba(79, 125, 255, 0.4), rgba(79, 125, 255, 0) 55%),
    radial-gradient(60% 100% at 90% 92%, rgba(111, 92, 255, 0.35), rgba(111, 92, 255, 0) 60%),
    var(--navy);
}
.ctaband__in { display: grid; gap: 1.15rem; justify-items: center; max-width: 700px; margin-inline: auto; }
.ctaband h2 { color: #fff; }
.ctaband p { color: #c3d0e6; font-size: clamp(1rem, 1.4vw, 1.15rem); }
