/* The existing cover layer owns the important responsive hero rules. */
@layer knowledge-blog-hero {
    #main#main.resource-article > .anchor-hero {
        display: block !important;
        min-height: 0 !important;
        padding: clamp(34px, 5vw, 76px) 0 !important;
        border-bottom: 1px solid #dce2d1;
        background: var(--reading-ivory, #f6f7f0) !important;
    }

    #main#main.resource-article--case-study > .anchor-hero { background: var(--reading-card, #eaf0e1) !important; }
    #main#main.resource-article--industry-insight > .anchor-hero { background: var(--reading-ivory, #f6f7f0) !important; }

    #main#main.resource-article .anchor-hero > .anchor-hero-grid {
        position: relative !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
        align-items: center !important;
        gap: clamp(28px, 5vw, 76px) !important;
        width: min(1280px, calc(100% - 80px)) !important;
        max-width: none !important;
        min-height: 0 !important;
        margin-inline: auto !important;
        padding: 0 !important;
    }

    #main#main.resource-article .anchor-hero .anchor-hero-copy {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #main#main.resource-article .anchor-hero .anchor-hero-media {
        position: relative !important;
        inset: auto !important;
        z-index: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: 4 / 3;
        margin: 0 !important;
        border: 1px solid #d2dbc5 !important;
        border-radius: 18px !important;
        overflow: hidden;
    }

    #main#main.resource-article .anchor-hero::before,
    #main#main.resource-article .anchor-hero::after,
    #main#main.resource-article .anchor-hero-media::before,
    #main#main.resource-article .anchor-hero-media::after { display: none !important; }

    #main#main.resource-article .anchor-hero .anchor-hero-media img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: cover !important;
        filter: none !important;
    }

    #main#main.resource-article .anchor-hero h1 {
        max-width: 18ch !important;
        font-size: clamp(2.5rem, 4vw, 3.25rem) !important;
        line-height: 1.07 !important;
        letter-spacing: -.047em !important;
        text-wrap: balance;
    }

    #main#main.resource-article .anchor-hero .anchor-hero-copy > p {
        margin-block: 14px !important;
        font-size: clamp(1rem, 1.25vw, 1.15rem) !important;
        line-height: 1.55 !important;
    }

    #main#main.resource-article .resource-reading__byline p {
        margin: 0 !important;
        font-size: inherit !important;
        line-height: inherit !important;
    }

    #main#main.resource-article--reading .resource-reading .anchor-content > .anchor-section:not(.blog-references) {
        background: transparent !important;
        border: 0 !important;
        border-top: 1px solid #dce2d1 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    @media (max-width: 760px) {
        #main#main.resource-article > .anchor-hero { padding-block: 22px 24px !important; }

        #main#main.resource-article .anchor-hero > .anchor-hero-grid {
            grid-template-columns: minmax(0, 1fr);
            gap: 21px !important;
            width: calc(100% - 34px) !important;
        }

        #main#main.resource-article .anchor-hero h1 { max-width: none !important; font-size: clamp(1.75rem, 7.5vw, 2.25rem) !important; }
        #main#main.resource-article .anchor-hero .anchor-hero-media { aspect-ratio: 1.82; border-radius: 12px !important; }
    }
}

#main.resource-article {
    --reading-olive: #56722d;
    --reading-ink: #23372b;
    --reading-copy: #49574d;
    --reading-line: #dce2d1;
    --reading-card: #f3f6eb;
}

.resource-reading__byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 13px;
    min-height: 24px;
    padding-left: 11px;
    border-left: 2px solid #76923e;
    color: var(--reading-copy);
    font-size: .83rem;
    line-height: 1.45;
}

html body.everklin-transformed #main.resource-article--reading .resource-reading {
    display: grid !important;
    grid-template-columns: minmax(185px, .72fr) minmax(0, 2.15fr);
    gap: clamp(32px, 7vw, 105px);
    align-items: start;
    width: min(1190px, calc(100% - 80px));
    margin-inline: auto;
    padding-block: clamp(32px, 5vw, 72px) !important;
}

.resource-reading__sidebar {
    position: sticky;
    top: 112px;
    align-self: start;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--reading-line);
    border-radius: 13px;
    background: var(--reading-card);
}

.resource-reading__contents summary { color: var(--reading-ink); font-size: 1rem; font-weight: 740; cursor: pointer; }
.resource-reading__contents ul { display: grid; gap: 4px; max-height: min(46vh, 370px); overflow: auto; margin: 11px 0 0; padding: 0; list-style: none; }
.resource-reading__contents a { display: block; padding: 5px 0; color: var(--reading-olive); font-size: .875rem; line-height: 1.42; text-decoration: underline; text-underline-offset: 3px; }
.resource-reading__sidebar .resource-copy-link { margin-top: 14px; }

html body.everklin-transformed #main.resource-article--reading .resource-reading .anchor-content {
    min-width: 0;
    width: 100%;
    max-width: none;
}

html body.everklin-transformed #main.resource-article--reading .resource-reading .anchor-content > .anchor-section {
    margin: 0 0 22px;
    padding: clamp(17px, 3vw, 36px) 0 !important;
    scroll-margin-top: 118px;
}

html body.everklin-transformed #main.resource-article--reading .resource-reading .anchor-content > .blog-references {
    margin-top: 10px;
    padding-inline: clamp(14px, 3vw, 28px) !important;
    border: 1px solid var(--reading-line);
    border-radius: 12px;
}

html body.everklin-transformed #main.resource-article--reading .resource-reading .anchor-content > .anchor-section h2 {
    margin: 0 0 .55em;
    color: var(--reading-ink);
    font-size: clamp(1.35rem, 2.6vw, 2.15rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -.03em;
}

.resource-reading .anchor-content > .anchor-section p { max-width: 73ch; color: var(--reading-copy); font-size: clamp(1rem, 1.25vw, 1.13rem); line-height: 1.74; }
.resource-reading .sector-case-note { margin: 0 0 20px; padding: 13px 15px; border-left: 3px solid #819749; background: var(--reading-card); color: var(--reading-copy); font-size: .9rem; }
.resource-reading .case-evidence-stage__position { display: inline-flex; min-width: 32px; min-height: 28px; align-items: center; justify-content: center; margin-bottom: 10px; border-radius: 6px; background: #e8eedb; color: var(--reading-olive); font-size: .75rem; font-weight: 800; }

.resource-review-card { display: grid; gap: 7px; margin: 0 0 26px; padding: clamp(14px, 2.7vw, 25px); border: 1px solid var(--reading-line); border-radius: 11px; background: var(--reading-card); }
.resource-review-card strong { color: var(--reading-ink); font-size: clamp(1.05rem, 2vw, 1.42rem); line-height: 1.25; }
.resource-review-card p { margin: 0; color: var(--reading-copy); line-height: 1.55; }
.resource-review-card a { width: fit-content; color: var(--reading-olive); font-size: .875rem; font-weight: 720; text-decoration: underline; text-underline-offset: 4px; }

#main.resource-article .resource-related__grid > article { overflow: hidden; padding: 0; border: 1px solid var(--reading-line); border-radius: 12px; background: white; }
#main.resource-article .resource-related__card { display: flex; flex-direction: column; height: 100%; color: var(--reading-ink); text-decoration: none; }
#main.resource-article .resource-related__card:is(:hover, :focus-visible) { background: var(--reading-card); }
#main.resource-article .resource-related__card img { width: 100%; height: clamp(110px, 14vw, 170px); object-fit: cover; }
#main.resource-article .resource-related__card > div { padding: 16px; }
#main.resource-article .resource-related__card span { color: var(--reading-olive); font-size: .76rem; font-weight: 740; }

.knowledge-editorial .knowledge-pick--short > div p { margin-block: 6px 0; font-size: .88rem; line-height: 1.5; }
.knowledge-editorial .knowledge-collection { margin-block: clamp(32px, 6vw, 74px); }
.knowledge-editorial .knowledge-collection > header { padding-bottom: 14px; border-bottom: 1px solid #dce2d1; }
.knowledge-editorial .knowledge-collection > header > h3 { letter-spacing: -.035em; }
.knowledge-editorial .knowledge-card__copy h4 { text-wrap: pretty; }
.knowledge-editorial .knowledge-card__copy > p:last-child { line-height: 1.54; }

@media (max-width: 880px) {
    html body.everklin-transformed #main.resource-article--reading .resource-reading { grid-template-columns: minmax(0, 1fr); width: calc(100% - 34px); gap: 18px; padding-block: 21px 34px !important; }
    .resource-reading__sidebar { position: static; padding: 13px; }
    .resource-reading__contents ul { max-height: none; }
    .resource-reading__sidebar:not(:has(details[open])) .resource-copy-link:not(:focus-visible) { margin-top: 7px; }
    html body.everklin-transformed #main.resource-article--reading .resource-reading .anchor-content > .anchor-section { margin-bottom: 9px; scroll-margin-top: 83px; }
}

/* Knowledge Center editorial palette and reading layout. */
#main:is(.scientific-editorial, .knowledge-editorial) {
    --reading-brand: #8aa63a;
    --reading-olive: #405225;
    --reading-forest: #243124;
    --reading-ink: #26312c;
    --reading-copy: #59645e;
    --reading-line: #dce3d2;
    --reading-ivory: #f6f7f0;
    --reading-card: #eaf0e1;
    --reading-teal: #176b70;
    --reading-amber: #a66a16;
    --reading-error: #b42318;
    overflow-wrap: anywhere;
}

html body.everklin-transformed #main.scientific-editorial .resource-reading {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(180px, 220px);
    gap: clamp(22px, 3.2vw, 58px);
    width: min(1360px, calc(100% - 72px));
}

#main.scientific-editorial :is(.resource-reading__sidebar, .scientific-tools) {
    position: sticky;
    top: 112px;
    align-self: start;
}
#main.scientific-editorial .scientific-tools {
    border-top: 3px solid var(--reading-brand);
    background: var(--reading-ivory);
    padding: 16px;
    color: var(--reading-ink);
}
#main.scientific-editorial .scientific-tools h2 { margin: 0; font-size: 1rem; }
#main.scientific-editorial .scientific-tools ul { margin: 10px 0 14px; padding: 0; list-style: none; }
#main.scientific-editorial .scientific-tools a { display: block; padding-block: 7px; font-size: .91rem; line-height: 1.4; }
#main.scientific-editorial :is(.scientific-tools, .resource-reading__contents, .scientific-source-notes) a {
    color: var(--reading-olive);
    text-decoration: underline;
    text-underline-offset: .18em;
}
#main.scientific-editorial [aria-current="location"] { font-weight: 750; text-decoration-thickness: 2px; }
#main:is(.scientific-editorial, .knowledge-editorial) :is(a, button, summary, input, select):focus-visible {
    outline: 2px solid var(--reading-teal);
    outline-offset: 3px;
}
#main.scientific-editorial .scientific-tools button,
#main.knowledge-editorial .scientific-calculator button {
    min-height: 44px;
    padding: 8px 13px;
    border: 1px solid var(--reading-olive);
    border-radius: 5px;
    background: #fff;
    color: var(--reading-olive);
    cursor: pointer;
}
#main.scientific-editorial .resource-reading :is(.anchor-content [id], .anchor-content[id]) { scroll-margin-top: 100px; }
#main.scientific-editorial .resource-reading .anchor-content > .anchor-section p {
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    line-height: 1.74;
    max-width: 75ch;
}
#main:is(.scientific-editorial, .knowledge-editorial) .scientific-kicker {
    margin: 0 0 6px;
    color: var(--reading-olive);
    font-size: .81rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
#main.scientific-editorial .scientific-method { padding-inline-start: 18px; border-inline-start: 3px solid var(--reading-teal); }
#main.scientific-editorial :is(.scientific-method, .scientific-source-notes) ol { padding-inline-start: 1.5em; }
#main.scientific-editorial .scientific-source-notes { border-top: 1px solid var(--reading-line); padding-block: 12px; }
#main.scientific-editorial .scientific-source-notes summary { cursor: pointer; font-weight: 650; }
#main.knowledge-editorial :is(.scientific-topics, .scientific-directory) {
    width: min(1300px, calc(100% - 48px));
    margin: 0 auto;
    padding-block: clamp(30px, 5.5vw, 72px);
}
#main.knowledge-editorial .scientific-topics__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 24px; }
#main.knowledge-editorial .scientific-topics__grid article { min-width: 0; border-top: 1px solid var(--reading-line); padding: 16px 0; }
#main.knowledge-editorial .scientific-topics__grid h3 { margin: 0 0 6px; font-size: 1.12rem; }
#main.knowledge-editorial .scientific-topics__grid p { margin: 0; color: var(--reading-copy); }
#main.knowledge-editorial :is(.scientific-topics__grid, .scientific-directory) a { color: var(--reading-olive); text-underline-offset: .18em; }
#main.knowledge-editorial .scientific-directory > p { max-width: 67ch; }
#main.knowledge-editorial .scientific-directory h1 { max-width: 23ch; font-size: clamp(1.9rem, 5vw, 3.25rem); }
#main.knowledge-editorial .scientific-directory__intro { padding: clamp(22px, 5vw, 52px); background: var(--reading-ivory); }
#main.knowledge-editorial .scientific-directory__nav { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-block: 18px; }
#main.knowledge-editorial .scientific-directory__nav a { padding-block: 8px; }
#main.knowledge-editorial .scientific-directory__items { list-style: none; padding: 0; }
#main.knowledge-editorial .scientific-directory__items li { border-bottom: 1px solid var(--reading-line); padding-block: 12px; }
#main.knowledge-editorial .scientific-directory__items a { font-weight: 650; }
#main.knowledge-editorial .scientific-directory__items small { display: block; color: var(--reading-copy); }
#main:is(.scientific-editorial, .knowledge-editorial) .scientific-table { max-width: 100%; overflow: auto; }
#main:is(.scientific-editorial, .knowledge-editorial) .scientific-table table { width: 100%; border-collapse: collapse; }
#main:is(.scientific-editorial, .knowledge-editorial) .scientific-table :is(th, td) { padding: 10px; border-bottom: 1px solid var(--reading-line); text-align: start; }
#main.knowledge-editorial .scientific-calculator { padding: clamp(16px, 3vw, 30px); background: var(--reading-ivory); margin-block: 20px; }
#main.knowledge-editorial .scientific-calculator__inputs { display: flex; flex-wrap: wrap; gap: 12px; }
#main.knowledge-editorial .scientific-calculator label { display: grid; flex: 1 1 160px; gap: 4px; }
#main.knowledge-editorial .scientific-calculator input { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #85947c; border-radius: 4px; background: #fff; }
#main.knowledge-editorial .scientific-calculator output { display: block; margin-block: 14px; font-weight: 700; }
#main.knowledge-editorial .scientific-calculator [data-invalid="true"] { color: var(--reading-error); }

@media (max-width: 1179px) {
    html body.everklin-transformed #main.scientific-editorial .resource-reading {
        grid-template-columns: minmax(160px, 205px) minmax(0, 1fr);
    }
    #main.scientific-editorial .scientific-tools { position: static; grid-column: 2; }
}
@media (max-width: 880px) {
    html body.everklin-transformed #main.scientific-editorial .resource-reading {
        grid-template-columns: minmax(0, 1fr);
        width: calc(100% - 32px);
        gap: 18px;
    }
    #main.scientific-editorial :is(.resource-reading__sidebar, .scientific-tools) { position: static; grid-column: auto; }
    #main.knowledge-editorial .scientific-topics__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 540px) {
    #main.knowledge-editorial .scientific-topics__grid { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    #main.scientific-editorial :is(.resource-reading__sidebar, .scientific-tools, .resource-connection, .page-actions) { display: none !important; }
    html body.everklin-transformed #main.scientific-editorial .resource-reading { display: block !important; width: 100%; }
}

#main.knowledge-editorial > .knowledge-masthead {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: clamp(22px, 5vw, 64px);
    min-height: 0;
    padding: clamp(28px, 4.5vw, 66px) max(24px, calc((100% - 1280px) / 2));
    background: var(--reading-ivory) !important;
}
#main.knowledge-editorial > .knowledge-masthead::after { content: none; }
#main.knowledge-editorial > .knowledge-masthead > img {
    grid-column: 2;
    grid-row: 1;
    position: static;
    z-index: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1.55;
    border: 1px solid var(--reading-line);
    border-radius: 12px;
}
#main.knowledge-editorial .knowledge-masthead__inner {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    margin: 0;
    padding: 0;
}
#main.knowledge-editorial .knowledge-masthead h1 { font-size: clamp(2.2rem, 4.4vw, 3.25rem); }
#main.knowledge-editorial .knowledge-masthead p { max-width: 48ch; }
#main.knowledge-editorial .knowledge-featured {
    content-visibility: auto;
    contain-intrinsic-block-size: auto 620px;
}
#main.knowledge-editorial .knowledge-collection__cards {
    content-visibility: auto;
    contain-intrinsic-block-size: auto 720px;
}
#main#main.knowledge-editorial :is(.knowledge-show-more:not([hidden]), #faqs > p > a, .knowledge-pathways__group nav a) {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    scroll-margin-block: 84px 24px;
}
#main.knowledge-editorial > .scientific-topics { background: #fff !important; }
#main.scientific-editorial .scientific-tools > h2 {
    font-size: 1.06rem !important;
    line-height: 1.3 !important;
    letter-spacing: -.015em !important;
}
#main.scientific-editorial [data-dilution-error]:empty { display: none; }
#main.scientific-editorial [data-dilution-error] { color: var(--reading-error); }
@media (max-width: 750px) {
    #main.knowledge-editorial > .knowledge-masthead {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 24px 18px;
    }
    #main.knowledge-editorial > .knowledge-masthead > img { grid-column: 1; grid-row: 2; aspect-ratio: 1.85; }
    #main.knowledge-editorial .knowledge-masthead h1 { font-size: clamp(1.9rem, 8vw, 2.25rem); }
}

#main.knowledge-editorial .scientific-flow { margin: 12px 0 20px; }
#main.knowledge-editorial .scientific-flow svg { display: block; width: min(100%, 540px); height: auto; }
#main.knowledge-editorial .scientific-flow figcaption { color: var(--reading-copy); font-size: .9rem; }

#main.knowledge-editorial > .scientific-topics { padding-block: clamp(28px, 4vw, 58px) !important; }
#main.knowledge-editorial .scientific-topics h2 { margin: 0 0 22px; font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
#main.knowledge-editorial .scientific-topics__grid article p + p { margin-top: 7px; }
#main.knowledge-editorial .scientific-calculator[id] { scroll-margin-top: 92px; }
#main:is(.scientific-editorial, .knowledge-editorial) .scientific-table table { min-width: 440px; overflow-wrap: normal; }
#main:is(.scientific-editorial, .knowledge-editorial) .scientific-table caption { text-align: start; padding-block: 8px; }

#main.scientific-editorial .scientific-table--case table {
    min-width: 0;
    overflow-wrap: anywhere;
}

#main.scientific-editorial .scientific-table--case th[scope="row"] { width: 40%; }
#main.scientific-editorial .scientific-table__context { display: block; margin-top: .25rem; }

#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart {
    margin: 1.25rem 0;
    padding: clamp(.75rem, 3vw, 1.5rem);
    border: 1px solid var(--reading-line);
    background: var(--reading-ivory);
}

#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart figcaption span { display: block; }
#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart ul { padding: 0; list-style: none; }
#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart li { display: grid; gap: .35rem; margin-block: .8rem; }
#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart__track { height: .55rem; background: var(--reading-card); }
#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart__track span { display: block; height: 100%; background: var(--reading-teal); }
#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart p { margin-bottom: 0; font-size: .9rem; }

#main.scientific-editorial .scientific-table__value {
    color: var(--reading-ink);
    font-weight: 700;
}

html body #main#main#main:is(.scientific-editorial, .knowledge-editorial) .benchmark-chart :is(strong, figcaption span) {
    color: var(--reading-ink) !important;
    -webkit-text-fill-color: currentColor !important;
}

#main#main.scientific-editorial #product-specific-charts p a {
    text-decoration: underline !important;
    text-underline-offset: .16em;
}

#main.knowledge-editorial .scientific-directory__nav--index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#main.knowledge-editorial .scientific-directory__nav--index a { min-height: 44px; }
@media (max-width: 760px) {
    #main.knowledge-editorial .scientific-directory__nav--index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#main.scientific-editorial [data-technical-diagram] {
    margin: 1.5rem 0;
    max-inline-size: 36rem;
}

#main.scientific-editorial [data-technical-diagram] svg {
    display: block;
    width: 100%;
    height: auto;
}

#main.scientific-editorial [data-technical-diagram] figcaption {
    color: var(--reading-copy);
    font-size: .9rem;
}

/* Override the shared public theme only for these Knowledge Center controls. */
#main#main#main.knowledge-editorial :is(.knowledge-tools__search, [data-faq-search]) button[type="submit"] {
    background: var(--reading-olive) !important;
    color: #fff !important;
}

#main#main#main.knowledge-editorial .knowledge-pathways__group > strong {
    color: var(--reading-forest) !important;
}

#main.knowledge-editorial :is(.scientific-directory__intro nav, .scientific-calculator p) a {
    text-decoration: underline;
}

/* Keep discovery actions usable on touch screens. */
@media (max-width: 767px) {
    .knowledge-editorial .knowledge-show-more {
        min-height: 44px;
    }
    .knowledge-editorial .knowledge-pathways__group nav a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
