/* ============================================
   alexgilabert.xyz · Web3 Lab (/web3)
   Se carga después de home.css y usa sus tokens (--ink, --surface, --line…).
   El marcado de datos lo genera static/js/web3-lab.js; el contenido curado
   (fondos, depósitos, comparador) lo renderiza el servidor.
   ============================================ */

:root {
    --pos: #1F7A55;
    --neg: #B42318;
    --warn: #9A5B00;
    --t-mmf: #1F86B8;
}

[data-theme="dark"] {
    --pos: #7CE0B0;
    --neg: #FF9B8A;
    --warn: #F0C36D;
    --t-mmf: #6FC3E8;
}

.up { color: var(--pos); }
.down { color: var(--neg); }

/* ---------- Esqueletos de carga ---------- */
.sk {
    display: block;
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent, color-mix(in srgb, var(--line) 70%, transparent), transparent) 0 0 / 200% 100% no-repeat,
        var(--line-3);
    animation: shimmer 1.4s linear infinite;
}

.sk-line { height: 20px; width: 60%; }
.sk-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.sk-block { width: 100%; height: 220px; border-radius: 12px; }

@keyframes shimmer {
    from { background-position: 150% 0, 0 0; }
    to { background-position: -50% 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sk { animation: none; }
}

.w3-err {
    padding: 28px 8px;
    text-align: center;
    font: 400 13px/1.5 var(--font-mono);
    color: var(--muted);
}

/* ---------- Cabecera de página ---------- */
.w3 {
    position: relative;
    isolation: isolate;
    overflow-x: clip;
    padding: clamp(32px, 4vw, 56px) 0 96px;
}

.w3-bg {
    position: absolute;
    inset: -68px 0 auto;
    height: 640px;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 75% at 70% 20%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 75% at 70% 20%, #000 25%, transparent 75%);
}

.w3-head { max-width: 900px; margin-bottom: 36px; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.kicker .live { background: var(--pos); }

.w3-head h1 {
    margin-top: 14px;
    font-size: clamp(38px, 5.6vw, 76px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.02;
    text-wrap: balance;
}

.w3-updated {
    margin-top: 18px;
    font-size: 12px;
    color: var(--muted);
}

.src-line {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- Tira de precios ---------- */
.tickerwrap {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.tickerbar {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.tickerbar::-webkit-scrollbar { display: none; }

.tk {
    flex: 1 0 auto;
    min-width: 168px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    scroll-snap-align: start;
    border-right: 1px solid var(--line-3);
}

.tk:last-child { border-right: 0; }

.tk.is-skeleton .sk-line { width: 90px; }

.tk-logo {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
}

/* En oscuro, los logos negros (ETH, XRP) necesitan una base clara */
[data-theme="dark"] .tk-logo.on-light { padding: 3px; background: #E8EBF2; }

.tk-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.tk-top {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font: 500 12px var(--font-mono);
}

.tk-sym { color: var(--ink); letter-spacing: .02em; }

.tk-px {
    font: 500 16px var(--font-mono);
    color: var(--ink);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.tk-src {
    position: absolute;
    right: 12px;
    bottom: 6px;
    font-size: 10.5px;
    letter-spacing: .02em;
    color: var(--muted);
    text-decoration: none;
    background: var(--surface);
    padding: 0 0 0 8px;
}

.tk-src:hover { color: var(--accent); }

.tk { padding-bottom: 22px; }

/* ---------- Navegación entre secciones: barra fina fija bajo el header ---------- */
.w3-bar {
    position: sticky;
    top: 78px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

/* El fondo de la barra ocupa todo el ancho de la ventana: el contenido que pasa por debajo no se ve */
.w3-bar::before {
    content: "";
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -1;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.w3-bar { border-bottom: 0; }

.w3-jump {
    display: flex;
    flex: 1;
    gap: 26px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.w3-jump::-webkit-scrollbar { display: none; }

.w3-jump a {
    position: relative;
    flex: none;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    font: 400 13px var(--font-mono);
    color: var(--muted);
    text-decoration: none;
    transition: color .2s;
}

.w3-jump a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--accent-ui);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}

.w3-jump a:hover { color: var(--ink); }
.w3-jump a.is-active { color: var(--ink); }
.w3-jump a.is-active::after { transform: scaleX(1); }

.w3-cta {
    flex: none;
    white-space: nowrap;
    font: 400 13px var(--font-mono);
    color: var(--accent);
    text-decoration: none;
}

.w3-cta:hover { text-decoration: underline; text-underline-offset: 4px; }

.w3-sec { scroll-margin-top: 150px; }

/* Secciones lejos del primer pantallazo: el navegador no las pinta hasta que se acercan */
#cronologia, #custodia {
    content-visibility: auto;
    contain-intrinsic-size: auto 760px;
}

/* ---------- Enlace de ancla copiable ---------- */

.anchor {
    position: relative;
    display: inline-grid;
    vertical-align: 0.12em;
    margin-left: 10px;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    background: none;
    color: var(--muted);
    cursor: pointer;
    opacity: .55;
    transition: opacity .2s, color .2s, border-color .2s, background-color .2s;
}

.anchor svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.h2:hover .anchor, .anchor:focus-visible, .anchor.is-ok { opacity: 1; }
.anchor:hover { color: var(--accent); border-color: var(--line-2); background: var(--surface); }

.anchor-ok {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
    color: var(--pos);
}



/* ---------- Secciones ---------- */
.w3 .card { border-radius: 18px; }

.w3-sec { padding-top: clamp(56px, 7vw, 88px); }

.w3-sec-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 32px;
    margin-bottom: 24px;
}

.w3-sec-head .h2 {
    font-size: clamp(26px, 3vw, 40px);
    max-width: 22ch;
}

.card-cap, .chart-card figcaption {
    font-size: 12px;
    color: var(--muted);
}

.note {
    margin-top: 16px;
    max-width: 72ch;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- Resumen de cabecera ---------- */
.hk {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.hk-i { display: flex; flex-direction: column; padding: 20px 22px 18px; }

.kpi-l {
    font-size: 11.5px;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    min-height: 2.7em;
}

.hk-v {
    margin-top: 12px;
    min-height: 44px;
    font-size: clamp(30px, 3.3vw, 44px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--ink);
    white-space: nowrap;
}

.hk-v .kn { font-size: 1em; }
.hk-v small { font: 400 13px var(--font-mono); letter-spacing: 0; color: var(--muted); margin-left: 2px; }
.hk-v .sk-line { margin-top: 8px; width: 70%; }
.hk-s { margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }


/* ---------- Stablecoins ---------- */
.euro-hl { padding: clamp(22px, 3vw, 34px); }

.euro-phrase {
    max-width: 24ch;
    font-size: clamp(28px, 3.8vw, 50px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
    text-wrap: balance;
}

.euro-phrase .sk-line { width: 60%; height: 36px; }

.euro-split {
    height: 8px;
    margin-top: 24px;
    border-radius: 99px;
    overflow: hidden;
    background: var(--line-2);
}

.euro-split i { display: block; height: 100%; width: 0; min-width: 4px; background: var(--accent-ui); border-radius: 99px; transition: width .9s cubic-bezier(.2, .7, .2, 1); }

.euro-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted);
}

.stable-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.chart-card { margin: 0; padding: 20px 20px 12px; }
.chart-card figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.chg-row { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.chg-row b { font-weight: 500; }
.ch-ref { fill: var(--surface); stroke: var(--accent-ui); stroke-width: 2; }
.ch-reft { fill: var(--body); font: 500 11px var(--font-mono); }
.chart-body { margin-top: 14px; }
.chart-body svg { width: 100%; height: auto; overflow: visible; }

.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--muted); font: 400 11px var(--font-mono); }
.ch-line { fill: none; stroke: var(--accent-ui); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: var(--accent-ui); opacity: .1; }
.ch-dot { fill: var(--accent-ui); stroke: var(--surface); stroke-width: 2; }
.ch-cursor { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }

.chart-wrap { position: relative; }

.ch-tip {
    position: absolute;
    top: 0;
    z-index: 2;
    pointer-events: none;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: 400 12px/1.4 var(--font-mono);
    white-space: nowrap;
    transform: translateX(-50%);
}

.table-card { padding: 20px 20px 8px; }

.ttable { margin-top: 12px; }

.trow {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 54px minmax(0, 1.1fr) 62px;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-top: 1px solid var(--line-3);
    font-size: 14px;
}

.tbody .trow:first-child { border-top: 0; }

.thead {
    align-items: end;
    line-height: 1.25;
    border-top: 0;
    padding: 0 0 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.num { text-align: right; font-family: var(--font-mono); }
.thead .num { font-family: inherit; }
.trow .nm { display: block; font-weight: 500; color: var(--ink); line-height: 1.3; }
.trow .is { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.trow .cur { font: 400 12px var(--font-mono); color: var(--body); }

.eur-card { margin-top: 16px; padding: 20px 24px 24px; }

.eur-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
}

.eur-sum { font-size: 12px; color: var(--body); }

.eur-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.eur-item {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}

.eur-item .nm { display: block; font-weight: 500; font-size: 14px; color: var(--ink); }
.eur-item .is { display: block; font-size: 12px; color: var(--muted); }

.eur-item .cap {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    font: 500 15px var(--font-mono);
    color: var(--ink);
}

.eur-item .cap .chg30 { font: 400 12px var(--font-mono); color: var(--body); }
.eur-item .cap .chg30 i { font-style: normal; color: var(--muted); }
.eur-item .cap .chg30 b { font-weight: 500; }

/* ---------- Comparador: tres tarjetas ---------- */
.cmp3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.cmp-card {
    --tc: var(--accent-ui);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 26px 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        radial-gradient(110% 60% at 0 0, color-mix(in srgb, var(--tc) 13%, transparent), transparent 62%),
        var(--surface);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.cmp-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--tc), transparent 80%);
}

.cmp-card.tone-mint { --tc: var(--pos); }
.cmp-card.tone-amber { --tc: var(--warn); }

.cmp-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--tc) 45%, var(--line));
    box-shadow: 0 26px 40px -30px var(--shadow);
}

.cmp-top { display: flex; align-items: center; justify-content: space-between; }

.cmp-ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--tc);
    background: color-mix(in srgb, var(--tc) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--tc) 28%, transparent);
}

.cmp-ico svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cmp-num { font-size: 12px; color: var(--muted); }

.cmp-title {
    margin-top: 22px;
    font-size: 23px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.18;
}

.cmp-what { margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--strong); }

.cmp-dl { margin: 22px 0 22px; }

.cmp-dl > div { padding: 13px 0; border-top: 1px solid var(--line-3); }

.cmp-dl dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmp-dl dd { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink); }

.cmp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 12px 3px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.cmp-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.cmp-pill.y-no { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.cmp-pill.y-yes { color: var(--pos); background: color-mix(in srgb, var(--pos) 13%, transparent); }
.cmp-pill.y-varies { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }

.cmp-ex { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.cmp-ex-l { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

.cmp-chip {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--tc) 32%, var(--line));
    background: color-mix(in srgb, var(--tc) 8%, transparent);
}

.cmp-link { margin-top: 12px; }
.cmp-link .link-arrow { margin-left: 0; }


.meta {
    margin: 10px 0 6px;
    display: grid;
    gap: 6px;
    font-size: 12px;
}

.meta > div {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid var(--line-3);
}

.meta dt { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; padding-top: 1px; }
.meta dd { margin: 0; color: var(--ink); line-height: 1.4; }

.item-src { margin-top: 12px; display: flex; gap: 14px; }

.item-src a {
    font: 400 12px var(--font-mono);
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 4px;
    transition: color .2s, text-decoration-color .2s;
}

.item-src a:hover { color: var(--accent); text-decoration-color: currentColor; }

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
    color: var(--muted);
    background: color-mix(in srgb, currentColor 9%, transparent);
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status[data-status="completed"] { color: var(--muted); }
.status[data-status="active"] { color: var(--pos); }
.status[data-status="pilot"] { color: var(--warn); }
.status[data-status="planned"] { color: var(--accent); }


/* ---------- Cronología de la tokenización ---------- */
.tz { position: relative; }
.tz-hint-m { display: none; }
.tz-ns { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--body); }

.tz-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.tz-seg {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.tz-seg button, .tz-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: none;
    font: 400 12.5px var(--font-mono);
    color: var(--body);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.tz-seg button:hover, .tz-btn:hover { color: var(--ink); background: var(--line-3); }

.tz-seg button[aria-pressed="true"] {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent-ui) 13%, transparent);
}

.tz-zoom { display: inline-flex; gap: 4px; margin-left: auto; }

.tz-zoom .tz-btn {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--surface);
    font: 500 18px/1 var(--font-sans);
    color: var(--ink);
}

.tz-pan { display: none; }

.tz-count { font-size: 12px; color: var(--muted); }

.tz-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tz-chip {
    --cc: var(--accent-ui);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px 0 10px;
    border: 1px solid color-mix(in srgb, var(--cc) 40%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--cc) 10%, var(--surface));
    font: 400 12.5px var(--font-mono);
    color: var(--ink);
    cursor: pointer;
    transition: opacity .2s, background-color .2s, border-color .2s;
}

.tz-chip i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cc);
}

.tz-chip b { font-weight: 400; color: var(--muted); }

.tz-chip[aria-pressed="false"] {
    background: var(--surface);
    border-color: var(--line);
    color: var(--muted);
}

.tz-chip[aria-pressed="false"] i { background: var(--line-2); }

.tz-chip.is-es { --cc: var(--pos); }

.tz-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        radial-gradient(70% 50% at 80% 0, color-mix(in srgb, var(--accent-ui) 7%, transparent), transparent 70%),
        var(--surface);
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.tz-stage.is-drag { cursor: grabbing; }
.tz-stage:focus-visible { outline: 2px solid var(--accent-ui); outline-offset: 3px; }

.tz-canvas { position: relative; width: 100%; }

.tz-ticks, .tz-lanes, .tz-items, .tz-axis { position: absolute; inset: 0; pointer-events: none; }
.tz-lanes { z-index: 0; }
.tz-items { pointer-events: none; }
.tz-items > * { pointer-events: auto; }

.tz-tk { position: absolute; top: 0; bottom: 0; width: 0; }
.tz-tk i { position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--line-3); }
.tz-tk.minor i { border-left-style: dotted; opacity: .6; }
.tz-tk b { position: absolute; left: 6px; bottom: 8px; font: 400 11px var(--font-mono); color: var(--muted); white-space: nowrap; }
.tz-tk.major b { color: var(--body); }

.mode-line .tz-tk b { bottom: auto; top: calc(var(--ay) + 14px); }
.mode-line .tz-tk i { top: calc(var(--ay) - 5px); bottom: auto; height: 12px; border-left-color: var(--line-2); }
.mode-line .tz-tk.minor i { height: 7px; top: calc(var(--ay) - 2px); }

.tz-axisline {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px;
    background:
        linear-gradient(90deg, var(--accent-ui) 0, var(--accent-ui) var(--tx, 0px), transparent var(--tx, 0px)),
        repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px);
}

.mode-line .tz-axisline { top: calc(var(--ay) - 1px); }

.tz-lane {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line-3);
}

.tz-lane-l {
    position: absolute;
    left: 12px;
    top: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cc) 14%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--cc) 30%, transparent);
    font: 400 11px var(--font-mono);
    color: var(--ink);
}

.tz-lane-l svg { width: 14px; height: 14px; fill: none; stroke: var(--cc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mode-lanes .tz-lane::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: color-mix(in srgb, var(--cc) 30%, transparent);
}

.tz-now {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed var(--accent-ui);
    pointer-events: none;
    z-index: 1;
}

.tz-now b {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-ui);
    color: #fff;
    font: 500 11px var(--font-mono);
}

[data-theme="dark"] .tz-now b { color: #0A0E17; }

.tz-item {
    --tc: var(--pos);
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    will-change: transform;
}

.tz-item.st-completed { --tc: var(--muted); }
.tz-item.st-pilot { --tc: var(--warn); }
.tz-item.st-planned { --tc: var(--accent-ui); }

.tz-dot {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    left: -8px;
    top: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tc);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 2px var(--tc);
    cursor: pointer;
    z-index: 3;
    transition: transform .2s;
}

.tz-item.st-planned .tz-dot { background: var(--surface); }

.tz-item.no-card .tz-dot { left: -6px; top: -6px; width: 12px; height: 12px; border-width: 2px; box-shadow: 0 0 0 1.5px var(--tc); }

.tz-dot::after {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--cc) 70%, transparent);
    opacity: 0;
    transition: opacity .2s;
}

.tz-item.is-sel .tz-dot { transform: scale(1.25); }
.tz-item.is-sel .tz-dot::after { opacity: 1; }
.tz-dot:hover { transform: scale(1.2); }
.tz-dot:focus-visible { outline: 2px solid var(--accent-ui); outline-offset: 5px; }

.tz-stem {
    position: absolute;
    left: -1px;
    width: 0;
    border-left: 2px solid var(--tc);
    z-index: 1;
}

.tz-item.st-planned .tz-stem { border-left-style: dotted; }
.tz-item.up .tz-stem { bottom: 8px; height: var(--stem); }
.tz-item.down .tz-stem { top: 8px; height: var(--stem); }
.tz-item.no-card .tz-stem, .tz-item.no-card .tz-card { display: none; }

.tz-card {
    position: absolute;
    left: calc(var(--cw) / -2);
    width: var(--cw);
    height: var(--ch);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 13px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        radial-gradient(90% 60% at 100% 0, color-mix(in srgb, var(--tc) 12%, transparent), transparent 65%),
        var(--surface);
    text-align: left;
    cursor: pointer;
    z-index: 2;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.tz-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--tc), transparent 75%);
}

.tz-item.up .tz-card { bottom: calc(var(--stem) + 8px); }
.tz-item.down .tz-card { top: calc(var(--stem) + 8px); }

.tz-item.st-planned .tz-card, .tz-item.is-future .tz-card { border-style: dashed; }

.tz-card:hover, .tz-item.is-sel .tz-card {
    border-color: color-mix(in srgb, var(--tc) 55%, var(--line));
    box-shadow: 0 22px 34px -26px var(--shadow);
    transform: translateY(-2px);
}

.tz-item.is-sel { z-index: 6; }

.tz-c-top { display: flex; align-items: center; gap: 8px; }

.tz-ci {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--cc) 16%, transparent);
    color: var(--cc);
}

.tz-ci svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tz-when { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.tz-c-top .status { margin-left: auto; padding: 1px 8px; font-size: 10px; letter-spacing: -0.01em; }
.tz-c-top .status::before { width: 5px; height: 5px; }

.tz-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
}

.tz-ent {
    font-size: 12px;
    line-height: 1.3;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tz-tag {
    position: relative;
    align-self: flex-start;
    margin-top: auto;
    padding: 1px 8px;
    border: 1px solid color-mix(in srgb, var(--accent-ui) 40%, transparent);
    border-radius: 999px;
    font-size: 10.5px;
    color: var(--accent);
    cursor: help;
}

.tz-tag::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 9;
    width: 230px;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: 400 12px/1.45 var(--font-sans);
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}

.tz-tag:hover::after, .tz-tag:focus-visible::after { opacity: 1; }

.mode-lanes .tz-card { gap: 3px; padding: 8px 11px 6px; border-radius: 13px; }
.mode-lanes .tz-ent, .mode-lanes .tz-tag { display: none; }
.mode-lanes .tz-title { -webkit-line-clamp: 1; font-size: 12.5px; }
.mode-lanes .tz-c-top .status { display: none; }

.tz-cluster {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg);
    font: 600 12px var(--font-mono);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 16%, transparent);
    cursor: pointer;
    z-index: 4;
    transition: transform .2s;
}

.tz-cluster:hover { transform: scale(1.12); }
.tz-cluster:focus-visible { outline: 2px solid var(--accent-ui); outline-offset: 4px; }

.tz-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font: 400 13px var(--font-mono);
    color: var(--muted);
}

.tz-mini {
    position: relative;
    height: 52px;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
    touch-action: none;
    cursor: pointer;
}

.tz-m-tick { position: absolute; bottom: 10px; width: 3px; height: 16px; margin-left: -1px; border-radius: 2px; background: var(--cc); opacity: .85; }
.tz-m-year { position: absolute; top: 4px; padding-left: 4px; border-left: 1px solid var(--line-2); font: 400 10px/1 var(--font-mono); color: var(--muted); }
.tz-m-now { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--accent-ui); }

.tz-m-win {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 8px;
    border: 2px solid var(--accent-ui);
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-ui) 14%, transparent);
    cursor: grab;
}

.tz-m-win:active { cursor: grabbing; }

.tz-panel { margin-top: 16px; padding: clamp(20px, 2.6vw, 30px); border-radius: 18px; animation: qzIn .3s ease both; }
.tz-p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tz-p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.tz-catchip {
    --cc: var(--accent-ui);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 11px 3px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cc) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--cc) 32%, transparent);
    font: 400 12px var(--font-mono);
    color: var(--ink);
}

.tz-catchip .tz-ci { width: 20px; height: 20px; }

.tz-p-close {
    flex: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.tz-p-close:hover { color: var(--ink); border-color: var(--ink); }

.tz-panel h3 { margin-top: 14px; font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.tz-p-desc { margin-top: 12px; max-width: 72ch; font-size: 15.5px; line-height: 1.6; color: var(--body); }
.tz-panel .meta { max-width: 520px; margin-top: 16px; }
.tz-panel .meta > div { grid-template-columns: 96px minmax(0, 1fr); }
.tz-p-inv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font-size: 14px; color: var(--body); }
.tz-p-inv .tz-tag { margin-top: 0; cursor: default; }
.tz-p-inv .tz-tag::after { display: none; }
.tz-p-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.tz-p-nav { display: flex; gap: 8px; }
.tz-p-nav button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: none; font: 400 12px var(--font-mono); color: var(--body); cursor: pointer; }
.tz-p-nav button:hover { color: var(--ink); border-color: var(--ink); }
.tz-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tz-list button { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: left; font: 500 14px var(--font-sans); color: var(--ink); cursor: pointer; }
.tz-list button:hover { border-color: var(--accent-ui); }

.mode-line .lvl0 { --stem: 44px; }
.mode-line .lvl1 { --stem: 182px; }
.mode-lanes .lvl0 { --stem: 8px; }
.mode-lanes .tz-ci { display: none; }

.tz-keys { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* versión vertical (móvil) */
.tz-v { display: none; }

@media (max-width: 900px) {
    .tz-hint-d { display: none; }
    .tz-hint-m { display: block; }
    .tz-stage, .tz-panel, .tz-keys { display: none !important; }
    .tz-v { display: block; }
    .tz-mode { display: none; }
    .tz-bar { gap: 8px; }
    .tz-zoom { margin-left: 0; }
    .tz-pan { display: inline-flex; gap: 4px; }
    .tz-pan .tz-btn { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); }
    .tz-count { width: 100%; }
    .tz-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: 0; padding-bottom: 2px; }
    .tz-filters::-webkit-scrollbar { display: none; }
    .tz-chip { flex: none; }
    .tz-mini { height: 46px; }

    .tz-vlist { position: relative; list-style: none; margin: 16px 0 0; padding: 0 0 0 28px; display: grid; gap: 12px; }
    .tz-vlist::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; border-left: 2px solid var(--accent-ui); }
    .tz-vyear { position: relative; font: 500 13px var(--font-mono); color: var(--ink); padding-top: 6px; }
    .tz-vyear::before { content: ""; position: absolute; left: -26px; top: 12px; width: 14px; border-top: 2px solid var(--accent-ui); }
    .tz-vnow { position: relative; font: 400 12px var(--font-mono); color: var(--accent); }
    .tz-vnow::before { content: ""; position: absolute; left: -29px; top: 50%; width: 18px; border-top: 2px dashed var(--accent-ui); }
    .tz-vnow span { padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent-ui) 12%, transparent); }
    .tz-vi { --tc: var(--pos); position: relative; }
    .tz-vi.st-completed { --tc: var(--muted); }
    .tz-vi.st-pilot { --tc: var(--warn); }
    .tz-vi.st-planned { --tc: var(--accent-ui); }
    .tz-vi > button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; }
    .tz-vi .tz-vdot { position: absolute; left: -28px; top: 18px; width: 16px; height: 16px; border-radius: 50%; background: var(--tc); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--tc); }
    .tz-vi.st-planned .tz-vdot { background: var(--bg); }
    .tz-vi .tz-card { position: relative; left: auto; top: auto; bottom: auto; width: auto; height: auto; min-height: 0; }
    .tz-vi.st-planned .tz-card { border-style: dashed; }
    .tz-vi .tz-title { -webkit-line-clamp: 3; font-size: 15px; }
    .tz-vi .tz-ent { white-space: normal; }
    .tz-vdetail { margin: -6px 0 0; padding: 16px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; background: var(--surface-2); }
    .tz-vdetail .tz-p-desc { font-size: 14.5px; margin-top: 0; }
    .tz-vdetail .meta { margin-top: 12px; }
    .tz-vempty { padding: 28px 0; text-align: center; font: 400 13px var(--font-mono); color: var(--muted); }
}

@media (min-width: 901px) {
    .tz-v { display: none !important; }
}


/* ---------- Logos de stablecoins ---------- */
.st-logo {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}

.st-fb { display: grid; place-items: center; font: 500 12px var(--font-mono); color: var(--muted); border: 1px solid var(--line-2); }

.st-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-cell > span:last-child { min-width: 0; }

.eur-item .nm-row { display: flex; align-items: center; gap: 10px; }
.eur-item .nm-row .st-logo { width: 26px; height: 26px; }

/* ---------- Herramienta de custodia: una sola tarjeta centrada + tira custody.config ---------- */
.qz-shell { max-width: 880px; margin: 0 auto; }

.qz-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px 14px 0 0;
    background: var(--d-card);
    color: var(--d-muted);
    font-size: 12px;
    border: 1px solid var(--d-line);
    border-bottom: 0;
}

.qz-strip-name { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--d-ink); }

.qz-chips {
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.qz-chips::-webkit-scrollbar { display: none; }

.qz-chips li {
    flex: none;
    display: inline-flex;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--d-line-2);
    border-radius: 999px;
    white-space: nowrap;
    color: var(--d-ink);
}

.qz-chips .k { color: var(--lilac); }
.qz-chips .k::after { content: ":"; }
.qz-chips li.is-empty { border-style: dashed; border-color: transparent; padding-left: 0; color: var(--d-muted); }
.qz-chips li.is-current { border-color: color-mix(in srgb, var(--lilac) 60%, transparent); }
.qz-chips li.qz-ok { border-color: transparent; color: var(--pos); }

.qz-main {
    display: flex;
    flex-direction: column;
    /* Altura estable entre pantallas: sin saltos al pasar de una pregunta a otra */
    min-height: 560px;
    padding: clamp(22px, 3.4vw, 40px);
    border-radius: 0 0 22px 22px !important;
    border-top-color: transparent;
}

.qz-view { display: flex; flex-direction: column; flex: 1; }

.qz-view.is-in { animation: qzIn .38s cubic-bezier(.2, .7, .2, 1) both; }

@keyframes qzIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.qz-tool { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.qz-start-text {
    margin-top: 16px;
    max-width: 30ch;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
}

.qz-gets { margin-top: 30px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.qz-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }

.qz-mini-c {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: var(--surface-2);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
}

.qz-mini-c + .qz-mini-c { border-left: 1px solid var(--line); }
.qz-mini-c i { display: block; margin-bottom: 4px; font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); }

.qz-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent-ui) 11%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-ui) 24%, transparent);
    transition: background-color .2s, color .2s;
}

.qz-i, .qz-ci {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qz-start-cta { margin-top: auto; padding-top: 36px; }
.qz-priv { margin-top: 14px; font-size: 12px; color: var(--muted); }

.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; }

.qz-back {
    padding: 4px 0;
    border: 0;
    background: none;
    font: 400 13px var(--font-mono);
    color: var(--muted);
    cursor: pointer;
    transition: color .2s;
}

.qz-back:hover { color: var(--ink); }
.qz-back[hidden] { display: block !important; visibility: hidden; }

.qz-prog { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.qz-segs { display: flex; gap: 4px; }
.qz-segs i { width: 20px; height: 4px; border-radius: 4px; background: var(--line-2); transition: background-color .3s; }
.qz-segs i.is-done { background: var(--accent-ui); }
.qz-segs i.is-now { background: color-mix(in srgb, var(--accent-ui) 55%, var(--line-2)); }
.qz-count { font-size: 12px; color: var(--muted); }

.qz-title {
    margin-top: 26px;
    max-width: 26ch;
    font-size: clamp(25px, 3vw, 32px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
}

.qz-title:focus, .res-name:focus, .qz-start-text:focus { outline: none; }

.qz-why { margin-top: 10px; }

.qz-why-btn {
    padding: 4px 0;
    border: 0;
    background: none;
    font: 400 13px var(--font-mono);
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 4px;
    cursor: pointer;
    transition: color .2s;
}

.qz-why-btn:hover { color: var(--accent); }

.qz-why p { max-width: 60ch; margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--body); }

.qz-multi { margin-top: 14px; font-size: 12px; color: var(--accent); }

/* Tarjetas unidas, sin huecos: las columnas dependen del número de opciones */
.qz-opts {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 22px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    overflow: hidden;
    background: var(--line-2);
    gap: 1px;
}

.qz-opt { grid-column: span 2; }
.qz-opts.n2 .qz-opt, .qz-opts.n4 .qz-opt { grid-column: span 3; }
.qz-opts.n5 .qz-opt:nth-child(-n + 3) { grid-column: span 2; }
.qz-opts.n5 .qz-opt:nth-child(n + 4) { grid-column: span 3; }
.qz-opts.n7 .qz-opt:nth-child(n + 4) { grid-column: span 3; }
.qz-opts.n7 .qz-opt:last-child { grid-column: span 6; }

.qz-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 140px;
    padding: 16px 16px 14px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    transition: background-color .2s, box-shadow .2s;
}

.qz-opt:hover { background: color-mix(in srgb, var(--accent-ui) 5%, var(--surface)); }

.qz-opt:focus-visible { outline: 2px solid var(--accent-ui); outline-offset: -3px; }

.qz-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qz-txt b { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.qz-txt small { font-size: 13px; line-height: 1.4; color: var(--muted); }

.qz-k {
    position: absolute;
    right: 14px;
    bottom: 12px;
    font-size: 11px;
    color: var(--muted);
    opacity: .75;
}

.qz-check {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-ui);
    color: #fff;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .2s, transform .2s;
}

.qz-check .qz-ci { width: 13px; height: 13px; stroke-width: 2.4; }

[data-theme="dark"] .qz-check { color: #0A0E17; }

.qz-opt.is-on { background: color-mix(in srgb, var(--accent-ui) 9%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent-ui); }

.qz-opt.is-on .qz-ico { background: var(--accent-ui); color: #fff; border-color: transparent; }
[data-theme="dark"] .qz-opt.is-on .qz-ico { color: #0A0E17; }
.qz-opt.is-on .qz-check { opacity: 1; transform: none; }

.qz-foot { margin-top: auto; padding-top: 28px; }
.qz-foot .btn[disabled] { opacity: .4; cursor: not-allowed; }

.q-err { margin-top: 10px; font-size: 13px; color: var(--neg); }

.res-name {
    margin-top: 12px;
    font-size: clamp(32px, 4.6vw, 54px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.04;
    text-wrap: balance;
}

.res-name .serif { font-style: italic; color: var(--accent); }

.res-sum { margin-top: 12px; max-width: 60ch; font-size: 17px; line-height: 1.55; color: var(--body); }

.res3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }

.res-box { padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.res-box.wide { margin-top: 12px; }

.res-box h4 {
    font: 500 11px var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.res-box .big { margin-top: 8px; font-size: 17px; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); line-height: 1.3; }
.res-box p { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--body); }
.res-box p.big { font-size: 17px; }

.res-box ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.res-box li { font-size: 14px; line-height: 1.5; color: var(--body); }

.res-det { margin-top: 10px; }
.res-det summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font: 400 12px var(--font-mono); color: var(--muted); }
.res-det p { max-width: 70ch; margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--body); }

.res-watch li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; }
.res-watch li .qz-ci { margin-top: 1px; color: var(--pos); }
.res-watch b { display: block; font-weight: 500; color: var(--ink); }

.res-pcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.res-pc li { position: relative; padding-left: 22px; }
.res-pc li::before { position: absolute; left: 0; top: 0; font: 500 14px var(--font-mono); }
.res-pc.pros li::before { content: "+"; color: var(--pos); }
.res-pc.cons li::before { content: "\2212"; color: var(--neg); }

.res-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 28px; }
.res-disc { margin-top: 18px; font-size: 12px; line-height: 1.5; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    .qz-view.is-in { animation: none; }
    .qz-opt, .qz-check, .w3-jump a::after { transition: none; }
}

/* ---------- Comparador: filas de rendimiento nativo, extra con ⓘ y riesgo ---------- */
.cmp-sub { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--body); }

.info {
    position: relative;
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    font-weight: 500;
    cursor: help;
    white-space: nowrap;
    text-decoration: underline dotted;
    text-decoration-color: var(--accent-ui);
    text-underline-offset: 4px;
}

.info svg {
    width: 14px;
    height: 14px;
    display: inline-block;
    margin-left: 4px;
    vertical-align: -2px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
}

.info::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 6;
    width: min(300px, 78vw);
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: 400 12.5px/1.5 var(--font-sans, inherit);
    letter-spacing: 0;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .15s, transform .15s;
}

.info:hover::after, .info:focus-visible::after, .info.is-open::after { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) { .info::after { left: 0; transform: translate(0, 4px); } .info:hover::after, .info:focus-visible::after, .info.is-open::after { transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .stable-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .cmp3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
    .tk { min-width: 156px; padding: 14px 16px 22px; }
}

@media (max-width: 520px) {
    .trow { grid-template-columns: minmax(0, 1fr) 40px 84px 50px; gap: 6px; font-size: 13px; }
    .thead { font-size: 9.5px; letter-spacing: 0; white-space: nowrap; }
    .table-card, .chart-card { padding-left: 16px; padding-right: 16px; }
    .eur-card { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Herramienta: responsive ---------- */
@media (max-width: 860px) {
    .qz-mini { grid-template-columns: minmax(0, 1fr); }
    .qz-mini-c { flex-direction: row; align-items: center; }
    .qz-mini-c + .qz-mini-c { border-left: 0; border-top: 1px solid var(--line); }
    .qz-opts { grid-template-columns: minmax(0, 1fr); }
    .qz-opt, .qz-opts .qz-opt:nth-child(n) { grid-column: auto; }
    .qz-opt { flex-direction: row; align-items: center; min-height: 0; padding: 14px 44px 14px 14px; gap: 14px; }
    .qz-k { display: none; }
    .qz-check { top: 50%; margin-top: -11px; }
    .res3, .res-pcs { grid-template-columns: minmax(0, 1fr); }
    .qz-main { min-height: 0; }
}

@media (max-width: 420px) {
    .qz-segs i { width: 12px; }
}

/* ---------- Cabecera y barra: responsive ---------- */
@media (max-width: 760px) {
    .hk { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .hk { gap: 10px; }
    .hk-i { padding: 16px 16px 14px; }
    .kpi-l { font-size: 10.5px; }
    .hk-v { font-size: 28px; min-height: 0; white-space: normal; }
    .hk-v small { display: block; margin: 2px 0 0; }
    .w3-bar { top: 66px; gap: 12px; }
    .w3-jump { gap: 18px; }
    .w3-cta { display: none; }
    .anchor-ok { left: auto; right: 0; top: calc(100% + 4px); transform: none; }
}
