h1 {
    line-height: 1.2;
}

article > header > h1 {
    margin-bottom: 0.3em;
}

article > header > .lightgray {
    margin-top: 0;
    margin-bottom: 0.25em;
}

article code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 0.1em 0.25em;
    background: #e0dde5;
    color: #2f283a;
    border-radius: 2px;
}

.code-widget {
    margin: 28px 0;
    overflow: hidden;
    border: 1px solid #44404e;
    border-radius: 6px;
    background: #25212d;
    color: #e5ffef;
    font-size: 15px;
}

.code-widget:not(.is-interactive) .code-output,
.code-widget:not(.is-interactive) .code-controls {
    display: none;
}

.code-fallback {
    margin: 0;
    padding: 12px 16px;
    line-height: 1.6;
}

.code-fallback code {
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.code-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
}

.code-panes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.code-controls [role="status"] {
    color: #b9b4c3;
    font-size: 13px;
}

#js-editor {
    --extra-lines: 5;
}

.js-editor .cm-editor {
    /* Extra editing space, plus the content's top and bottom padding. */
    height: calc((var(--example-lines) + var(--extra-lines, 1)) * 1.6em + 24px);
}

.js-editor .cm-scroller {
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    line-height: 1.6;
}

.js-editor .cm-content {
    padding: 12px 0;
}

.code-controls {
    border-top: 1px solid #44404e;
}

.code-controls button {
    border: 1px solid #e5ffef88;
    border-radius: 0;
    padding: 3px 14px;
    background: #2f283a;
    color: #e5ffef;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.code-controls button:hover:not(:disabled) {
    background: #e5ffef88;
    color: #2f283a;
}

.code-controls button:active:not(:disabled) {
    background: #e5ffef;
    color: #2f283a;
}

.code-controls button:focus-visible {
    outline: 2px solid #e5ffef;
    outline-offset: 3px;
}

.code-controls button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.code-output {
    min-width: 0;
    border-top: 1px solid #44404e;
    padding: 12px 16px;
    background: #1d1a23;
}

.code-widget pre {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.code-output pre {
    min-height: 1.6em;
    max-height: 236px;
    overflow: auto;
    margin: 0;
}

