.check-for-leaks {

    /* header.css scopes its rules as #header #title-container (two IDs), so
       every override in here must carry the same weight or it silently loses. */
    #header #title-container {
        padding-bottom: 24px;

        @media screen and (min-width: 876px) {
            padding-bottom: 40px;
        }

        /* Hero copy paragraphs get max-width 830 from header.css, but
           .container is a grid, where align-self:center doesn't center them
           horizontally — margin auto does. */
        .container>p {
            margin-left: auto;
            margin-right: auto;
        }

        /* header.css centers/mid-clamps every hero <p> — undo all of it
           inside the cards, they are left-aligned components. */
        .leak-card p {
            text-align: start;
            align-self: auto;
            max-width: none;
            margin-left: 0;
            margin-right: 0;
        }

        #leak-eyebrow {
            font-family: "Neue Kaine";
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 2.24px;
            text-align: center;
            text-transform: uppercase;
            background: linear-gradient(90deg, #AC70EF 0%, #F27FBE 50%, #FFB681 100%);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;

            @media screen and (min-width: 876px) {
                font-size: 20px;
                letter-spacing: 3.2px;
            }
        }

        h1 {
            margin-top: 8px;

            strong {
                font-weight: 600;
            }

            @media screen and (min-width: 876px) {
                margin-top: 8px;
            }
        }

        /* The card/map/attribution blocks stay nested in here on purpose:
           they need the two-ID weight to beat #header #title-container p. */

    #leak-cards {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: stretch;

        @media screen and (min-width: 876px) {
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }
    }

    .leak-card {
        position: relative;
        overflow: hidden;
        background: #FFF;
        border-radius: 24px;
        text-align: start;

        @media screen and (min-width: 876px) {
            width: 412px;
            height: 432px;
            flex: 0 0 auto;
        }
    }

    #ip-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px 20px;
        box-sizing: border-box;

        @media screen and (min-width: 876px) {
            gap: 24px;
            padding: 28px 24px;
        }

        .label {
            color: #71658B;
            font-size: 14px;
            text-transform: capitalize;

            @media screen and (min-width: 876px) {
                font-size: 16px;
            }
        }

        .ip-block {
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
            z-index: 2;
            align-self: stretch;
            /* Keep the IP clear of the badge overlapping the card's top-right
               corner — long IPv6 addresses wrap inside this width instead of
               running underneath it. */
            padding-right: 96px;
            box-sizing: border-box;

            .ip {
                font-family: "Neue Kaine";
                font-size: 20px;
                font-weight: 700;
                word-break: break-all;

                @media screen and (min-width: 876px) {
                    font-size: 26px;
                }

                &.exposed {
                    color: #FF2A05;
                }

                &.protected {
                    color: #17C50E;
                }
            }
        }

        .meta {
            display: flex;
            gap: 16px;
            align-self: stretch;
            position: relative;
            z-index: 2;

            &>div {
                flex: 1 0 0;
                display: flex;
                flex-direction: column;
                gap: 8px;

                .label {
                    font-size: 14px;
                }

                .value {
                    color: #0A011A;
                    font-size: 14px;
                    font-weight: 500;
                    text-transform: capitalize;

                    @media screen and (min-width: 876px) {
                        font-size: 16px;
                    }

                    .flag {
                        font-family: "Noto Flags";
                    }
                }
            }
        }

        .note {
            display: flex;
            gap: 6px;
            align-items: flex-start;
            position: relative;
            z-index: 2;

            img {
                flex: 0 0 auto;
                margin-top: 1px;
            }

            p {
                color: #71658B;
                font-size: 14px;
                line-height: 21px;

                strong {
                    color: #0A011A;
                    font-weight: 500;
                }
            }
        }

        .globe {
            position: absolute;
            z-index: 1;
            left: 28%;
            bottom: -12%;
            width: 95%;
            height: auto;
            pointer-events: none;

            @media screen and (min-width: 876px) {
                left: 15%;
                bottom: -14%;
                width: 88%;
            }
        }
    }

    #leak-badge {
        position: absolute;
        z-index: 3;
        width: 84px;
        height: auto;
        right: 8px;
        top: -30px;

        /* The protected badge is a 74x104 shield, not a 108x108 square —
           rendered at the exposed badge's width it grows ~152px tall and
           overlaps the card text. Keep it at its natural size, centred on
           the same point as the exposed badge. */
        &.protected {
            width: 64px;
        }

        @media screen and (min-width: 876px) {
            width: 108px;
            /* Cards are a centered 844px pair; the badge overlaps the right
               edge of the left card like in the design (290px into the pair). */
            left: calc(50% - 132px);
            right: auto;
            top: 19px;

            &.protected {
                width: 74px;
                left: calc(50% - 115px);
                top: 21px;
            }
        }
    }

    #map-card {
        height: 290px;

        @media screen and (min-width: 876px) {
            height: 432px;
        }

        #leak-map {
            position: absolute;
            inset: 0;
            background: #E8E7EA;
            z-index: 1;
        }

        .map-chip {
            position: absolute;
            background: #FFF;
            filter: drop-shadow(0px 10px 10px rgba(0, 0, 0, 0.15));
            z-index: 500;

            &.coords {
                display: flex;
                flex-direction: column;
                gap: 4px;
                left: 16px;
                top: 16px;
                padding: 10px 12px;
                border-radius: 15px;
                max-width: 240px;

                @media screen and (min-width: 876px) {
                    left: 19px;
                    top: 19px;
                }

                .coords-line {
                    color: #0A011A;
                    font-size: 14px;
                    font-weight: 600;

                    @media screen and (min-width: 876px) {
                        font-size: 18px;
                    }
                }

                a {
                    color: #2076FF;
                    font-size: 14px;
                    text-decoration: none;
                }
            }

            &.zoom {
                display: flex;
                flex-direction: column;
                gap: 8px;
                right: 14px;
                bottom: 24px;
                padding: 10px 12px;
                border-radius: 8px;

                hr {
                    width: 100%;
                    margin: 0;
                    border: none;
                    border-top: 1px solid #E8E7EA;
                }

                button {
                    width: 24px;
                    height: 24px;
                    padding: 0;
                    border: none;
                    background: none;
                    cursor: pointer;

                    color: #0A011A;
                    font-size: 22px;
                    line-height: 24px;
                    font-weight: 500;
                }
            }
        }
    }

    #maxmind-attribution {
        font-size: 13px !important;
        color: #8E7DAF;
        margin-top: 8px;

        a {
            color: inherit;
        }
    }
    }

    /* Shared gradient CTA — used in the hero card and the tools cards. */
    .leak-cta,
    #header #title-container .leak-cta {
        position: relative;
        z-index: 2;
        display: flex;
        height: 48px;
        padding: 10px 28px;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        align-self: stretch;

        border-radius: 16px;
        background: linear-gradient(90deg, #AC70EF 0%, #F27FBE 50%, #FFB681 100%);
        box-shadow: 0px 20px 40px 0px rgba(242, 127, 190, 0.20), 0px 0px 11px 0px rgba(255, 255, 255, 0.40) inset, 0px 0px 16px 0px rgba(255, 255, 255, 0.40) inset;

        color: #FFF;
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        text-transform: uppercase;
        white-space: nowrap;

        @media screen and (min-width: 876px) {
            align-self: flex-start;
        }
    }

    /* ------------------------------------------------------------------ */
    /* Security tools section                                              */
    /* ------------------------------------------------------------------ */

    #security-tools {
        background: #EFEDF5;
        margin-top: 0;
        padding: 48px 16px;
        /* body is a centered flex column — full-bleed sections stretch,
           same pattern as .box and #desktop-bg. */
        align-self: stretch;
        box-sizing: border-box;

        @media screen and (min-width: 876px) {
            padding: 80px 40px;
        }

        .container {
            margin-left: auto;
            margin-right: auto;
        }

        h2 {
            font-weight: 500;

            strong {
                font-weight: 700;
            }
        }

        .tools-tabs {
            display: flex;
            gap: 12px;
            padding: 12px;
            margin: 24px auto 0;
            width: 100%;
            max-width: 600px;
            box-sizing: border-box;

            background: #FFF;
            border-radius: 24px;

            @media screen and (min-width: 876px) {
                gap: 20px;
                padding: 16px;
                margin-top: 40px;
            }

            button {
                flex: 1 0 0;
                min-width: 0;
                padding: 14px 8px;
                border: none;
                border-radius: 16px;
                background: #FFF;
                cursor: pointer;

                color: #0A011A;
                font-size: 16px;
                font-weight: 500;
                text-align: center;

                @media screen and (min-width: 876px) {
                    padding: 16px;
                    font-size: 20px;
                }

                &.active {
                    background: linear-gradient(90deg, #AC70EF 0%, #F27FBE 50%, #FFB681 100%);
                    color: #FFF;
                    font-weight: 600;
                }
            }
        }

        .tools-cards {
            display: flex;
            flex-direction: column;
            gap: 24px;
            align-items: stretch;
            margin-top: 32px;

            @media screen and (min-width: 876px) {
                flex-direction: row;
                gap: 28px;
                align-items: stretch;
                margin-top: 40px;
            }
        }

        .tool-card[hidden] {
            display: none;
        }

        .tool-card {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 24px;
            padding: 24px;
            box-sizing: border-box;

            background: #FFF;
            border-radius: 32px;

            @media screen and (min-width: 876px) {
                gap: 32px;
                padding: 28px;
                border-radius: 48px;
            }

            &.status-card {
                @media screen and (min-width: 876px) {
                    width: 380px;
                    flex: 0 0 auto;
                }
            }

            &.result-card {
                @media screen and (min-width: 876px) {
                    flex: 1 0 0;
                    min-width: 0;
                }
            }

            p {
                color: #0A011A;
                font-size: 16px;
                line-height: 27px;
            }
        }

        .status-icon {
            display: flex;
            justify-content: center;
            align-items: center;
            flex: 0 0 auto;
            width: 48px;
            height: 48px;
            border-radius: 24px;
            background: #EEE;
        }

        .status-head {
            display: flex;
            gap: 12px;
            align-items: center;

            .status-text {
                display: flex;
                flex-direction: column;
                gap: 8px;

                .who {
                    color: #71658B;
                    font-size: 16px;
                    font-weight: 500;
                }

                strong {
                    color: #0A011A;
                    font-size: 18px;
                    font-weight: 600;
                }
            }
        }

        .alert {
            align-self: stretch;
            padding: 12px;
            border-radius: 16px;

            &.bad {
                background: rgba(255, 103, 106, 0.10);

                p {
                    color: #FF3F42;
                    font-size: 16px;
                    line-height: 24px;
                }
            }

            &.good {
                background: rgba(9, 156, 97, 0.10);

                p {
                    color: #099C61;
                    font-size: 16px;
                    line-height: 24px;
                }
            }
        }

        .result-text {
            display: flex;
            flex-direction: column;
            gap: 12px;

            h3 {
                font-family: "Inter Display";
                font-size: 20px;
                font-weight: 600;
                line-height: normal;

                @media screen and (min-width: 876px) {
                    font-size: 24px;
                }
            }
        }

        .webrtc-ips {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-self: stretch;
            list-style: none;
            padding: 0;

            li {
                padding: 10px 14px;
                border-radius: 12px;
                background: #EFEDF5;
                color: #0A011A;
                font-size: 15px;
                font-weight: 500;
            }
        }

        .browser-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;

            @media screen and (min-width: 876px) {
                gap: 24px;
            }

            a {
                display: flex;
                gap: 8px;
                align-items: center;
                justify-content: center;
                padding: 14px 20px;
                border-radius: 40px;
                background: #EFEDF5;

                color: #0A011A;
                font-size: 16px;
                text-decoration: none;

                @media screen and (min-width: 876px) {
                    padding: 18px 24px;
                    font-size: 20px;
                }
            }
        }

        .faq-link {
            color: #2076FF;
        }
    }

    /* ------------------------------------------------------------------ */
    /* FAQ accordion                                                       */
    /* ------------------------------------------------------------------ */

    .faq-item {
        .faq-title {
            /* .box makes children shrink-to-fit; stretch so the toggle can
               sit at the far right edge. */
            align-self: stretch;

            h3 {
                flex: 1 0 0;
                min-width: 0;
            }

            .faq-toggle {
                flex: 0 0 auto;
                padding: 0;
                border: none;
                background: none;
                cursor: pointer;
                line-height: 0;

                img {
                    width: 32px;
                    height: 32px;

                    @media screen and (min-width: 876px) {
                        width: 48px;
                        height: 48px;
                    }
                }

                .icon-close {
                    display: none;
                }
            }
        }

        .faq-answer {
            display: none;
        }

        &.open {
            .faq-answer {
                display: flex;
            }

            .faq-toggle {
                .icon-close {
                    display: inline;
                }

                .icon-open {
                    display: none;
                }
            }
        }
    }

    /* Leaflet attribution kept tiny but visible (OSM tile policy) */
    .leaflet-control-attribution {
        font-size: 10px;
    }
}
