/* Readable without JavaScript; exclude the legacy Custom HTML component. */
body.shd-editorial .entry-content pre.wp-block-code:not(.code-container *) {
    box-sizing: border-box;
    max-width: 100%;
    max-height: 36rem;
    overflow: auto;
    white-space: pre;
    overflow-wrap: normal;
    border-radius: .375rem;
    tab-size: 4;
}
body.shd-editorial .entry-content pre.wp-block-code:not(.code-container *) > code {
    display: block;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
}
body.shd-editorial .shd-code-snippet { min-width: 0; max-width: 100%; margin-block: 1.75rem; }
body.shd-editorial .entry-content .shd-code-snippet > pre.wp-block-code { margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
body.shd-editorial .shd-code-snippet__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .125rem .5rem .125rem 1rem;
    border: 1px solid var(--shd-line);
    border-bottom: 0;
    border-radius: .375rem .375rem 0 0;
    background: var(--shd-surface);
    color: var(--shd-content-muted);
    font: 400 .75rem/1.5 var(--shd-content-font);
}
body.shd-editorial .shd-code-snippet__toolbar > span { overflow-wrap: anywhere; min-width: 0; }
body.shd-editorial .shd-code-snippet__toolbar button {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: .25rem;
    background: transparent;
    box-shadow: none;
    color: var(--shd-ink);
    font: inherit;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
body.shd-editorial .shd-code-snippet__toolbar button:hover { background: #eae8e2; }
body.shd-editorial .shd-code-snippet__toolbar button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body.shd-editorial .shd-code-snippet__toolbar button[data-state="success"] { color: var(--shd-accent); }
body.shd-editorial .shd-code-snippet :is(button, pre):focus-visible { outline: 2px solid var(--shd-accent) !important; outline-offset: 3px; }
/* Native disclosure, scoped only to Details containing enhanced code. */
body.shd-editorial .entry-content details.shd-code-details { margin-block: 1.75rem; padding: 0; border: 1px solid var(--shd-line); border-radius: .375rem; background: transparent; }
body.shd-editorial .entry-content details.shd-code-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; padding: .75rem 1rem; margin: 0; box-sizing: border-box; list-style: none; color: var(--shd-ink); font: 500 .875rem/1.5 var(--shd-content-font); cursor: pointer; }
body.shd-editorial .entry-content details.shd-code-details > summary::-webkit-details-marker { display: none; }
body.shd-editorial .entry-content details.shd-code-details > summary::marker { content: ''; }
body.shd-editorial .entry-content details.shd-code-details > summary::after { content: ''; flex: none; width: .45rem; height: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
body.shd-editorial .entry-content details.shd-code-details[open] > summary::after { transform: rotate(225deg); }
body.shd-editorial .entry-content details.shd-code-details[open] > summary { border-bottom: 1px solid var(--shd-line); }
body.shd-editorial .entry-content details.shd-code-details > summary:focus-visible { outline: 2px solid var(--shd-accent) !important; outline-offset: 3px; }
body.shd-editorial .entry-content details.shd-code-details > .shd-code-snippet { margin: 0; }
body.shd-editorial .entry-content details.shd-code-details > .shd-code-snippet + .shd-code-snippet { border-top: 1px solid var(--shd-line); }
body.shd-editorial .entry-content details.shd-code-details > .shd-code-snippet > .shd-code-snippet__toolbar { border: 0; border-radius: 0; background: transparent; }
body.shd-editorial .entry-content details.shd-code-details > .shd-code-snippet > pre.wp-block-code { border: 0; border-top: 1px solid var(--shd-line); border-radius: 0; }
body.shd-editorial .entry-content details.shd-code-details > .shd-code-snippet:last-child > pre.wp-block-code { border-radius: 0 0 .375rem .375rem; }
.shd-code-snippet__status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shd-code-snippet__clipboard { position: fixed; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
