/* Apple HIG-inspired legal document layout */

.legal-page {
    --color-primary: #005ecb;
    --color-primary-hover: #004fa9;
    --color-text: #111114;
    --color-text-light: #3a3a3c;
    --color-bg-secondary: transparent;
    --color-border: #d2d2d7;
    background:
        radial-gradient(circle at 15% -20%, rgba(0, 122, 255, 0.08), transparent 38%),
        radial-gradient(circle at 85% -10%, rgba(52, 199, 89, 0.06), transparent 34%),
        #f5f5f7;
    color: #1d1d1f;
}

.legal-page .header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-page .header .container {
    min-height: 64px;
    display: flex;
    align-items: center;
}

.legal-page .hero {
    background: transparent;
    border-bottom: none;
    padding: 68px 0 28px;
}

.legal-page .hero h1 {
    font-size: clamp(2rem, 3vw, 2.7rem);
    line-height: 1.18;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.015em;
}

.legal-page .hero p {
    font-size: 1rem;
    color: #3a3a3c;
}

.legal-page .section {
    padding: 24px 0 88px;
}

.legal-page .content {
    max-width: 860px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
    padding: clamp(1.4rem, 4vw, 3rem);
}

.legal-page .content h1 {
    font-size: clamp(1.62rem, 2.6vw, 2.2rem);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: -0.012em;
}

.legal-page .content h1::after {
    content: none;
}

.legal-page .content h2 {
    margin-top: 2.4rem;
    margin-bottom: 0.9rem;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: clamp(1.15rem, 1.8vw, 1.34rem);
    line-height: 1.45;
    font-weight: 650;
    letter-spacing: -0.008em;
    color: #111114;
}

.legal-page .content h3 {
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    padding-left: 0;
    border-left: none;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 0.35rem;
    font-size: 1.04rem;
    font-weight: 600;
    color: #1d1d1f;
}

.legal-page .content h3[style] {
    margin-top: 1.8rem !important;
    margin-bottom: 0.8rem !important;
    font-size: 1.04rem !important;
}

.legal-page .content p,
.legal-page .content li {
    color: #111114;
    line-height: 1.92;
    font-size: 1rem;
}

.legal-page .content p[style],
.legal-page .content ul[style],
.legal-page .content li[style] {
    color: #111114 !important;
}

.legal-page .content ul,
.legal-page .content ol {
    margin: 0.95rem 0 1.35rem 1.3rem;
}

.legal-page .content li {
    margin-bottom: 0.56rem;
}

.legal-page .content a {
    color: #005ecb;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.legal-page .content a[style] {
    color: #005ecb !important;
}

.legal-page .privacy-intro,
.legal-page .info-box,
.legal-page .contact-card,
.legal-page .date-card {
    border-radius: 16px;
    border: 1px solid #c7c7cc;
    background: #fbfbfd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.legal-page .privacy-intro {
    padding: 1.2rem 1.3rem;
    border: 1px solid #c7c7cc;
    color: #3a3a3c;
    margin-bottom: 1.9rem;
}

.legal-page .info-box {
    margin: 1rem 0;
    padding: 1.06rem 1.2rem;
}

.legal-page .contact-card {
    margin-top: 0.7rem;
    padding: 1rem 1.1rem;
    border: 1px solid #c7c7cc;
}

.legal-page .date-grid {
    margin-top: 1.1rem;
    gap: 0.85rem;
}

.legal-page .date-card {
    text-align: left;
    padding: 1rem;
}

.legal-page .date-card:hover {
    transform: none;
    box-shadow: none;
}

.legal-page .date-label {
    color: #3a3a3c;
    font-size: 0.83rem;
}

.legal-page .date-value {
    color: #1d1d1f;
    font-size: 1rem;
}

.legal-page .language-switcher {
    display: flex;
    gap: 0.45rem;
    margin: 0 auto 1.8rem;
    padding: 0.35rem;
    width: 100%;
    max-width: 860px;
    box-sizing: border-box;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-page .language-switcher button {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #1d1d1f;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.legal-page .language-switcher button:hover {
    background: rgba(255, 255, 255, 0.68);
    color: #1d1d1f;
}

.legal-page .language-switcher button.active {
    background: #ffffff;
    color: #1d1d1f;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.legal-page .language-content {
    display: none;
}

.legal-page .language-content.active {
    display: block;
}

.legal-page footer {
    background: transparent;
    border-top: none;
    padding-top: 0;
    padding-bottom: 2rem;
}

.legal-page footer[style] {
    background: transparent !important;
    border-top: none !important;
    margin-top: 2.2rem !important;
}

.legal-page footer p[style] {
    color: #3a3a3c !important;
    font-size: 0.9rem !important;
}

.legal-page footer .container {
    max-width: 860px;
    border-top: 1px solid #d2d2d7;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .legal-page .header .container {
        min-height: 56px;
    }

    .legal-page .hero {
        padding: 56px 0 20px;
    }

    .legal-page .section {
        padding-bottom: 62px;
    }

    .legal-page .language-switcher {
        display: flex;
    }
}

@media (max-width: 480px) {
    .legal-page .hero {
        padding: 44px 0 16px;
    }

    .legal-page .content {
        border-radius: 18px;
    }

    .legal-page .language-switcher {
        width: 100%;
        justify-content: center;
    }

    .legal-page .language-switcher button {
        flex: 1;
    }
}