/**
 * Heardle NBN checker — large results modal + brand styling.
 */
body.checker-page {
    --heardle-navy: #0a0e27;
    --heardle-blue: #1e90ff;
    --heardle-acid: #e6e659;
}

body.checker-page .hero-checker {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(30, 144, 255, 0.18), transparent 55%),
        radial-gradient(90% 70% at 100% 20%, rgba(230, 230, 89, 0.28), transparent 50%),
        linear-gradient(165deg, #dceaf7 0%, #f2f7fc 48%, #f5f2d4 100%);
}

body.checker-page .hero-checker .hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

body.nbn-modal-open {
    overflow: hidden;
}

/* —— Modal shell —— */
.nbn-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.nbn-modal[hidden] {
    display: none !important;
}

@media (min-width: 720px) {
    .nbn-modal {
        align-items: center;
        padding: 2rem;
    }
}

.nbn-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 39, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: nbnModalFade 0.22s ease;
}

.nbn-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100%, 640px);
    max-height: min(94vh, 860px);
    background: #fff;
    color: var(--heardle-navy);
    border: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 48px rgba(10, 14, 39, 0.28);
    animation: nbnModalRise 0.3s ease;
    overflow: hidden;
}

@media (min-width: 720px) {
    .nbn-modal__panel {
        width: min(94vw, 920px);
        border-radius: 24px;
        box-shadow: 0 28px 80px rgba(10, 14, 39, 0.35);
        max-height: min(92vh, 860px);
    }
}

@media (min-width: 1100px) {
    .nbn-modal__panel {
        width: min(92vw, 980px);
    }
}

.nbn-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(10, 14, 39, 0.08);
    background: #fff;
    flex-shrink: 0;
}

.nbn-modal__heading {
    min-width: 0;
    flex: 1;
}

.nbn-modal__eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    margin: 0 0 0.35rem;
}

.nbn-modal__eyebrow {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(10, 14, 39, 0.45);
}

.nbn-modal__header .fb-status[hidden] {
    display: none !important;
}

.nbn-modal__header .fb-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: #e8f5ec;
    color: #1f6b3a;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
}

.nbn-modal__header .fb-status::before {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
}

.nbn-modal__header .fb-status.is-planned {
    background: #fff4e5;
    color: #9a5b00;
}

.nbn-modal__header .fb-status.is-unavailable {
    background: #fdecea;
    color: #b42318;
}

.nbn-modal__header .fb-status.is-skymuster {
    background: #e8eef8;
    color: #1e3a6e;
}

.nbn-modal__header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--heardle-navy);
}

.nbn-modal__address {
    margin: 0.45rem 0 0;
    font-size: 0.98rem;
    line-height: 1.4;
    color: rgba(10, 14, 39, 0.55);
}

.nbn-modal__address[hidden] {
    display: none !important;
}

.nbn-modal__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: var(--light-gray, #e9ecef);
    color: rgba(10, 14, 39, 0.55);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.nbn-modal__header-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex-shrink: 0;
    margin: -0.2rem -0.4rem 0 0;
}

.nbn-modal__nbn-mark {
    display: inline-flex;
    align-items: baseline;
    margin-top: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    background: #0b1f17;
    color: #7dffb3;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    user-select: none;
}

.nbn-modal__nbn-mark sup {
    font-size: 0.55em;
    font-weight: 700;
    margin-left: 0.08em;
    color: rgba(125, 255, 179, 0.85);
}

.nbn-modal__nbn-logo {
    display: block;
    width: auto;
    height: 2.1rem;
    margin-top: 0.2rem;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.nbn-modal__close svg {
    width: 1.2rem;
    height: 1.2rem;
}

.nbn-modal__close:hover {
    color: var(--heardle-navy);
    background: var(--heardle-acid);
}

.nbn-modal__body {
    overflow-y: auto;
    padding: 0.65rem 1.25rem 1rem;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

@keyframes nbnModalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nbnModalRise {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* —— Content layout (single column) —— */
#nbn-results-modal .fb-flow {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

#nbn-results-modal .fb-summary {
    padding: 0;
    margin: 0;
}

#nbn-results-modal .fb-note {
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(230, 230, 89, 0.55);
    border-left: 3px solid var(--heardle-acid);
    border-radius: 10px;
    background: rgba(230, 230, 89, 0.16);
    font-size: 0.84rem;
    line-height: 1.35;
    color: rgba(10, 14, 39, 0.8);
}

#nbn-results-modal .fb-summary .fb-note + .fb-note {
    margin-top: 0.5rem;
}

#nbn-results-modal .fb-note--upgrade {
    border-color: rgba(46, 125, 98, 0.35);
    border-left-color: #2e7d62;
    background: rgba(46, 125, 98, 0.1);
}

#nbn-results-modal .fb-note strong {
    color: var(--heardle-navy);
    font-weight: 700;
}

/* —— Visual connection panel —— */
#nbn-results-modal .fb-connect {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(238, 244, 251, 0.95), rgba(245, 242, 212, 0.55));
    border: 1px solid rgba(10, 14, 39, 0.08);
    overflow: hidden;
}

#nbn-results-modal .fb-connect-alert {
    margin: 0;
    padding: 0.4rem 0.85rem;
    border: 0;
    border-bottom: 1px solid rgba(230, 230, 89, 0.55);
    border-radius: 0;
    background: rgba(230, 230, 89, 0.22);
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(10, 14, 39, 0.82);
    font-weight: 600;
}

#nbn-results-modal .fb-connect-body {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
    gap: 0.65rem 0.85rem;
    padding: 0.65rem 0.85rem;
    align-items: start;
}

#nbn-results-modal .fb-connect--satellite .fb-connect-body {
    grid-template-columns: 1fr;
    padding: 0.85rem 1rem;
}

#nbn-results-modal .fb-connect--satellite {
    background: linear-gradient(145deg, rgba(238, 244, 251, 0.98), rgba(232, 238, 248, 0.85));
}

@media (min-width: 720px) {
    #nbn-results-modal .fb-connect-body {
        grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
        gap: 0.75rem 1rem;
        padding: 0.7rem 1rem;
    }
}

#nbn-results-modal .fb-connect-visual {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#nbn-results-modal .fb-connect-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    justify-content: center;
}

#nbn-results-modal .fb-connect-address {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

#nbn-results-modal .fb-connect-address-label {
    display: none;
}

#nbn-results-modal .fb-connect-address-value {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--heardle-navy);
}

#nbn-results-modal .fb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0;
}

#nbn-results-modal .fb-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(10, 14, 39, 0.08);
    color: var(--heardle-navy);
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

#nbn-results-modal .fb-chip--upgrade {
    background: rgba(46, 125, 98, 0.14);
    color: #1f5f4a;
}

#nbn-results-modal .fb-chip--planned {
    background: rgba(154, 91, 0, 0.12);
    color: #9a5b00;
}

#nbn-results-modal .fb-chip--busy {
    background: rgba(230, 230, 89, 0.35);
    color: #6b5200;
}

#nbn-results-modal .fb-connect-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--heardle-navy);
    letter-spacing: -0.015em;
}

#nbn-results-modal .fb-connect-text {
    display: none;
    margin: 0.15rem 0 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: rgba(10, 14, 39, 0.62);
}

#nbn-results-modal .fb-connect-text.is-shown {
    display: block;
}

#nbn-results-modal .fb-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 0.2rem;
}

#nbn-results-modal .fb-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

#nbn-results-modal .fb-meta-item--class {
    flex: 1 1 14rem;
    min-width: min(100%, 12rem);
    gap: 0.3rem;
}

#nbn-results-modal .fb-meta-item > span,
#nbn-results-modal .fb-meta-class-head > span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(10, 14, 39, 0.45);
}

#nbn-results-modal .fb-meta-item > strong {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--heardle-navy);
    word-break: break-all;
}

#nbn-results-modal .fb-meta-class-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
}

#nbn-results-modal .fb-meta-class-code {
    color: var(--heardle-navy);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

#nbn-results-modal .fb-meta-class-meaning {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(10, 14, 39, 0.5);
    max-width: 42ch;
}

#nbn-results-modal .fb-meta-help {
    margin: 0.2rem 0 0;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(10, 14, 39, 0.62);
    max-width: 38ch;
}

#nbn-results-modal .fb-connect-foot {
    margin: 0.7rem 0 0;
    font-size: 0.88rem;
    color: rgba(10, 14, 39, 0.58);
}

#nbn-results-modal .fb-connect-foot a {
    color: var(--heardle-navy);
    font-weight: 600;
    text-decoration: none;
}

#nbn-results-modal .fb-connect-foot a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* NTD product photo + port markup */
#nbn-results-modal .fb-hw--ntd-photo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
}

#nbn-results-modal .fb-ntd-shot {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background-color: #dfe7ef;
    background-image: var(--ntd-photo);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    border: 1px solid rgba(10, 14, 39, 0.08);
    min-height: 58px;
    aspect-ratio: 16 / 10;
    width: 100%;
}

#nbn-results-modal .fb-ntd-shot--1p {
    aspect-ratio: 781 / 506;
}

#nbn-results-modal .fb-ntd-shot--4p {
    aspect-ratio: 1024 / 574;
}

#nbn-results-modal .fb-ntd-shot--hfc {
    aspect-ratio: 408 / 541;
    max-width: 140px;
    margin-inline: auto;
}

#nbn-results-modal .fb-ntd-img {
    /* Keep for a11y / right-click; photo is painted via CSS background. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

#nbn-results-modal .fb-ntd-hotspots {
    display: none;
}

#nbn-results-modal .fb-port-status-list {
    list-style: none;
    margin: 0.15rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
}

#nbn-results-modal .fb-meta-item--class .fb-port-status-list {
    margin-top: 0.2rem;
}

#nbn-results-modal .fb-port-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(10, 14, 39, 0.08);
    font-size: 0.68rem;
    line-height: 1.15;
    min-width: 0;
}

#nbn-results-modal .fb-port-status-dot {
    flex: 0 0 auto;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: rgba(10, 14, 39, 0.25);
}

#nbn-results-modal .fb-port-status.is-busy .fb-port-status-dot {
    background: #e0a800;
    box-shadow: 0 0 6px rgba(224, 168, 0, 0.65);
}

#nbn-results-modal .fb-port-status.is-free .fb-port-status-dot {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.55);
}

#nbn-results-modal .fb-port-status-name {
    font-weight: 700;
    color: rgba(10, 14, 39, 0.55);
}

#nbn-results-modal .fb-port-status-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--heardle-navy);
    white-space: nowrap;
}

#nbn-results-modal .fb-port-status.is-busy .fb-port-status-value {
    color: #8a5a00;
}

#nbn-results-modal .fb-port-status.is-free .fb-port-status-value {
    color: #1f6b3a;
}

/* Copper wall socket */
#nbn-results-modal .fb-socket.is-busy .fb-socket-led {
    background: #f0c24b;
    box-shadow: 0 0 8px rgba(240, 194, 75, 0.75);
    animation: fbPortPulse 1.8s ease-in-out infinite;
}

#nbn-results-modal .fb-socket.is-busy .fb-socket-meter {
    background: rgba(230, 230, 89, 0.28);
    color: #6b5200;
}

@keyframes fbPortPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

#nbn-results-modal .fb-hw--logo {
    display: flex;
    justify-content: center;
}

#nbn-results-modal .fb-nbn-logo-img {
    width: min(100%, 220px);
    height: auto;
    border-radius: 0;
    background: transparent;
    mix-blend-mode: multiply;
}

#nbn-results-modal .fb-socket {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

#nbn-results-modal .fb-socket-plate {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: linear-gradient(160deg, #f7f8fb 0%, #e4e8ef 100%);
    border: 1px solid rgba(10, 14, 39, 0.12);
    box-shadow:
        0 4px 12px rgba(10, 14, 39, 0.1),
        inset 0 1px 0 #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
}

#nbn-results-modal .fb-socket-screw {
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: #c5cad3;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
}

#nbn-results-modal .fb-socket-jack {
    width: 26px;
    height: 22px;
    border-radius: 4px;
    background: #1a1f2e;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
}

#nbn-results-modal .fb-socket-slot {
    width: 12px;
    height: 8px;
    border-radius: 2px;
    background: #0a0e18;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#nbn-results-modal .fb-socket-meter {
    /* Line status is under service class (same pattern as NTD ports). */
    display: none;
}

#nbn-results-modal .fb-socket-led {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #5ee29a;
    box-shadow: 0 0 6px rgba(94, 226, 154, 0.7);
}

#nbn-results-modal .fb-socket.is-taken .fb-socket-led {
    background: #f0c24b;
    box-shadow: 0 0 8px rgba(240, 194, 75, 0.75);
    animation: fbPortPulse 1.8s ease-in-out infinite;
}

#nbn-results-modal .fb-socket.is-taken .fb-socket-meter {
    background: rgba(230, 230, 89, 0.28);
    color: #6b5200;
}

#nbn-results-modal .fb-generic-mark {
    width: 148px;
    height: 148px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #0b1f17;
    color: #7dffb3;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 12px 28px rgba(10, 14, 39, 0.18);
}

#nbn-results-modal .fb-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin: 0.35rem 0 0;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(10, 14, 39, 0.08);
}

#nbn-results-modal .fb-footer-row .fb-nbn-attrib {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
}

#nbn-results-modal .fb-footer-row .fb-btn-contact {
    flex-shrink: 0;
    white-space: nowrap;
}

#nbn-results-modal .fb-nbn-attrib {
    margin: 0.05rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    line-height: 1.3;
    color: rgba(10, 14, 39, 0.42);
}

#nbn-results-modal .fb-nbn-attrib-logo {
    height: 1.1rem;
    width: auto;
    border-radius: 0;
    background: transparent;
    flex-shrink: 0;
    mix-blend-mode: multiply;
}

#nbn-results-modal .fb-nbn-wordmark {
    display: inline-block;
    margin-right: 0.35rem;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1f5f4a;
}

#nbn-results-modal .fb-nbn-wordmark sup {
    font-size: 0.55em;
    font-weight: 700;
}

#nbn-results-modal .fb-plans {
    padding: 0.55rem 0 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(10, 14, 39, 0.08);
    border-radius: 0;
    box-shadow: none;
}

#nbn-results-modal .fb-plans--contact {
    padding-top: 0.85rem;
}

#nbn-results-modal .fb-plans--contact .fb-plans-heading {
    margin-bottom: 0.55rem;
}

#nbn-results-modal .fb-contact-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    max-width: 36rem;
}

#nbn-results-modal .fb-contact-lead {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heardle-navy);
}

#nbn-results-modal .fb-contact-copy {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(10, 14, 39, 0.62);
}

#nbn-results-modal .fb-contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding: 0.7rem 1.15rem;
    border-radius: 0.55rem;
    background: var(--heardle-navy);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

#nbn-results-modal .fb-contact-cta:hover {
    background: #152048;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

#nbn-results-modal .fb-contact-cta .fb-btn-icon {
    width: 1.1rem;
    height: 1.1rem;
}

#nbn-results-modal .fb-plans-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    margin-bottom: 0.45rem;
}

#nbn-results-modal .fb-plans-heading {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--heardle-navy);
    order: 1;
}

#nbn-results-modal .fb-plans-contract {
    order: 2;
}

/* Desktop: path + audience sit on the right */
#nbn-results-modal .fb-plans-path-toggle {
    order: 3;
    margin-left: auto;
}

#nbn-results-modal .fb-plans-audience {
    order: 4;
}

#nbn-results-modal .fb-plans-head:not(.has-path-toggle) .fb-plans-audience {
    margin-left: auto;
}

#nbn-results-modal .fb-plans h3,
#nbn-results-modal .fb-plans-heading {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--heardle-navy);
}

#nbn-results-modal .fb-plans-intro {
    display: none;
}

#nbn-results-modal .fb-plans-path {
    display: none;
}

#nbn-results-modal .fb-plans-path-label {
    display: none;
}

#nbn-results-modal .checker-connection-path {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border-radius: 999px;
    background: var(--light-gray, #e9ecef);
}

#nbn-results-modal .checker-path-btn {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(10, 14, 39, 0.55);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

#nbn-results-modal .checker-path-btn.active {
    background: var(--heardle-navy);
    color: #fff;
}

#nbn-results-modal .fb-plans-path-note {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(10, 14, 39, 0.55);
}

#nbn-results-modal .fb-plans-path-note[hidden] {
    display: none !important;
}

#nbn-results-modal .checker-plan-type {
    display: inline-flex;
    gap: 3px;
    margin: 0 !important;
    padding: 3px !important;
    border: none;
    background: var(--light-gray, #e9ecef) !important;
    border-radius: 999px !important;
}

#nbn-results-modal .checker-plan-type-btn {
    border: 0;
    border-radius: 999px !important;
    background: transparent;
    color: rgba(10, 14, 39, 0.55);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem !important;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    box-shadow: none !important;
}

#nbn-results-modal .checker-plan-type-btn.active {
    background: var(--heardle-navy) !important;
    color: #fff !important;
    border-radius: 999px !important;
}

#nbn-results-modal .checker-plans-status {
    margin: 0.2rem 0;
    font-size: 0.82rem;
    color: rgba(10, 14, 39, 0.55);
}

#nbn-results-modal .checker-plans-empty {
    margin: 0.35rem 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: rgba(10, 14, 39, 0.62);
    flex: 1 1 100%;
}

#nbn-results-modal .checker-plans-grid.plans-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.65rem;
    grid-template-columns: none !important;
    max-height: none;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin: 0;
    padding: 0.15rem 0.1rem 0.55rem;
    scroll-snap-type: none;
    scroll-padding-inline: 0.1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    cursor: grab;
    scroll-behavior: auto;
}

#nbn-results-modal .checker-plans-grid.plans-grid.is-centered {
    justify-content: center;
}

#nbn-results-modal .fb-plans {
    /* Wider hover target for wheel → horizontal scroll */
    position: relative;
}

#nbn-results-modal .checker-plans-grid.plans-grid::-webkit-scrollbar {
    height: 6px;
}

#nbn-results-modal .checker-plans-grid.plans-grid::-webkit-scrollbar-thumb {
    background: rgba(10, 14, 39, 0.2);
    border-radius: 999px;
}

#nbn-results-modal .fb-plan-card {
    flex: 0 0 min(200px, 72vw);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 11.5rem;
    margin: 0;
    padding: 0.85rem 0.85rem 0.75rem;
    border: 1px solid rgba(10, 14, 39, 0.1);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

#nbn-results-modal .fb-plan-card:hover {
    border-color: rgba(10, 14, 39, 0.22);
}

#nbn-results-modal .fb-plan-card.is-featured {
    border-color: rgba(10, 14, 39, 0.1);
    background: #fff;
}

#nbn-results-modal .fb-plan-card-pill {
    display: none;
}

#nbn-results-modal .fb-plan-card-tag {
    display: inline-flex;
    align-self: flex-start;
    margin: 0;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--heardle-navy);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

#nbn-results-modal .fb-plan-card-speed {
    margin: 0.35rem 0 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--heardle-navy);
    white-space: nowrap;
}

#nbn-results-modal .fb-plan-card-speed-unit {
    margin-left: 0.15em;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(10, 14, 39, 0.55);
}

#nbn-results-modal .fb-plan-card-speed-kicker {
    display: none;
}

#nbn-results-modal .fb-plan-card-name {
    display: none;
}

#nbn-results-modal .fb-plan-card-evening {
    margin: 0.1rem 0 0;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(10, 14, 39, 0.45);
}

#nbn-results-modal .fb-plan-card-evening-kicker,
#nbn-results-modal .fb-plan-card-evening-label,
#nbn-results-modal .fb-plan-card-tier,
#nbn-results-modal .fb-plan-card-blurb {
    display: none;
}

#nbn-results-modal .fb-plans-speed-note {
    margin: 0.35rem 0 0.75rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: rgba(10, 14, 39, 0.55);
}

#nbn-results-modal .fb-plan-card-price {
    margin: 0.75rem 0 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--heardle-navy);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

#nbn-results-modal .fb-plan-card-price small {
    margin-left: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(10, 14, 39, 0.5);
}

#nbn-results-modal .fb-plan-card--promo {
    position: relative;
    overflow: hidden;
    border-color: transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(145deg, #d8ff4a 0%, #b8f500 42%, #0a0e27 100%) border-box;
    border: 2px solid transparent;
    box-shadow:
        0 10px 28px rgba(10, 14, 39, 0.1),
        inset 0 0 0 1px rgba(184, 245, 0, 0.25);
}

#nbn-results-modal .fb-plan-card--promo::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #b8f500, #0a0e27);
}

#nbn-results-modal .fb-plan-card-promo {
    margin-top: 0.65rem;
    padding: 0.55rem 0.6rem 0.5rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(184, 245, 0, 0.22) 0%, rgba(184, 245, 0, 0.06) 100%);
}

#nbn-results-modal .fb-plan-card-promo-ribbon {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--heardle-navy);
    color: var(--heardle-acid);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}

#nbn-results-modal .fb-plan-card-promo-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.45rem;
}

#nbn-results-modal .fb-plan-card--promo .fb-plan-card-price {
    margin: 0;
    font-size: 1.55rem;
}

#nbn-results-modal .fb-plan-card-was {
    position: relative;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: rgba(10, 14, 39, 0.42);
    text-decoration: none;
}

#nbn-results-modal .fb-plan-card-was::after {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    top: 52%;
    height: 2px;
    background: rgba(192, 57, 43, 0.85);
    transform: rotate(-8deg);
    border-radius: 2px;
}

#nbn-results-modal .fb-plan-card-promo-meta {
    margin: 0.35rem 0 0;
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: rgba(10, 14, 39, 0.62);
}

#nbn-results-modal .fb-plan-card-btn {
    margin-top: auto;
    border: 0;
    border-radius: 50px;
    background: var(--heardle-acid);
    color: var(--heardle-navy);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

#nbn-results-modal .fb-plan-card-btn:hover,
#nbn-results-modal .fb-plan-card:hover .fb-plan-card-btn {
    background: var(--heardle-navy);
    color: #fff;
}

#nbn-results-modal .fb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 0.15rem 0 0;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(10, 14, 39, 0.08);
}

#nbn-results-modal .fb-btn-primary,
#nbn-results-modal .fb-btn-secondary {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    color: rgba(10, 14, 39, 0.62);
}

#nbn-results-modal .fb-btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

#nbn-results-modal .fb-btn-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

#nbn-results-modal .fb-btn-primary:hover,
#nbn-results-modal .fb-btn-secondary:hover {
    color: var(--heardle-navy);
    background: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#nbn-results-modal .fb-details {
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(10, 14, 39, 0.12);
    background: transparent;
}

#nbn-results-modal .fb-accordion-btn,
#nbn-results-modal .fb-details > summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-display);
    color: var(--heardle-navy);
    list-style: none;
}

#nbn-results-modal .fb-details > summary::-webkit-details-marker {
    display: none;
}

#nbn-results-modal .fb-accordion-title {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
}

#nbn-results-modal .fb-accordion-hint {
    display: none;
}

#nbn-results-modal .fb-accordion-chevron {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.2s ease;
    color: rgba(10, 14, 39, 0.4);
}

#nbn-results-modal .fb-details[open] .fb-accordion-chevron,
#nbn-results-modal .fb-accordion-btn[aria-expanded='true'] .fb-accordion-chevron {
    transform: rotate(180deg);
}

#nbn-results-modal .fb-accordion-body {
    padding: 0 0 0.85rem;
    border: 0;
}

#nbn-results-modal .fb-kv-list {
    margin: 0;
    padding: 0.15rem 0 0;
}

#nbn-results-modal .fb-kv {
    display: grid;
    grid-template-columns: minmax(7.5rem, 32%) 1fr;
    gap: 0.5rem 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(10, 14, 39, 0.08);
    align-items: baseline;
}

#nbn-results-modal .fb-kv:last-of-type {
    border-bottom: 0;
}

#nbn-results-modal .fb-kv dt {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(10, 14, 39, 0.5);
}

#nbn-results-modal .fb-kv dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--heardle-navy);
    word-break: break-word;
}

#nbn-results-modal .fb-inline-status {
    display: inline;
    font-weight: 700;
}

#nbn-results-modal .fb-inline-status.is-taken {
    color: #8a5a00;
}

#nbn-results-modal .fb-detail-help {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(10, 14, 39, 0.58);
}

#nbn-results-modal .fb-detail-help--tight {
    margin: -0.15rem 0 0.35rem;
    padding-left: calc(32% + 1rem);
    font-size: 0.88rem;
}

@media (max-width: 639px) {
    #nbn-results-modal .fb-kv {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    #nbn-results-modal .fb-detail-help--tight {
        padding-left: 0;
    }
}

#nbn-results-modal .fb-accordion-foot {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: rgba(10, 14, 39, 0.58);
}

#nbn-results-modal .fb-accordion-foot a {
    color: var(--heardle-navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#nbn-results-modal .checker-plans-status,
#nbn-results-modal .checker-plans-empty {
    margin: 0.4rem 0;
    font-size: 0.92rem;
    color: rgba(10, 14, 39, 0.55);
}

@media (max-width: 719px) {
    .nbn-modal__header,
    .nbn-modal__body {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
}

/* —— Phone / iPad portrait: keep desktop (≥1024) rules untouched —— */

@media (max-width: 719px) {
    .nbn-modal__panel {
        max-height: min(94dvh, 860px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .nbn-modal__body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    /* Stack NTD above address / service class */
    #nbn-results-modal .fb-connect-body {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Hide NTD photo + FTTN socket drawing; status pills stay under service class */
    #nbn-results-modal .fb-connect-body.has-ntd-visual .fb-connect-visual,
    #nbn-results-modal .fb-connect-body.has-socket-visual .fb-connect-visual {
        display: none;
    }

    #nbn-results-modal .fb-meta-item--class {
        flex: 1 1 100%;
        min-width: 0;
    }

    #nbn-results-modal .fb-meta-class-meaning {
        max-width: none;
    }

    #nbn-results-modal .fb-port-status-list {
        gap: 0.35rem;
    }

    #nbn-results-modal .fb-footer-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    #nbn-results-modal .fb-footer-row .fb-nbn-attrib {
        max-width: none;
    }

    #nbn-results-modal .fb-footer-row .fb-btn-contact {
        white-space: normal;
        justify-content: center;
        width: 100%;
    }

    #nbn-results-modal .fb-contact-cta {
        width: 100%;
        justify-content: center;
    }

    #nbn-results-modal .fb-plan-card {
        flex: 0 0 min(188px, 78vw);
    }

    #nbn-results-modal .checker-plans-grid.plans-grid {
        scroll-snap-type: x mandatory;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    #nbn-results-modal .fb-plan-card {
        scroll-snap-align: start;
    }
}

#nbn-results-modal .fb-plans-break {
    display: none;
}

/* iPhone / iPad: title, then contract + Home/Business, then copper/fibre */
@media (max-width: 1023px) {
    #nbn-results-modal .fb-plans-head {
        gap: 0.45rem 0.4rem;
    }

    #nbn-results-modal .fb-plans-heading {
        order: 1;
        flex: 1 0 100%;
        width: 100%;
    }

    #nbn-results-modal .fb-plans-contract {
        order: 2;
        margin-left: 0;
    }

    #nbn-results-modal .fb-plans-audience {
        order: 3;
        margin-left: 0 !important;
    }

    #nbn-results-modal .fb-plans-break {
        display: block;
        order: 4;
        flex: 1 0 100%;
        width: 100%;
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        overflow: hidden;
    }

    #nbn-results-modal .fb-plans-path-toggle {
        order: 5;
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
        margin-left: 0;
        align-self: flex-start;
    }

    #nbn-results-modal .checker-plan-type-btn,
    #nbn-results-modal .checker-path-btn {
        font-size: 0.74rem;
        padding: 0.32rem 0.65rem !important;
    }
}

/* Touch devices: don’t block vertical modal scroll on the carousel */
@media (pointer: coarse) {
    #nbn-results-modal .checker-plans-grid.plans-grid {
        touch-action: pan-x pan-y;
    }

    #nbn-results-modal .fb-plan-card-btn {
        min-height: 2.5rem;
    }
}
