/* ==========================================================================
   Información de interés
   ========================================================================== */

/* ---- Subnavegación fija ------------------------------------------------ */

html { scroll-padding-top: calc(var(--header-h) + 84px); }

.df-subnav {
    position: sticky;
    top: var(--header-h);
    z-index: 900;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.df-subnav-lista {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-block: 10px;
    scrollbar-width: none;
}
.df-subnav-lista::-webkit-scrollbar { display: none; }
.df-subnav-lista a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}
.df-subnav-lista .df-icono { width: 17px; height: 17px; }
.df-subnav-lista a:hover { background: var(--paper); color: var(--navy); }
.df-subnav-lista a.is-activo { background: var(--navy); color: #fff; }
.df-subnav-lista a.is-activo .df-icono { color: var(--c2); }

/* ---- Grupos E / F / C / D ---------------------------------------------- */

.df-grupos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 40px; }
.df-grupo {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
}
.df-grupo-letra {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--navy);
    color: var(--c2);
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
}
.df-grupo-codigos { color: var(--c4); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.df-grupo h3 { margin-top: 6px; color: var(--navy); font-size: 1.08rem; line-height: 1.25; }
.df-grupo p:last-child { margin-top: 8px; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ---- Explorador -------------------------------------------------------- */

.df-explorador {
    padding: clamp(24px, 3.4vw, 40px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.df-explorador-cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.df-explorador-titulo { color: var(--navy); font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; }
.df-explorador-ayuda { margin-top: 4px; color: var(--muted); font-size: .95rem; }
.df-leyenda { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .84rem; font-weight: 700; }
.df-leyenda span { display: inline-flex; align-items: center; gap: 8px; }
.df-leyenda i { width: 26px; height: 10px; border-radius: 99px; }
.df-leyenda .is-vendedor { background: linear-gradient(90deg, var(--c5), var(--c4)); }
.df-leyenda .is-comprador { background: var(--c2); }

.df-codigos {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 18px 28px;
    margin-top: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}
.df-codigos-modo {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.df-codigos-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.df-codigo {
    min-width: 72px;
    padding: 12px 14px;
    border: 1.5px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--navy);
    transition: border-color .2s, background-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.df-codigo-sigla { font-family: var(--font-serif); font-size: 1.22rem; font-weight: 600; letter-spacing: .03em; line-height: 1; }
.df-codigo:hover { border-color: var(--c3); transform: translateY(-2px); }
.df-codigo[aria-selected="true"] {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
    box-shadow: var(--glow-navy);
}

.js .df-inco-panel:not(.is-active) { display: none; }
.df-inco-panel { padding-top: 30px; border-radius: 12px; }
.no-js .df-inco-panel + .df-inco-panel { margin-top: 30px; border-top: 1px solid var(--line); }
.df-inco-panel:focus-visible { outline-offset: 8px; }
.df-inco-cabecera { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 22px; }
.df-inco-codigo {
    display: grid;
    place-items: center;
    width: 92px; height: 92px;
    border-radius: 24px;
    background: linear-gradient(140deg, var(--navy), var(--c4));
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: .02em;
    box-shadow: var(--glow-navy);
}
.df-inco-titulos h3 { color: var(--navy); font-size: 1.7rem; }
.df-inco-titulos h3 span { margin-left: 6px; color: var(--c4); font-family: var(--font-sans); font-size: .9rem; font-weight: 700; }
.df-inco-titulos p { max-width: 70ch; margin-top: 10px; color: var(--muted); }
.df-inco-panel.is-active .df-inco-cabecera { animation: dfSubir .6s var(--ease-out) both; }

/* Trayecto: barra de costos + marcador de riesgo */
.df-trayecto { padding: 58px 14px 60px; }
.df-trayecto-pista { position: relative; height: 12px; border-radius: 99px; background: var(--c2); }
.df-trayecto-vendedor {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--costo);
    border-radius: 99px;
    background: linear-gradient(90deg, var(--c5), var(--c4));
}
.df-inco-panel.is-active .df-trayecto-vendedor { animation: dfCrecer 1.1s var(--ease) both; }
@keyframes dfCrecer { from { width: 0; } }

.df-trayecto-hito { position: absolute; top: 50%; left: var(--pos); }
.df-trayecto-hito i {
    position: absolute;
    left: 0; top: 0;
    width: 14px; height: 14px;
    border: 2.5px solid var(--navy);
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}
.df-trayecto-hito small {
    position: absolute;
    top: 16px;
    left: 0;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
}
.df-trayecto-hito.is-arriba small { top: auto; bottom: 16px; }
.df-trayecto-hito.is-primero small { transform: translateX(-10px); }
.df-trayecto-hito.is-ultimo small { transform: translateX(calc(-100% + 10px)); }
.df-trayecto-hito.is-atenuado { opacity: .35; }

.df-trayecto-riesgo {
    position: absolute;
    top: 50%;
    left: var(--riesgo);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--c2);
    box-shadow: 0 0 0 6px rgba(95, 176, 201, .28), var(--shadow-xs);
    transform: translate(-50%, -50%);
}
.df-trayecto-riesgo .df-icono { width: 19px; height: 19px; }
.df-inco-panel.is-active .df-trayecto-riesgo { animation: dfRiesgo 1.1s var(--ease) both; }
@keyframes dfRiesgo { from { left: 0; } }

.df-inco-puntos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.df-inco-punto {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--paper);
}
.df-inco-punto-icono {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px; height: 44px;
    border-radius: 13px;
    background: var(--navy);
    color: var(--c2);
}
.df-inco-punto.is-costo .df-inco-punto-icono { background: var(--c2); color: var(--navy); }
.df-inco-punto small { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.df-inco-punto strong { color: var(--navy); font-size: 1.02rem; }

.df-obligaciones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; }
.df-obligacion { padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.df-obligacion dt { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; line-height: 1.35; text-transform: uppercase; }
.df-obligacion dd { margin: 10px 0 0; }
.df-quien { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 800; }
.df-quien::before { content: ""; width: 12px; height: 12px; border-radius: 50%; }
.is-vendedor .df-quien::before { background: linear-gradient(135deg, var(--c5), var(--c4)); }
.is-comprador .df-quien::before { background: var(--c2); }
.is-libre .df-quien { color: var(--muted); }
.is-libre .df-quien::before { border: 1.5px dashed var(--muted); }
.df-obligacion small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.35; }

.df-explorador-nota { margin-top: 22px; color: var(--muted); font-size: .85rem; }

/* ---- Conversor --------------------------------------------------------- */

.no-js .df-conversor { display: none; }
.df-conversor {
    display: grid;
    gap: 26px;
    padding: clamp(24px, 3.4vw, 36px);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.df-magnitudes {
    display: inline-flex;
    flex-wrap: wrap;
    justify-self: start;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
}
.df-magnitud { position: relative; }
.df-magnitud input { position: absolute; opacity: 0; pointer-events: none; }
.df-magnitud span {
    display: block;
    padding: 10px 18px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s, color .2s, box-shadow .2s;
}
.df-magnitud span:hover { color: var(--navy); }
.df-magnitud input:checked + span { background: var(--navy); color: #fff; box-shadow: var(--glow-navy); }
.df-magnitud input:focus-visible + span { outline: 2px solid var(--c3); outline-offset: 2px; }

.df-conversor-cuerpo {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 16px;
}
.df-conversor-cuerpo .df-input { height: 54px; padding-block: 0; }
.df-conversor-cantidad .df-input { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; }
.df-conversor-cambiar {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    transition: transform .4s var(--ease), background-color .2s, border-color .2s;
}
.df-conversor-cambiar:hover { background: var(--c1); border-color: var(--c3); transform: rotate(180deg); }

.df-conversor-resultado {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    padding: 26px 28px;
    overflow: hidden;
    isolation: isolate;
    border-radius: 22px;
    background: linear-gradient(120deg, var(--navy), #34407e);
    color: #fff;
}
.df-conversor-resultado::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -120px; right: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(167, 224, 219, .3), transparent 62%);
}
.df-conversor-numero {
    font-family: var(--font-serif);
    font-size: clamp(2.1rem, 4.6vw, 3.3rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1;
    overflow-wrap: anywhere;
}
.df-conversor-unidad { color: var(--c2); font-size: 1.1rem; font-weight: 700; }
.df-conversor-formula { flex-basis: 100%; color: var(--on-dark-2); font-size: .92rem; }

/* ---- Tabla de equivalencias -------------------------------------------- */

.df-tabla-bloque {
    margin-top: 36px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
}
.df-tabla-cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.df-tabla-cabecera h3 { color: var(--navy); font-size: 1.45rem; }
.df-buscador {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(340px, 100%);
    padding: 0 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: var(--paper);
    transition: border-color .2s, box-shadow .2s;
}
.df-buscador:focus-within { border-color: var(--c3); box-shadow: 0 0 0 4px rgba(95, 176, 201, .18); }
.df-buscador .df-icono { width: 18px; height: 18px; color: var(--muted); }
.df-buscador input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; outline: none; }
.df-tabla-scroll { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
.df-tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.df-tabla thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.df-tabla td { padding: 12px 16px; border-top: 1px solid var(--line); }
.df-tabla tbody tr:first-child td { border-top: 0; }
.df-tabla tbody tr { transition: background-color .15s; }
.df-tabla tbody tr:hover { background: rgba(227, 246, 245, .55); }
.df-tabla .is-num { color: var(--navy); font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.df-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--c1);
    color: var(--c4);
    font-size: .72rem;
    font-weight: 800;
}
.df-tabla-vacia { padding: 28px; color: var(--muted); text-align: center; }

/* ---- Contenedores ------------------------------------------------------ */

.df-filtros {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 34px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
}
.df-filtro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 700;
    transition: background-color .2s, color .2s, box-shadow .2s;
}
.df-filtro span {
    display: grid;
    place-items: center;
    min-width: 24px; height: 24px;
    padding: 0 6px;
    border-radius: 99px;
    background: #fff;
    color: var(--navy);
    font-size: .74rem;
}
.df-filtro:hover { color: var(--navy); }
.df-filtro.is-activo { background: var(--navy); color: #fff; box-shadow: var(--glow-navy); }
.df-filtro.is-activo span { background: rgba(255, 255, 255, .16); color: #fff; }

.df-contenedores-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.df-cont { --radius: 22px; }
.df-cont[hidden] { display: none; }
.df-cont.is-entrando { animation: dfSubir .5s var(--ease-out) both; }
.df-cont-cuerpo {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 64px 24px 24px;
    border-radius: 22px;
    background: var(--paper);
    transition: box-shadow .3s, background-color .3s;
}
.df-cont:hover .df-cont-cuerpo { background: #fff; box-shadow: var(--shadow-sm); }
.df-cont h3 { color: var(--navy); font-size: 1.45rem; }
.df-cont h3 span { margin-left: 4px; color: var(--c4); font-family: var(--font-sans); font-size: .85rem; font-weight: 800; }
.df-cont-cuerpo > p { flex: 1; color: var(--muted); font-size: .93rem; }

.df-silueta { position: absolute; top: 14px; right: 20px; width: auto; height: 44px; }
.df-silueta-suelo { stroke: var(--line-strong); stroke-width: 1; }
.df-silueta-cuerpo { fill: rgba(95, 176, 201, .2); stroke: var(--c4); stroke-width: 1.3; stroke-linejoin: round; }
.df-silueta-linea { stroke: var(--c4); stroke-width: .8; stroke-opacity: .45; }
.df-silueta-equipo { fill: var(--c4); }
.df-silueta-marco { stroke: var(--c4); stroke-width: 1; stroke-dasharray: 3 2; }
.df-silueta-lona { stroke: var(--c3); stroke-width: 1.4; stroke-dasharray: 3 2; }
.df-silueta-carga { fill: rgba(62, 109, 156, .22); stroke: var(--c4); stroke-width: 1; stroke-dasharray: 2 2; }
.df-silueta-ventila { stroke: var(--c4); stroke-width: 1.6; stroke-dasharray: 2 3; }

.df-cont-metricas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.df-cont-metricas div { padding: 12px; border-radius: 12px; background: #fff; }
.df-cont:hover .df-cont-metricas div { background: var(--paper); }
.df-cont-metricas dt { color: var(--muted); font-size: .63rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.df-cont-metricas dd { margin: 5px 0 0; color: var(--navy); font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; line-height: 1; white-space: nowrap; }
.df-cont-metricas small { margin-left: 3px; color: var(--muted); font-family: var(--font-sans); font-size: .7rem; font-weight: 700; }

.df-cont-medidas { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
.df-cont-medidas th, .df-cont-medidas td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: right; }
.df-cont-medidas thead th { border-top: 0; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.df-cont-medidas th:first-child { padding-left: 0; text-align: left; }
.df-cont-medidas tbody th { color: var(--ink); font-weight: 700; }
.df-cont-medidas td { color: var(--navy); font-weight: 600; }

/* ---- Enlaces ----------------------------------------------------------- */

.df-enlaces-grupos { display: grid; gap: 38px; }
.df-enlaces-titulo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--c4);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.df-enlaces-titulo::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.df-enlaces-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.df-enlace {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 48px 22px 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.df-enlace:hover { transform: translateY(-3px); border-color: transparent; box-shadow: var(--shadow-sm); }
.df-enlace-sigla {
    display: grid;
    place-items: center;
    flex: none;
    min-width: 50px; height: 50px;
    padding: 0 8px;
    border-radius: 14px;
    background: var(--c1);
    color: var(--navy);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .02em;
    transition: background-color .3s, color .3s;
}
.df-enlace:hover .df-enlace-sigla { background: var(--navy); color: var(--c2); }
.df-enlace-texto { display: grid; gap: 4px; }
.df-enlace-texto strong { color: var(--navy); font-size: 1.02rem; line-height: 1.3; }
.df-enlace-texto small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.df-enlace-texto em { margin-top: 4px; color: var(--c4); font-size: .78rem; font-style: normal; font-weight: 700; }
.df-enlace-ir {
    position: absolute;
    top: 20px; right: 18px;
    width: 18px; height: 18px;
    color: var(--muted);
    transition: transform .3s var(--ease-out), color .3s;
}
.df-enlace:hover .df-enlace-ir { color: var(--navy); transform: translate(2px, -2px); }
