/* =========================================================
   LEGAL-/SYSTEMSEITEN · DESIGNBASIS V2
   Gemeinsame Systemhülle mit ruhigem rechtlichem Lesebereich.
   Ausschließlich über .legal-v2 auf migrierte Legalseiten begrenzt.
   ========================================================= */

.legal-v2 {
    --legal-crt: #141416;
    --legal-reading: #DCE5E4;
    --legal-reading-soft: #C7CFCE;
    --legal-system: #FF4FD8;
    --legal-system-active: #FFD0F2;
    --legal-system-narration: #F07ACB;
    --legal-system-muted: #9E718E;
    --legal-system-line: rgba(255, 79, 216, .55);
    --legal-system-bg: rgba(255, 79, 216, .072);
    --machine-ghost-color: var(--legal-system);
    --machine-ghost-face-color: var(--legal-system-narration);
    --machine-ghost-muted: var(--legal-system-muted);

    background: var(--legal-crt);
    color: var(--legal-reading);
}

/* Der Viewport ist die Bildröhre; keine zusätzliche Monitorgeometrie. */
.legal-v2::before {
    content: "";
    position: fixed;
    z-index: 1000;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 88% 94% at 50% 45%, rgba(240, 238, 255, .028), transparent 62%),
        radial-gradient(ellipse 106% 102% at 50% 48%, transparent 52%, rgba(7, 7, 10, .1) 72%, rgba(2, 2, 4, .5) 94%, rgba(0, 0, 2, .72) 100%);
    box-shadow:
        inset 0 0 44px rgba(235, 231, 255, .035),
        inset 0 0 118px rgba(0, 0, 3, .54),
        inset 0 0 0 1px rgba(238, 235, 255, .09);
}

.legal-v2::after {
    content: "";
    position: fixed;
    z-index: 999;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, .025), transparent 18%, transparent 72%, rgba(170, 181, 255, .014)),
        repeating-linear-gradient(to bottom, rgba(223, 226, 238, .012) 0, rgba(223, 226, 238, .012) 1px, transparent 1px, transparent 4px);
    opacity: .7;
}

.legal-v2 .legal-terminal-shell {
    width: min(900px, calc(100% - 24px));
    padding: 72px 0 30px;
    gap: 12px;
}

.legal-v2 .legal-system-section,
.legal-v2 .legal-terminal {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--legal-system-line);
    border-radius: 5px;
    background:
        radial-gradient(ellipse at 18% 0, rgba(255, 79, 216, .09), transparent 48%),
        var(--legal-system-bg);
    box-shadow:
        inset 0 0 38px rgba(255, 79, 216, .09),
        0 0 5px rgba(255, 143, 224, .2),
        0 0 16px rgba(255, 38, 190, .14);
    transition:
        border-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.legal-v2 .legal-system-section::after,
.legal-v2 .legal-terminal::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 35%, var(--legal-system) 0, transparent 68%);
    opacity: .025;
}

.legal-v2 .legal-page-header {
    padding: 0;
}

.legal-v2 .legal-terminal > :not(.machine-ghost) {
    position: relative;
    z-index: 1;
}

.legal-v2 .legal-home-link {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    min-height: 100%;
    padding: 28px 30px 26px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.legal-v2 .legal-home-link:focus-visible {
    outline: 1px solid var(--legal-system-active);
    outline-offset: -4px;
}

.legal-v2 .legal-brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.legal-v2 .terminal-title {
    min-width: 0;
    color: #FFE3F7;
    text-shadow:
        0 0 2px rgba(255, 235, 249, .96),
        0 0 6px rgba(255, 143, 224, .72),
        0 0 17px rgba(255, 79, 216, .46),
        -1px 0 rgba(255, 55, 190, .28);
}

.legal-v2 .terminal-line {
    display: block;
    color: var(--legal-system-muted);
    opacity: .5;
}

.legal-v2 .terminal-subtitle {
    display: block;
    color: var(--legal-system-active);
    text-shadow:
        0 0 3px rgba(255, 208, 242, .64),
        0 0 10px rgba(255, 79, 216, .44);
}

.legal-v2 .system-clock {
    flex: 0 0 8ch;
    width: 8ch;
    padding-top: 3px;
    color: var(--legal-system);
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
    text-align: right;
    white-space: nowrap;
    text-shadow:
        0 0 3px rgba(255, 151, 221, .4),
        0 0 8px rgba(255, 79, 216, .28);
}

.legal-v2 .legal-terminal-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.legal-v2 .legal-system-face {
    flex: 0 0 5ch;
    width: 5ch;
    padding-top: 5px;
    color: var(--legal-system-active);
    line-height: 1;
    text-align: right;
    white-space: nowrap;
    text-shadow:
        0 0 3px rgba(255, 208, 242, .62),
        0 0 10px rgba(255, 79, 216, .42);
    animation: legalFacePresence 7.4s steps(1, end) infinite;
}

@keyframes legalFacePresence {
    0%, 42%, 45%, 76%, 79%, 100% { opacity: 1; transform: translateX(0); }
    43%, 44% { opacity: .28; transform: translateY(1px); }
    77%, 78% { opacity: .82; transform: translateX(-1px); }
}

.legal-v2 .legal-idle-background {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.legal-v2 .legal-idle-line,
.legal-v2 .legal-idle-pixel {
    position: absolute;
    display: block;
    opacity: 0;
    pointer-events: none;
}

.legal-v2 .legal-idle-line {
    top: 62%;
    left: -18%;
    width: 38%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 79, 216, .25), transparent);
    box-shadow: 0 0 8px rgba(255, 79, 216, .13);
    animation: legalIdleLine 11s ease-in-out infinite;
}

.legal-v2 .legal-idle-pixel {
    width: 2px;
    height: 2px;
    background: var(--legal-system-active);
    box-shadow: 0 0 7px rgba(255, 79, 216, .44);
    animation: legalIdlePixel 8.6s steps(1, end) infinite;
}

.legal-v2 .legal-idle-pixel-1 { top: 27%; left: 80%; animation-delay: -2s; }
.legal-v2 .legal-idle-pixel-2 { top: 72%; left: 17%; animation-delay: -6s; }
.legal-v2 .legal-idle-pixel-3 { top: 48%; left: 61%; animation-delay: -9s; }

@keyframes legalIdleLine {
    0%, 63%, 100% { opacity: 0; transform: translateX(0); }
    68% { opacity: .34; }
    78% { opacity: .08; transform: translateX(310%); }
}

@keyframes legalIdlePixel {
    0%, 70%, 73%, 100% { opacity: 0; }
    71% { opacity: .62; }
    72% { opacity: .18; }
}

.legal-v2 .system-back-nav {
    --system-nav-line: rgba(255, 79, 216, .34);
    --system-nav-bg: rgba(255, 79, 216, .035);
    --system-nav-muted: var(--legal-system-muted);
    --system-nav-active: var(--legal-system-active);
}

.legal-v2 .legal-page-content {
    margin: 0;
    padding: 0;
}

.legal-v2 .legal-page-title {
    margin: 0;
    padding: 22px 30px 20px;
    color: var(--legal-system-active);
    font-size: 1.55rem;
    line-height: 1.4;
    letter-spacing: .05em;
    text-shadow:
        0 0 3px rgba(255, 208, 242, .58),
        0 0 12px rgba(255, 79, 216, .34);
}

.legal-v2 .legal-footer a:focus-visible,
.legal-v2 .legal-article a:focus-visible {
    outline: 1px solid var(--legal-system-active);
    outline-offset: 3px;
}

.legal-v2 .legal-article {
    max-width: none;
    padding: 0 30px;
    color: var(--legal-reading);
    font-size: 1rem;
    line-height: 1.82;
}

.legal-v2 .legal-article h2 {
    margin-top: 46px;
    color: var(--legal-system-narration);
    line-height: 1.45;
    text-shadow:
        0 0 3px rgba(255, 151, 221, .42),
        0 0 9px rgba(255, 79, 216, .22);
}

.legal-v2 .legal-article h3 {
    margin-top: 32px;
    color: var(--legal-system-muted);
    font-size: .95rem;
    line-height: 1.5;
    letter-spacing: .035em;
    text-shadow: 0 0 7px rgba(255, 79, 216, .16);
}

.legal-v2 .legal-article p {
    max-width: 68ch;
    color: var(--legal-reading);
    text-shadow: 0 0 5px rgba(255, 208, 242, .055);
}

.legal-v2 .legal-article ul,
.legal-v2 .legal-article ol {
    max-width: 68ch;
    margin: 20px 0 25px;
    padding-left: 30px;
    color: var(--legal-reading);
}

.legal-v2 .legal-article li {
    margin-bottom: 8px;
}

.legal-v2 .legal-article code {
    color: var(--legal-system-narration);
    font-family: inherit;
    overflow-wrap: anywhere;
    text-shadow: 0 0 6px rgba(255, 79, 216, .18);
}

.legal-v2 .legal-article strong {
    color: var(--legal-system-muted);
    font-weight: normal;
    letter-spacing: .04em;
}

.legal-v2 .legal-article a {
    color: var(--legal-system-active);
    border-bottom-color: rgba(255, 79, 216, .55);
    text-shadow: 0 0 7px rgba(255, 79, 216, .24);
}

.legal-v2 .legal-article a:hover {
    color: #FFE3F7;
    border-bottom-color: var(--legal-system-active);
}

.legal-v2 .legal-article hr {
    height: 1px;
    margin: 38px 0;
    border: 0;
    background: linear-gradient(90deg, rgba(255, 79, 216, .38), rgba(255, 79, 216, .08) 72%, transparent);
    box-shadow: 0 0 8px rgba(255, 79, 216, .08);
}

.legal-v2 .legal-terminal {
    width: 100%;
    max-width: none;
    margin: 0 0 40px;
    padding: 26px 28px;
    color: var(--legal-system-narration);
    font-size: var(--font-system);
    line-height: 1.9;
    letter-spacing: .035em;
    text-shadow:
        0 0 3px rgba(255, 151, 221, .3),
        0 0 9px rgba(255, 79, 216, .18);
}

.legal-v2 .legal-terminal::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 58%;
    left: -24%;
    width: 38%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 79, 216, .22), transparent);
    opacity: 0;
    animation: legalIdleLine 12s ease-in-out infinite -3s;
}

.legal-v2 .legal-entry-terminal {
    margin-bottom: 38px;
}

.legal-v2 .legal-terminal .legal-line-1,
.legal-v2 .legal-closing-status .final-line-1,
.legal-v2 .legal-closing-status .final-line-7 {
    color: var(--legal-system-active);
    text-shadow:
        0 0 3px rgba(255, 208, 242, .54),
        0 0 10px rgba(255, 79, 216, .38);
}

.legal-v2 .status-blink,
.legal-v2 .status-blink-alt,
.legal-v2 .status-blink-slow {
    color: var(--legal-system-active);
}

.legal-v2 .legal-lower-system {
    padding: 28px 30px 24px;
    color: var(--legal-system-narration);
}

.legal-v2 .legal-lower-system > :not(.legal-idle-background):not(.machine-ghost) {
    position: relative;
    z-index: 1;
}

.legal-v2 .legal-closing-status {
    font-size: var(--font-system);
    line-height: 1.9;
    letter-spacing: .035em;
    text-shadow:
        0 0 3px rgba(255, 151, 221, .3),
        0 0 9px rgba(255, 79, 216, .18);
}

.legal-v2 .legal-footer {
    margin-top: 0;
    padding: 30px 0 0;
}

.legal-v2 .footer-line {
    color: var(--legal-system-muted);
    opacity: .34;
}

.legal-v2 .footer-navigation {
    padding-right: 0;
    padding-left: 0;
}

.legal-v2 .footer-navigation a {
    color: var(--legal-system);
}

.legal-v2 .footer-navigation a:hover,
.legal-v2 .footer-navigation a:focus-visible {
    color: var(--legal-system-active);
    text-shadow:
        0 0 3px rgba(255, 208, 242, .54),
        0 0 10px rgba(255, 79, 216, .44);
}

@media (hover: hover) and (pointer: fine) {
    .legal-v2 .legal-system-section:hover,
    .legal-v2 .legal-terminal:hover {
        border-color: rgba(255, 143, 224, .76);
        background-color: rgba(255, 79, 216, .092);
        box-shadow:
            inset 0 0 42px rgba(255, 79, 216, .115),
            0 0 6px rgba(255, 143, 224, .28),
            0 0 18px rgba(255, 38, 190, .2);
    }
}

@media (max-width: 600px) {
    .legal-v2::before {
        background:
            radial-gradient(ellipse 92% 96% at 50% 44%, rgba(240, 238, 255, .03), transparent 58%),
            radial-gradient(ellipse 108% 102% at 50% 48%, transparent 46%, rgba(7, 7, 10, .07) 67%, rgba(2, 2, 4, .34) 91%, rgba(0, 0, 2, .52) 100%);
        box-shadow:
            inset 0 0 22px rgba(235, 231, 255, .04),
            inset 0 0 64px rgba(0, 0, 3, .4),
            inset 0 0 0 1px rgba(238, 235, 255, .08);
    }

    .legal-v2::after {
        background:
            linear-gradient(112deg, rgba(255, 255, 255, .03), transparent 20%, transparent 70%, rgba(170, 181, 255, .016)),
            repeating-linear-gradient(to bottom, rgba(229, 231, 242, .02) 0, rgba(229, 231, 242, .02) 1px, transparent 1px, transparent 3px);
    }

    .legal-v2 .legal-terminal-shell {
        width: calc(100% - 12px);
        padding-top: 12px;
        padding-bottom: 20px;
    }

    .legal-v2 .legal-system-section,
    .legal-v2 .legal-terminal {
        border-radius: 4px;
    }

    .legal-v2 .legal-page-header {
        padding: 0;
    }

    .legal-v2 .legal-home-link {
        padding: 22px 14px 20px;
    }

    .legal-v2 .legal-brand-row {
        gap: 8px;
    }

    .legal-v2 .system-clock {
        flex-basis: 8ch;
        width: 8ch;
        padding-top: 2px;
        font-size: .82rem;
        letter-spacing: .04em;
    }

    .legal-v2 .legal-terminal-heading-row {
        gap: 8px;
    }

    .legal-v2 .legal-system-face {
        flex-basis: 5ch;
        width: 5ch;
        padding-top: 3px;
        font-size: .82rem;
    }

    .legal-v2 .legal-page-title {
        padding: 18px 14px 16px;
        font-size: 1.3rem;
    }

    .legal-v2 .legal-article {
        padding: 0 14px;
        font-size: 1rem;
        line-height: 1.76;
    }

    .legal-v2 .legal-article h2 {
        margin-top: 38px;
        overflow-wrap: anywhere;
    }

    .legal-v2 .legal-article h3 {
        margin-top: 28px;
        overflow-wrap: anywhere;
    }

    .legal-v2 .legal-article ul,
    .legal-v2 .legal-article ol {
        padding-left: 22px;
    }

    .legal-v2 .legal-article hr {
        margin: 32px 0;
    }

    .legal-v2 .legal-terminal {
        margin-bottom: 38px;
        padding: 22px 14px;
        font-size: .78rem;
        line-height: 1.8;
        letter-spacing: .01em;
        overflow-wrap: anywhere;
    }

    .legal-v2 .legal-entry-terminal {
        margin-bottom: 32px;
    }

    .legal-v2 .legal-lower-system {
        padding: 24px 14px 20px;
    }

    .legal-v2 .legal-closing-status {
        font-size: .78rem;
        line-height: 1.8;
        letter-spacing: .01em;
        overflow-wrap: anywhere;
    }

    .legal-v2 .legal-footer {
        margin-top: 0;
        padding-top: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-v2 .legal-system-face,
    .legal-v2 .legal-idle-line,
    .legal-v2 .legal-idle-pixel,
    .legal-v2 .legal-terminal::before,
    .legal-v2 .legal-line,
    .legal-v2 .final-line,
    .legal-v2 .status-blink,
    .legal-v2 .status-blink-alt,
    .legal-v2 .status-blink-slow {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
