/* Nexus 18.22a – core legal footer and owner editor, independent of Pages. */
.nexus-legal-footer{position:relative;z-index:9;clear:both;flex:none;width:100%;margin-top:auto;background:rgba(3,8,16,.95);border-top:1px solid rgba(143,216,255,.22);color:#cbd6e7;font:13px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}
.nexus-legal-footer__inner{width:min(1200px,calc(100% - 32px));margin:auto;min-height:62px;display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;padding:12px 0}
.nexus-legal-footer a{color:#c9e8ff;text-decoration:underline;text-underline-offset:3px;padding:9px 6px}
.nexus-legal-footer a:focus-visible,.nexus-imprint-editor button:focus-visible{outline:2px solid #80e9ff;outline-offset:3px}
.nexus-imprint-editor{position:relative;z-index:3;max-width:1050px;width:calc(100% - 32px);margin:28px auto 40px;padding:clamp(20px,3vw,34px);border:1px solid rgba(125,213,255,.25);border-radius:7px;background:rgba(5,16,29,.94);color:#eff7ff;box-shadow:0 20px 65px rgba(0,0,0,.3);font:14px/1.55 system-ui,-apple-system,Segoe UI,sans-serif}
.nexus-imprint-editor__head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.nexus-imprint-editor h2{margin:0 0 8px;font-size:clamp(23px,3vw,32px)}
.nexus-imprint-editor p{color:#c4d4e5}
.nexus-imprint-eyebrow{color:#98dafa;font-size:12px;text-transform:uppercase;letter-spacing:.13em}
.nexus-imprint-editor [data-imprint-badge]{white-space:nowrap;color:#ffd49a}
.nexus-imprint-editor__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:13px;margin:18px 0}
.nexus-imprint-editor label{display:flex;flex-direction:column;gap:5px}
.nexus-imprint-editor input:not([type=checkbox]),.nexus-imprint-editor textarea{width:100%;box-sizing:border-box;min-height:38px;padding:9px 11px;border-radius:5px;border:1px solid rgba(147,202,244,.42);background:#0c1928;color:#fff;font:inherit}
.nexus-imprint-editor textarea{resize:vertical}
.nexus-imprint-editor .nexus-imprint-check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:16px 0;cursor:pointer}
.nexus-imprint-editor .nexus-imprint-check input{margin-top:4px}
.nexus-imprint-editor__extras{border-top:1px solid rgba(145,190,220,.22);border-bottom:1px solid rgba(145,190,220,.22);padding:10px 0;margin:12px 0}
.nexus-imprint-editor__extras summary{cursor:pointer;color:#b2e4ff;font-weight:600}
.nexus-imprint-editor__actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-top:16px}
.nexus-imprint-editor__actions button{background:#134566;border:1px solid #4badde;color:#fff;padding:11px 18px;border-radius:5px;font:inherit;font-weight:700;cursor:pointer}
.nexus-imprint-editor__actions a{color:#c8ecff}
.nexus-imprint-editor [hidden]{display:none!important}
.nexus-imprint-public{display:flex;flex-direction:column;min-height:100vh;margin:0;color:#eaf4ff;background:linear-gradient(140deg,#05090f,#0d2031 62%,#0a0b1a);font:16px/1.65 system-ui,-apple-system,Segoe UI,sans-serif}
.nexus-imprint-document{flex:1;width:min(820px,calc(100% - 32px));margin:40px auto;padding:clamp(20px,4vw,44px);box-sizing:border-box;border:1px solid rgba(143,216,255,.2);border-radius:6px;background:rgba(8,20,34,.85)}
.nexus-imprint-document h1{font-size:clamp(32px,5vw,48px);margin:0 0 30px}
.nexus-imprint-document h2{font-size:19px;color:#b0e2ff}
.nexus-imprint-document section{border-top:1px solid rgba(130,190,210,.16);padding:12px 0}
.nexus-imprint-document a{color:#9ee0ff}
@media(max-width:650px){.nexus-imprint-editor__head{display:block}.nexus-imprint-editor [data-imprint-badge]{white-space:normal}}

.nexus-imprint-editor__toggle{display:flex;justify-content:space-between;gap:14px;cursor:pointer;font-weight:700;color:#c3eaff;list-style-position:inside}.nexus-imprint-editor__toggle:hover{color:#fff}.nexus-imprint-editor:not([open]){padding:16px 22px;margin-bottom:20px}.nexus-imprint-editor__head{margin-top:20px}
/* Step 18.22b: reuse core legal editor styles for the privacy notice. */
.nexus-privacy-editor textarea[name="notice_text"]{display:block;min-height:340px;line-height:1.6;resize:vertical}
.nexus-privacy-editor [data-privacy-badge]{color:#ffd49a}
.nexus-privacy-editor [data-privacy-action="publish"]{background:#155b51;border-color:#5bd0b7}
.nexus-privacy-text{white-space:normal;overflow-wrap:anywhere;line-height:1.85}
.nexus-privacy-updated{font-size:13px;opacity:.72;border-top:1px solid rgba(143,216,255,.15);padding-top:16px;margin-top:28px}
.nexus-legal-footer nav{display:flex;flex-wrap:wrap;gap:8px}


/* Step 18.22d: legal footer belongs to the document flow, not the 3D/sky layer.
   Keep the three public shells aligned without replacing existing Page/Room layout. */
body.nexus-register-page,
body.nexus-page-public:not(.nexus-page-public--error),
body.nexus-imprint-public {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* The default Hero start page has body padding; stretch its legal footer edge
   to edge without shifting the actual Hero content or its sticky sidebars. */
body.nexus-register-page {
    --nexus-hero-legal-gutter: clamp(16px, 3vw, 34px);
    padding: var(--nexus-hero-legal-gutter) var(--nexus-hero-legal-gutter) 0;
}
body.nexus-register-page > .nexus-register-stage {
    flex: 1 0 auto;
    min-width: 0;
    padding-bottom: clamp(42px, 6vw, 76px);
    position: relative;
    z-index: 1;
}
body.nexus-register-page > .nexus-legal-footer {
    width: calc(100% + 2 * var(--nexus-hero-legal-gutter));
    margin-inline: calc(-1 * var(--nexus-hero-legal-gutter));
}

/* On published Pages the header, site shell and legal links form one column.
   Background canvases stay fixed, while the footer follows real content. */
body.nexus-page-public:not(.nexus-page-public--error) > .nexus-page-shell {
    flex: 1 0 auto;
    min-width: 0;
    padding-bottom: clamp(48px, 6vw, 86px);
}
body.nexus-imprint-public > .nexus-imprint-document {
    min-width: 0;
    margin-bottom: clamp(38px, 5vw, 66px);
}

/* One unobtrusive, full-width legal bar shared by default Hero, Pages and
   stand-alone legal documents. No position:fixed/absolute or overlay tricks. */
.nexus-legal-footer {
    position: relative;
    z-index: 9;
    isolation: isolate;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100%;
    margin-top: auto;
    background: linear-gradient(180deg, rgba(5, 13, 24, .98), rgba(3, 8, 16, .99));
    border-top: 1px solid rgba(143, 216, 255, .22);
    box-shadow: 0 -14px 42px rgba(0, 0, 0, .14);
    color: #ccd9e9;
}
.nexus-legal-footer__inner {
    width: min(1180px, calc(100% - 40px));
    min-width: 0;
    min-height: 68px;
    margin-inline: auto;
    padding: 12px 0 max(12px, env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    flex-wrap: wrap;
}
.nexus-legal-footer__brand {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .015em;
    color: #e5eef9;
}
.nexus-legal-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    min-width: 0;
}
.nexus-legal-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 8px;
    border-radius: 4px;
    color: #c4e5fb;
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
    text-underline-offset: 4px;
    transition: color .15s ease, background-color .15s ease;
}
.nexus-legal-footer a:hover {
    background: rgba(143, 216, 255, .08);
    color: #fff;
    text-decoration: underline;
}
.nexus-legal-footer a:focus-visible {
    outline: 2px solid #80e9ff;
    outline-offset: 2px;
}
@media (max-width: 600px) {
    .nexus-legal-footer__inner {
        width: calc(100% - 32px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        padding-block: 18px max(14px, env(safe-area-inset-bottom, 0px));
    }
    .nexus-legal-footer nav { gap: 4px 10px; }
    .nexus-legal-footer a { min-height: 44px; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .nexus-legal-footer a { transition: none; }
}
