/* Public article/page bodies and the Gutenberg canvas, never wp-admin chrome. */
:is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) code {
    padding: .15em .4em;
    border: 1px solid rgba(167, 139, 250, .22);
    border-radius: 4px;
    background: #201a32;
    color: #e9d5ff;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .9em;
    overflow-wrap: anywhere;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
:is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) pre,
:is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) pre.wp-block-code,
:is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) > code,
:is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) code.gn-code-block {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    margin: 1.5em 0;
    padding: 20px 22px;
    border: 1px solid #3c3550;
    border-left: 3px solid #a78bfa;
    border-radius: 10px;
    background: #0e1420;
    color: #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.75;
    text-align: left;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    overflow-x: auto;
    tab-size: 4;
    scrollbar-width: thin;
    scrollbar-color: #74618f #0e1420;
}
/* Nested code inherits the panel; avoid a second padded box or changed spacing. */
:is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) pre code {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font: inherit;
    white-space: inherit;
    word-break: normal;
    overflow-wrap: normal;
    overflow: visible;
}
@media (max-width: 480px) {
    :is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) pre,
    :is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) pre.wp-block-code,
    :is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) > code,
    :is(.gn-post-content, .gn-page-content, .entry-content, .editor-styles-wrapper) code.gn-code-block { padding: 16px; font-size: 13px; }
}
@media print {
    :where(.gn-post-content, .gn-page-content, .entry-content) pre { background: #f4f4f4; color: #111; box-shadow: none; white-space: pre-wrap; }
}
