/* ============================================================
   NEODATO 3.7.0 — EQUIVALENCIAS ("¿Y eso cuánto es?")
   Componente compartido: sección del inicio y caja completa
   de /equivalencias. Solo tokens de /tokens.css. Prefijo .eq-
   ============================================================ */

.eq-kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bronze-dark); font-weight: 500; }
.eq-num { font-family: var(--font-mono); font-weight: 500; color: var(--verde-botella); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.eq-detalle { margin-top: 6px; font-size: 0.9rem; line-height: 1.5; color: var(--text-primary); }
.eq-cuenta { margin-top: 6px; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.6; color: var(--text-secondary); }
.eq-cuenta a { color: var(--verde-botella); text-decoration: none; white-space: nowrap; }
.eq-cuenta a:hover { color: var(--bronze-dark); text-decoration: underline; }
.eq-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes eqCambio { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

/* Campos (tu sueldo, mes) */
.eq-sueldo { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.eq-campo {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; min-width: 0;
    background: var(--paper); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.eq-campo:focus-within { border-color: var(--verde-botella); box-shadow: 0 0 0 4px var(--verde-botella-tint); }
.eq-campo > i { color: var(--verde-botella); }
.eq-campo span { font-family: var(--font-mono); color: var(--text-secondary); }
.eq-campo input {
    width: 130px; border: 0; outline: 0; background: transparent; font-family: var(--font-mono); font-size: 1rem;
    font-weight: 500; color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.eq-campo select {
    border: 0; outline: 0; background: transparent; font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
    color: var(--text-primary); max-width: 300px; cursor: pointer;
}
.eq-campo-mes { height: 44px; }
.eq-privado { font-size: 0.78rem; color: var(--text-muted); }
.eq-privado i { color: var(--verde-botella); margin-right: 4px; }

/* Flechas, puntos y compartir */
.eq-flecha {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--paper);
    color: var(--text-secondary); cursor: pointer; display: grid; place-items: center; font-size: 0.85rem;
    transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.eq-flecha:hover { border-color: var(--ink); color: var(--ink); }
.eq-flecha:focus-visible, .eq-punto:focus-visible, .eq-compartir button:focus-visible, .eq-compartir a:focus-visible,
.eq-tab:focus-visible, .eq-link:focus-visible, .eq-boton:focus-visible, .eq-mes:focus-visible, .eq-periodo:focus-visible,
.eq-refs-mas summary:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.eq-puntos { display: flex; gap: 6px; }
.eq-punto { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--border-strong); cursor: pointer; transition: background var(--dur-base) var(--ease-out), width var(--dur-base) var(--ease-out); }
.eq-punto[aria-current="true"] { width: 22px; border-radius: 999px; background: var(--verde-botella); }

.eq-compartir { display: flex; align-items: center; gap: 6px; }
.eq-compartir a, .eq-compartir button {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--paper);
    color: var(--text-secondary); display: grid; place-items: center; font-size: 0.85rem; cursor: pointer; text-decoration: none;
    transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.eq-compartir a:hover, .eq-compartir button:hover { border-color: var(--bronze); color: var(--bronze-dark); }
.eq-compartir .is-done { border-color: var(--verde-botella); color: var(--verde-botella); }
.eq-compartir-solo { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-muted); }
.eq-compartir-solo i { color: var(--verde-botella); }
.eq-link { font-size: 0.86rem; font-weight: 600; color: var(--verde-botella); text-decoration: none; white-space: nowrap; }
.eq-link:hover { color: var(--bronze-dark); }

/* Botón principal de la sección (verde botella; el naranja queda para la acción única de cada vista) */
.eq-boton {
    display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 26px; border-radius: 999px;
    background: var(--verde-botella); color: var(--paper); font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
    text-decoration: none; transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.eq-boton:hover { background: var(--ink); color: var(--paper); }
.eq-boton i { font-size: 0.8em; transition: transform var(--dur-base) var(--ease-out); }
.eq-boton:hover i { transform: translateX(3px); }

/* ── Sección del inicio ──────────────────────────────── */
.eq-grande { max-width: 880px; margin: 0 auto; text-align: center; font-family: var(--font-sans); }
.eq-g-titulo {
    margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.02; letter-spacing: -0.02em; color: var(--ink);
}
.eq-g-titulo em { font-style: italic; color: var(--bronze); }
.eq-g-cab { margin: 20px auto 0; max-width: 640px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 1.9vw, 1.45rem); line-height: 1.4; color: var(--text-primary); }
.eq-g-cab b { font-family: var(--font-mono); font-weight: 500; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
/* El mes de la frase es un selector (select nativo, transparente, encima del texto) */
.eq-g-mes { position: relative; display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; color: var(--bronze-dark); border-bottom: 2px dashed var(--bronze); cursor: pointer; border-radius: 2px; transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out); }
.eq-g-mes:hover { color: var(--ink); border-bottom-style: solid; }
.eq-g-mes:focus-within { outline: 2px solid var(--bronze); outline-offset: 3px; }
.eq-g-mes > i { font-size: 0.5em; position: relative; top: -0.15em; }
.eq-g-mes select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 1rem; border: 0; appearance: none; -webkit-appearance: none; }

/* Zona de altura fija: la diapositiva más alta manda, así las flechas nunca se mueven */
.eq-g-escena { margin-top: 28px; display: flex; flex-direction: column; justify-content: flex-start; }
.eq-g-medida { position: absolute; left: -9999px; top: 0; visibility: hidden; pointer-events: none; margin: 0; }
.eq-g-cuadro.is-cambio { animation: eqCambio 420ms var(--ease-out) both; }
.eq-g-dice { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); }
.eq-g-num { margin-top: 6px; font-family: var(--font-mono); font-weight: 500; font-size: clamp(4.4rem, 11vw, 8.6rem); line-height: 1; letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.eq-g-resto { margin-top: 6px; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.2; color: var(--bronze); }
.eq-grande .eq-detalle { margin-top: 10px; font-size: 1rem; color: var(--text-secondary); }
.eq-grande .eq-cuenta { margin-top: 14px; }

/* "Tu sueldo": campo chico arriba, la equivalencia es el número grande */
.eq-g-sueldo { margin: 12px auto 0; height: 44px; }
.eq-g-sueldo input { width: 140px; text-align: center; }
.eq-g-sueldo > i { font-size: 0.75rem; color: var(--verde-botella); }
.eq-g-num.is-vacio { color: var(--border-strong); }
.eq-g-sueldo + .eq-g-num { margin-top: 10px; }

.eq-g-nav { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.eq-g-redes { margin-top: 18px; min-height: 34px; display: flex; align-items: center; justify-content: center; }
.eq-grande > .eq-boton { margin-top: 32px; }
.eq-g-redes .eq-compartir-solo { display: block; text-align: center; line-height: 1.5; }
.eq-g-redes .eq-compartir-solo i { margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .eq-g-cuadro.is-cambio { animation: none; } }

/* ── Caja completa (/equivalencias) ──────────────────── */
.eq-caja { background: var(--paper-dim); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; }
.eq-caja-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.eq-cifra-k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); }
.eq-cifra-v { margin-top: 6px; font-family: var(--font-mono); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.eq-cifra-v small { font-size: 0.4em; letter-spacing: 0; color: var(--text-secondary); margin-left: 6px; }
.eq-cifra-f { margin-top: 8px; font-size: 0.86rem; color: var(--text-secondary); }

/* Mini barra de meses (sincronizada con el selector) */
.eq-meses { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.eq-meses-barras { display: flex; align-items: flex-end; gap: 8px; }
.eq-mes { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-sm); }
.eq-mes-barra { width: 34px; height: 56px; display: flex; align-items: flex-end; }
.eq-mes-barra i { display: block; width: 100%; height: 0; border-radius: 4px 4px 0 0; background: var(--paper-strong); transition: height 600ms var(--ease-out), background var(--dur-base) var(--ease-out); }
.eq-mes:hover .eq-mes-barra i { background: var(--border-strong); }
.eq-mes.is-activo .eq-mes-barra i { background: var(--verde-botella); }
.eq-mes-t { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.eq-mes.is-activo .eq-mes-t { color: var(--ink); font-weight: 600; }
.eq-meses-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.eq-periodo {
    height: 36px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--paper);
    font-family: var(--font-sans); font-size: 0.86rem; font-weight: 600; color: var(--text-secondary); cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.eq-periodo:hover { border-color: var(--verde-botella); color: var(--verde-botella); }
.eq-periodo.is-activo { background: var(--verde-botella); border-color: var(--verde-botella); color: var(--paper); }

/* Pestañas + buscador de comuna (el espacio queda reservado en todas las pestañas) */
.eq-tabs-fila { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.eq-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper-strong); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.eq-tabs::-webkit-scrollbar { display: none; }
.eq-tab {
    height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; white-space: nowrap;
    font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600; color: var(--text-secondary);
    transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.eq-tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

.eq-buscador {
    position: relative; display: flex; align-items: center; gap: 10px; width: min(340px, 100%); height: 46px; padding: 0 14px;
    background: var(--paper); border: 1.5px solid var(--border-strong); border-radius: 999px;
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.eq-tabs-fila:not(.con-buscador) .eq-buscador { visibility: hidden; }
.eq-buscador:focus-within { border-color: var(--verde-botella); box-shadow: 0 0 0 4px var(--verde-botella-tint); }
.eq-buscador > i { color: var(--verde-botella); }
.eq-buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.eq-buscador input::placeholder { color: var(--text-muted); font-weight: 500; }
.eq-buscador-chip { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--bronze-dark); background: var(--bronze-tint); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.eq-buscador-chip:empty { display: none; }
.eq-sugs {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
    max-height: 300px; overflow-y: auto; background: var(--paper); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.eq-sugs[hidden] { display: none; }
.eq-sugs li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.eq-sugs li span { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 400; color: var(--text-muted); white-space: nowrap; }
.eq-sugs li:hover, .eq-sugs li.is-activa { background: var(--paper-dim); }
.eq-sugs li.is-activa { box-shadow: inset 2px 0 0 var(--verde-botella); }
.eq-sugs li.eq-sugs-vacio { cursor: default; font-weight: 500; color: var(--text-muted); }
.eq-sugs li.eq-sugs-vacio:hover { background: transparent; }

.eq-panel { margin-top: 24px; }
.eq-panel[hidden] { display: none; }

.eq-filas { display: grid; gap: 0; }
.eq-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--border-strong); }
.eq-fila:first-child { border-top: 0; padding-top: 4px; }
.eq-fila-v { font-family: var(--font-mono); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--verde-botella); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.eq-fila-t { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text-primary); margin-top: 4px; }
.eq-fila .eq-cuenta { grid-column: 1 / -1; margin-top: 0; }
.eq-fila-acc { align-self: center; }
.eq-fila-acc .eq-compartir-solo { display: none; }
.eq-fila.is-destacada { background: linear-gradient(90deg, var(--bronze-tint), transparent 70%); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: var(--radius-md); }

.eq-reloj { margin-top: 8px; padding: 24px; border-radius: var(--radius-lg); background: var(--ink); color: var(--text-on-ink); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.eq-reloj-k { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); }
.eq-reloj-v { font-family: var(--font-mono); font-weight: 500; font-size: clamp(2rem, 4.4vw, 3rem); color: var(--bronze-tint); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.eq-reloj-s { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

.eq-aviso { margin-top: 16px; display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--bronze-tint); color: var(--bronze-dark); font-size: 0.86rem; line-height: 1.5; }
.eq-aviso i { margin-top: 3px; }

.eq-barra { margin-top: 10px; height: 8px; border-radius: 999px; background: var(--paper-strong); overflow: hidden; }
.eq-barra i { display: block; height: 100%; min-width: 3px; border-radius: 999px; background: var(--verde-botella); width: 0; transition: width 700ms var(--ease-out); }

.eq-caja-pie { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border-strong); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.eq-caja-pie .eq-cuenta { margin-top: 0; }

/* ── Tabla de referencias (método), una fila por referencia ─ */
.eq-refs { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.eq-refs th { text-align: left; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); padding: 0 16px 10px 0; border-bottom: 2px solid var(--ink); }
.eq-refs td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--border-strong); vertical-align: top; color: var(--text-primary); }
.eq-refs td:first-child { font-weight: 600; }
.eq-refs td.eq-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq-refs td small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.eq-refs a { font-family: var(--font-mono); font-size: 0.78rem; color: var(--verde-botella); text-decoration: none; white-space: nowrap; }
.eq-refs a:hover { color: var(--bronze-dark); text-decoration: underline; }
.eq-refs-links { display: block; margin-top: 4px; }
.eq-refs-mas { margin-top: 8px; font-weight: 400; }
.eq-refs-mas summary { cursor: pointer; width: fit-content; font-family: var(--font-mono); font-size: 0.74rem; color: var(--verde-botella); list-style: none; }
.eq-refs-mas summary::-webkit-details-marker { display: none; }
.eq-refs-mas summary::before { content: '+'; display: inline-block; width: 1em; }
.eq-refs-mas[open] summary::before { content: '−'; }
.eq-refs-mas ul { margin: 8px 0 0; padding: 0; list-style: none; }
.eq-refs-mas li { display: grid; grid-template-columns: 76px 90px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--border-strong); font-size: 0.82rem; }
.eq-refs-mas li .eq-refs-links { margin-top: 0; }
.eq-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
    .eq-refs thead { display: none; }
    .eq-refs, .eq-refs tbody, .eq-refs tr, .eq-refs td { display: block; width: 100%; }
    .eq-refs tr { padding: 14px 0; border-bottom: 1px solid var(--border-strong); }
    .eq-refs td { border: 0; padding: 2px 0; }
    .eq-refs td + td { margin-top: 6px; }
}
@media (max-width: 640px) {
    .eq-caja { padding: 24px 18px; border-radius: var(--radius-lg); }
    .eq-fila { grid-template-columns: minmax(0, 1fr); }
    .eq-campo input { width: 110px; }
    .eq-campo select { max-width: 220px; }
    .eq-caja-cab .eq-campo-mes { width: 100%; max-width: 100%; overflow: hidden; }
    .eq-caja-cab .eq-campo-mes select { max-width: none; min-width: 0; width: 100%; flex: 1; text-overflow: ellipsis; }
    .eq-tabs-fila { flex-direction: column; align-items: stretch; }
    .eq-tabs { align-self: flex-start; }
    .eq-buscador { width: 100%; }
    .eq-tabs-fila:not(.con-buscador) .eq-buscador { display: none; }
    .eq-meses { flex-direction: column; align-items: stretch; }
    .eq-meses-barras { justify-content: space-between; }
    .eq-mes-barra { width: 26px; }
    .eq-g-nav { gap: 14px; }
    .eq-refs-mas li { grid-template-columns: 64px 80px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .eq-barra i, .eq-mes-barra i { transition: none; }
}
