/* Email presentation within the shared Blackleaf product layout. */
.bl-pos.bl-email {
    --pos-header-offset: var(--pos-site-header-height, 84px);
}

.bl-email .bl-pos__page-nav {
    border-bottom: 1px solid var(--pos-line-soft);
}

.bl-email:not([data-enhanced]) .bl-pos__hero h1 > span,
.bl-email:not([data-enhanced]) .bl-pos__hero-actions > *,
.bl-email:not([data-enhanced]) .bl-pos__hero .bl-pos__particle-still {
    opacity: 1;
}

.bl-email .bl-email__layouts,
.bl-email .bl-email__panel {
    min-width: 0;
    margin: 0;
    padding: clamp(18px, 3.5vw, 34px);
    border: 1px solid var(--layoutBorderColor, #383a39);
    border-radius: 16px;
    background: var(--pos-surface, var(--bodyBgColor, #161716));
}

.bl-email .bl-email__layouts {
    position: relative;
}

.bl-email .bl-email__layouts legend,
.bl-email .bl-email__panel-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreColor, #fff);
}

.bl-email__layouts legend {
    padding-inline: 8px;
}

.bl-email__layouts > input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}

.bl-email__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.bl-email__choices label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 7px 14px;
    border: 1px solid var(--layoutBorderColor, #383a39);
    border-radius: 8px;
}

#bl-email-spotlight:checked ~ .bl-email__choices [for="bl-email-spotlight"],
#bl-email-collection:checked ~ .bl-email__choices [for="bl-email-collection"],
#bl-email-digest:checked ~ .bl-email__choices [for="bl-email-digest"] {
    color: var(--bodyBgColor, #111);
    background: var(--foreColor, #fff);
    border-color: var(--foreColor, #fff);
}

#bl-email-spotlight:focus-visible ~ .bl-email__choices [for="bl-email-spotlight"],
#bl-email-collection:focus-visible ~ .bl-email__choices [for="bl-email-collection"],
#bl-email-digest:focus-visible ~ .bl-email__choices [for="bl-email-digest"] {
    outline: 2px solid var(--linkHover, currentColor);
    outline-offset: 3px;
}

.bl-email__example {
    display: none;
}

#bl-email-spotlight:checked ~ .bl-email__example--spotlight,
#bl-email-collection:checked ~ .bl-email__example--collection,
#bl-email-digest:checked ~ .bl-email__example--digest {
    display: block;
}

.bl-email__message-header,
.bl-email__records {
    margin: 0;
}

.bl-email__message-header > div,
.bl-email__records > div {
    display: grid;
    grid-template-columns: minmax(5rem, .9fr) minmax(0, 2fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--layoutBorderColor, #383a39);
}

.bl-email__message-header dt,
.bl-email__records dt,
.bl-email__metrics dt {
    color: var(--subColor, #999);
    font-size: .875rem;
}

.bl-email__message-header dd,
.bl-email__records dd,
.bl-email__metrics dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.bl-email__message {
    margin: 18px 0 0;
    padding: clamp(14px, 3vw, 24px);
    background: #f4f0e8;
    color: #171914;
    border-radius: 8px;
}

.bl-email .bl-email__message h3 {
    color: inherit;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    margin: 0 0 8px;
}

.bl-email .bl-email__message p {
    color: inherit;
}

.bl-email__example-action {
    display: inline-block;
    padding: 7px 12px;
    background: #24511c;
    color: #fff;
    border-radius: 5px;
    font-size: .875rem;
}

.bl-email .bl-email__example-note {
    margin: 14px 0 0;
    color: var(--subColor, #999);
    font-size: .8125rem;
}

.bl-email__panel-heading {
    margin-bottom: 12px;
}

.bl-email__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
    margin: 0;
}

.bl-email__metrics dd {
    font-family: var(--headerFont, inherit);
    font-size: clamp(1.65rem, 3.1vw, 3rem);
    line-height: 1.2;
    padding-top: 8px;
}

.bl-email__prep {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 4vw, 64px);
    margin-top: 40px;
}

.bl-email__prep > section {
    padding-top: 18px;
    border-top: 1px solid var(--layoutBorderColor, #383a39);
}

.bl-email__source-links {
    color: var(--subColor, #aaa);
}

.bl-email__source-links a,
.bl-email__questions p a {
    text-decoration: underline;
}

.bl-email__questions details {
    border-top: 1px solid var(--layoutBorderColor, #383a39);
    padding-block: 16px;
}

.bl-email__questions summary {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    padding-block: 5px;
}

.bl-email__questions details p {
    padding-top: 12px;
    max-width: 75ch;
}

html:is([layout-mode="lite"], [layout-mode="medium"]) .bl-pos.bl-email {
    --pos-surface: var(--itemBgColor, #f6f7f8);
    --pos-line: var(--layoutBorderColor, #c9cdd2);
    --pos-line-soft: var(--layoutBorderColor, #e0e3e6);
    --pos-text: var(--bodyColor, #202225);
    --pos-muted: var(--subColor, #565b63);
    --pos-accent: #27621d;
}

html:is([layout-mode="lite"], [layout-mode="medium"]) .bl-email > section {
    background: var(--bodyBgColor, #fff);
}

html:is([layout-mode="lite"], [layout-mode="medium"]) .bl-email .bl-pos__page-nav :is(a, .bl-pos__page-title > span) {
    color: var(--pos-text);
}

@media (max-width: 767px) {
    .bl-pos.bl-email {
        --pos-header-offset: var(--pos-site-header-height, 72px);
    }
    .bl-email .bl-pos__page-nav :is(.bl-pos__page-title, .bl-pos__page-actions) {
        display: none;
    }
    .bl-email .bl-pos__page-nav .bl-pos__page-links {
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }
    .bl-email__prep {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .bl-email__choices label {
        padding-inline: 10px;
    }
}
