.legal-main {
    width: min(calc(100% - 110px), 1180px);
    min-height: calc(100vh - 164px);
    margin: 0 auto;
}

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

.legal-hero h1 {
    margin: 0;
    font-size: clamp(48px, 5vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.052em;
    font-weight: 760;
}

.legal-hero .legal-lede {
    max-width: 780px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.72;
}

.legal-meta {
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 760px);
    justify-content: space-between;
    gap: 88px;
    padding: 0 0 96px;
    border-top: 1px solid var(--line);
}

.legal-sidebar {
    align-self: start;
    position: sticky;
    top: 24px;
    padding-top: 38px;
}

.legal-sidebar h2 {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legal-sidebar h2:not(:first-child) { margin-top: 34px; }
.legal-sidebar nav { display: grid; gap: 4px; }
.legal-sidebar a {
    position: relative;
    padding: 8px 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
    transition: color 160ms ease, transform 160ms ease;
}
.legal-sidebar a:hover { color: var(--text); transform: translateX(2px); }
.legal-sidebar a[aria-current="page"] { color: var(--text); font-weight: 650; }
.legal-sidebar a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 14px;
    left: -16px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--violet));
}

.legal-document { min-width: 0; }
.legal-document > section {
    padding: 42px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 28px;
}
.legal-document > section:last-child { border-bottom: 0; }
.legal-document h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.35;
    letter-spacing: -0.035em;
    font-weight: 680;
}
.legal-document h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -0.02em;
    font-weight: 650;
}
.legal-document p {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
}
.legal-document a { color: var(--violet); text-decoration: underline; text-decoration-color: rgba(117, 72, 244, 0.28); text-underline-offset: 4px; }
.legal-document a:hover { text-decoration-color: currentColor; }

.legal-summary {
    position: relative;
    padding-left: 28px !important;
}
.legal-summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 42px;
    bottom: 42px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--pink), var(--violet));
}
.legal-summary p:first-of-type { color: var(--text); font-size: 18px; }

.legal-subsections {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 34px;
}
.legal-subsections > div {
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.legal-subsections p { margin-top: 9px; font-size: 14px; line-height: 1.75; }

.support-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
.support-email { min-width: 0; }
.support-email a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 20px;
    font-weight: 650;
}
.support-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.support-action {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text) !important;
    background: var(--surface);
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 650;
    cursor: pointer;
}
.support-action:hover { border-color: rgba(117, 72, 244, 0.45); }
.support-copy-action {
    font: inherit;
}
.support-feedback {
    margin-top: 10px !important;
    color: var(--text) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.legal-footer {
    min-height: 104px;
    padding: 24px max(55px, calc((100% - 1180px) / 2));
    justify-content: space-between;
    gap: 24px;
}
.legal-footer p { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 920px) {
    .legal-main { width: min(calc(100% - 48px), 760px); }
    .legal-layout { grid-template-columns: 1fr; gap: 0; }
    .legal-sidebar {
        position: static;
        padding: 24px 0;
        border-bottom: 1px solid var(--line);
    }
    .legal-sidebar h2:not(:first-child), .legal-sidebar .page-contents { display: none; }
    .legal-sidebar nav:first-of-type { display: flex; gap: 22px; overflow-x: auto; }
    .legal-sidebar a { white-space: nowrap; }
    .legal-sidebar a[aria-current="page"]::before { left: 0; right: 0; top: auto; bottom: 1px; width: auto; height: 2px; border-radius: 2px; }
}

@media (max-width: 760px) {
    .legal-main { width: calc(100% - 36px); min-height: calc(100vh - 150px); }
    .legal-hero { padding: 38px 0 36px; }
    .legal-hero h1 { font-size: clamp(39px, 12vw, 52px); }
    .legal-hero .legal-lede { margin-top: 18px; font-size: 17px; line-height: 1.7; }
    .legal-meta { margin-top: 20px; }
    .legal-layout { padding-bottom: 56px; }
    .legal-document > section { padding: 34px 0; scroll-margin-top: 16px; }
    .legal-document h2 { font-size: 22px; }
    .legal-document p { font-size: 15px; line-height: 1.8; }
    .legal-summary { padding-left: 20px !important; }
    .legal-summary::before { top: 34px; bottom: 34px; }
    .legal-summary p:first-of-type { font-size: 16px; }
    .legal-subsections { grid-template-columns: 1fr; gap: 20px; }
    .support-contact { align-items: flex-start; flex-direction: column; gap: 20px; }
    .support-actions { width: 100%; }
    .support-email a { font-size: 17px; }
    .support-action { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
    .legal-footer { min-height: 138px; padding: 26px 18px; flex-direction: column; justify-content: center; }
    .legal-footer nav a { min-width: 94px; }
}
