.code-blocks-section {
    margin: clamp(1.25rem, 3vw, 2.25rem) 0;
    clear: both;
    text-align: left;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.code-blocks-section,
.code-blocks-section *,
.code-blocks-section::before,
.code-blocks-section::after,
.code-blocks-section *::before,
.code-blocks-section *::after {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.code-blocks-snippet {
    --code-blocks-bg: #5f6876;
    --code-blocks-content-bg: var(--code-blocks-bg);
    --code-blocks-bar: #2b3444;
    --code-blocks-text: #ffffff;
    --code-blocks-muted: rgba(215, 222, 234, 0.68);
    --code-blocks-border: #445066;
    --code-blocks-radius: 0px;
    --code-blocks-copy-bg-hover: rgba(255, 255, 255, 0.1);
    --code-blocks-line-number: rgba(215, 222, 234, 0.48);
    --code-blocks-gutter-border: rgba(255, 255, 255, 0.14);
    --code-blocks-font-size: clamp(0.78rem, 1.25vw, 0.88rem);
    --code-blocks-font-weight: 400;
    position: relative;
    width: 100%;
    margin: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--code-blocks-border) !important;
    border-radius: var(--code-blocks-radius) !important;
    background: var(--code-blocks-bg) !important;
    color: var(--code-blocks-text) !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.code-blocks-snippet.is-light {
    --code-blocks-bg: #f8fafc;
    --code-blocks-content-bg: #f8fafc;
    --code-blocks-bar: #eef2f7;
    --code-blocks-text: #1f2937;
    --code-blocks-muted: rgba(31, 41, 55, 0.62);
    --code-blocks-border: #d8dee9;
    --code-blocks-copy-bg-hover: rgba(15, 23, 42, 0.08);
    --code-blocks-line-number: rgba(31, 41, 55, 0.45);
    --code-blocks-gutter-border: rgba(15, 23, 42, 0.14);
}

.code-blocks-window-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 4.95rem;
    padding: 0.85rem clamp(1.25rem, 2.6vw, 1.875rem) 0.7rem;
    border: 0 !important;
    background: var(--code-blocks-bar) !important;
}

.code-blocks-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.code-blocks-dots span {
    display: block;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.18) !important;
}

.code-blocks-dots .is-red {
    background: #ff5f57 !important;
}

.code-blocks-dots .is-yellow {
    background: #ffbd2e !important;
}

.code-blocks-dots .is-green {
    background: #28c840 !important;
}

.code-blocks-title {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    color: var(--code-blocks-muted) !important;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.8125rem;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-blocks-title.is-empty {
    min-height: 1px;
}

.code-blocks-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.code-blocks-language-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--code-blocks-muted) !important;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.code-blocks-snippet.is-light .code-blocks-language-badge {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.05) !important;
}

.code-blocks-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.15rem;
    padding: 0.35rem 0.6rem;
    border: 0 !important;
    border-radius: 0.65rem;
    background: transparent !important;
    color: var(--code-blocks-muted) !important;
    font: 700 0.86rem/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.code-blocks-copy:hover,
.code-blocks-copy:focus-visible,
.code-blocks-copy.is-copied {
    background: var(--code-blocks-copy-bg-hover) !important;
    color: var(--code-blocks-text) !important;
    outline: none;
}

.code-blocks-copy:active {
    transform: translateY(1px);
}

.code-blocks-copy-icon {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    opacity: 0.78;
}

.code-blocks-pre {
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid rgba(255, 255, 255, 0.58) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    padding: clamp(1.05rem, 2.5vw, 1.55rem) clamp(1.25rem, 2.6vw, 1.875rem) clamp(1.35rem, 3vw, 2rem);
    background: var(--code-blocks-content-bg) !important;
    color: var(--code-blocks-text) !important;
    scrollbar-width: none;
}

.code-blocks-snippet.is-light .code-blocks-pre {
    border-top-color: rgba(15, 23, 42, 0.16) !important;
}

.code-blocks-pre code {
    display: block;
    min-width: 0 !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--code-blocks-text) !important;
    font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: var(--code-blocks-font-size);
    line-height: 1.58;
    font-weight: var(--code-blocks-font-weight);
    letter-spacing: -0.01em;
    font-variant-ligatures: contextual common-ligatures;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    tab-size: 4;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.code-blocks-pre code *,
.code-blocks-line-content {
    font-size: var(--code-blocks-font-size) !important;
    font-weight: var(--code-blocks-font-weight) !important;
}

.code-blocks-line-number {
    font-size: var(--code-blocks-font-size) !important;
    font-weight: 400 !important;
}

.code-blocks-pre,
.code-blocks-pre code,
.code-blocks-pre code *,
.code-blocks-pre code .token {
    color: var(--code-blocks-text) !important;
    background-color: transparent;
}

.code-blocks-snippet.is-wrap .code-blocks-pre code,
.code-blocks-snippet.is-wrap .code-blocks-line-content {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.code-blocks-snippet.is-wrap .code-blocks-pre {
    overflow: visible !important;
}

.code-blocks-pre.is-numbered {
    padding-left: 0;
    padding-right: 0;
}

.code-blocks-pre.is-numbered code {
    min-width: 0 !important;
    width: 100%;
}

.code-blocks-code-line {
    display: grid;
    grid-template-columns: minmax(2.75rem, auto) minmax(0, 1fr);
    align-items: start;
    min-width: 0 !important;
}

.code-blocks-snippet.is-wrap .code-blocks-code-line {
    min-width: 0;
}

.code-blocks-line-number {
    user-select: none;
    padding: 0 0.85rem 0 1.1rem;
    border-right: 1px solid var(--code-blocks-gutter-border);
    color: var(--code-blocks-line-number) !important;
    text-align: right;
}

.code-blocks-line-content {
    min-width: 0 !important;
    padding: 0 1.25rem;
}

.code-blocks-source {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.code-blocks-toast {
    position: absolute;
    top: 0.9rem;
    right: 1.1rem;
    z-index: 2;
    transform: translateY(-0.3rem);
    opacity: 0;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92) !important;
    color: #ffffff !important;
    font: 700 0.78rem/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.code-blocks-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.code-blocks-caption {
    margin-top: 0.65rem;
    color: #64748b !important;
    font-size: 0.875rem;
    line-height: 1.55;
}

@media (max-width: 575px) {
    .code-blocks-window-bar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 3.35rem;
        padding-inline: 1rem;
        gap: 0.65rem;
    }

    .code-blocks-dots {
        gap: 0.45rem;
    }

    .code-blocks-dots span {
        width: 0.72rem;
        height: 0.72rem;
    }

    .code-blocks-language-badge {
        display: none;
    }

    .code-blocks-copy span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .code-blocks-pre {
        padding: 1rem;
    }

    .code-blocks-pre.is-numbered {
        padding-left: 0;
        padding-right: 0;
    }

    .code-blocks-line-number {
        padding-left: 0.75rem;
        padding-right: 0.65rem;
    }

    .code-blocks-line-content {
        padding: 0 0.85rem;
    }
}


/* v1.2.5: no internal scrollbars. Code wraps and the block grows with content. */
.code-blocks-section,
.code-blocks-snippet,
.code-blocks-pre,
.code-blocks-pre code,
.code-blocks-code-line,
.code-blocks-line-content {
    max-width: 100% !important;
}

.code-blocks-pre {
    max-height: none !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
}

.code-blocks-pre::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.code-blocks-pre code,
.code-blocks-line-content {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.code-blocks-code-line {
    min-width: 0 !important;
    width: 100% !important;
}
.code-blocks-snippet,
.code-blocks-snippet *,
.code-blocks-body,
.code-blocks-code-wrap,
.code-blocks-pre,
.code-blocks-pre code {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.code-blocks-body,
.code-blocks-code-wrap,
.code-blocks-pre {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.code-blocks-pre {
    width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
}

.code-blocks-pre code,
.code-blocks-pre code * {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}