.legal-page {
    min-width: 320px;
    background: var(--paper);
}

.legal-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 88px;
    padding: 10px clamp(18px, 4vw, 64px);
    color: var(--white);
    border-bottom: 1px solid var(--line-light);
    background: var(--ink);
}

.legal-header > p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.legal-back {
    justify-self: end;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
}

.legal-back:hover,
.legal-back:focus-visible {
    color: var(--blue-bright);
}

.legal-nav {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 3vw, 42px);
    padding: 15px clamp(18px, 4vw, 64px);
    border-bottom: 1px solid var(--line-dark);
    background: var(--paper-deep);
    overflow-x: auto;
    scrollbar-width: thin;
}

.legal-nav a {
    flex: 0 0 auto;
    padding: 5px 0;
    color: rgba(11, 13, 15, 0.7);
    border-bottom: 2px solid transparent;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
}

.legal-nav a:hover,
.legal-nav a:focus-visible,
.legal-nav a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--blue);
}

.legal-draft-banner {
    padding: 16px clamp(20px, 5vw, 76px);
    color: #fff5dd;
    border-bottom: 1px solid #8a6117;
    background: #4b350d;
    font-size: 0.86rem;
    line-height: 1.55;
    text-align: center;
}

.legal-draft-banner strong {
    margin-right: 4px;
    color: var(--white);
}

.legal-hero {
    padding: clamp(58px, 8vw, 120px) max(clamp(24px, 8vw, 120px), calc((100vw - 1440px) / 2));
    color: var(--white);
    background:
        linear-gradient(105deg, rgba(0, 108, 168, 0.22), transparent 46%),
        var(--ink);
}

.legal-hero .eyebrow {
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.72);
}

.legal-hero .eyebrow span {
    width: 36px;
    height: 2px;
    background: var(--blue-bright);
}

.legal-hero h1 {
    max-width: 1050px;
    margin: 0;
    font-size: clamp(3.5rem, 8vw, 8.5rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.legal-hero > p:not(.eyebrow, .legal-version) {
    max-width: 760px;
    margin: 34px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(1rem, 1.45vw, 1.25rem);
    line-height: 1.65;
}

.legal-version {
    margin: 28px 0 0;
    color: var(--blue-bright);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legal-content {
    width: min(100% - 40px, 980px);
    margin: 0 auto;
    padding: clamp(50px, 7vw, 100px) 0 clamp(72px, 9vw, 130px);
}

.legal-section + .legal-section {
    margin-top: clamp(48px, 6vw, 82px);
    padding-top: clamp(42px, 5vw, 68px);
    border-top: 1px solid var(--line-dark);
}

.legal-section h2,
.legal-form-card h2 {
    max-width: 800px;
    margin: 0 0 28px;
    font-size: clamp(2.15rem, 5vw, 4.4rem);
    line-height: 0.95;
    overflow-wrap: anywhere;
}

.legal-section h3 {
    margin: 34px 0 12px;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.015em;
}

.legal-section p,
.legal-section li,
.legal-section address,
.legal-section dd,
.legal-form-card p,
.legal-form-card label {
    max-width: 780px;
    color: rgba(11, 13, 15, 0.8);
    line-height: 1.72;
}

.legal-section p,
.legal-section ul,
.legal-section ol,
.legal-section dl {
    margin-top: 0;
    margin-bottom: 20px;
}

.legal-section ul,
.legal-section ol {
    padding-left: 1.4rem;
}

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

.legal-section a,
.legal-form-card a,
.legal-footer a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.legal-email-image {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    pointer-events: none;
    user-select: none;
    vertical-align: -0.28em;
}

.legal-email-image img {
    width: auto;
    height: 1.18em;
}

.legal-section a:hover,
.legal-section a:focus-visible,
.legal-form-card a:hover,
.legal-form-card a:focus-visible,
.legal-footer a:hover,
.legal-footer a:focus-visible {
    color: var(--blue);
}

.legal-address {
    margin: 0;
    padding-left: 22px;
    border-left: 4px solid var(--blue);
    font-style: normal;
}

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

.legal-callout {
    margin: 30px 0;
    padding: 24px 26px;
    border: 1px solid rgba(0, 108, 168, 0.28);
    background: rgba(0, 108, 168, 0.07);
}

.legal-callout strong:first-child {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
}

.legal-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: var(--line-dark);
}

.legal-facts > div {
    padding: 22px;
    background: var(--paper);
}

.legal-facts dt {
    margin-bottom: 5px;
    color: rgba(11, 13, 15, 0.52);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.legal-facts dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.legal-table-wrap {
    margin: 28px 0;
    border: 1px solid var(--line-dark);
    overflow-x: auto;
}

.legal-table {
    width: 100%;
    min-width: 670px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.32);
}

.legal-table th,
.legal-table td {
    padding: 17px 18px;
    border-bottom: 1px solid var(--line-dark);
    text-align: left;
    vertical-align: top;
}

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

.legal-table th {
    color: var(--white);
    background: var(--ink-soft);
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

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

.legal-form-card {
    scroll-margin-top: 24px;
    margin-top: clamp(54px, 7vw, 90px);
    padding: clamp(28px, 5vw, 54px);
    color: var(--white);
    background: var(--ink);
}

.legal-form-card h2,
.legal-form-card p,
.legal-form-card label {
    color: inherit;
}

.legal-form-card > p {
    color: rgba(255, 255, 255, 0.7);
}

.legal-form-card .legal-form-kicker {
    margin: 0 0 14px;
    color: var(--blue-bright);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-form-notice {
    max-width: 780px;
    margin: 26px 0;
    padding: 18px 20px;
    color: #fff2d3;
    border: 1px solid rgba(255, 205, 99, 0.62);
    background: rgba(155, 92, 8, 0.2);
}

.legal-form-notice strong {
    display: block;
    margin-bottom: 6px;
    color: var(--white);
}

.legal-form-notice p {
    margin: 0;
    color: inherit;
}

.withdrawal-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.legal-field {
    display: grid;
    gap: 8px;
}

.legal-field-wide {
    grid-column: 1 / -1;
}

.legal-field label {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-field label span {
    color: rgba(255, 255, 255, 0.48);
    font-weight: 600;
    text-transform: none;
}

.legal-field input,
.legal-field textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0;
    outline: 0;
    background: rgba(255, 255, 255, 0.06);
}

.legal-field textarea {
    min-height: 125px;
    resize: vertical;
}

.legal-field input:focus,
.legal-field textarea:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 2px rgba(24, 160, 238, 0.25);
}

.legal-field input[aria-invalid="true"],
.legal-field textarea[aria-invalid="true"] {
    border-color: #ff7e73;
}

.legal-field-error {
    min-height: 1.25em;
    margin: 0;
    color: #ffaaa2 !important;
    font-size: 0.78rem;
}

.legal-field-hint {
    margin: 0;
    color: rgba(255, 255, 255, 0.62) !important;
    font-size: 0.76rem;
    line-height: 1.5 !important;
}

.withdrawal-turnstile,
.withdrawal-turnstile-unavailable {
    grid-column: 1 / -1;
}

.withdrawal-turnstile {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.withdrawal-turnstile .legal-field-hint,
.withdrawal-turnstile .legal-field-error {
    max-width: none;
}

.withdrawal-turnstile .legal-field-hint a {
    color: var(--blue-bright);
}

.withdrawal-turnstile [data-turnstile-widget] {
    width: 100%;
}

.withdrawal-turnstile-unavailable {
    margin: 0;
}

.withdrawal-submit {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 24px;
    color: var(--ink);
    border: 0;
    background: var(--blue-bright);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.withdrawal-submit:hover,
.withdrawal-submit:focus-visible {
    background: var(--white);
}

.withdrawal-submit:disabled {
    cursor: wait;
    opacity: 0.62;
}

.withdrawal-status {
    grid-column: 1 / -1;
    margin: 0;
    padding: 16px;
    color: var(--white) !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.withdrawal-status[data-state="success"] {
    border-color: #73c990;
    background: rgba(54, 146, 87, 0.2);
}

.withdrawal-status[data-state="error"] {
    border-color: #ff7e73;
    background: rgba(194, 65, 55, 0.2);
}

.legal-noscript {
    margin-top: 24px;
    padding: 15px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.legal-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 36px;
    align-items: start;
    padding: clamp(38px, 5vw, 70px) clamp(22px, 5vw, 76px);
    color: rgba(255, 255, 255, 0.7);
    background: var(--ink);
    font-size: 0.82rem;
}

.legal-footer > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

.legal-footer > div p,
.legal-footer > p {
    margin: 0;
}

.legal-footer strong {
    color: var(--white);
    letter-spacing: 0.08em;
}

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

.legal-footer > p {
    justify-self: end;
    text-align: right;
}

@media (max-width: 760px) {
    .legal-header {
        grid-template-columns: 1fr auto;
    }

    .legal-header > p {
        display: none;
    }

    .legal-nav {
        justify-content: flex-start;
    }

    .legal-hero {
        padding-right: 24px;
        padding-left: 24px;
    }

    .legal-facts,
    .withdrawal-form {
        grid-template-columns: 1fr;
    }

    .legal-field-wide,
    .withdrawal-turnstile,
    .withdrawal-turnstile-unavailable,
    .withdrawal-submit,
    .withdrawal-status {
        grid-column: 1;
    }

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

    .legal-footer > p {
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 430px) {
    .legal-header .brand span {
        display: none;
    }

    .legal-header .brand img {
        width: 50px;
        height: 50px;
    }

    .legal-back {
        font-size: 0.68rem;
    }

    .legal-content {
        width: min(100% - 30px, 980px);
    }
}

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