.external-legal-page {
    --eld-bg: #12171c;
    --eld-surface: #1c2227;
    --eld-paper: #eee8df;
    --eld-muted: #d2ccc2;
    --eld-gold: #c9ad86;
    --eld-rule: #454b4c;
    --eld-accent-rule: #79684f;
    background: var(--eld-bg);
}

.external-legal-page main { padding-top: 0; }

.eld-wrap {
    width: min(1320px, calc(100% - 96px));
    margin-inline: auto;
}

.eld-hero {
    padding-block: clamp(132px, 11vw, 168px) clamp(44px, 5vw, 72px);
    background: #151a1d;
}

.eld-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    align-items: center;
    gap: clamp(29px, 4.4vw, 70px) clamp(26px, 3.5vw, 52px);
}

.detail-page .eld-hero-title {
    max-width: 100%;
    margin: 0;
    color: var(--eld-paper);
    font-size: clamp(2.8rem, 5vw, 5.1rem);
    line-height: .99;
    text-wrap: balance;
}

.eld-hero-title em,
.eld-pilot h2 em {
    color: var(--eld-gold);
    font-style: normal;
}

.detail-page .eld-hero .eld-hero-lead {
    max-width: 45ch;
    margin: clamp(20px, 2.7vw, 36px) 0 24px;
    color: var(--eld-muted);
    font-size: clamp(1rem, 1.35vw, 1.1875rem);
    line-height: 1.67;
}

.eld-action,
.eld-text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: #e3c69e;
    font: 600 .875rem/1.45 var(--font-body, sans-serif);
}

.eld-action {
    padding: 13px clamp(16px, 2vw, 26px);
    border: 1px solid #9b805c;
    text-decoration: none;
}

.eld-action:hover {
    border-color: var(--eld-gold);
    background: #22282d;
    color: #f4dec0;
}

.eld-action span,
.eld-text-link span { flex: none; }

.eld-text-link { text-underline-offset: 4px; }
.eld-text-link:hover { color: #f4dec0; }

.eld-hero-visual {
    aspect-ratio: 1.45;
    margin: 0;
    background: #212526;
}

.eld-hero-visual img,
.eld-pilot-review img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eld-hero-visual img { object-position: 50% 55%; }

.eld-hero-pilot {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: clamp(16px, 2.8vw, 42px);
    padding-top: clamp(12px, 2vw, 26px);
    border-top: 1px solid var(--eld-accent-rule);
}

.detail-page .eld-hero .eld-hero-offer {
    margin: 0;
    color: var(--eld-paper);
    font: 500 clamp(1.6rem, 2.4vw, 2.3rem)/1.12 var(--font-heading, Georgia, serif);
}

.detail-page .eld-hero .eld-hero-offer-note {
    margin: 0;
    padding-inline: clamp(16px, 2.8vw, 42px);
    border-inline: 1px solid var(--eld-accent-rule);
    color: var(--eld-muted);
    line-height: 1.55;
}

.eld-section { padding-block: clamp(56px, 6.5vw, 94px); }

.eld-editorial-grid,
.eld-pilot-layout,
.eld-terms-panel {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    align-items: start;
    gap: clamp(24px, 5vw, 78px);
}

.detail-page .eld-section h2 {
    margin: 0;
    color: var(--eld-paper);
    font-size: clamp(2.45rem, 4.05vw, 3.9rem);
    line-height: 1.09;
    text-wrap: pretty;
}

.detail-page .eld-section h3 {
    margin: 0;
    color: var(--eld-paper);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.16;
    text-wrap: pretty;
}

.detail-page .eld-section p {
    margin: 0;
    color: var(--eld-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.detail-page .eld-section-intro > p {
    max-width: 52ch;
    margin-top: 16px;
}

.eld-tasks { background: var(--eld-surface); }

.eld-disclosures { border-top: 1px solid var(--eld-accent-rule); }
.eld-disclosure { border-bottom: 1px solid var(--eld-rule); }

.eld-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 56px;
    padding-block: 15px;
    color: var(--eld-paper);
    list-style: none;
    cursor: pointer;
}

.eld-disclosure summary::-webkit-details-marker { display: none; }

.eld-disclosure summary::after {
    content: "+";
    flex: 0 0 1.1em;
    color: var(--eld-gold);
    font-size: 1.3rem;
    font-weight: 400;
    text-align: center;
}

.eld-disclosure[open] summary::after { content: "−"; }
.eld-disclosure summary:hover { color: #e3c69e; }

.eld-disclosure-label { display: grid; gap: 4px; }

.eld-disclosure-title {
    font: 500 clamp(1.48rem, 2.25vw, 2rem)/1.13 var(--font-heading, Georgia, serif);
}

.eld-task-example {
    max-width: 66ch;
    color: var(--eld-muted);
    font: 400 .9375rem/1.55 var(--font-body, sans-serif);
}

.eld-disclosure ul {
    max-width: 68ch;
    margin: 0 24px 18px 0;
    padding-inline-start: 1.35rem;
    color: var(--eld-muted);
    font-size: .9375rem;
    line-height: 1.6;
    list-style: disc;
}

.eld-disclosure li + li { margin-top: 6px; }
.eld-disclosure li::marker { color: var(--eld-gold); }

.detail-page .eld-section .eld-faq > p {
    max-width: 66ch;
    margin: 0 24px 18px 0;
}

.eld-pilot-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(20px, 4vw, 60px);
    margin-top: clamp(25px, 3.5vw, 44px);
}

.eld-pilot-steps {
    display: flex;
    flex-direction: column;
    counter-reset: eld-step;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--eld-accent-rule);
    list-style: none;
}

.eld-pilot-steps li {
    flex: 1;
    position: relative;
    counter-increment: eld-step;
    padding: 19px 0 19px 44px;
    border-bottom: 1px solid var(--eld-rule);
}

.eld-pilot-steps li::before {
    content: counter(eld-step, decimal-leading-zero);
    position: absolute;
    top: 22px;
    inset-inline-start: 0;
    color: var(--eld-gold);
    font: 600 .8rem/1.45 var(--font-body, sans-serif);
}

.detail-page .eld-pilot-steps p { margin-top: 6px; }

.eld-pilot-review {
    background: var(--eld-surface);
    border-bottom: 1px solid var(--eld-accent-rule);
}

.eld-pilot-review img {
    height: clamp(126px, 14vw, 195px);
    object-position: 55% 50%;
}

.eld-pilot-review-copy { padding: clamp(18px, 2.6vw, 30px); }

.eld-pilot-review dl {
    margin: 15px 0 0;
    font-size: .9375rem;
    line-height: 1.6;
}

.eld-pilot-review dt {
    color: #e3c69e;
    font-weight: 600;
}

.eld-pilot-review dd {
    margin: 4px 0 0;
    color: var(--eld-muted);
}

.eld-pilot-review dd + dt {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--eld-rule);
}

.eld-terms {
    padding-block: 0 clamp(28px, 4vw, 58px);
}

.eld-terms-panel {
    align-items: center;
    padding: clamp(24px, 4vw, 56px);
    border: 1px solid var(--eld-accent-rule);
    background: var(--eld-surface);
}

.detail-page .eld-terms .eld-rate {
    display: grid;
    gap: 5px;
    margin-top: 16px;
    font-size: .875rem;
}

.eld-rate strong {
    color: #ecd0a3;
    font: 500 clamp(2.2rem, 3.5vw, 3.2rem)/1.04 var(--font-heading, Georgia, serif);
    white-space: nowrap;
}

.detail-page .eld-section :is(.eld-terms-copy, .eld-privacy-copy) p + p { margin-top: 13px; }
.detail-page .eld-section :is(.eld-terms-copy, .eld-privacy-copy) p { max-width: 65ch; }

.eld-privacy {
    padding-block: clamp(40px, 5.3vw, 76px);
    background: var(--eld-surface);
}

.eld-faq-section { padding-bottom: clamp(44px, 5.5vw, 80px); }

.external-legal-page #contact.site-contact { background: var(--eld-bg); }
.external-legal-page #contact .site-contact-form-shell { background: var(--eld-surface); }
.external-legal-page #contact .form-input { background: #121a1f; }

.external-legal-page #contact .eld-office {
    display: grid;
    gap: 4px;
    margin: 16px 0 0;
    padding-inline-start: 12px;
    border-inline-start: 1px solid var(--eld-accent-rule);
    color: var(--eld-muted);
    font-size: .875rem;
    line-height: 1.55;
}

.eld-office strong { color: #e3c69e; }

.external-legal-page :is(a, summary, button, input, textarea):focus-visible {
    outline: 3px solid #e3c699;
    outline-offset: 4px;
}

@media screen and (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .eld-hero {
        display: grid;
        min-height: 100vh;
        min-height: 100svh;
    }

    .eld-hero-layout { grid-template-rows: 1fr auto; }

    .eld-hero-visual {
        width: 100%;
        max-height: 55vh;
        max-height: 55svh;
    }
}

@media (max-width: 1024px) {
    .eld-wrap { width: calc(100% - 64px); }
    .eld-hero { padding-top: 120px; }
    .eld-hero-pilot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) max-content; }
}

@media screen and (min-width: 901px) and (max-height: 820px) {
    .eld-hero { padding-block: clamp(110px, 14vh, 120px) 28px; }
    .eld-hero-layout { row-gap: 24px; }

    .detail-page .eld-hero-title {
        font-size: clamp(2.65rem, min(4.4vw, 8.4vh), 4.1rem);
    }

    .detail-page .eld-hero .eld-hero-lead {
        margin-block: 17px 20px;
        font-size: 1rem;
    }

    .eld-hero-visual { width: 100%; max-height: 48vh; max-height: 48svh; }
    .eld-hero-pilot { padding-top: 14px; }
}

/* Keep the pilot link above the fixed contact button on desktop. */
@media screen and (min-width: 1024px) and (max-width: 1700px) and (hover: hover) and (pointer: fine) {
    .eld-hero { padding-bottom: 84px; }
}

@media (max-width: 900px) {
    .eld-hero-layout { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }

    .detail-page .eld-hero-title {
        max-width: 19ch;
        font-size: clamp(2.65rem, 7vw, 4.3rem);
        line-height: 1.03;
    }

    .detail-page .eld-hero .eld-hero-lead { margin-block: 16px 21px; }
    .eld-hero-visual { width: 100%; aspect-ratio: 2 / 1; max-height: 350px; }

    .eld-hero-pilot {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 8px 24px;
        padding-top: 17px;
    }

    .detail-page .eld-hero .eld-hero-offer-note { padding: 0; border: 0; }
    .eld-hero-pilot .eld-text-link { grid-area: 1 / 2 / span 2; }
}

@media (max-width: 760px) {
    .eld-wrap { width: calc(100% - 48px); }

    .eld-hero {
        padding-block: 104px 32px;
        padding-block-start: clamp(96px, 13svh, 108px);
    }

    .eld-hero-layout,
    .eld-editorial-grid,
    .eld-pilot-layout,
    .eld-terms-panel {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 24px;
    }

    .detail-page .eld-hero-title {
        font-size: clamp(2.45rem, 8.6vw, 4rem);
        line-height: 1.03;
        text-wrap: pretty;
    }

    .detail-page .eld-hero .eld-hero-lead { margin: 15px 0 20px; }
    .eld-hero-visual { aspect-ratio: 1.72; max-height: 256px; }

    .eld-hero-pilot {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        gap: 7px;
    }

    .eld-hero-pilot .eld-text-link { grid-area: auto; }
    .eld-section { padding-block: 46px; }
    .eld-terms { padding-block: 0 35px; }

    .detail-page .eld-section h2 { font-size: clamp(2.1rem, 7.3vw, 3.3rem); }
    .detail-page .eld-section-intro > p { margin-top: 10px; }
    .eld-pilot-steps li { padding: 15px 0 15px 32px; }
    .eld-pilot-steps li::before { top: 18px; }
    .eld-pilot-review img { height: clamp(104px, 27vw, 176px); }

    .external-legal-page main :is(section[id], nav[id]) { scroll-margin-top: 88px; }
}

@media screen and (min-width: 640px) and (max-width: 900px) and (max-height: 560px) {
    .eld-hero { padding-block: 108px 30px; }
    .eld-hero-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 24px; }
    .detail-page .eld-hero-title { font-size: clamp(2rem, 5vw, 2.65rem); }

    .detail-page .eld-hero .eld-hero-lead {
        margin-block: 13px 16px;
        font-size: .9375rem;
    }

    .eld-hero-visual { aspect-ratio: 1.45; max-height: 232px; }

    .eld-hero-pilot {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 6px 18px;
    }

    .eld-hero-pilot .eld-text-link { grid-area: 1 / 2 / span 2; }
}
