/* ── Reset & variables ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0f1117;
  --surface:      #1a1d2e;
  --surface2:     #22263a;
  --border:       #2e3350;
  --border-sel:   #22c55e;
  --accent:       #22c55e;
  --accent-dim:   rgba(34,197,94,0.10);
  --accent-dim2:  rgba(34,197,94,0.18);
  --text-1:       #e8eaf0;
  --text-2:       #b0b8d8;
  --text-3:       #7a84a8;
  --text-4:       #9aa2c6;
  --font:         'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Syne', var(--font);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  padding-bottom: 90px;
  -webkit-font-smoothing: antialiased;
}

/* Header: mismas clases que layout 1 (.app-header en styles.css + body.layout-modern) */
body[data-layout="v2"] .app-header {
  z-index: 30;
}

/* ── Hero ────────────────────────────────────────── */
.v2-hero {
  text-align: center;
  padding: 30px 20px 22px;
}
.v2-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.v2-hero h1 span { color: var(--accent); }
.v2-hero-sub {
  font-size: 14px; color: var(--text-2);
  max-width: 380px; margin: 0 auto 22px;
  line-height: 1.65;
}
.v2-hero-sub strong { color: var(--text-1); font-weight: 600; }

/* ── Amount input ─────────────────────────────────── */
.v2-amount-label {
  font-size: 14px; color: var(--text-3); margin-bottom: 8px;
}
.v2-amount-box {
  display: flex; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; overflow: hidden;
  width: 220px; margin: 0 auto;
  transition: border-color .15s;
}
.v2-amount-box:focus-within { border-color: var(--accent); }
.v2-amount-currency {
  padding: 11px 14px;
  font-size: 14px; font-weight: 700; color: var(--accent);
  border-right: 1px solid var(--border);
  background: var(--surface2); letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-left: 7px;
  border-radius: inherit;
}
.v2-amount-input {
  flex: 1; padding: 11px 14px;
  font-size: 22px; font-weight: 700; color: var(--text-1);
  background: transparent; border: none; outline: none;
  font-family: var(--font); width: 100%;
}
.v2-amount-input::-webkit-outer-spin-button,
.v2-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.v2-amount-input[type=number] { -moz-appearance: textfield; }

/* ── Section label ───────────────────────────────── */
.v2-section-label {
  font-size: 14px; font-weight: 600; letter-spacing: 0.9px;
  text-transform: uppercase; color: var(--text-4);
  padding: 14px 16px 10px;
}

/* ── Insight band (altura reservada; idle/active superpuestos, sin layout shift) ─ */
.v2-insight-band {
  margin: 0 14px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-sizing: border-box;
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.v2-insight-band--active {
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.08) inset;
}
.v2-insight-layer {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  transition: opacity .22s ease, visibility .22s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.v2-insight-band:not(.v2-insight-band--active) .v2-insight-idle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.v2-insight-band--active .v2-insight-live {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.v2-insight-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v2-insight-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-dim2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.v2-insight-band:not(.v2-insight-band--active) .v2-insight-idle .v2-insight-icon {
  background: rgba(122, 132, 168, 0.12);
  border: 1px solid var(--border);
}
.v2-insight-icon--anim {
  animation: v2InsightIconPulse 2.2s ease-in-out infinite;
}
@keyframes v2InsightIconPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}
.v2-insight-text { font-size: 14px; color: var(--text-2); line-height: 1.4; }
.v2-insight-text--idle strong { color: var(--text-3); }
.v2-insight-text strong {
  color: var(--text-1); display: block;
  font-size: 14px; font-weight: 700; margin-bottom: 1px;
}
.v2-insight-text em { color: var(--accent); font-style: normal; font-weight: 600; }
.v2-insight-delta { text-align: right; flex-shrink: 0; }
.v2-insight-delta--idle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 52px;
}
.v2-insight-pulse-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.v2-insight-pulse-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-4);
  opacity: 0.35;
  animation: v2InsightDot 1.1s ease-in-out infinite;
}
.v2-insight-pulse-dots span:nth-child(2) { animation-delay: 0.15s; }
.v2-insight-pulse-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes v2InsightDot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.88); }
  40% { opacity: 1; transform: scale(1); background: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .v2-insight-icon--anim { animation: none; }
  .v2-insight-pulse-dots span { animation: none; opacity: 0.5; }
}
.v2-insight-delta .big {
  font-size: 17px; font-weight: 800; color: var(--accent);
  display: block; letter-spacing: -0.5px;
}
.v2-insight-delta .sub { font-size: 14px; color: var(--text-3); }

/* ── Loading skeleton ─────────────────────────────── */
.v2-cards-skeleton {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 14px;
}
.v2-card-skeleton {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px; height: 110px;
  position: relative; overflow: hidden;
}
.v2-card-skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── Cards grid ──────────────────────────────────── */
#v2CardsGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 14px;
}
@media (min-width: 600px) {
  #v2CardsGrid, .v2-cards-skeleton { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  #v2CardsGrid, .v2-cards-skeleton { grid-template-columns: repeat(4, 1fr); max-width: 900px; margin: 0 auto; }
  .v2-insight-band { max-width: 900px; margin-left: auto; margin-right: auto; }
  .v2-section-label { max-width: 900px; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; }
}

.v2-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  position: relative;
  user-select: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.v2-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 13px 13px 12px;
}
.v2-card-ratefoot {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 11px 13px 13px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  /* Esquinas inferiores alineadas con la card (sin overflow:hidden en .v2-card) */
  border-radius: 0 0 12px 12px;
}
.v2-card--selected .v2-card-ratefoot {
  background: color-mix(in srgb, var(--surface2) 82%, var(--accent-dim2));
}
.v2-card:hover:not(.v2-card--selected) { border-color: #3d4468; }
.v2-card--selected {
  border-color: var(--border-sel);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.15);
}

.v2-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 9px;
}
.v2-card-left { display: flex; gap: 8px; align-items: center; }

.v2-card-check {
  width: 19px; height: 19px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s;
  background: var(--surface2);
}
.v2-card--selected .v2-card-check {
  background: var(--accent); border-color: var(--accent);
}
.v2-card-check-icon { display: none; }
.v2-card--selected .v2-card-check-icon { display: block; }

/* Nombre de proveedor / plataforma (misma clase en cards, sheet y desglose) */
.provider-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.method-line {
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 3px;
}
.v2-card-titles { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }

.v2-info-btn {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  font-size: 14px; color: var(--text-2);
  font-weight: 700; font-style: italic;
  transition: border-color .15s, color .15s, background .15s;
  line-height: 1;
}
.v2-info-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.v2-card-divider {
  border: none; border-top: 1px solid var(--border); margin: 8px 0;
}

/* Sub-routes (radio) */
.v2-routes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; flex: 1 1 auto; min-height: 0; }
/* Una sola ruta: mismo texto que el selector, sin radio — alinear con columna de label */
.v2-routes--single { padding-left: 21px; }
.v2-route {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 14px; padding: 2px 0; cursor: pointer;
}
.v2-radio {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s; background: var(--surface2);
}
.v2-radio--active { border-color: var(--accent); }
.v2-radio--active::after {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); display: block;
}
.v2-route-label { line-height: 1.35; }
.v2-route-label strong {
  display: block; font-weight: 600;
  color: var(--text-1); font-size: 14px;
}
.v2-route-label span { color: var(--text-2); font-size: 14px; }

/* Rate preview */
.v2-rate {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 4px; margin-top: 0;
}
.v2-rate-heading {
  font-size: 13px; font-weight: 600;
  color: var(--text-2); letter-spacing: 0.02em;
}
.v2-rate-line {
  display: flex; align-items: baseline; justify-content: center;
  flex-wrap: wrap; gap: 4px;
}
.v2-rate-value {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  transition: color .15s;
}
.v2-rate-unit { font-size: 14px; color: var(--text-3); }
.v2-card--selected .v2-rate-value { color: var(--accent); }

/* Rank badge */
.v2-rank {
  position: absolute; top: -8px; left: 10px; z-index: 2;
  font-size: 14px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; letter-spacing: 0.3px;
  pointer-events: none;
}
.v2-rank--1 { background: #f59e0b; color: #000; }
.v2-rank--2 { background: var(--surface2); color: var(--text-2); border: 1px solid var(--border); }
.v2-rank--3 { background: var(--surface2); color: var(--text-2); border: 1px solid var(--border); }

/* ── Error state ──────────────────────────────────── */
.v2-error-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-3); font-size: 14px;
}
.v2-error-state strong { display: block; color: var(--text-2); margin-bottom: 6px; }
.v2-retry-btn {
  margin-top: 14px; padding: 8px 18px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; font-family: var(--font);
  font-size: 14px;
}
.v2-retry-btn:hover { border-color: var(--accent); color: var(--accent); }

.v2-cta-anchor {
  height: 0; width: 100%; pointer-events: none;
}

/* ── Sticky CTA ───────────────────────────────────── */
.v2-sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 14px 14px 18px;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
  z-index: 20;
  transition: padding .2s ease, background .2s ease;
}
/* Scroll hacia abajo: mismo bloque en flujo, pegado bajo las cards */
.v2-sticky-cta.v2-sticky-cta--docked {
  position: relative;
  left: auto; right: auto;
  padding: 18px 0 28px;
  margin-top: 4px;
  background: var(--bg);
  z-index: 5;
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.25);
}
.v2-cta-btn {
  width: 100%; max-width: 680px; margin: 0 auto; display: flex;
  align-items: center; justify-content: space-between;
  background: var(--accent); color: #000;
  font-size: 15px; font-weight: 700;
  padding: 15px 20px;
  border-radius: 14px; border: none; cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 6px 28px rgba(34,197,94,0.4);
  transition: opacity .15s, transform .12s, box-shadow .15s;
}
.v2-cta-btn:active { transform: scale(0.98); }
.v2-cta-btn:hover { box-shadow: 0 8px 36px rgba(34,197,94,0.5); }
.v2-cta-btn:disabled {
  background: var(--surface2); color: var(--text-3);
  box-shadow: none; cursor: not-allowed;
}
.v2-cta-left { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.v2-cta-main { font-size: 15px; }
.v2-cta-hint { font-size: 14px; font-weight: 500; opacity: 0.75; }
.v2-cta-arrow { font-size: 20px; }

/* ── Result sheet ─────────────────────────────────── */
.v2-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  align-items: flex-end; justify-content: center;
}
.v2-overlay--open { display: flex; }

.v2-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  width: 100%; max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  animation: v2SheetUp .25s cubic-bezier(0.34,1.2,0.64,1);
  padding-bottom: 30px;
}
@keyframes v2SheetUp {
  from { transform: translateY(60px); opacity: .5; }
  to   { transform: translateY(0);    opacity: 1; }
}

.v2-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 12px auto 0;
}
.v2-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.v2-sheet-title { font-size: 16px; font-weight: 700; }
.v2-sheet-subtitle { font-size: 14px; color: var(--text-3); margin-top: 2px; }
.v2-sheet-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text-2);
  flex-shrink: 0; transition: border-color .15s;
}
.v2-sheet-close:hover { border-color: var(--text-2); }

/* Winner highlight — diamante (mayor “valor” visual) */
.v2-winner {
  margin: 14px 14px 10px;
  background: linear-gradient(145deg, rgba(34,197,94,0.14) 0%, rgba(15,23,42,0.55) 55%, rgba(34,197,94,0.08) 100%);
  border: 1.5px solid rgba(34,197,94,0.55);
  border-radius: 16px;
  padding: 16px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 12px 40px rgba(0,0,0,0.35);
}
.v2-winner-gem-col {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.v2-winner-gem-svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 6px 18px rgba(56,189,248,0.55));
}
.v2-winner-gem-svg svg { width: 56px; height: 56px; display: block; }
.gem-kind-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #bae6fd;
  line-height: 1.2;
}
.gem-place-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  line-height: 1.2;
}
.v2-winner-info { flex: 1; min-width: 0; }
.v2-winner-kicker {
  font-size: 14px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 6px;
}
.v2-winner-info .provider-name {
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-winner-info .method-line {
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #cbd5e1;
}
.v2-winner-ars {
  font-size: 26px; font-weight: 800; color: var(--accent);
  letter-spacing: -0.5px; display: block; margin-top: 8px;
}
.v2-winner-ars-label {
  font-size: 14px; font-weight: 600; color: var(--text-3);
  display: block; margin-top: 2px;
}
.v2-winner-diff { font-size: 14px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.v2-winner-diff strong { color: var(--accent); }

/* Lista: resto del ranking — 2º zafiro, 3º esmeralda, resto más neutro pero legible */
.v2-result-list-head {
  padding: 10px 14px 6px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
}
.v2-result-list { padding: 0 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.v2-result-row {
  border-radius: 14px; padding: 14px 14px 14px 12px;
  display: flex; align-items: stretch; gap: 12px;
  border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.v2-result-row--p2 {
  background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(15,23,42,0.65) 100%);
  border-color: rgba(96,165,250,0.45);
  box-shadow: 0 0 0 1px rgba(147,197,253,0.12) inset;
}
.v2-result-row--p3 {
  background: linear-gradient(135deg, rgba(16,185,129,0.11) 0%, rgba(15,23,42,0.65) 100%);
  border-color: rgba(52,211,153,0.38);
  box-shadow: 0 0 0 1px rgba(167,243,208,0.1) inset;
}
.v2-result-row--pn {
  background: linear-gradient(180deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.55) 100%);
  border-color: rgba(148,163,184,0.22);
}
.v2-result-gem-col {
  flex-shrink: 0;
  width: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 6px;
  padding-top: 2px;
}
.v2-result-gem-col svg { width: 40px; height: 40px; display: block; }
.v2-result-place-tag {
  font-size: 12px; font-weight: 800; letter-spacing: 0.03em;
  text-transform: uppercase; text-align: center; line-height: 1.25;
  max-width: 72px;
}
.v2-result-row--p2 .v2-result-place-tag { color: #93c5fd; }
.v2-result-row--p3 .v2-result-place-tag { color: #6ee7b7; }
.v2-result-row--pn .v2-result-place-tag { color: var(--text-3); }
.v2-result-gem-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-top: 4px;
}
.v2-result-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.v2-result-row-main .provider-name {
  font-size: 16px;
  margin-bottom: 1px;
}
.v2-result-row-main .method-line { margin-top: 2px; }
.v2-result-fees   { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v2-fee-pill {
  font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(15,23,42,0.65); border: 1px solid rgba(148,163,184,0.25);
  color: #e2e8f0;
}
.v2-result-row--p2 .v2-fee-pill { border-color: rgba(96,165,250,0.35); color: #dbeafe; }
.v2-result-row--p3 .v2-fee-pill { border-color: rgba(52,211,153,0.35); color: #d1fae5; }
.v2-fee-pill--muted { color: #cbd5e1; border-style: dashed; opacity: 0.95; }
.v2-fee-pill--diff {
  color: #fde68a !important;
  border-color: rgba(251,191,36,0.45) !important;
  background: rgba(251,191,36,0.08);
}
.v2-result-ars-col {
  text-align: right; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 108px;
}
.v2-result-ars-label {
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #94a3b8;
  margin-bottom: 3px;
}
.v2-result-ars {
  font-size: 18px; font-weight: 800; color: #f8fafc;
  letter-spacing: -0.02em;
}
.v2-result-row--p2 .v2-result-ars { color: #dbeafe; text-shadow: 0 0 24px rgba(59,130,246,0.35); }
.v2-result-row--p3 .v2-result-ars { color: #a7f3d0; text-shadow: 0 0 22px rgba(16,185,129,0.25); }
.v2-result-rate-line {
  font-size: 14px; font-weight: 600; color: #cbd5e1;
  margin-top: 4px;
}

/* Sheet actions */
.v2-sheet-actions { padding: 14px 14px 0; }
.v2-btn-outline {
  width: 100%; padding: 13px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text-1); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .15s, background .15s, color .15s;
  text-decoration: none;
}
.v2-btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.v2-sheet-note {
  text-align: center; font-size: 14px; color: var(--text-4);
  padding: 10px 20px 0; line-height: 1.5;
}

/* ── Tooltip overlay ──────────────────────────────── */
.v2-tooltip-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: flex-end; justify-content: center;
  padding: 16px;
}
.v2-tooltip-overlay--open { display: flex; }
.v2-tooltip-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px;
  width: 100%; max-width: 440px;
  animation: v2SheetUp .2s ease;
}
.v2-tt-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.v2-tt-title { font-size: 16px; font-weight: 700; }
.v2-tt-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text-2);
}
.v2-tt-body { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.v2-tt-body p { margin-bottom: 8px; }
.v2-tt-body strong { color: var(--text-1); }
.v2-tt-badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 14px; font-weight: 600; margin-bottom: 8px;
}
.v2-tt-badge--green { background: var(--accent-dim2); color: var(--accent); border: 1px solid rgba(34,197,94,.3); }
.v2-tt-badge--warn  { background: rgba(245,158,11,.12); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }

/* ── Toast ────────────────────────────────────────── */
.v2-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 16px;
  font-size: 14px; color: var(--text-2);
  opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; z-index: 50;
  white-space: nowrap;
}
.v2-toast--visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.v2-toast--error { border-color: #ef4444; color: #fca5a5; }

/* ══ DESGLOSE COMPLETO ══════════════════════════════ */

/* Full-screen overlay; contenido acotado en desktop */
.v2-det-overlay {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 150;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
  max-height: 100dvh;
  animation: v2DetIn .25s cubic-bezier(0.34,1.1,0.64,1);
}
.v2-det-overlay--open { display: flex; }
.v2-det-header {
  max-width: 680px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.v2-det-inner {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 0 14px;
}
@keyframes v2DetIn {
  from { transform: translateY(40px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header sticky */
.v2-det-header {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(15,17,23,0.97);
  backdrop-filter: blur(10px);
}
.v2-det-back {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  font-size: 16px; color: var(--text-2);
  transition: border-color .15s;
}
.v2-det-back:hover { border-color: var(--text-2); }
.v2-det-header-text { flex: 1; min-width: 0; }
.v2-det-title    { font-size: 15px; font-weight: 700; }
.v2-det-subtitle { font-size: 14px; color: var(--text-3); margin-top: 1px; }

/* Único scroll vertical del desglose (evita scroll doble con el documento) */
.v2-det-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 30px;
  width: 100%;
}

/* Summary bar */
.v2-det-summary {
  display: flex;
  margin: 14px 0 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.v2-det-sum-item {
  flex: 1; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 3px;
}
.v2-det-sum-item + .v2-det-sum-item { border-left: 1px solid var(--border); }
.v2-det-sum-label { font-size: 14px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.6px; }
.v2-det-sum-val   { font-size: 14px; font-weight: 700; color: var(--text-1); }
.v2-det-sum-val.green { color: var(--accent); }

/* Sort chips */
.v2-det-sort {
  display: flex; gap: 6px;
  padding: 12px 0 0;
  overflow-x: auto; scrollbar-width: none;
}
.v2-det-sort::-webkit-scrollbar { display: none; }
.v2-det-chip {
  flex-shrink: 0; padding: 5px 12px; border-radius: 20px;
  font-size: 14px; font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface2); color: var(--text-3);
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.v2-det-chip.active {
  background: var(--accent-dim2);
  border-color: rgba(34,197,94,0.4);
  color: var(--accent);
}
.v2-det-sort-hint {
  margin: 0;
  padding: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-3);
}

/* Method cards */
.v2-det-cards {
  padding: 12px 0 0;
  display: flex; flex-direction: column; gap: 10px;
}
.v2-det-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.v2-det-card.best { border-color: var(--accent); }

.v2-det-card-head {
  padding: 14px 16px;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.v2-det-card-left  { flex: 1; min-width: 0; }
.v2-det-card-right { text-align: right; flex-shrink: 0; }

.v2-det-rank-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.v2-det-rank-badge {
  font-size: 14px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.v2-det-rank-badge.gold   { background: #f59e0b; color: #000; }
.v2-det-rank-badge.silver { background: var(--surface2); color: var(--text-2); border: 1px solid var(--border); }
.v2-det-rank-badge.bronze { background: var(--surface2); color: var(--text-2); border: 1px solid var(--border); }
.v2-det-rank-badge.other  { background: var(--surface2); color: var(--text-4); border: 1px solid var(--border); }
.v2-det-best-tag {
  font-size: 14px; color: var(--accent); font-weight: 600;
  background: var(--accent-dim2); border: 1px solid rgba(34,197,94,0.3);
  padding: 2px 8px; border-radius: 20px;
}
.v2-det-fee-sort-em {
  font-size: 14px;
  font-weight: 600;
  color: #fde68a;
  margin: 2px 0 6px;
  line-height: 1.3;
}
.v2-det-card-left .provider-name { font-size: 16px; }
.v2-det-card-left .method-line { margin-top: 4px; color: #94a3b8; }
.v2-det-method-sub  { font-size: 14px; color: var(--text-3); margin-top: 6px; }

.v2-det-final-ars {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text-1); display: block;
}
.v2-det-card.best .v2-det-final-ars { color: var(--accent); }
.v2-det-rate-line { font-size: 14px; color: var(--text-3); margin-top: 2px; }
.v2-det-vs {
  font-size: 14px; font-weight: 600; margin-top: 4px;
}
.v2-det-vs.positive { color: var(--accent); }
.v2-det-vs.negative { color: #ef4444; }

/* Fee pills row */
.v2-det-fee-row {
  padding: 6px 16px 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.v2-det-fee-pill {
  font-size: 14px; padding: 3px 9px; border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface2); color: var(--text-3);
}
.v2-det-fee-pill.red   { color: #fca5a5; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.10); }
.v2-det-fee-pill.green { color: var(--accent); border-color: rgba(34,197,94,0.35); background: var(--accent-dim2); }

/* Expand button */
.v2-det-expand {
  width: 100%; padding: 9px 16px;
  background: var(--surface2);
  border: none; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: color .15s, background .15s;
}
.v2-det-expand:hover { background: #262a40; color: var(--text-2); }
.v2-det-expand-icon { display: inline-block; transition: transform .2s; }
.v2-det-expand.open .v2-det-expand-icon { transform: rotate(180deg); }

/* Steps breakdown */
.v2-det-steps {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  flex-direction: column;
}
.v2-det-steps.open { display: flex; }

.v2-det-step {
  display: flex; align-items: flex-start;
  gap: 10px; padding: 9px 0;
  border-bottom: 1px solid rgba(46,51,80,0.5);
}
.v2-det-step:last-child { border-bottom: none; }

.v2-det-step-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px; margin-top: 1px;
}
.v2-det-step-icon svg {
  display: block; width: 22px; height: 22px; flex-shrink: 0;
}

.v2-det-step-body { flex: 1; min-width: 0; }
.v2-det-step-label { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 1px; }
.v2-det-step-desc  { font-size: 14px; color: var(--text-3); }

.v2-det-step-right { text-align: right; flex-shrink: 0; }
.v2-det-step-val {
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.v2-det-step-val.neutral  { color: var(--text-1); }
.v2-det-step-val.negative { color: #ef4444; }
.v2-det-step-val.fx       { color: #60a5fa; }
.v2-det-step-val.final    { color: var(--accent); }
.v2-det-step-cur { font-size: 14px; color: var(--text-4); margin-top: 1px; }

/* Footer note */
.v2-det-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px; color: var(--text-4); line-height: 1.5;
}
.v2-det-note strong { color: var(--text-3); }

/* ── Cards shell (ancho = grilla de cards) ───────────────── */
.v2-cards-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 14px;
}
.v2-cards-shell .v2-section-label {
  padding-left: 0;
  padding-right: 0;
}
.v2-marketing-root {
  max-width: 960px;
  margin: 0 auto;
}
/* Cards: +2px y mínimo 14px en contenido */
.v2-card .provider-name { font-size: 16px; }
.v2-card .v2-route { font-size: 14px; }
.v2-card .v2-route-label strong { font-size: 14px; }
.v2-card .v2-route-label span { font-size: 14px; }
.v2-card .v2-rate-heading { font-size: 14px; }
.v2-card .v2-rate-value { font-size: 17px; }
.v2-card .v2-rate-unit { font-size: 14px; }
.v2-card .v2-info-btn { font-size: 14px; }
.v2-card .v2-rank { font-size: 14px; }

/* Insight / grid: el padding horizontal lo aporta solo .v2-cards-shell */
.v2-insight-band { margin: 0 0 12px; }
#v2CardsGrid, .v2-cards-skeleton { padding: 0; }
@media (min-width: 900px) {
  #v2CardsGrid, .v2-cards-skeleton {
    max-width: none;
    margin: 0;
  }
  .v2-insight-band {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
  .v2-section-label {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Marketing (styles.css): tipografía legible mín. 14px en el bloque inferior — solo layout v2 */
body[data-layout="v2"] .v2-marketing-root .hero-trust,
body[data-layout="v2"] .v2-marketing-root .sp-label,
body[data-layout="v2"] .v2-marketing-root .sp-av,
body[data-layout="v2"] .v2-marketing-root .sp-av--more,
body[data-layout="v2"] .v2-marketing-root .hchart-subtitle,
body[data-layout="v2"] .v2-marketing-root .hchart-attribution,
body[data-layout="v2"] .v2-marketing-root .hchart-attribution a,
body[data-layout="v2"] .v2-marketing-root .hchart-pill,
body[data-layout="v2"] .v2-marketing-root .hchart-range-btn,
body[data-layout="v2"] .v2-marketing-root .about-card h3,
body[data-layout="v2"] .v2-marketing-root .about-card p,
body[data-layout="v2"] .v2-marketing-root .pricing-tier,
body[data-layout="v2"] .v2-marketing-root .pricing-price span,
body[data-layout="v2"] .v2-marketing-root .pricing-price-note,
body[data-layout="v2"] .v2-marketing-root .pricing-pro-desc,
body[data-layout="v2"] .v2-marketing-root .pricing-feature,
body[data-layout="v2"] .v2-marketing-root .pro-badge-inline,
body[data-layout="v2"] .v2-marketing-root .guide-card p,
body[data-layout="v2"] .v2-marketing-root .app-footer p {
  font-size: 14px !important;
}

/* Mismo tono secundario que layout 1 (--text-2 en styles.css); el :root v2 pisa --text-2 */
body[data-layout="v2"] .v2-marketing-root .hero-trust,
body[data-layout="v2"] .v2-marketing-root .hero-trust svg {
  color: #5e7a6c;
}

