@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

body.legal-page {
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.legal-page .legal-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.legal-page .legal-orb--one {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -120px;
    background: rgba(var(--accent-rgb), 0.18);
}

.legal-page .legal-orb--two {
    width: 360px;
    height: 360px;
    right: -120px;
    top: 20%;
    background: rgba(var(--violet-rgb), 0.16);
}

.legal-page .legal-orb--three {
    width: 320px;
    height: 320px;
    left: 30%;
    bottom: -120px;
    background: rgba(var(--green-rgb), 0.14);
}

.legal-container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 80px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
    margin-bottom: 44px;
}

.topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.topbar .logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(var(--accent-rgb), 0.18);
}

.topbar .logo span {
    font-family: "JetBrains Mono", monospace;
}

.topbar .brand-title .name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.topbar .brand-title .tag {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.legal-page .top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-page .back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.legal-page .back:hover {
    transform: translateY(-2px);
    border-color: var(--card-border-hover);
    background: var(--card-hover);
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.12);
}

.page-header {
    text-align: center;
    margin-bottom: 36px;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 74px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-header .gradient {
    display: inline-block;
    padding: 0.04em 0 0.08em;
    margin: -0.04em 0 -0.08em;
    background: linear-gradient(135deg, var(--accent), var(--accent2), var(--green), var(--accent));
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 4.5s linear infinite;
}

.page-header p {
    max-width: 760px;
    margin: 20px auto 0;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-muted);
}

.page-header .updated {
    margin-top: 18px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.legal-section {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: 0 18px 48px rgba(17, 24, 39, 0.06);
}

.legal-section h2 {
    margin: 0 0 20px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
}

.legal-section p,
.legal-section li {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-soft);
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p {
    margin-top: 14px;
}

.legal-section strong {
    color: var(--text);
}

.legal-section ul {
    margin: 0;
    padding-left: 22px;
}

.legal-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
}

.legal-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.legal-table th,
.legal-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-soft);
}

.legal-table th {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
    background: rgba(var(--accent-rgb), 0.08);
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-table td:first-child,
.legal-table th:first-child {
    min-width: 200px;
}

.legal-section a {
    color: var(--accent);
    text-decoration: none;
}

.legal-section a:hover,
.legal-footer a:hover {
    text-decoration: underline;
}

.legal-footer {
    text-align: center;
    padding: 48px 0 12px;
    border-top: 1px solid var(--card-border);
    margin-top: 36px;
}

.legal-footer .copy {
    color: var(--text-soft);
    font-size: 15px;
    font-weight: 600;
}

.legal-footer .footer-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 18px 28px;
    flex-wrap: wrap;
}

.legal-footer a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

body[data-theme="dark"].legal-page .legal-section {
    background: rgba(16, 25, 49, 0.92);
}

body[data-theme="dark"].legal-page .legal-table-wrap {
    background: rgba(16, 25, 49, 0.72);
}

body[data-theme="dark"].legal-page .legal-table th {
    background: rgba(var(--accent-rgb), 0.16);
}

@media (max-width: 860px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar .brand {
        justify-content: center;
    }

    .legal-page .top-actions {
        justify-content: center;
    }

    .legal-section {
        padding: 28px 22px;
    }
}

@media (max-width: 640px) {
    .legal-container {
        width: min(100% - 24px, 1240px);
        padding-top: 22px;
    }

    .page-header p {
        font-size: 16px;
    }

    .page-header .updated {
        font-size: 13px;
    }
}
