.ip-page-lead {
    max-width: 790px;
    margin-top: 15px;
}

.ip-intro {
    max-width: 900px;
}

/* ============================================================
   V9 · Diagnóstico IPv4 / IPv6
   El panel de resultado conserva su identidad oscura en ambos temas.
   ============================================================ */

.ip-connectivity-card {
    padding: 20px 21px;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 14px;
    background: rgba(7, 24, 30, .16);
}

.ip-connectivity-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.ip-connectivity-heading .result-group-title {
    margin-bottom: 5px;
}

.ip-connectivity-copy {
    max-width: 700px;
    margin: 0;
    color: #9FB6BC;
    font-size: .78rem;
    line-height: 1.55;
}

.ip-stack-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: #B7CACF;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .69rem;
    font-weight: 800;
    white-space: nowrap;
}

.ip-stack-badge.is-dual {
    border-color: rgba(59, 162, 114, .24);
    background: rgba(59, 162, 114, .10);
    color: #A9E1C1;
}

.ip-stack-badge.is-single {
    border-color: rgba(216, 155, 43, .24);
    background: rgba(216, 155, 43, .09);
    color: #E7C887;
}

.ip-stack-badge.is-limited {
    color: #C7D5D8;
}

.ip-access-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #88A3AA;
    font-size: .7rem;
}

.ip-access-line strong {
    color: #CBE9ED;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 850;
}

.ip-family-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ip-family-item {
    position: relative;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.ip-family-item.is-current {
    border-color: rgba(34, 199, 214, .20);
    box-shadow: inset 0 0 0 1px rgba(34, 199, 214, .035);
}

.ip-family-item.is-current::after {
    content: "IP de acceso";
    position: absolute;
    right: 14px;
    bottom: 12px;
    color: #6E929A;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ip-family-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.ip-family-name {
    color: #91ABB1;
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ip-family-state {
    color: #91ABB1;
    font-size: .68rem;
    font-weight: 750;
    text-align: right;
}

.ip-family-state.is-ok {
    color: #8ED3AE;
}

.ip-family-state.is-ok::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--c22-success);
    vertical-align: 1px;
}

.ip-family-value-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ip-family-address {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    color: #F2F8F9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(.9rem, 2vw, 1.03rem);
    font-weight: 780;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ip-family-copy {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    background: rgba(255, 255, 255, .045);
    color: #D9EEF1;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}

.ip-family-copy:hover,
.ip-family-copy:focus-visible {
    border-color: rgba(34, 199, 214, .24);
    background: rgba(34, 199, 214, .10);
    color: #fff;
}

.ip-family-copy:focus-visible {
    outline: 2px solid rgba(34, 199, 214, .32);
    outline-offset: 2px;
}

.ip-family-network {
    display: grid;
    margin: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.ip-family-network > div {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.ip-family-network dt,
.ip-family-network dd {
    margin: 0;
}

.ip-family-network dt {
    color: #78969D;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ip-family-network dd {
    color: #DCECEF;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .72rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ip-family-help {
    margin: 10px 0 20px;
    color: #819DA4;
    font-size: .69rem;
    line-height: 1.5;
}

.ip-connectivity-privacy {
    margin: 14px 0 0;
    color: #819DA4;
    font-size: .68rem;
    line-height: 1.55;
}

.ip-connectivity-privacy strong {
    color: #A6C4CA;
    font-weight: 750;
}

.result-context-divider {
    margin-bottom: 18px;
}

.result-context-note {
    max-width: 880px;
    margin: 0 0 15px;
    color: #91ACB2;
    font-size: .73rem;
    line-height: 1.55;
}

.result-context-note strong {
    color: #CBE5E9;
}

.ip-location-card {
    width: 100%;
}

.ip-location-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ip-location-access {
    color: #80A0A7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ip-location-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
}

.ip-location-list .result-row:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.result-map-ip {
    flex: 0 1 auto;
    max-width: 48%;
    color: #9CB6BC;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .72rem;
    line-height: 1.45;
    text-align: right;
    overflow-wrap: anywhere;
}

/* ============================================================
   V9 · Interpretación
   Compatible de origen con modo día y modo noche.
   ============================================================ */

.ip-interpretation {
    margin-top: 56px;
}

.ip-interpretation-heading {
    margin-bottom: 22px;
}

.ip-guidance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ip-guidance-card {
    padding: 24px 25px;
    border: 1px solid #DCE6E8;
    border-radius: 15px;
    background: #fff;
}

.ip-guidance-kicker {
    display: block;
    margin-bottom: 9px;
    color: #0E929E;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.ip-guidance-card h3 {
    margin: 0 0 8px;
    color: #0F2A33;
    font-size: 1rem;
    line-height: 1.35;
}

.ip-guidance-card p {
    margin: 0;
    color: #62767D;
    font-size: .88rem;
    line-height: 1.65;
}

/* ============================================================
   V9 · Resultados técnicos plegables
   ============================================================ */

.ip-technical-details {
    margin-top: 18px;
    border: 1px solid #DCE6E8;
    border-radius: 15px;
    background: #fff;
    overflow: hidden;
}

.ip-technical-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 21px;
    color: #0F2A33;
    font-size: .85rem;
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.ip-technical-details > summary::-webkit-details-marker {
    display: none;
}

.ip-technical-details > summary::before {
    content: ">";
    margin-right: 8px;
    color: #0E929E;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    transition: transform .16s ease;
}

.ip-technical-details[open] > summary::before {
    transform: rotate(90deg);
}

.ip-details-hint {
    margin-left: auto;
    color: #7C8E94;
    font-size: .69rem;
    font-weight: 700;
}

.ip-technical-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 21px 21px;
}

.ip-technical-group {
    min-width: 0;
    padding: 18px;
    border: 1px solid #E5ECEE;
    border-radius: 12px;
    background: #F8FAFA;
}

.ip-technical-group-wide {
    grid-column: 1 / -1;
}

.ip-technical-group h2 {
    margin: 0 0 12px;
    color: #0F2A33;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.ip-technical-list {
    margin: 0;
}

.ip-technical-list > div {
    display: grid;
    grid-template-columns: minmax(105px, .7fr) minmax(0, 1.6fr);
    gap: 14px;
    padding: 8px 0;
    border-top: 1px solid #E5ECEE;
}

.ip-technical-list dt,
.ip-technical-list dd {
    margin: 0;
}

.ip-technical-list dt {
    color: #73868C;
    font-size: .72rem;
}

.ip-technical-list dd {
    color: #263C44;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .73rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* ============================================================
   Modo oscuro específico de los nuevos bloques exteriores.
   El resultado principal ya es oscuro por diseño en ambos modos.
   ============================================================ */

html[data-theme="dark"] .ip-guidance-card,
html[data-theme="dark"] .ip-technical-details {
    border-color: #263D44;
    background: #102329;
}

html[data-theme="dark"] .ip-guidance-kicker {
    color: #62D1DB;
}

html[data-theme="dark"] .ip-guidance-card h3,
html[data-theme="dark"] .ip-technical-details > summary {
    color: #E7F1F3;
}

html[data-theme="dark"] .ip-guidance-card p {
    color: #9AAFB5;
}

html[data-theme="dark"] .ip-details-hint {
    color: #8EA4AA;
}

html[data-theme="dark"] .ip-technical-group {
    border-color: #263D44;
    background: #0C1C21;
}

html[data-theme="dark"] .ip-technical-group h2 {
    color: #DDECEF;
}

html[data-theme="dark"] .ip-technical-list > div {
    border-top-color: #22373E;
}

html[data-theme="dark"] .ip-technical-list dt {
    color: #879DA3;
}

html[data-theme="dark"] .ip-technical-list dd {
    color: #C8D9DD;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 780px) {
    .ip-connectivity-heading {
        display: block;
    }

    .ip-stack-badge {
        display: inline-flex;
        margin-top: 10px;
    }

    .ip-family-grid,
    .ip-guidance-grid,
    .ip-technical-body,
    .ip-location-list {
        grid-template-columns: 1fr;
    }

    .ip-location-list .result-row:last-child:nth-child(odd),
    .ip-technical-group-wide {
        grid-column: auto;
    }

    .result-map-ip {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 580px) {
    .ip-page-lead {
        margin-top: 12px;
    }

    .ip-connectivity-card {
        padding: 17px 16px;
    }

    .ip-family-item {
        padding: 14px;
    }

    .ip-family-item.is-current::after {
        position: static;
        display: inline-block;
        margin-top: 2px;
    }

    .ip-family-help {
        margin-bottom: 10px;
    }

    .ip-guidance-card {
        padding: 21px;
    }

    .ip-technical-details > summary {
        padding: 17px 18px;
    }

    .ip-technical-body {
        padding: 0 16px 16px;
    }

    .ip-technical-group {
        padding: 16px;
    }

    .ip-technical-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ip-technical-details > summary::before {
        transition: none;
    }
}


/* ============================================================
   V9 FINAL · Resultados técnicos integrados en el resultado
   ============================================================ */

/*
 * El panel principal de ¿Cuál es mi IP? mantiene identidad oscura
 * tanto en modo día como en modo noche. Por ello, al quedar ahora
 * Resultados técnicos dentro de result-panel, su apariencia debe
 * pertenecer al mismo sistema visual en ambos temas.
 */

.result-panel .ip-technical-details {
    margin-top: 24px;
    border-color: rgba(255, 255, 255, .085);
    background: rgba(7, 24, 30, .16);
}

.result-panel .ip-technical-details > summary {
    color: #DDECEF;
}

.result-panel .ip-details-hint {
    color: #88A3AA;
}

.result-panel .ip-technical-group {
    border-color: rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .025);
}

.result-panel .ip-technical-group h2 {
    color: #DDECEF;
}

.result-panel .ip-technical-list > div {
    border-top-color: rgba(255, 255, 255, .06);
}

.result-panel .ip-technical-list dt {
    color: #78969D;
}

.result-panel .ip-technical-list dd {
    color: #DCECEF;
}

/* ============================================================
   V9 FINAL · Ubicación aproximada más compacta en escritorio
   ============================================================ */

/*
 * En móvil se conserva exactamente el layout existente.
 * En escritorio acortamos la distancia entre etiqueta y valor.
 * El quinto dato (Zona horaria) deja de ocupar las dos columnas:
 * queda en la columna izquierda, igual que el resto de la ficha.
 */
@media (min-width: 781px) {
    .ip-location-list .result-row {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        column-gap: 16px;
        align-items: start;
    }

    .ip-location-list .result-row:last-child:nth-child(odd) {
        grid-column: auto;
    }
}
