/* ============================================================
   Home — rediseño "Espectro"
   Una sola key, todo el espectro de modelos: el color de cada proveedor
   (--pc) es la fuente de profundidad (auroras, brillos, bordes); la paleta
   base (índigo) aporta brand, superficies y tipografía.
   Solo lee tokens de 01-tokens.css, nunca hex de paleta.
   ============================================================ */

/* Primitivas compartidas (avatar, auroras, secciones, CTA final, reveal) en spectrum.css.
   El @property --pc que anima el color del hero también vive ahí. */

:root {
  --lp-gutter: clamp(1rem, 4vw, 1.5rem);
  --lp-radius: 20px;
  --lp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lp-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

/* ── Utilidades ───────────────────────────────────────────────── */
.lp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-ink);
  text-decoration: none;
}
.lp-link span { transition: transform 0.18s var(--lp-ease); }
.lp-link:hover { text-decoration: none; color: var(--brand-ink); }
.lp-link:hover span { transform: translateX(3px); }

/* ══ Hero ═══════════════════════════════════════════════════════ */
.lp-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--lp-gutter) clamp(3rem, 6vw, 5rem);
  transition: --pc 0.9s var(--lp-ease);
}

.lp-hero .sp-aurora--1 {
  width: 720px; height: 520px;
  animation: lp-drift 22s ease-in-out infinite alternate;
}
.lp-hero .sp-aurora--2 {
  width: 520px; height: 420px;
  top: auto; right: auto; bottom: -220px; left: 30%;
  opacity: calc(var(--aurora-a) * 0.75);
  animation: lp-drift 26s ease-in-out infinite alternate-reverse;
}
.lp-aurora-pc {
  will-change: transform;
  width: 620px; height: 620px;
  top: -40px; right: -120px;
  background: var(--pc);
  opacity: calc(var(--aurora-a) * 1.15);
}
@keyframes lp-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, 40px, 0) scale(1.08); }
}

.lp-hero-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.lp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 1.6rem;
}
.lp-kicker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent);
  animation: lp-pulse 2.2s ease-in-out infinite;
}
@keyframes lp-pulse { 50% { opacity: 0.45; } }

.lp-title {
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 1.4rem;
  color: var(--text);
  text-wrap: balance;
}
.lp-lead {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2.1rem;
}
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.lp-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 1.6rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.lp-trust li { display: inline-flex; align-items: center; gap: 0.45rem; }
.lp-trust li::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 9px no-repeat,
    var(--success);
}

/* ── Consola animada ──────────────────────────────────────────── */
.lp-console { position: relative; }
.lp-console-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--pc) 38%, var(--border));
  background:
    var(--card-sheen),
    linear-gradient(180deg, color-mix(in srgb, var(--pc) 10%, var(--surface)) 0%, var(--surface) 48%);
  box-shadow:
    0 40px 90px -40px color-mix(in srgb, var(--pc) 70%, transparent),
    var(--shadow-lg);
  overflow: hidden;
}
.lp-console-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--lp-mono);
  font-size: 0.74rem;
}
.lp-console-method {
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  font-weight: 700;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}
.lp-console-path { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-console-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lp-console-live span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: 0 0 10px var(--pc);
  animation: lp-pulse 1.4s ease-in-out infinite;
}
.lp-console-body { padding: 1.3rem 1.3rem 1.1rem; display: flex; flex-direction: column; gap: 0.95rem; }
.lp-console-who { display: flex; align-items: center; gap: 0.8rem; }
.lp-console-who-text { display: flex; flex-direction: column; min-width: 0; }
.lp-console-name {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-console-pname { font-size: 0.78rem; color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text)); font-weight: 600; }
.lp-console-code {
  display: block;
  font-family: var(--lp-mono);
  font-size: 0.82rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--hairline);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-console-code .t-k { color: var(--text-muted); }
.lp-console-code .t-p { color: var(--text-muted); padding: 0 0.15rem; }
.lp-console-code .t-s { color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text)); font-weight: 600; }
.lp-console-prompt {
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.lp-console-prompt-tag {
  font-family: var(--lp-mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.lp-console-stream { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.1rem; }
.lp-console-stream span {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--pc) 45%, var(--surface-2)),
    color-mix(in srgb, var(--pc) 14%, var(--surface-2)));
  transform-origin: left center;
}
.lp-console-stream span:nth-child(1) { width: 94%; }
.lp-console-stream span:nth-child(2) { width: 100%; }
.lp-console-stream span:nth-child(3) { width: 81%; }
.lp-console-stream span:nth-child(4) { width: 52%; }
.lp-console-stream.is-streaming span { animation: lp-stream 1.6s var(--lp-ease) both; }
.lp-console-stream.is-streaming span:nth-child(2) { animation-delay: 0.25s; }
.lp-console-stream.is-streaming span:nth-child(3) { animation-delay: 0.5s; }
.lp-console-stream.is-streaming span:nth-child(4) { animation-delay: 0.75s; }
@keyframes lp-stream {
  from { transform: scaleX(0); opacity: 0.4; }
  to   { transform: scaleX(1); opacity: 1; }
}

.lp-console-body.is-swapping .lp-console-who,
.lp-console-body.is-swapping .lp-console-code { animation: lp-swap 0.5s var(--lp-ease); }
@keyframes lp-swap {
  from { opacity: 0; transform: translateY(6px); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.lp-console-meter {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  border-top: 1px solid var(--hairline);
}
.lp-meter-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1.1rem;
  min-width: 0;
}
.lp-meter-cell + .lp-meter-cell { border-left: 1px solid var(--hairline); }
.lp-meter-lbl {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.lp-meter-val {
  font-family: var(--lp-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lp-meter-val em { font-style: normal; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.lp-meter-cost { background: color-mix(in srgb, var(--pc) 9%, transparent); }
.lp-meter-cost .lp-meter-val { font-size: 1.18rem; font-weight: 700; color: color-mix(in srgb, var(--pc) 55%, var(--text)); }

.lp-console-switch {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem;
  border-top: 1px solid var(--hairline);
}
.lp-switch-dot {
  position: relative;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}
.lp-switch-dot::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 9px; height: 9px;
  border-radius: 99px;
  background: var(--dot);
  opacity: 0.45;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--lp-ease), opacity 0.2s;
}
.lp-switch-dot:hover::after { opacity: 0.85; }
.lp-switch-dot[aria-pressed="true"]::after { width: 22px; opacity: 1; box-shadow: 0 0 10px var(--dot); }
.lp-switch-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lp-console-note {
  margin: 0.9rem 0.25rem 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

/* ══ Proveedores ════════════════════════════════════════════════ */
.lp-providers { padding: 0 var(--lp-gutter); }
.lp-providers-inner { max-width: var(--content-w); margin: 0 auto; text-align: center; }
.lp-providers-title {
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  letter-spacing: -0.005em;
}
.lp-providers-title strong { color: var(--text); font-weight: 700; }
.lp-spectrum-bar {
  display: flex;
  gap: 3px;
  height: 6px;
  max-width: 760px;
  margin: 0 auto 1.4rem;
  border-radius: 99px;
  overflow: hidden;
}
.lp-spectrum-bar span { background: var(--pc); min-width: 6px; }
.lp-provider-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}
.lp-prov {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.35rem 0.55rem 0.35rem 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--lp-ease), box-shadow 0.2s;
}
.lp-prov:hover {
  text-decoration: none;
  color: var(--text);
  border-color: color-mix(in srgb, var(--pc) 55%, var(--border));
  box-shadow: 0 10px 26px -14px color-mix(in srgb, var(--pc) 80%, transparent);
  transform: translateY(-2px);
}
.lp-prov-n {
  font-family: var(--lp-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 7px;
  color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text));
  background: color-mix(in srgb, var(--pc) 14%, transparent);
}

/* ══ Duelos: título (las secciones comunes viven en spectrum.css) ═ */
.lp-duel h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 0.7rem;
  text-wrap: balance;
}

/* ══ Bento ══════════════════════════════════════════════════════ */
.lp-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "api   api   api   chat  chat  chat"
    "cli   cli   cli   chat  chat  chat"
    "pay   pay   audit audit web   web";
  gap: 1rem;
}
.lp-tile-api   { grid-area: api;   --tc: var(--aurora-1); }
.lp-tile-chat  { grid-area: chat;  --tc: var(--aurora-2); }
.lp-tile-cli   { grid-area: cli;   --tc: var(--aurora-3); }
.lp-tile-pay   { grid-area: pay;   --tc: var(--brand); }
.lp-tile-audit { grid-area: audit; --tc: var(--accent); }
.lp-tile-web   { grid-area: web;   --tc: var(--success); }

.lp-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.6rem;
  border-radius: var(--lp-radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--tc) 16%, transparent), transparent 60%),
    var(--card-sheen),
    var(--surface);
  overflow: hidden;
  min-width: 0;
  transition: border-color 0.25s, transform 0.25s var(--lp-ease), box-shadow 0.25s;
}
.lp-tile:hover {
  border-color: color-mix(in srgb, var(--tc) 45%, var(--border));
  box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--tc) 70%, transparent);
}
.lp-tile h3 { font-size: 1.2rem; font-weight: 750; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.lp-tile p { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); margin: 0; }
.lp-tile p code {
  font-family: var(--lp-mono);
  font-size: 0.82em;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
}
.lp-tile-head { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.2rem; }
.lp-tile-icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  color: color-mix(in srgb, var(--tc) var(--ink-mix), var(--text));
  background: color-mix(in srgb, var(--tc) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 28%, transparent);
}
.lp-tile-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lp-tile-foot { margin-top: auto; padding-top: 0.4rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Código (API) y terminal (CLI) — siempre sobre fondo oscuro, en ambos temas. */
.lp-code, .lp-term {
  position: relative;
  border-radius: 14px;
  background: var(--code-bg);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  color: #E6E8F0;
  margin-top: 0.3rem;
}
.lp-code-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lp-code-dots { display: inline-flex; gap: 5px; }
.lp-code-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.lp-code-lang { font-family: var(--lp-mono); font-size: 0.7rem; color: #8B90A3; }
.lp-code-copy {
  margin-left: auto;
  min-height: 28px;
  padding: 0 0.65rem;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #C9CCD8;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.lp-code-copy:hover { background: rgba(255,255,255,0.1); color: #fff; }
.lp-code-copy:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lp-code pre, .lp-term pre {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  font-family: var(--lp-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  background: transparent;
  border: 0;
  color: inherit;
}
.lp-code .t-k, .lp-term .t-k { color: color-mix(in srgb, var(--brand) 55%, #fff); }
.lp-code .t-s, .lp-term .t-s { color: #7EE2B8; }
.lp-code .t-c, .lp-term .t-c { color: #7C8197; }
.lp-term pre { padding-right: 5.5rem; }
.lp-term-copy { position: absolute; top: 0.6rem; right: 0.6rem; }
.lp-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.25em;
  vertical-align: text-bottom;
  background: #7EE2B8;
  animation: lp-blink 1.1s steps(1) infinite;
}
@keyframes lp-blink { 50% { opacity: 0; } }

/* Chat mockup */
.lp-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding: 1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--hairline);
  flex: 1;
}
.lp-chat-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.lp-chat-model {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--lp-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text));
  background: color-mix(in srgb, var(--pc) 13%, transparent);
}
.lp-chat-model i { width: 6px; height: 6px; border-radius: 50%; background: var(--pc); }
.lp-chat-cost { font-family: var(--lp-mono); font-size: 0.7rem; color: var(--text-muted); }
.lp-chat-msg { font-size: 0.84rem; line-height: 1.55; max-width: 88%; }
.lp-chat-user {
  align-self: flex-end;
  padding: 0.55rem 0.85rem;
  border-radius: 14px 14px 4px 14px;
  background: var(--brand);
  color: var(--on-brand);
}
.lp-chat-ai {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: 4px 14px 14px 14px;
  background: var(--surface-2);
  color: var(--text);
}
.lp-chat-math {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--brand-ink);
}
.lp-frac { display: inline-flex; flex-direction: column; align-items: center; font-size: 0.76rem; line-height: 1.25; }
.lp-frac span:first-child { border-bottom: 1px solid currentColor; padding: 0 0.25rem 1px; }
.lp-chat-typing { display: inline-flex; gap: 3px; padding-top: 0.15rem; }
.lp-chat-typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: lp-typing 1.2s ease-in-out infinite;
}
.lp-chat-typing i:nth-child(2) { animation-delay: 0.2s; }
.lp-chat-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes lp-typing { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
.lp-chat-input {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.lp-chat-send {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
}
.lp-chat-feats { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lp-chat-feats span {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Pay-as-you-go */
.lp-pay { margin-top: auto; display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.6rem; }
.lp-pay-bar { display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; }
.lp-pay-net { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 70%, var(--accent)), var(--brand)); }
.lp-pay-fee {
  min-width: 10px;
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--text-muted) 45%, transparent) 0 3px,
    transparent 3px 6px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-muted) 40%, transparent);
  border-radius: 0 99px 99px 0;
}
.lp-pay-legend { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.lp-pay-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.lp-pay-legend strong { font-family: var(--lp-mono); color: var(--text); font-weight: 600; }
.lp-pay-legend i { width: 9px; height: 9px; border-radius: 3px; }
.lp-pay-sw-net { background: var(--brand); }
.lp-pay-sw-fee { background: color-mix(in srgb, var(--text-muted) 55%, transparent); }
.lp-pay-note { font-size: 0.72rem; color: var(--text-muted); }

/* Audit log */
.lp-log { list-style: none; margin: auto 0 0; padding: 0.6rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; }
.lp-log li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.76rem;
  min-width: 0;
}
.lp-log i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 8px var(--pc); flex-shrink: 0; }
.lp-log code {
  font-family: var(--lp-mono);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.lp-log-cost { font-family: var(--lp-mono); color: var(--text-muted); white-space: nowrap; }

/* Web search */
.lp-cite { margin-top: auto; padding-top: 0.6rem; display: flex; flex-direction: column; gap: 0.55rem; }
.lp-cite-line { display: flex; align-items: center; gap: 0.45rem; }
.lp-cite-line span {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 30%, var(--surface-2)), var(--surface-2));
}
.lp-cite-short span { flex: 0 0 62%; }
.lp-cite-line b {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--tc) var(--ink-mix), var(--text));
  background: color-mix(in srgb, var(--tc) 16%, transparent);
}

/* ══ Duelos — franja oscura en ambos temas ══════════════════════ */
.lp-duel {
  /* tokens locales: el panel es siempre profundo, así que el texto es siempre claro */
  --text: #F4F4F5;
  --text-muted: #A9AFC0;
  --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --hairline: rgba(255,255,255,0.07);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border-radius: 28px;
  background:
    radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--danger) 26%, transparent), transparent 60%),
    radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--aurora-1) 30%, transparent), transparent 60%),
    var(--panel-deep);
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lp-duel h2 { color: var(--text); }
.lp-duel p { font-size: 0.95rem; line-height: 1.7; color: var(--text-muted); max-width: 48ch; margin: 0 0 1.4rem; }
.lp-eyebrow-duel { color: color-mix(in srgb, var(--danger) 70%, #fff); }
.lp-duel-steps { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.lp-duel-steps li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; color: var(--text); }
.lp-duel-steps b {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  font-size: 0.72rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.lp-duel-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.65rem; }
.lp-duel-cta span { font-size: 0.76rem; color: var(--text-muted); }

.lp-arena { display: flex; flex-direction: column; gap: 1rem; }
.lp-arena-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.lp-fighter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 0.85rem 0.9rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  overflow: hidden;
}
.lp-fighter::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--fc);
}
.lp-fighter-id { font-family: var(--lp-mono); font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-align: center; }
.lp-fighter-lines { display: flex; flex-direction: column; gap: 6px; }
.lp-fighter-lines i { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.1); }
.lp-fighter-lines i:nth-child(1) { width: 100%; }
.lp-fighter-lines i:nth-child(2) { width: 86%; }
.lp-fighter-lines i:nth-child(3) { width: 94%; }
.lp-fighter-lines i:nth-child(4) { width: 58%; }
.lp-fighter-score {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.lp-fighter-score::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--s);
  border-radius: inherit;
  background: var(--fc);
  transform-origin: left;
}
.lp-fighter-win {
  border-color: color-mix(in srgb, var(--fc) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fc) 60%, transparent), 0 18px 40px -16px var(--fc);
  background: color-mix(in srgb, var(--fc) 12%, rgba(255,255,255,0.03));
}
.lp-fighter-win .lp-fighter-id { color: #fff; }
.lp-fighter-win .lp-fighter-lines i { background: color-mix(in srgb, var(--fc) 40%, rgba(255,255,255,0.1)); }
.lp-crown {
  position: absolute;
  top: 8px; right: 8px;
  color: #F3CF7A;
  filter: drop-shadow(0 0 6px rgba(243,207,122,0.6));
}
.lp-verdict {
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.lp-verdict-lbl {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.lp-verdict p { margin: 0; font-size: 0.88rem; font-style: italic; color: var(--text); max-width: none; }

/* Animación del duelo al entrar en viewport */
.sp-reveal-ready .lp-duel:not(.is-in) .lp-fighter-score::after { transform: scaleX(0); }
.sp-reveal-ready .lp-duel:not(.is-in) .lp-verdict,
.sp-reveal-ready .lp-duel:not(.is-in) .lp-crown { opacity: 0; transform: translateY(6px); }
.lp-duel .lp-fighter-score::after { transition: transform 1.2s var(--lp-ease) 0.3s; }
.lp-duel .lp-verdict, .lp-duel .lp-crown { transition: opacity 0.5s ease 1.4s, transform 0.5s var(--lp-ease) 1.4s; }

/* ══ Recién llegados ════════════════════════════════════════════ */
.lp-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}
.lp-model {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.3rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(110% 70% at 0% 0%, color-mix(in srgb, var(--pc) 18%, transparent), transparent 60%),
    var(--card-sheen),
    var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.22s, transform 0.22s var(--lp-ease), box-shadow 0.22s;
}
.lp-model:hover {
  text-decoration: none;
  color: var(--text);
  border-color: color-mix(in srgb, var(--pc) 50%, var(--border));
  box-shadow: 0 22px 44px -26px color-mix(in srgb, var(--pc) 85%, transparent);
  transform: translateY(-3px);
}
.lp-model-top { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.lp-model-top > div { min-width: 0; }
.lp-model-prov { font-size: 0.74rem; font-weight: 600; color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text)); }
.lp-model-name { font-size: 1.02rem; font-weight: 750; letter-spacing: -0.015em; margin: 0.05rem 0 0; line-height: 1.25; }
.lp-model-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.lp-model-foot {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hairline);
}
.lp-model-foot > div { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.lp-model-lbl { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.lp-model-val { font-family: var(--lp-mono); font-size: 0.86rem; font-weight: 600; color: var(--text); white-space: nowrap; }

/* ══ Novedades ══════════════════════════════════════════════════ */
.lp-news { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; }
.lp-news-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.8rem;
  border-radius: var(--lp-radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(80% 90% at 100% 100%, color-mix(in srgb, var(--aurora-1) 16%, transparent), transparent 60%),
    var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s var(--lp-ease);
}
.lp-news-main:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; color: var(--text); }
.lp-news-badge {
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--brand-ink);
  background: var(--brand-10);
  border: 1px solid var(--brand-25);
}
.lp-news-date, .lp-news-item time { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); font-family: var(--lp-mono); }
.lp-news-main h3 { font-size: 1.3rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.3; margin: 0; }
.lp-news-main p { font-size: 0.9rem; line-height: 1.65; color: var(--text-muted); margin: 0; flex: 1; }
.lp-news-list { display: flex; flex-direction: column; gap: 0.5rem; }
.lp-news-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid transparent;
  border-left: 2px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.18s, border-color 0.18s;
}
.lp-news-item:hover { background: var(--surface); border-color: var(--border); border-left-color: var(--brand); text-decoration: none; color: var(--text); }
.lp-news-item h4 { font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.4; }
.lp-news-item p { font-size: 0.8rem; line-height: 1.55; color: var(--text-muted); margin: 0; }

/* ══ Reveal (spectrum.js) ═══════════════════════════════════════ */
/* la franja del duelo anima sus partes internas, no se desplaza entera */
.sp-reveal-ready .lp-duel[data-reveal] { transform: none; }

/* ══ Responsive ═════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
  .lp-console { max-width: 560px; width: 100%; margin: 0 auto; }
  .lp-aurora-pc { top: auto; bottom: -160px; right: -200px; }
  .lp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "api   api"
      "chat  cli"
      "pay   audit"
      "web   web";
  }
  .lp-duel { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .lp-bento { grid-template-columns: 1fr; grid-template-areas: "api" "cli" "chat" "pay" "audit" "web"; }
  .lp-news { grid-template-columns: 1fr; }
  .lp-console-meter { grid-template-columns: 1fr 1fr; }
  .lp-meter-cost { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--hairline); }
  .lp-tile { padding: 1.3rem; }
  .lp-cta-row .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 420px) {
  .lp-arena-row { gap: 0.5rem; }
  .lp-fighter { padding: 0.9rem 0.6rem 0.75rem; }
  .lp-model-foot { grid-template-columns: repeat(2, auto); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-hero { transition: none; }
  .lp-hero .sp-aurora, .lp-kicker-dot, .lp-console-live span,
  .lp-caret, .lp-chat-typing i { animation: none; }
  .lp-console-stream.is-streaming span { animation: none; }
  .sp-reveal-ready .lp-duel:not(.is-in) .lp-fighter-score::after { transform: none; }
  .sp-reveal-ready .lp-duel:not(.is-in) .lp-verdict,
  .sp-reveal-ready .lp-duel:not(.is-in) .lp-crown { opacity: 1; transform: none; }
  .lp-tile, .lp-model, .lp-prov, .lp-news-main { transition: none; }
}
