/* Terra | 2026-09-29 | Keep long legal destinations readable without horizontal text-zoom overflow. */
:root {
    --ink: #171423;
    --ink-soft: #5e586b;
    --paper: #fbfaff;
    --paper-deep: #f3f0fa;
    --violet: #6843c7;
    --violet-bright: #8b6ce5;
    --violet-wash: rgba(104, 67, 199, 0.09);
    --line: rgba(34, 25, 54, 0.13);
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(43, 26, 78, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--paper);
    color: var(--ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    background:
        radial-gradient(circle at 86% 5%, rgba(139, 108, 229, 0.13), transparent 27rem),
        linear-gradient(180deg, var(--paper) 0 28rem, #fff 28rem 100%);
    color: var(--ink);
    line-height: 1.72;
}

a {
    overflow-wrap: anywhere;
    color: var(--violet);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

a:hover {
    color: #4d2aa7;
}

a:focus-visible,
button:focus-visible {
    border-radius: 3px;
    outline: 3px solid rgba(104, 67, 199, 0.42);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 650;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    min-height: 78px;
    padding: 0.9rem clamp(1.1rem, 4vw, 4rem);
    border-bottom: 1px solid var(--line);
    background: rgba(251, 250, 255, 0.88);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.logo-sm {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.logo-sm img {
    display: block;
    width: auto;
    height: 33px;
    filter: drop-shadow(0 6px 12px rgba(104, 67, 199, 0.16));
}

.header-title {
    color: var(--ink-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.legal-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legal-nav a {
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
    background: var(--violet-wash);
    color: var(--violet);
}

.legal-nav .legal-home {
    margin-left: 0.35rem;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
}

.content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(3.7rem, 8vw, 7.5rem) 0 clamp(5rem, 9vw, 8rem);
}

.legal-hero {
    position: relative;
    max-width: 900px;
    margin-bottom: clamp(3rem, 7vw, 6rem);
    overflow: clip;
}

.legal-hero::after {
    position: absolute;
    top: -4rem;
    right: -18rem;
    width: 34rem;
    height: 34rem;
    border: 1px solid rgba(104, 67, 199, 0.11);
    border-radius: 50%;
    box-shadow:
        0 0 0 42px rgba(104, 67, 199, 0.026),
        0 0 0 86px rgba(104, 67, 199, 0.018);
    content: "";
    pointer-events: none;
}

.legal-kicker {
    margin: 0 0 1.1rem;
    color: var(--violet);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.73rem;
    font-weight: 650;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.page-title {
    max-width: 850px;
    margin: 0;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: clamp(3rem, 8vw, 6.7rem);
    font-weight: 500;
    letter-spacing: -0.065em;
    line-height: 0.95;
}

.effective-date {
    margin: 1.35rem 0 0;
    color: var(--ink-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.035em;
}

.intro {
    max-width: 790px;
    margin: 2.4rem 0 0;
    color: #3d3748;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    font-weight: 400;
    line-height: 1.5;
}

.legal-hero > .highlight {
    max-width: 790px;
    margin-top: 2rem;
}

.document-layout {
    display: grid;
    grid-template-columns: minmax(185px, 240px) minmax(0, 760px);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: start;
}

.document-index {
    position: sticky;
    top: 108px;
    display: grid;
    gap: 0.15rem;
    max-height: calc(100vh - 132px);
    padding: 0.5rem 0 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

.document-index strong {
    margin-bottom: 0.65rem;
    color: var(--ink-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.67rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.document-index a {
    padding: 0.45rem 0.6rem;
    border-left: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.74rem;
    line-height: 1.35;
    text-decoration: none;
}

.document-index a:hover,
.document-index a:focus-visible {
    border-left-color: var(--violet);
    color: var(--violet);
}

.legal-sections {
    min-width: 0;
}

.section {
    margin: 0;
    padding: 0 0 3.4rem;
    scroll-margin-top: 115px;
}

.section + .section {
    padding-top: 3.4rem;
    border-top: 1px solid var(--line);
}

.section h2 {
    margin: 0 0 1.35rem;
    color: var(--ink);
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.038em;
    line-height: 1.1;
}

.section h3 {
    margin: 2rem 0 0.65rem;
    color: var(--violet);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.012em;
}

.section p,
.section li,
.highlight p,
.data-table {
    color: #4d4659;
    font-size: 0.98rem;
}

.section p {
    margin: 0 0 1rem;
}

.section ul {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 1.35rem;
    padding: 0;
    list-style: none;
}

.section li {
    position: relative;
    padding-left: 1.3rem;
}

.section li::before {
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--violet-bright);
    content: "";
}

.highlight {
    margin: 1.5rem 0;
    padding: 1.2rem 1.35rem;
    border: 1px solid rgba(104, 67, 199, 0.16);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(104, 67, 199, 0.08), rgba(255, 255, 255, 0.88));
    box-shadow: 0 14px 38px rgba(43, 26, 78, 0.045);
}

.highlight p:last-child {
    margin-bottom: 0;
}

.data-table {
    width: 100%;
    margin: 1.3rem 0 1.8rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--ink);
    background: var(--paper-deep);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: end;
    padding: 2.4rem clamp(1.1rem, 4vw, 4rem);
    border-top: 1px solid var(--line);
    background: var(--ink);
    color: rgba(255, 255, 255, 0.66);
}

.legal-brand-lock {
    display: grid;
    gap: 0.1rem;
}

.legal-brand-lock strong {
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
}

.legal-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

@media (max-width: 820px) {
    .header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .header-title {
        display: none;
    }

    .document-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .document-index {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.76);
    }

    .document-index strong {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .header {
        min-height: 68px;
        padding: 0.75rem 1rem;
    }

    .logo-sm img {
        height: 29px;
    }

    .legal-nav {
        gap: 0;
    }

    .legal-nav a {
        padding: 0.48rem 0.5rem;
        font-size: 0.72rem;
    }

    .legal-nav .legal-home {
        display: none;
    }

    .content {
        width: min(100% - 1.5rem, 1180px);
        padding-top: 3.7rem;
    }

    .legal-hero::after {
        right: -29rem;
    }

    .document-index {
        grid-template-columns: 1fr;
    }

    .document-index strong {
        grid-column: auto;
    }

    .section + .section {
        padding-top: 2.5rem;
    }

    .section {
        padding-bottom: 2.5rem;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .footer {
        display: grid;
        align-items: start;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
