/* Shared public WordPress templates: pages, directory listings, help and articles.
   The existing true-black canvas, lime accents and light reading surfaces keep their own tokens.
   Change the neutral surface tokens only on website panels, outside the app demonstrations. */
body.mile27-approved :is(
    .benefit-bar, .audience, .pricing-section, .price-card, .resource-card, .view-stage,
    .data-table th, .availability-note, .directory-toolbar input, .field input,
    .field select, .field textarea, .tool-form, .download-card, .feature-card, .page-price-card,
    .support-search input, .help-sidebar, .subscription-option--yearly
) {
    --surface: #070909;
    --surface-raised: #101514;
}

/* When an app preview is nested in a website panel, preserve its device artwork. */
body.mile27-approved :is(.phone-device, .demo-shell, .island-preview, .workday-display, .dashboard-closeup, .lock-preview) {
    --surface: color-mix(in srgb, var(--gray) 10%, var(--black));
    --surface-raised: color-mix(in srgb, var(--gray) 16%, var(--black));
}

body.wp-child-theme-mile27-approved-child.mile27-approved .site-header {
    background-color: #020303;
}
body.wp-child-theme-mile27-approved-child.mile27-approved .site-footer {
    background-color: #010202;
}
body.mile27-approved .m27-mega {
    background-color: #050707;
}
body.mile27-approved .site-header .nav-toggle:is(:hover, :focus) {
    background-color: #101514 !important;
}

/* The contact template sets its editable input backgrounds as inline stylesheet !important rules. */
body.mile27-approved .m27-contact-form input:not([type=submit]):not([type=checkbox]),
body.mile27-approved .m27-contact-form textarea,
body.mile27-approved .m27-contact-form select {
    background-color: #080b0b !important;
}
body.mile27-approved .m27-contact-form .contact-form-submission {
    background-color: #090c0b;
}

/* The editorial resource center has its own light paper layout and dark calculator and hero. */
.mile27-release-resources .m27-res {
    --dark: #050707;
}
.mile27-release-resources .m27-res .m27-hero {
    background-image: radial-gradient(ellipse at 82% 15%, #384222 0%, #050707 51%);
}
.mile27-release-resources .m27-res .m27-fields input {
    background-color: #101514;
}
.mile27-release-resources .m27-res .m27-footer {
    background-color: #010202;
}

/* Shared consent panel. Keep the existing consent and preference button states distinct. */
body :is(#m27-consent) {
    background-color: #090c0b;
}
/* The standalone Spanish homepage has an unclassed body and an explicit es-US language. */
html[lang="es-US"] > body:not([class]) {
    background-color: #040606;
}
html[lang="es-US"] > body:not([class]) > header {
    background-color: #020303;
}
html[lang="es-US"] > body:not([class]) #principal .band {
    background-color: #090c0b;
}
html[lang="es-US"] > body:not([class]) .m27-lang {
    background-color: #050707;
}
html[lang="es-US"] > body:not([class]) #m27-consent {
    background-color: #0c0f0e;
}

/* Newsroom pages share this header/footer with their light-background articles. */
body.m27pr-page {
    background-color: #040606;
}
.m27pr-page .m27pr {
    --pr-ink: #040606;
    --pr-panel: #090c0b;
}
.m27pr-page .pr-shell-header {
    background-color: #020303;
}
.m27pr-page .pr-shell-footer {
    background-color: #010202;
}
.m27pr-page .m27pr .pr-hero {
    background-color: #050707;
}
.m27pr-page .m27pr .pr-contents,
.m27pr-page .m27pr .pr-gallery-section,
.m27pr-page .m27pr .pr-news {
    background-color: #090c0b;
}
.m27pr-page .m27pr .pr-video-frame,
.m27pr-page .m27pr video {
    background-color: #020303;
}
.m27pr-page .m27pr .pr-facts .pr-button:not(:hover) {
    background-color: #050707;
}

/* Partner program, preserving the lime annual commission card, calculator and form controls. */
body.m27p-page {
    background-color: #040606;
}
.m27p-page .m27p {
    --mp-night: #040606;
}
.m27p-page .m27p-top {
    background-color: #020303;
}
.m27p-page .m27p-bottom {
    background-color: #010202;
}
.m27p-page .m27p .mp-hero {
    background-color: #050707;
}
.m27p-page .m27p .mp-rewards,
.m27p-page .m27p .mp-apply,
.m27p-page .m27p .mp-calculator-box {
    background-color: #070909;
}
.m27p-page .m27p .mp-product,
.m27p-page .m27p .mp-kit,
.m27p-page .m27p .mp-benefit-grid li {
    background-color: #090c0b;
}
.m27p-page .m27p .mp-end .mp-button:not(:hover) {
    background-color: #050707;
}
