/* Content sets the hero height; artwork follows the measured section bounds. */
:root body.public-branding {
    --hero-copy-width: 66%;
    --hero-padding: clamp(48px, 4vw, 72px);
}

/* Full-width artwork heroes: use the centre instead of a narrow text column. */
:root body.public-branding :is(.m-hero, .sw-hero, .sf-hero, .sd-hero) {
    min-height: 0;
}
:root body.public-branding :is(.ledger-intro, .m-hero-content, .sw-hero-content, .sf-hero-content) {
    min-height: 0;
    padding-block: var(--hero-padding);
}
:root body.public-branding :is([data-ledger-hero] .ledger-title, .m-hero-content h1, .sw-hero h1, .sf-hero h1) {
    width: min(var(--hero-copy-width), 24ch);
    max-width: none;
}
:root body.public-branding :is([data-ledger-hero] .ledger-intro-copy, .m-hero-content > p, .sw-hero-lead, .sf-hero .sf-lead) {
    max-width: min(var(--hero-copy-width), 64ch);
    margin-top: 20px;
}
:root body.public-branding :is([data-ledger-hero] .ledger-actions, .m-hero-content .m-actions, .sw-hero .sw-actions, .sf-hero .sf-actions) {
    margin-top: 24px;
}
:root body.public-branding .sw-hero-intro { margin-bottom: 18px; }
:root body.public-branding .sw-hero-bottom { margin-top: 0; }

/* SDOCS has one text block over a full-size background, not two grid items. */
:root body.public-branding .document-hero .hero-grid {
    display: block;
    min-height: 0;
    padding-block: var(--hero-padding);
}
:root body.public-branding .document-hero .hero-copy { width: var(--hero-copy-width); }
:root body.public-branding .document-hero h1 { max-width: 24ch; }
:root body.public-branding .document-hero .hero-copy > p { max-width: 64ch; margin-top: 20px; }
:root body.public-branding .document-hero .hero-actions { margin-top: 24px; }

:root body.public-branding .sd-hero { padding-block: var(--hero-padding); }
:root body.public-branding .sd-hero-copy { width: var(--hero-copy-width); }
:root body.public-branding .sd-hero h1 { max-width: 24ch; }
:root body.public-branding .sd-hero .sd-actions { margin-top: 24px; }

/* Keep the directory search centred, with full page width around readable fields. */
:root body.public-branding .public-directory-hero-content {
    width: 100%;
    max-width: none;
    padding-inline: clamp(20px, 4vw, 72px);
    padding-block: clamp(32px, 3vw, 56px) 28px;
}
:root body.public-branding .public-directory-hero h1 { max-width: 26ch; margin-inline: auto; }
:root body.public-branding .public-directory-hero-content > p:not(:first-child) { max-width: 64ch; margin-top: 16px; }
:root body.public-branding .public-directory-hero-content > form { margin-top: 24px; }
:root body.public-branding .public-directory-hero-content > ul { margin-top: 16px; }
:root body.public-branding .public-directory-hero-content > div { margin-top: 20px; }
:root body.public-branding .public-directory-hero > nav > div {
    width: 100%; max-width: none; padding-inline: clamp(20px, 4vw, 72px);
}

/* Template and foundation apps retain their real preview beside the introduction. */
:root body.public-branding .ss-hero {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(28px, 4vw, 64px);
    padding-inline: clamp(20px, 4vw, 72px);
    padding-block: clamp(40px, 3.5vw, 64px);
}
:root body.public-branding .ss-hero h1 { max-width: 24ch; }
:root body.public-branding .ss-hero .ss-category { margin-bottom: 16px; }
:root body.public-branding .ss-hero .ss-lead { max-width: 60ch; margin-top: 20px; }
:root body.public-branding .ss-hero .ss-actions { margin-top: 24px; }
:root body.public-branding .ss-hero .ss-preview-top { padding: 16px 20px; }
:root body.public-branding .ss-hero .ss-preview-content { padding: 20px; }
:root body.public-branding .ss-hero .ss-preview h2 { margin-bottom: 14px; }
:root body.public-branding .ss-hero .ss-flow { gap: 8px; }
:root body.public-branding .ss-hero .ss-flow-step { padding-block: 10px; }
:root body.public-branding .ss-hero .ss-preview-caption { padding: 12px 20px; }
:root body.public-branding .ss-hero .ss-preview { min-width: 0; }
:root body.public-branding .ss-hero .ss-preview > summary { display: none; }

@media (max-width: 1100px) {
    :root body.public-branding { --hero-copy-width: 76%; --hero-padding: 48px; }
}
@media (max-width: 767px) {
    :root body.public-branding { --hero-copy-width: 100%; --hero-padding: 40px; }
    :root body.public-branding :is([data-ledger-hero] .ledger-title, .m-hero-content h1, .sw-hero h1, .sf-hero h1) { width: 100%; }
    :root body.public-branding :is(.document-hero h1, .sd-hero h1) { max-width: none; }
    :root body.public-branding .ss-hero { grid-template-columns: 1fr; gap: 28px; }
    :root body.public-branding .ss-hero .ss-preview-content { padding: 20px; }
    :root body.public-branding .public-directory-hero h1 { max-width: 22ch; }
    :root body.public-branding .document-hero .document-motion { opacity: .28; }
    :root body.public-branding .m-hero .m-hero-art { opacity: .25; }
    :root body.public-branding .ss-hero .ss-preview > summary {
        display: flex; align-items: center; justify-content: space-between; gap: 16px;
        min-height: 52px; padding: 14px 20px; list-style: none; cursor: pointer;
        font-size: 14px; font-weight: 600;
    }
    :root body.public-branding .ss-hero .ss-preview > summary::-webkit-details-marker { display: none; }
    :root body.public-branding .ss-hero .ss-preview > summary svg { width: 16px; height: 16px; }
    :root body.public-branding .ss-hero .ss-preview[open] > summary { border-bottom: 1px solid var(--ss-line); }
    :root body.public-branding .ss-hero .ss-preview[open] > summary svg { transform: rotate(180deg); }
    :root body.public-branding .ss-hero .ss-topic-controls { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 16px; }
    :root body.public-branding .ss-hero .ss-topic-controls button { flex-shrink: 0; white-space: nowrap; }
}
