:root {
    --legal-bg-start: #06101d;
    --legal-bg-end: #0c1f35;
    --legal-panel-top: rgba(14, 29, 47, 0.95);
    --legal-panel-bottom: rgba(8, 17, 29, 0.96);
    --legal-border: rgba(157, 205, 240, 0.38);
    --legal-text: rgba(233, 246, 255, 0.98);
    --legal-text-muted: rgba(182, 213, 236, 0.9);
    --legal-link: rgba(176, 224, 255, 0.96);
    --legal-link-hover: rgba(228, 244, 255, 0.99);
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100%;
    font-family: 'Sora', 'Segoe UI', sans-serif;
    color: var(--legal-text);
    background:
        radial-gradient(circle at 18% 16%, rgba(124, 197, 255, 0.12), rgba(124, 197, 255, 0) 34%),
        radial-gradient(circle at 82% 86%, rgba(142, 212, 255, 0.08), rgba(142, 212, 255, 0) 36%),
        linear-gradient(165deg, var(--legal-bg-start), var(--legal-bg-end));
}

.legalShell {
    width: min(920px, calc(100vw - 24px));
    margin: clamp(12px, 3vw, 30px) auto;
    max-height: calc(100dvh - 24px);
    border: 1px solid var(--legal-border);
    border-radius: 20px;
    background:
        linear-gradient(175deg, var(--legal-panel-top), var(--legal-panel-bottom)),
        linear-gradient(120deg, rgba(154, 214, 245, 0.08), rgba(154, 214, 245, 0));
    box-shadow:
        0 24px 52px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    padding: clamp(16px, 3vw, 30px);
    overflow: hidden;
}

.legalTopBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.legalBackLink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: var(--legal-link);
    text-decoration: none;
    border-bottom: 1px solid rgba(176, 224, 255, 0.44);
}

.legalBackLink:hover {
    color: var(--legal-link-hover);
    border-color: rgba(228, 244, 255, 0.72);
}

.legalUpdated {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24px;
    color: var(--legal-text-muted);
    text-transform: uppercase;
}

.legalTitle {
    margin: 0 0 8px 0;
    font-size: clamp(28px, 5.2vw, 48px);
    line-height: 0.98;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    color: transparent;
    background: linear-gradient(130deg, #d9ecff 12%, #c6e6ff 48%, #fff2df 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.legalLead {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--legal-text-muted);
    max-width: 70ch;
}

.legalSection {
    border-top: 1px solid rgba(146, 194, 228, 0.24);
    padding-top: 12px;
    margin-top: 12px;
}

.legalSection h2 {
    margin: 0 0 6px 0;
    font-size: 14px;
    letter-spacing: 0.38px;
    text-transform: uppercase;
    color: rgba(222, 241, 255, 0.98);
}

.legalSection p,
.legalSection li {
    font-size: 14px;
    line-height: 1.58;
    color: rgba(210, 233, 250, 0.95);
}

.legalSection ul {
    margin: 0;
    padding-left: 18px;
}

.legalSection a {
    color: var(--legal-link);
    text-decoration: underline;
    text-decoration-color: rgba(176, 224, 255, 0.58);
    text-underline-offset: 2px;
}

.legalSection a:hover {
    color: var(--legal-link-hover);
    text-decoration-color: rgba(228, 244, 255, 0.82);
}

.legalConsentControls {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legalConsentBtn {
    border: 1px solid rgba(156, 210, 244, 0.52);
    border-radius: 9px;
    min-height: 36px;
    padding: 0 12px;
    background: linear-gradient(170deg, rgba(21, 61, 89, 0.84), rgba(10, 28, 43, 0.9));
    color: rgba(228, 244, 255, 0.97);
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.legalConsentBtn.secondary {
    background: linear-gradient(170deg, rgba(17, 39, 61, 0.82), rgba(8, 20, 32, 0.9));
    color: rgba(210, 234, 250, 0.96);
}

.legalConsentBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    border-color: rgba(191, 230, 252, 0.72);
}

.legalConsentBtn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.legalConsentStatus {
    margin: 8px 0 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(186, 218, 240, 0.9);
}

.legalFooter {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(146, 194, 228, 0.26);
    font-size: 12px;
    color: var(--legal-text-muted);
}

@media (max-width: 720px) {
    .legalShell {
        width: calc(100vw - 12px);
        margin: 8px auto;
        max-height: calc(100dvh - 12px);
        border-radius: 14px;
        padding: 12px;
    }

    .legalTopBar {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 10px;
    }

    .legalLead,
    .legalSection p,
    .legalSection li {
        font-size: 13px;
    }
}
