/*
 * Editorial + legal pages.
 * Common sober layout, scoped away from header/footer.
 */

body.hdn-editorial-page :where(.content-container.site-container, .content-area, .entry-content-wrap),
body.hdn-legal-page :where(.content-container.site-container, .content-area, .entry-content-wrap),
body.hdn-editorial-page :where(#primary, .site-main),
body.hdn-legal-page :where(#primary, .site-main) {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hdn-editorial-shell,
.hdn-legal-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 clamp(4rem, 7vw, 7rem);
    color: var(--hdn-story-indigo, #0f172a);
}

.hdn-editorial-hero,
.hdn-legal-hero {
    width: var(--hdn-story-canvas);
    margin-inline: auto;
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
    padding: clamp(2.2rem, 5vw, 4.8rem);
    border: 1px solid rgba(176, 141, 87, 0.34);
    background:
        linear-gradient(135deg, rgba(176, 141, 87, 0.18), rgba(176, 141, 87, 0) 34%),
        linear-gradient(115deg, #0f172a 0%, #172236 100%);
    color: var(--hdn-story-ivory, #f6f2ea);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.hdn-editorial-hero.hdn-cine-hero,
.hdn-legal-hero.hdn-cine-hero {
    min-height: 0;
    background: transparent;
}

.hdn-editorial-hero .hdn-cine-hero-stage,
.hdn-editorial-hero .hdn-cine-hero-overlay,
.hdn-legal-hero .hdn-cine-hero-stage,
.hdn-legal-hero .hdn-cine-hero-overlay {
    display: none;
}

.hdn-editorial-kicker,
.hdn-legal-kicker {
    margin: 0 0 0.9rem;
    color: var(--hdn-story-gold, #b08d57);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hdn-editorial-hero h1,
.hdn-legal-hero h1 {
    max-width: 12ch;
    margin: 0;
    color: var(--hdn-story-ivory, #f6f2ea);
    font-size: clamp(2.5rem, 6vw, 5.7rem);
    line-height: 0.96;
}

.hdn-editorial-intro,
.hdn-legal-hero p {
    max-width: 64ch;
    margin: 1.1rem 0 0;
    color: rgba(246, 242, 234, 0.82);
    font-size: clamp(1rem, 1.08vw, 1.14rem);
    line-height: 1.78;
}

.hdn-legal-updated {
    color: rgba(246, 242, 234, 0.66) !important;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hdn-editorial-body,
.hdn-legal-content-wrap,
.hdn-legal-nav,
.hdn-editorial-cta {
    width: var(--hdn-story-canvas);
    margin-inline: auto;
}

.hdn-editorial-body,
.hdn-legal-content-wrap {
    margin-top: 0;
}

.hdn-legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: clamp(1.2rem, 2vw, 1.8rem);
}

.hdn-legal-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--hdn-story-line, rgba(15, 23, 42, 0.14));
    color: var(--hdn-story-indigo, #0f172a);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.hdn-legal-link.is-active,
.hdn-legal-link:hover,
.hdn-legal-link:focus-visible {
    border-color: var(--hdn-story-indigo, #0f172a);
    background: var(--hdn-story-indigo, #0f172a);
    color: var(--hdn-story-ivory, #f6f2ea);
}

.hdn-legal-content-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(280px, 0.62fr);
    gap: clamp(1rem, 3vw, 2.4rem);
    margin-bottom: clamp(3.5rem, 6vw, 6rem);
}

.hdn-editorial-main,
.hdn-legal-content,
.hdn-legal-help-card,
.hdn-editorial-cta-inner {
    border: 1px solid var(--hdn-story-line, rgba(15, 23, 42, 0.14));
    border-radius: 0 !important;
    background: var(--hdn-story-surface, #fffaf1);
    padding: clamp(1rem, 2.6vw, 2.2rem);
}

.hdn-legal-content,
.hdn-legal-help-card {
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.hdn-editorial-prose,
.hdn-legal-content {
    color: rgba(15, 23, 42, 0.78);
    line-height: 1.78;
}

.hdn-legal-content :where(.wp-block-group, .wp-block-cover, .wp-block-columns) {
    width: 100% !important;
    max-width: var(--hdn-story-readable, 74ch) !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

.hdn-legal-content :where([class*="align"], [class*="has-"][class*="-background-color"], [class*="has-"][class*="-color"]) {
    background: transparent !important;
    color: inherit !important;
}

.hdn-legal-content :where(h1) {
    display: none !important;
}

.hdn-editorial-prose > *:first-child,
.hdn-legal-content > *:first-child {
    margin-top: 0 !important;
}

.hdn-editorial-prose h1,
.hdn-editorial-prose h2,
.hdn-editorial-prose h3,
.hdn-legal-content h1,
.hdn-legal-content h2,
.hdn-legal-content h3,
.hdn-legal-help-card h2,
.hdn-legal-help-card h3,
.hdn-editorial-cta h2 {
    color: var(--hdn-story-indigo, #0f172a);
    line-height: 1.15;
}

.hdn-editorial-prose h2,
.hdn-legal-content h2 {
    margin: 1.5rem 0 0.65rem;
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);
}

.hdn-editorial-prose p,
.hdn-editorial-prose li,
.hdn-legal-content p,
.hdn-legal-content li,
.hdn-legal-help-card p,
.hdn-editorial-cta p {
    color: rgba(15, 23, 42, 0.76);
    line-height: 1.78;
}

.hdn-editorial-prose p + p,
.hdn-legal-content p + p,
.hdn-editorial-prose ul,
.hdn-legal-content ul {
    margin-top: 0.9rem;
}

.hdn-legal-side {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.hdn-legal-help-card {
    display: grid;
    gap: 0.75rem;
}

.hdn-legal-help-card:first-child {
    border-color: rgba(176, 141, 87, 0.42);
    background:
        linear-gradient(135deg, rgba(176, 141, 87, 0.12), rgba(176, 141, 87, 0) 42%),
        #fffaf1;
}

.hdn-legal-help-card :where(h2, h3, p, ul) {
    margin: 0;
}

.hdn-editorial-cta {
    margin-top: var(--hdn-story-gap, 4rem);
    margin-bottom: var(--hdn-story-footer-air, 5rem);
}

.hdn-accessories-page .hdn-personalisation-widget--accessories-flow {
    margin-bottom: var(--hdn-story-footer-air, 5rem) !important;
}

.hdn-editorial-cta-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.hdn-editorial-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 980px) {
    .hdn-legal-content-wrap,
    .hdn-editorial-cta-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .hdn-legal-shell {
        padding-bottom: clamp(3rem, 12vw, 4rem);
    }

    .hdn-editorial-hero,
    .hdn-legal-hero {
        width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        box-sizing: border-box;
        margin-top: clamp(1.5rem, 8vw, 3rem);
        padding: clamp(1.45rem, 8vw, 2.4rem);
    }

    .hdn-editorial-hero h1 {
        font-size: clamp(2.25rem, 13vw, 4rem);
    }

    .hdn-legal-hero h1 {
        max-width: 100%;
        font-size: clamp(1.9rem, 10vw, 2.8rem);
        line-height: 1.06;
        letter-spacing: -0.045em;
    }

    .hdn-legal-nav,
    .hdn-legal-content-wrap {
        width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        min-width: 0;
        box-sizing: border-box;
    }

    .hdn-legal-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
    }

    .hdn-legal-link {
        min-height: 44px;
        flex: 0 0 auto;
    }

    .hdn-legal-content,
    .hdn-legal-help-card {
        min-width: 0;
        padding: 1rem;
    }

    .hdn-legal-side {
        margin-top: 1rem;
    }
}
