.footer{
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-top:auto;
    flex-shrink:0;
    background:var(--surface);
}

.footer-container{
    width:100%;
    box-sizing:border-box;
    background:var(--surface);
    border-top:1px solid var(--border);
    color:var(--text);
    padding:24px 0 14px;
}

.footer-main{
    width:98%;
    max-width:1700px;
    margin:0 auto;
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr 1fr;
    gap:40px;
    align-items:start;
}

.footer-brand{
    display:flex;
    align-items:center;
    gap:16px;
}

.footer-brand img{
    width:48px;
    height:auto;
    max-height:48px;
    object-fit:contain;
    display:block;
    flex-shrink:0;
}

.footer-brand strong{
    display:block;
    font-size:18px;
    font-weight:700;
    color:var(--text);
}

.footer-brand .brand-name,
.footer-bottom .brand-name{
    display:inline;
    white-space:nowrap;
    color:var(--text);
}

.footer-brand .brand-d,
.footer-bottom .brand-d{
    display:inline;
    color:var(--accent);
}

.footer-brand .footer-tagline{
    display:block;
    margin-top:7px;
    font-size:13px;
    color:var(--muted);
}

.footer-column{
    display:flex;
    flex-direction:column;
    gap:11px;
}

.footer-column h4{
    margin:0 0 4px;
    font-size:14px;
    color:var(--text);
}

.footer-column a,
.footer-pgp-link{
    color:var(--muted);
    font-size:14px;
    text-decoration:none;
}

.footer-column a:hover,
.footer-pgp-link:hover{
    color:var(--accent);
}

.footer-pgp-link{
    cursor:pointer;
}

.footer-meta{
    width:98%;
    max-width:1700px;
    margin:24px auto 0;
    padding-top:14px;
    border-top:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
}

.footer-disclaimer{
    margin:0;
    padding:0;
    color:var(--muted);
    font-size:12px;
    text-align:right;
    order:2;
}

.footer-bottom{
    margin:0;
    color:var(--muted);
    font-size:12px;
    text-align:left;
    order:1;
}

@media(max-width:900px){
    .footer-main{
        grid-template-columns:repeat(2,1fr);
        gap:30px;
    }

    .footer-brand{
        grid-column:1 / -1;
    }
}

@media(max-width:600px){
    .footer{
        width:100%;
        margin-left:0;
    }

    .footer-container{
        padding:18px 12px 12px;
    }

    .footer-main{
        width:100%;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:18px 16px;
    }

    .footer-brand{
        grid-column:1 / -1;
        gap:12px;
    }

    .footer-brand img{
        width:40px;
        max-height:40px;
    }

    .footer-brand strong{
        font-size:16px;
    }

    .footer-brand span{
        font-size:12px;
        margin-top:4px;
    }

    .footer-column{
        min-width:0;
        gap:8px;
    }

    .footer-column h4{
        font-size:13px;
        margin:0 0 2px;
    }

    .footer-column a,
    .footer-pgp-link{
        font-size:13px;
    }

    .footer-meta{
        width:100%;
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
        margin-top:18px;
    }

    .footer-disclaimer{
        text-align:left;
        order:2;
    }
}

/* Site PGP popup */

.footer-pgp-toggle{
    display:none;
}

.footer-pgp-overlay{
    display:none;
    position:fixed;
    inset:0;
    z-index:9999;
    align-items:center;
    justify-content:center;
}

.footer-pgp-toggle:checked + .footer-pgp-overlay{
    display:flex;
}

.footer-pgp-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.65);
    cursor:pointer;
}

.footer-pgp-popup{
    position:relative;
    z-index:2;
    width:90%;
    max-width:800px;
    max-height:80vh;
    padding:24px;
    box-sizing:border-box;
    overflow:auto;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:10px;
    box-shadow:0 12px 40px rgba(0,0,0,.4);
}

.footer-pgp-popup h3{
    margin:0 35px 18px 0;
    font-size:18px;
    color:var(--text);
}

.footer-pgp-popup pre{
    margin:0;
    padding:16px;
    max-height:60vh;
    overflow:auto;
    white-space:pre-wrap;
    word-break:break-word;
    border:1px solid var(--border);
    border-radius:6px;
    background:rgba(0,0,0,.12);
    color:var(--muted);
    font-size:12px;
    line-height:1.6;
    cursor:copy;
    -webkit-user-select:all;
    user-select:all;
}

.footer-pgp-popup p{
    margin:0;
    color:var(--muted);
    font-size:13px;
}

.footer-pgp-close{
    position:absolute;
    top:14px;
    right:18px;
    font-size:25px;
    line-height:1;
    color:var(--muted);
    cursor:pointer;
}

.footer-pgp-close:hover{
    color:var(--text);
}

.footer{
    background:rgba(24,26,33,.94);
    box-shadow:
        0 -1px 0 rgba(217,70,143,.22),
        0 -18px 40px rgba(0,0,0,.18);
}

html[data-theme="light"] .footer{
    background:rgba(236,238,232,.94);
    box-shadow:
        0 -1px 0 rgba(184,50,128,.16),
        0 -14px 32px rgba(26,29,34,.06);
}

.footer-container{
    background:transparent;
    border-top:0;
    padding:40px 0 20px;
}

.footer-main{
    gap:36px 48px;
}

.footer-brand{
    gap:14px;
}

.footer-brand img{
    width:44px;
    max-height:44px;
    filter:drop-shadow(0 0 10px rgba(217,70,143,.32));
}

.footer-brand strong{
    font-size:17px;
    letter-spacing:.02em;
}

.footer-brand .footer-tagline{
    margin-top:6px;
    font-size:12px;
    letter-spacing:.02em;
}

.footer-column{
    gap:10px;
}

.footer-column h4{
    margin:0 0 8px;
    padding-bottom:8px;
    border-bottom:1px solid rgba(217,70,143,.2);
    font-size:11px;
    font-weight:700;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:var(--text);
}

.footer-column a,
.footer-pgp-link{
    width:fit-content;
    color:#c8ccd4;
    font-size:13px;
    font-weight:500;
    transition:color .15s ease;
}

html[data-theme="light"] .footer-column a,
html[data-theme="light"] .footer-pgp-link{
    color:#4b5160;
}

.footer-column a:hover,
.footer-pgp-link:hover{
    color:var(--accent);
}

.footer-meta{
    margin-top:32px;
    padding:16px 0 0;
    border-top-color:rgba(217,70,143,.18);
}

.footer-bottom,
.footer-disclaimer{
    font-size:12px;
    line-height:1.5;
}

.footer-pgp-popup{
    border-color:rgba(217,70,143,.28);
    border-radius:14px;
    box-shadow:0 20px 50px rgba(0,0,0,.5);
}

.footer-pgp-popup h3{
    color:var(--accent);
}

@media(max-width:600px){
    .footer-container{
        padding:28px 12px 16px;
    }

    .footer-column h4{
        font-size:11px;
    }
}
