.details-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 36px 32px 80px
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px
}

.back-link:hover {
    color: var(--accent)
}

.back-link svg {
    width: 14px;
    height: 14px
}

.details-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px
}

.query-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-strong);
    word-break: break-all;
    letter-spacing: -.5px
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease, border-color .15s ease
}

.copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent)
}

.copy-btn svg {
    width: 15px;
    height: 15px;
    pointer-events: none
}

.copy-btn.copied {
    color: #16a34a;
    border-color: #16a34a
}

.copy-field-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted-2);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    vertical-align: middle;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.copy-field-btn svg {
    width: 12px;
    height: 12px;
    pointer-events: none;
}

.copy-field-btn:hover {
    color: var(--accent);
    border-color: var(--card-border);
    background: var(--surface);
}

.copy-field-btn.copied {
    color: #16a34a;
    border-color: #16a34a;
}

.value-with-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.value-with-copy .value-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

.prefixes-netblock-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.prefixes-netblock-wrap .prefixes-netblock {
    flex: 1;
    min-width: 0;
}

.prefixes-netblock-wrap .copy-field-btn {
    opacity: 0;
    transition: opacity .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.prefixes-table-row:hover .copy-field-btn,
.prefixes-netblock-wrap .copy-field-btn:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .prefixes-netblock-wrap .copy-field-btn {
        opacity: 1;
    }
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px
}

.freshness-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted-2);
    background: var(--surface);
    border: 1px solid var(--card-border);
}

.freshness-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--text-muted-2);
}

@media (max-width:640px) {
    .freshness-badge {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    color: var(--text-strong)
}

.chip.chip-asn {
    color: var(--accent);
    border-color: var(--accent-soft)
}

.chip.chip-rir {
    color: var(--accent-purple)
}

.chip.chip-good {
    color: #16a34a
}

.chip.chip-bad {
    color: var(--bad)
}

.chip.chip-warn {
    color: var(--warn)
}

.chip.chip-asn {
    display: inline-flex;
    align-items: center;
    gap: 5px
}

.rpki-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
}

.rpki-badge {
    width: 12px;
    height: 12px;
    flex-shrink: 0
}

.rpki-badge.valid {
    color: #16a34a
}

.rpki-badge.invalid {
    color: var(--bad)
}

.rpki-badge-inline {
    width: 11px;
    height: 11px;
    flex-shrink: 0
}

.rpki-badge-inline.valid {
    color: #16a34a
}

.rpki-badge-inline.invalid {
    color: var(--bad)
}

.info-value .sub.rpki-sub {
    display: flex;
    align-items: center;
    gap: 4px
}

.details-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 20px;
    align-items: start
}

.details-grid > .left-col,
.details-grid > .right-col {
    min-width: 0;
}

.info-card {
    border: none;
    border-radius: 18px;
    background: var(--card-bg);
    overflow: hidden;
    margin: 10px;
    min-width: 0;
    max-width: 100%;
}

.info-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    padding: 16px 20px;
    background: var(--surface)
}

.info-row {
    display: flex;
}

.info-row:nth-child(odd) {
    background: transparent;
}

.info-table {
    width: 100%;
    border-collapse: collapse
}

.info-row:last-child {
    border-bottom: none
}

.info-label {
    flex: 0 0 40%;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--text-muted-2);
}

.info-label-icon svg {
    width: 100%;
    height: 100%;
}

.info-value {
    flex: 1;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-strong);
    font-weight: 600;
    word-break: break-word
}

.info-value a {
    color: var(--accent);
    text-decoration: none
}

.info-value a:hover {
    text-decoration: underline
}

.info-value.muted {
    color: var(--text-muted-2);
    font-weight: 400
}

.info-value .sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted-2);
    font-weight: 400;
    margin-top: 2px
}

.info-help-btn {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.info-help-btn:hover,
.info-help-btn[aria-expanded="true"] {
    color: var(--accent);
    border-color: var(--accent);
}

.info-help-popover {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: min(280px, 80vw);
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-strong);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.info-help-popover strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.info-help-popover p {
    margin: 0;
    color: var(--text-muted);
}

.info-help-popover.visible {
    display: block;
}

.map-frame-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/11;
    border-top: 1px solid var(--card-border);
    background: var(--surface);
}

.map-frame-wrapper iframe,
.map-frame-wrapper .leaflet-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.leaflet-map .leaflet-control-attribution {
    font-size: 10px;
}

.map-approx-note {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1000;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    pointer-events: none;
}

.map-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border-top: 1px solid var(--card-border);
    background: var(--card-bg)
}

.map-open-btn:hover {
    background: var(--accent-soft)
}

.map-open-btn svg {
    width: 13px;
    height: 13px
}

.security-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 20px
}

.notice-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--accent-soft);
    border: 1px solid var(--card-border);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px
}

.notice-card svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 1px
}

.notice-card.danger {
    background: color-mix(in srgb, var(--bad) 12%, transparent);
    border-color: color-mix(in srgb, var(--bad) 35%, transparent);
    color: var(--bad)
}

.notice-card.danger svg {
    color: var(--bad)
}

.error-card {
    text-align: center;
    padding: 70px 32px
}

.error-card .code-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--text-muted-2);
    background: var(--surface);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 20px
}

.error-card h1 {
    font-size: 28px;
    margin-bottom: 14px;
    color: var(--text)
}

.error-card p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 28px
}

@media (max-width:860px) {
    .details-grid {
        grid-template-columns: 1fr
    }
}

.security-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    flex-wrap: wrap;
}

.security-status-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.security-status-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.security-status-icon.good {
    color: #22c55e;
    background: #22c55e18;
}

.security-status-icon.bad {
    color: #ef4444;
    background: #ef444418;
}

.security-status-icon.warn {
    color: #f59e0b;
    background: #f59e0b18;
}

.security-status-icon svg {
    width: 18px;
    height: 18px;
}

.security-status-text {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
}

.security-status-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
}

.security-status-subtitle {
    margin-top: 3px;
    font-size: 13px;
    color: #cfcdcd;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: normal;
}

.security-status-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.security-status-badge.bad {
    background: #dc2626;
}

.security-status-badge.warn {
    background: #d97706;
}

.security-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 20px;
    text-align: center;
}

.security-empty-state svg {
    width: 34px;
    height: 34px;
    color: #22c55e;
}

.security-empty-state p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width:640px) {

    .security-status-card {
        flex-direction: column;
        align-items: stretch;
    }

    .security-status-left {
        width: 100%;
    }

    .security-status-badge {
        align-self: flex-start;
        margin-left: 0;
        margin-top: 6px;
    }

    .abuse-contacts-wrap {
        padding: 4px 16px 14px;
    }

    .abuse-contact-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .details-wrap {
        padding: 28px 20px 60px
    }

    .query-title {
        font-size: 26px
    }

    .info-label {
        flex-basis: 46%
    }

    .info-help-popover {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: min(260px, 85vw);
    }

}

.security-status-card.valid {
    border-left: 4px solid #007b2d;
    background: #22c55e18;
}

.security-status-card.invalid {
    border-left: 4px solid #ef4444;
    background: #ef444418;
}

.security-status-card.unknown {
    border-left: 4px solid #f59e0b;
    background: #d97706;
}

.rpki-card {
    margin: 20px 10px;
}

.rpki-card.valid {
    border-color: #22c55e;
}

.rpki-card.invalid {
    border-color: #ef444455;
}

.rpki-card.unknown {
    border-color: #f59e0b55;
}

.security-status-badge.valid {
    background: #16a34a;
}

.security-status-badge.unknown {
    background: #d97706;
}

.abuse-contacts-wrap {
    padding: 4px 20px 16px;
}

.abuse-contacts-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted-2);
    margin-bottom: 8px;
}

.abuse-contacts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.abuse-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--warn);
    background: color-mix(in srgb, var(--warn) 12%, transparent);
    border: none;
    transition: background .15s ease, transform .1s ease;
    max-width: 100%;
    overflow: hidden;
}

.abuse-contact-btn span.email-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abuse-contact-btn:hover {
    background: color-mix(in srgb, var(--warn) 20%, transparent);
    transform: translateY(-1px);
}

.abuse-contact-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    max-width: 14px;
    max-height: 14px;
}

.abuse-contacts-empty {
    font-size: 12.5px;
    color: var(--text-muted-2);
    font-style: italic;
}

.ip-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-flag {
    width: 34px;
    height: 24px;
    object-fit: cover;
    border-radius: 5px;
    vertical-align: middle;
}

.asn-link {
    text-decoration: none !important;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.asn-link:hover,
.asn-link:visited,
.asn-link:active {
    text-decoration: none !important;
    color: inherit;
}

.asn-arrow {
    width: 12px;
    height: 12px;
    opacity: .6;
    transition: transform .15s ease, opacity .15s ease;
}

.asn-link:hover .asn-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

.chip-asn {
    user-select: none;
}

.chip-asn:hover {
    border-color: rgba(56, 57, 195, .5);
    background: rgba(56, 57, 195, .12);
}

.prefixes-table-wrap {
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
}

.prefixes-table-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted-2);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 1;
    min-width: 0;
}

.prefixes-table-header span:last-child {
    text-align: right;
}

.prefixes-table-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 20px;
    font-size: 13px;
    border-top: 1px solid var(--card-border);
    transition: background .12s ease;
    min-width: 0;
}

.prefixes-table-row:nth-child(even) {
    background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.prefixes-table-row:hover {
    background: var(--surface);
}

.prefixes-netblock {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    color: var(--accent);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.prefixes-netblock-arrow {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-2px);
    transition: opacity .15s ease, transform .15s ease;
}

a.prefixes-netblock:hover .prefixes-netblock-arrow {
    opacity: .75;
    transform: translateX(0);
}

.prefixes-count {
    color: var(--text-muted);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    min-width: 0;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.range-hostname.is-empty {
    color: var(--text-muted-2);
    font-weight: 500;
    font-style: italic;
    opacity: .85;
}

@media (max-width:640px) {
    .prefixes-count {
        max-width: 90px;
        font-size: 12px;
    }

    .prefixes-netblock {
        font-size: 12px;
    }
}

.prefixes-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
    border: none;
    border-top: 1px solid var(--card-border);
    cursor: pointer;
    transition: background .15s ease;
}

.prefixes-load-more:hover {
    background: var(--accent-soft);
}

.prefixes-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.prefixes-toggle {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.prefixes-toggle-btn {
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.prefixes-toggle-btn:hover {
    color: var(--text-strong);
}

.prefixes-toggle-btn.active {
    background: var(--accent);
    color: #fff;
}

.prefixes-empty {
    padding: 28px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted-2);
}

.rdap-raw-details {
    margin: 4px 20px 16px;
    border-top: 1px solid var(--card-border);
    padding-top: 12px;
    min-width: 0;
    max-width: 100%;
}

.rdap-raw-summary {
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    list-style: none;
}

.rdap-raw-summary::-webkit-details-marker {
    display: none;
}

.rdap-raw-json {
    margin-top: 10px;
    max-height: 320px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: auto;
    min-width: 0;
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-strong);
    white-space: pre-wrap;
    word-break: break-all;
    overflow-wrap: anywhere;
}
/* Página de rangos (/range/:ip/:bits) */
.range-hostname{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;color:var(--text-muted);word-break:break-all;text-align:left!important}
.range-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 4px 4px}
.range-page-jump{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-muted)}
.range-page-jump input{width:70px;padding:8px 10px;border-radius:8px;border:1px solid var(--surface-border);background:var(--card-bg);color:var(--text);font-family:inherit;font-size:13px}
.range-pagination .btn{padding:9px 16px;font-size:13px}
.range-pagination .btn.disabled{opacity:.45;pointer-events:none}
@media (max-width:640px){.range-pagination{justify-content:center}.range-page-jump{width:100%;justify-content:center}}

/* Breadcrumb de rangos en la página de una IP puntual */
.range-breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;color:var(--text-muted);margin-bottom:14px}
.range-breadcrumb a{color:var(--accent);text-decoration:none;font-weight:600}
.range-breadcrumb a:hover{text-decoration:underline}
.range-breadcrumb-sep{color:var(--text-muted-2)}
.range-breadcrumb-current{color:var(--text-strong);font-weight:600}
a.prefixes-netblock{text-decoration:none;cursor:pointer}
a.prefixes-netblock:hover{text-decoration:underline}

/* Rango de IP (RDAP) clickeable, cuando es un bloque CIDR alineado */
a.range-link{color:var(--accent);text-decoration:none;font-weight:600}
a.range-link:hover{text-decoration:underline}

/* Modo agregado de /range para rangos amplios (varios ASNs/países) */
.country-bar-list{display:flex;flex-direction:column;gap:4px;padding:14px 20px 20px}
.country-bar-row{display:grid;grid-template-columns:160px 1fr 56px;align-items:center;gap:16px;font-size:13px;padding:9px 10px;border-radius:10px;transition:background .12s ease}
.country-bar-row:hover{background:var(--surface)}
.country-bar-name{display:flex;align-items:center;gap:8px;min-width:0;color:var(--text)}
.country-bar-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.country-flag-sm{width:20px;height:14px;object-fit:cover;border-radius:3px;flex-shrink:0;box-shadow:0 0 0 1px var(--card-border)}
.country-flag-placeholder{background:color-mix(in srgb, var(--text-muted-2) 18%, transparent);box-shadow:none}
.country-bar-track{position:relative;height:10px;border-radius:999px;background:color-mix(in srgb, var(--text-muted-2) 16%, transparent);overflow:hidden}
.country-bar-fill{display:block;height:100%;min-width:4px;border-radius:999px;background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 78%, white 0%), var(--accent));transition:width .4s cubic-bezier(.4,0,.2,1)}
.country-bar-pct{text-align:right;color:var(--text-muted);font-variant-numeric:tabular-nums;font-weight:700;font-size:12.5px}
@media (max-width:520px){
    .country-bar-list{padding:10px 14px 16px}
    .country-bar-row{grid-template-columns:96px 1fr 40px;gap:10px;padding:8px 6px}
    .country-bar-name-text{font-size:12px}
}
a.asn-inline-link{color:var(--accent);text-decoration:none;font-weight:600}
a.asn-inline-link:hover{text-decoration:underline}

/* "Todos los rangos" (/ranges) y drill-down de sub-rangos dentro de /range */
.ranges-panel{padding:16px 20px 20px}
.ranges-index-desc{color:var(--text-muted);font-size:14px;margin:0 0 16px;max-width:640px}
.ranges-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:10px}
.ranges-grid-item{display:flex;align-items:center;justify-content:center;padding:14px 12px;border-radius:10px;background:var(--surface);border:1px solid var(--surface-border);color:var(--accent);font-family:ui-monospace,"SF Mono",Consolas,monospace;font-size:13px;font-weight:600;text-align:center;text-decoration:none;transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease}
.ranges-grid-item:hover{background:var(--card-bg);border-color:var(--accent);transform:translateY(-2px);box-shadow:0 6px 16px color-mix(in srgb, var(--accent) 18%, transparent)}
.ranges-grid-item:active{transform:translateY(0)}
@media (max-width:520px){
    .ranges-panel{padding:12px 14px 16px}
    .ranges-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
    .ranges-grid-item{padding:11px 8px;font-size:12px}
}

/* Bloque destacado con el total de direcciones cuando el rango es
   demasiado grande para desglosar por ASN (ej. un /8 completo) */
.range-hero{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:28px 20px;text-align:center}
.range-hero-value{font-size:32px;font-weight:800;letter-spacing:-.5px;color:var(--text-strong);font-variant-numeric:tabular-nums}
.range-hero-label{font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}
