:root {
    --font-main: 'Aptos', 'Corbel', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --bg: #FAFAF7;
    --card: #FFFFFF;
    --ink: #161B19;
    --muted: #6B7069;
    --green: #0E7A63;
    --green-dark: #0A5A49;
    --green-soft: #E4F3EE;
    --coral: #FF6B4A;
    --coral-soft: #FFE9E2;
    --sand: #F1EDE3;
    --line: rgba(22, 27, 25, 0.09);
    --radius: 20px;

    --color-cream: var(--bg);
    --color-white: var(--card);
    --color-ink: var(--ink);
    --color-muted: var(--muted);
    --color-forest: var(--green);
    --color-forest-2: var(--green-dark);
    --color-coral: var(--coral);
    --color-line: var(--line);
    --shadow-card: 0 20px 40px -24px rgba(22, 27, 25, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.legal-page {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-main);
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 247, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-wrapper {
    position: relative;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-container {
    min-height: 74px;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.logo,
.logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.logo-text {
    font-size: 19px;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.main-nav a {
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--ink);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.header-lang-switcher {
    position: relative;
    flex: 0 0 auto;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--green-dark);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 150px;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.header-lang-switcher.active .lang-dropdown {
    display: grid;
}

.lang-dropdown a {
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: var(--green);
    color: #fff;
}

.mobile-menu-toggle,
.mobile-lang-switcher,
.mobile-nav-cta,
.nav-indicator {
    display: none;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 76px;
    text-align: center;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 107, 74, 0.12), transparent 32%),
        radial-gradient(circle at 86% 20%, rgba(14, 122, 99, 0.12), transparent 34%),
        var(--bg);
}

.update-date-pill {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--green-dark);
    background: var(--green-soft);
    font-size: 13px;
    font-weight: 700;
}

.legal-title {
    max-width: 920px;
    margin: 0 auto 14px;
    color: var(--ink);
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.legal-meta {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 16px;
}

.legal-container {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 34px;
    padding-top: 56px;
    padding-bottom: 96px;
}

.legal-sidebar {
    position: sticky;
    top: 98px;
    align-self: start;
    min-width: 0;
    max-height: calc(100vh - 122px);
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 20px 40px -32px rgba(22, 27, 25, 0.22);
}

.legal-sidebar::-webkit-scrollbar {
    width: 6px;
}

.legal-sidebar::-webkit-scrollbar-thumb {
    background: rgba(14, 122, 99, 0.2);
    border-radius: 999px;
}

.legal-nav-title {
    margin-bottom: 12px;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal-nav a {
    display: block;
    padding: 9px 11px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: break-word;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.legal-nav a:hover {
    color: var(--ink);
    background: var(--sand);
}

.legal-nav a.active {
    color: #fff;
    background: var(--green);
    transform: translateX(2px);
}

.legal-content {
    min-width: 0;
    padding: clamp(28px, 5vw, 62px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 22px 60px -42px rgba(22, 27, 25, 0.34);
}

.article-section {
    margin-bottom: 48px;
    scroll-margin-top: 112px;
}

.article-section:last-child {
    margin-bottom: 0;
}

.article-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: var(--ink);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.article-section h2::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 6px var(--green-soft);
    flex: 0 0 auto;
}

.article-section h3 {
    margin: 30px 0 10px;
    color: var(--green-dark);
    font-size: 1.06rem;
    letter-spacing: -0.005em;
}

.article-section h4 {
    margin: 24px 0 8px;
    color: var(--ink);
    font-size: 0.98rem;
}

.legal-content p,
.legal-content li {
    color: var(--muted);
    font-size: 15.5px;
}

.legal-content p {
    margin: 0 0 1.1rem;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 1.55rem;
    padding-left: 1.2rem;
}

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

.legal-content strong {
    color: var(--ink);
}

.legal-content a {
    color: var(--green-dark);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(14, 122, 99, 0.25);
    text-underline-offset: 3px;
}

.important-callout {
    margin: 28px 0;
    padding: 20px;
    border: 1px solid rgba(255, 107, 74, 0.22);
    border-radius: 16px;
    color: #8f351d;
    background: var(--coral-soft);
    font-weight: 800;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green-dark);
    background: #fff;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    color: #fff;
    background: var(--green);
}

@media (max-width: 980px) {
    .header-wrapper {
        padding: 0 24px;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: 24px;
        right: 24px;
        top: calc(100% + 10px);
        z-index: 60;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow-card);
    }

    body.legal-nav-open .main-nav {
        display: block;
    }

    .main-nav ul {
        display: grid;
        gap: 8px;
    }

    .main-nav a {
        display: block;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .main-nav a:hover {
        background: var(--sand);
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 999px;
        background: var(--ink);
        color: #fff;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        margin: 0;
        border-radius: 999px;
        background: currentColor;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    body.legal-nav-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    body.legal-nav-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.legal-nav-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .header-container > .btn {
        display: none;
    }

    .mobile-nav-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        margin-top: 10px;
        border-radius: 999px;
        background: var(--ink);
        color: #fff;
        font-size: 14px;
        font-weight: 800;
        text-decoration: none;
    }

    .main-nav .mobile-nav-cta {
        color: #fff;
    }

    .mobile-lang-switcher {
        display: flex;
        gap: 8px;
        padding-top: 12px;
        margin-top: 12px;
        border-top: 1px solid var(--line);
    }

    .mobile-lang-link {
        padding: 7px 10px;
        border-radius: 999px;
        color: var(--muted);
        font-weight: 800;
        text-decoration: none;
    }

    .mobile-lang-link.active {
        color: #fff;
        background: var(--green);
    }

    .legal-container {
        grid-template-columns: 1fr;
        padding-top: 34px;
    }

    .legal-sidebar {
        display: none;
    }
}

@media (max-width: 660px) {
    .container,
    .header-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    .logo-text {
        font-size: 18px;
    }

    .header-lang-switcher {
        display: none;
    }

    .legal-hero {
        padding: 58px 0 52px;
    }

    .legal-title {
        max-width: 350px;
        font-size: clamp(2rem, 10vw, 2.45rem);
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    .legal-content {
        padding: 26px 22px;
        border-radius: 18px;
    }

    .legal-content p,
    .legal-content li {
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    .container,
    .header-wrapper {
        padding-left: 18px;
        padding-right: 18px;
    }

    .legal-title {
        max-width: 300px;
        font-size: clamp(1.9rem, 9.2vw, 2.25rem);
    }

    .legal-meta {
        max-width: 310px;
        font-size: 15px;
    }



    .legal-content {
        padding: 24px 20px;
    }
}
