html {
    background: #05070b;
}

.public-legal {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(ellipse 120% 72% at 50% -12%, rgba(var(--legal-accent-rgb, 59, 130, 246), 0.14), transparent 54%),
        linear-gradient(180deg, #0a0d15 0%, #070910 38%, #05070b 100%);
    color: #e7ecf5;
    font-size: 16px;
    line-height: 1.72;
}

.public-legal *,
.public-legal *::before,
.public-legal *::after {
    box-sizing: border-box;
}

.public-legal a {
    color: inherit;
}

.public-legal img {
    max-width: 100%;
}

.public-legal-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.public-legal-noise,
.public-legal-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.public-legal-noise {
    opacity: 0.12;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.6px, transparent 0.6px);
    background-size: 18px 18px;
    mix-blend-mode: soft-light;
}

.public-legal-grid {
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 82%);
}

.public-legal-container {
    width: min(1160px, 100% - 2rem);
    margin-inline: auto;
    min-width: 0;
}

.public-legal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(7, 9, 14, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

.public-legal-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.25rem;
}

.public-legal-brand,
.public-legal-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    text-decoration: none;
}

.public-legal-brand-logo {
    display: block;
    width: clamp(172px, 18vw, 236px);
    max-height: 64px;
    height: auto;
    object-fit: contain;
}

.public-legal-brand-fallback,
.public-legal-footer-brand-fallback {
    display: inline-flex;
    align-items: center;
    color: #fafcff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.public-legal-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-left: auto;
    min-width: 0;
}

.public-legal-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #b1b8c7;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.public-legal-nav__link:hover {
    color: #fafcff;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
}

.public-legal-nav__link.is-active {
    color: rgb(var(--legal-accent-rgb, 59, 130, 246));
    border-color: rgba(var(--legal-accent-rgb, 59, 130, 246), 0.28);
    background: rgba(var(--legal-accent-rgb, 59, 130, 246), 0.12);
    box-shadow: inset 0 0 0 1px rgba(var(--legal-accent-rgb, 59, 130, 246), 0.06);
}

.public-legal-nav__link--login {
    color: #f2f5fb;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
}

.public-legal-main {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: clamp(2rem, 3vw, 3.2rem) 0 4rem;
}

.public-legal-hero {
    margin-bottom: 1.35rem;
}

.public-legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    color: #9da7b8;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-legal-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--legal-accent-rgb, 59, 130, 246), 0.82));
}

.public-legal-h1 {
    margin: 0;
    max-width: 15ch;
    color: #fafcff;
    font-size: clamp(2rem, 3.15vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.06;
}

.public-legal-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.94) 0%, rgba(10, 13, 20, 0.97) 100%);
    box-shadow:
        0 26px 80px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
    overflow: hidden;
}

.public-legal-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--legal-accent-rgb, 59, 130, 246), 0.55), transparent);
}

.public-legal-card-inner {
    padding: clamp(1.25rem, 1rem + 1.6vw, 2.75rem);
}

.public-legal-prose {
    color: #d6dbe5;
    overflow-wrap: anywhere;
}

.public-legal-prose > :first-child {
    margin-top: 0;
}

.public-legal-prose h2 {
    margin: 2.45rem 0 0.95rem;
    padding-top: 1.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #fbfdff;
    font-size: clamp(1.125rem, 1.04rem + 0.45vw, 1.35rem);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.02em;
}

.public-legal-prose h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.public-legal-prose p,
.public-legal-prose ul,
.public-legal-prose ol {
    margin: 0 0 1.1rem;
    font-size: 1rem;
}

.public-legal-prose ul,
.public-legal-prose ol {
    padding-left: 1.2rem;
}

.public-legal-prose li {
    margin-bottom: 0.7rem;
    padding-left: 0.1rem;
}

.public-legal-prose a {
    color: rgb(var(--legal-accent-rgb, 59, 130, 246));
    text-decoration: none;
    box-shadow: inset 0 -1px 0 rgba(var(--legal-accent-rgb, 59, 130, 246), 0.38);
    transition:
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.public-legal-prose a:hover {
    color: #dbe9ff;
    box-shadow: inset 0 -1px 0 rgba(var(--legal-accent-rgb, 59, 130, 246), 0.68);
}

.public-legal-prose strong {
    color: #fbfdff;
    font-weight: 700;
}

.public-legal-meta {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 1.8rem;
    padding: 0.72rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #c9d2df;
    font-size: 0.875rem;
    line-height: 1.4;
}

.public-legal-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 1.5rem 0 2.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(7, 9, 14, 0.08) 0%, rgba(7, 9, 14, 0.62) 100%);
}

.public-legal-footer-inner {
    display: grid;
    gap: 1rem;
    align-items: center;
}

.public-legal-footer-brand {
    justify-self: center;
}

.public-legal-footer-brand-logo {
    display: block;
    width: clamp(158px, 16vw, 220px);
    max-height: 58px;
    height: auto;
    object-fit: contain;
}

.public-legal-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.6rem;
}

.public-legal-footer-nav a,
.public-legal-footer-login {
    color: #aab2c1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.18s ease;
}

.public-legal-footer-nav a:hover,
.public-legal-footer-login:hover {
    color: #fafcff;
}

.public-legal-footer-dot {
    color: #545d70;
    user-select: none;
}

.public-legal-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
}

.public-legal-footer-copy {
    margin: 0;
    color: #7f8899;
    font-size: 0.875rem;
}

@media (min-width: 960px) {
    .public-legal-footer-inner {
        grid-template-columns: auto 1fr auto;
    }

    .public-legal-footer-brand {
        justify-self: start;
    }

    .public-legal-footer-bottom {
        justify-self: end;
        justify-content: flex-end;
    }
}

@media (max-width: 900px) {
    .public-legal-header-inner {
        align-items: flex-start;
    }

    .public-legal-nav {
        gap: 0.5rem;
    }
}

@media (max-width: 720px) {
    .public-legal-container {
        width: min(100% - 1.5rem, 1160px);
    }

    .public-legal-header {
        padding: 0.8rem 0;
    }

    .public-legal-header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .public-legal-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        margin-left: 0;
        width: 100%;
    }

    .public-legal-nav__link {
        width: 100%;
        min-height: 46px;
        padding-inline: 0.9rem;
        font-size: 0.95rem;
    }

    .public-legal-h1 {
        max-width: none;
    }

    .public-legal-card {
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .public-legal {
        font-size: 16px;
    }

    .public-legal-brand-logo {
        width: min(180px, 52vw);
    }

    .public-legal-nav {
        grid-template-columns: 1fr;
    }

    .public-legal-main {
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }

    .public-legal-eyebrow {
        font-size: 0.74rem;
    }

    .public-legal-h1 {
        font-size: clamp(1.72rem, 8vw, 2.2rem);
    }

    .public-legal-card-inner {
        padding: 1.15rem;
    }

    .public-legal-prose h2 {
        margin-top: 2rem;
        padding-top: 1.2rem;
    }

    .public-legal-meta {
        margin-bottom: 1.45rem;
        padding: 0.7rem 0.95rem;
        border-radius: 18px;
    }

    .public-legal-footer-nav {
        gap: 0.45rem 0.55rem;
    }
}
