:root {
    --legal-bg: #f5f0e7;
    --legal-text: #1b2333;
    --legal-muted: #617084;
    --legal-line: rgba(27, 35, 51, 0.08);
    --legal-warm: #9f5f1a;
    --legal-cool: #5679a6;
    --legal-fresh: rgba(166, 220, 194, 0.16);
    --legal-sky: rgba(169, 204, 228, 0.14);
    --legal-blush: rgba(246, 214, 188, 0.14);
    --legal-leaf: rgba(190, 228, 170, 0.12);
    --legal-bloom: rgba(255, 228, 214, 0.2);
    --legal-card: rgba(255, 255, 255, 0.5);
    --legal-card-strong: rgba(255, 255, 255, 0.72);
    --legal-shadow: 0 16px 32px rgba(27, 35, 51, 0.05);
    --legal-soft-shadow: 0 10px 18px rgba(27, 35, 51, 0.028);
    --legal-glow: rgba(219, 168, 104, 0.13);
    --legal-glow-cool: rgba(125, 150, 184, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--legal-text);
    background: radial-gradient(circle at 10% 8%, var(--legal-bloom) 0%, rgba(255, 228, 214, 0) 22%),
    radial-gradient(circle at 86% 12%, var(--legal-sky) 0%, rgba(169, 204, 228, 0) 26%),
    radial-gradient(circle at 22% 72%, var(--legal-leaf) 0%, rgba(190, 228, 170, 0) 24%),
    radial-gradient(circle at 74% 78%, var(--legal-fresh) 0%, rgba(166, 220, 194, 0) 28%),
    linear-gradient(180deg, #fffdf7 0%, #f3faf7 42%, #f8f5ee 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.legal-page {
    position: relative;
    overflow-x: hidden;
    isolation: isolate;
}

.legal-page::before,
.legal-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.legal-page::before {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 34%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 30px);
    opacity: 0.42;
}

.legal-page::after {
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle at 50% 22%, rgba(240, 255, 247, 0.34) 0%, rgba(240, 255, 247, 0) 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 30%);
    opacity: 0.64;
}

.page-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 42% 18%, rgba(255, 237, 223, 0.16) 0%, rgba(255, 237, 223, 0) 10%),
    radial-gradient(circle at 12% 62%, rgba(206, 238, 213, 0.14) 0%, rgba(206, 238, 213, 0) 12%),
    radial-gradient(circle at 84% 54%, rgba(216, 231, 249, 0.14) 0%, rgba(216, 231, 249, 0) 10%);
}

.page-atmosphere::before,
.page-atmosphere::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(30px);
    animation: drift 32s ease-in-out infinite alternate;
}

.page-atmosphere::before {
    top: 70px;
    left: -20px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(255, 228, 214, 0.22) 0%, rgba(255, 228, 214, 0.06) 30%, rgba(255, 228, 214, 0) 72%);
    box-shadow: 170px 180px 0 -126px rgba(255, 255, 255, 0.14),
    220px 70px 0 -150px rgba(210, 240, 222, 0.16);
}

.page-atmosphere::after {
    right: -60px;
    bottom: 10px;
    width: 390px;
    height: 390px;
    background: radial-gradient(circle, rgba(166, 220, 194, 0.18) 0%, rgba(166, 220, 194, 0.05) 30%, rgba(166, 220, 194, 0) 72%);
    box-shadow: -150px -120px 0 -116px rgba(255, 255, 255, 0.14),
    -220px -20px 0 -154px rgba(222, 239, 255, 0.14);
    animation-duration: 38s;
}

.legal-shell {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100% - 36px));
    margin: 0 auto;
    padding: 26px 0;
}

.legal-topbar,
.legal-hero,
.legal-content,
.legal-footer {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--legal-card);
    box-shadow: var(--legal-shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.legal-topbar::before,
.legal-content::before,
.legal-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.legal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    margin-bottom: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(247, 252, 251, 0.52) 100%);
}

.legal-topbar::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 12px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(153, 207, 195, 0.2) 0%, rgba(153, 207, 195, 0.05) 34%, rgba(153, 207, 195, 0) 72%);
    opacity: 0.68;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.legal-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: url("../images/logo.png") center / cover no-repeat;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 18px rgba(119, 168, 182, 0.08),
    0 0 0 6px rgba(255, 255, 255, 0.16);
    font-size: 0;
    color: transparent;
    flex: 0 0 auto;
}

.legal-brand-text strong,
.legal-brand-text span {
    display: block;
}

.legal-brand-text strong {
    font-size: 16px;
    letter-spacing: 0.01em;
    color: #263247;
}

.legal-brand-text span {
    color: var(--legal-muted);
    font-size: 13px;
    line-height: 1.5;
}

.legal-topbar-actions,
.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-topbar-actions {
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: flex-end;
    padding: 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.legal-chip,
.legal-footer-links a {
    text-decoration: none;
}

.legal-chip {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.66);
    color: var(--legal-text);
    box-shadow: 0 8px 16px rgba(27, 35, 51, 0.024);
    transition: transform 0.28s ease, background-color 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.legal-chip:hover,
.legal-footer-links a:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(27, 35, 51, 0.04);
}

.legal-chip-primary {
    background: linear-gradient(135deg, #79aeb7 0%, #90c6c2 100%);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(121, 174, 183, 0.18);
}

.legal-chip::before,
.legal-footer-links a::before {
    font-size: 15px;
    line-height: 1;
    opacity: 0.92;
}

.legal-topbar-actions a[href="/"]::before,
.legal-topbar-actions a[href="/zh/"]::before,
.legal-topbar-actions a[href="/es/"]::before,
.legal-topbar-actions a[href="/ru/"]::before {
    content: "🎡";
}

.legal-topbar-actions a[href*="coin-flip"]::before,
.legal-topbar-actions a[href*="cara-o-cruz"]::before {
    content: "🪙";
}

.legal-topbar-actions a[href*="/about/"]::before {
    content: "✨";
}

.legal-topbar-actions a[href$="/privacy-policy/"]::before,
.legal-topbar-actions a[href$="/terms-of-service/"]::before {
    content: "📘";
}

.legal-hero {
    padding: 52px 42px 36px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.68) 0%, rgba(250, 246, 240, 0.58) 46%, rgba(243, 247, 252, 0.6) 100%);
}

.legal-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.legal-hero::before {
    top: -100px;
    right: -30px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(219, 168, 104, 0.1) 0%, rgba(219, 168, 104, 0.03) 32%, rgba(219, 168, 104, 0) 72%);
}

.legal-hero::after {
    left: -90px;
    bottom: -110px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(125, 150, 184, 0.09) 0%, rgba(125, 150, 184, 0.025) 30%, rgba(125, 150, 184, 0) 72%);
}

.legal-hero > * {
    position: relative;
    z-index: 1;
}

.legal-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    padding: 6px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--legal-warm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    box-shadow: 0 6px 14px rgba(27, 35, 51, 0.024);
}

.legal-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5.4vw, 60px);
    line-height: 1.04;
    max-width: 10ch;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.legal-hero p,
.legal-hero li,
.legal-content p,
.legal-content li,
.legal-footer p {
    color: var(--legal-muted);
    line-height: 1.85;
    font-size: 16px;
}

.legal-hero p {
    max-width: 60ch;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.legal-meta-item {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 8px 14px rgba(27, 35, 51, 0.022);
    font-size: 14px;
    color: #334155;
}

.legal-content {
    padding: 24px 20px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.legal-grid {
    display: grid;
    grid-template-columns: minmax(0, 252px) minmax(0, 1fr);
    gap: 22px;
}

.legal-sidebar,
.legal-main,
.legal-section,
.legal-note {
    position: relative;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.46);
    box-shadow: var(--legal-soft-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.legal-sidebar::before,
.legal-section::before,
.legal-note::before,
.legal-footer::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.legal-sidebar {
    padding: 22px 18px;
    align-self: start;
    position: sticky;
    top: 30px;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.72) 0%, rgba(255, 255, 255, 0.46) 100%);
}

.legal-sidebar h2,
.legal-main h2,
.legal-main h3 {
    color: var(--legal-text);
}

.legal-sidebar h2 {
    font-size: 18px;
    margin: 0 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legal-sidebar h2::before {
    content: "✦";
    font-size: 14px;
    color: var(--legal-warm);
}

.legal-nav {
    display: grid;
    gap: 10px;
}

.legal-nav a {
    min-height: 42px;
    padding: 10px 13px 10px 15px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
    text-decoration: none;
    color: #334155;
    display: flex;
    align-items: center;
    position: relative;
    transition: transform 0.26s ease, background-color 0.26s ease, box-shadow 0.26s ease;
}

.legal-nav a::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.28);
}

.legal-nav a[href="#collect"]::after,
.legal-nav a[href="#use"]::after {
    content: "🌿";
}

.legal-nav a[href="#cookies"]::after {
    content: "🍪";
}

.legal-nav a[href="#advertising"]::after {
    content: "📣";
}

.legal-nav a[href="#links"]::after {
    content: "🔗";
}

.legal-nav a[href="#security"]::after {
    content: "🛡️";
}

.legal-nav a[href="#choices"]::after {
    content: "🧭";
}

.legal-nav a[href="#contact"]::after {
    content: "✉️";
}

.legal-nav a[href="#warranty"]::after {
    content: "☁️";
}

.legal-nav a[href="#liability"]::after {
    content: "⚖️";
}

.legal-nav a[href="#ip"]::after {
    content: "©️";
}

.legal-nav a[href="#third-parties"]::after {
    content: "🪐";
}

.legal-nav a[href="#changes"]::after {
    content: "🕊️";
}

.legal-nav a[href="#law"]::after {
    content: "📜";
}

.legal-nav a::after {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.9;
}

.legal-nav a:hover {
    transform: translateX(1px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 16px rgba(27, 35, 51, 0.03);
}

.legal-main {
    padding: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    display: grid;
    gap: 16px;
}

.legal-section {
    padding: 22px 24px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.legal-section h2 {
    margin: 0 0 12px;
    font-size: 22px;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#collect h2::before,
#use h2::before {
    content: "🌿";
}

#cookies h2::before {
    content: "🍪";
}

#advertising h2::before {
    content: "📣";
}

#links h2::before {
    content: "🔗";
}

#security h2::before {
    content: "🛡️";
}

#choices h2::before {
    content: "🧭";
}

#contact h2::before {
    content: "✉️";
}

#warranty h2::before {
    content: "☁️";
}

#liability h2::before {
    content: "⚖️";
}

#ip h2::before {
    content: "©️";
}

#third-parties h2::before {
    content: "🪐";
}

#changes h2::before {
    content: "🕊️";
}

#law h2::before {
    content: "📜";
}

.legal-section h3 {
    margin: 18px 0 10px;
    font-size: 18px;
}

.legal-section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 1px;
    margin-top: 12px;
    background: linear-gradient(90deg, rgba(159, 95, 26, 0.48) 0%, rgba(125, 150, 184, 0.16) 100%);
}

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

.legal-list li + li {
    margin-top: 8px;
}

.legal-note {
    margin-top: 16px;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.82) 0%, rgba(255, 255, 255, 0.66) 100%);
}

.legal-note strong {
    display: block;
    margin-bottom: 8px;
    color: #8b5b2b;
    position: relative;
    padding-left: 22px;
}

.legal-note strong::before {
    content: "☕";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
}

.legal-footer {
    margin-top: 18px;
    padding: 24px 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.64) 0%, rgba(245, 248, 252, 0.56) 100%);
}

.legal-footer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.legal-footer-links a {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 8px 14px rgba(27, 35, 51, 0.028);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legal-footer-links a[href*="terms-of-service"]::before {
    content: "📜";
}

.legal-footer-links a[href*="privacy-policy"]::before {
    content: "🔒";
}

.legal-footer-links a[href*="/about/"]::before {
    content: "✨";
}

.legal-footer-links a[href="mailto:support@wheelpage.com"]::before {
    content: "✉️";
}

.legal-footer-links a[href="/"]::before,
.legal-footer-links a[href="/zh/"]::before,
.legal-footer-links a[href="/es/"]::before,
.legal-footer-links a[href="/ru/"]::before {
    content: "🎡";
}

.legal-footer small {
    display: block;
    margin-top: 16px;
    color: #64748b;
    line-height: 1.7;
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.legal-anchor {
    scroll-margin-top: 34px;
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(12px, -8px, 0) scale(1.02);
    }
}

@media (max-width: 959.98px) {
    .legal-shell {
        width: min(100% - 24px, 1160px);
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .legal-grid {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: static;
    }

    .legal-footer-top,
    .legal-topbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 767.98px) {
    .legal-topbar,
    .legal-hero,
    .legal-content,
    .legal-footer,
    .legal-section,
    .legal-sidebar,
    .legal-note {
        border-radius: 26px;
    }

    .legal-hero {
        padding: 34px 22px 28px;
    }

    .legal-content {
        padding: 18px 14px 14px;
    }

    .legal-section {
        padding: 20px 18px;
    }

    .legal-topbar {
        padding: 16px;
        gap: 14px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(247, 252, 251, 0.6) 100%);
    }

    .legal-topbar::after {
        width: 84px;
        height: 84px;
        right: 10px;
        top: 8px;
        opacity: 0.56;
    }

    .legal-brand {
        width: 100%;
        justify-content: center;
        align-items: center;
        padding: 4px 0 14px;
        text-align: center;
    }

    .legal-brand::after {
        content: "";
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, rgba(159, 95, 26, 0) 0%, rgba(159, 95, 26, 0.16) 22%, rgba(125, 150, 184, 0.16) 78%, rgba(125, 150, 184, 0) 100%);
    }

    .legal-brand-text {
        display: grid;
        gap: 2px;
        justify-items: center;
    }

    .legal-topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
        padding: 8px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.44);
    }

    .legal-topbar-actions .legal-chip:first-child {
        grid-column: 1 / -1;
        min-height: 44px;
        border-radius: 18px;
    }

    .legal-topbar-actions .legal-chip {
        justify-content: center;
        text-align: center;
        min-height: 42px;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 16px;
    }

    .legal-meta {
        gap: 10px;
    }

    .legal-meta-item {
        width: 100%;
        justify-content: flex-start;
    }

    .legal-footer-links {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .legal-footer-links a {
        width: 100%;
        justify-content: flex-start;
    }

    .legal-brand {
        align-items: center;
    }

    .legal-brand-text span {
        max-width: 320px;
        margin: 0 auto;
    }

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

    .legal-hero h1 {
        max-width: none;
        font-size: clamp(34px, 10vw, 48px);
    }

    .legal-nav a::after {
        font-size: 13px;
    }
}

@media (max-width: 479.98px) {
    .legal-topbar {
        padding: 14px;
        gap: 12px;
    }

    .legal-brand {
        gap: 10px;
        padding-bottom: 12px;
    }

    .legal-brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    .legal-brand-text strong {
        font-size: 15px;
    }

    .legal-brand-text span {
        font-size: 12px;
        line-height: 1.45;
        max-width: 280px;
    }

    .legal-topbar-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .legal-topbar-actions .legal-chip:first-child {
        grid-column: 1 / -1;
    }

    .legal-topbar-actions .legal-chip {
        min-height: 40px;
        font-size: 13px;
        gap: 6px;
    }

    .legal-topbar-actions .legal-chip::before {
        font-size: 14px;
    }

    .legal-shell {
        width: min(100% - 20px, 1040px);
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .legal-hero {
        padding: 38px 20px 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .page-atmosphere::before,
    .page-atmosphere::after,
    .legal-chip,
    .legal-footer-links a {
        animation: none !important;
        transition: none !important;
    }
}
