:root {
    --header-color: #fff8eb;
}

.logo {
    margin-right: 0.5em;
}

.textimagepair {
    display: flex;
    flex-direction: row;
    gap: 1em;
    padding: 2rem;
    background-color: #fff4de;
}

@media screen and (max-width: 110em) {
    .textimagepair {
        flex-direction: column;
    }

    .textimagepair video {
        margin-left: auto;
        margin-right: auto;
    }
}

.callout {
    background-color: rgb(255, 241, 185);
    border: solid 0.1em rgb(255, 223, 96);
    border-left-width: 1em;
    padding: 1.5em;
    border-radius: 5px;
}

figure {
    text-align: center;
}

figure img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

figure figcaption {
    text-align: center;
}

header span {
    display: flex;
    align-items: center;
}

.githublink {
    margin-left: 0.5em;
}

.article-meta {
    color: #5a5a5a;
    font-size: 0.9em;
    margin-top: -0.5em;
    margin-bottom: 1.5em;
}

.ai-assistance {
    margin-top: 2em;
    padding: 1em 1.25em;
    border-left: 3px solid #c9b894;
    background-color: #faf6ec;
    color: #5a5a5a;
    font-size: 0.9em;
}

.ai-assistance p {
    margin: 0;
}

.speed-pattern {
    margin-top: 1em;
}

.speed-pattern h2 {
    margin-top: 0;
    background-color: #f0e6d3;
    border-radius: 0.5em;
    padding: 0.5em;
}

.contributing {
    background-color: #f0e6d3;
    padding: 1em;
    margin-top: 2em;
}

.contributing h2 {
    margin-top: 0;
}

.burger {
    margin-left: 0.5em;
}

body {
    margin: 0;
    background-color: white;
    display: grid;
    gap: 0;
    font-size: calc(15px + 0.390625vw);
}

nav {
    padding: 1em;
    background-color: #f0e6d3;
}

nav ul {
    list-style: none;
    padding: 0;
    font-size: 1.2em;
}

nav li {
    margin-bottom: 0.6em;
}

.mobile-hidden {
    display: none;
}

header {
    display: flex;
    align-items: center;
    background-color: #2d3866;
    padding: 1em;
    font-size: 2em;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    justify-content: space-between;
}

header a {
    color: var(--header-color);
    text-decoration: none;
}

header a:visited {
    color: var(--header-color);
}

a {
    color: #4f63b3;
}

a:visited {
    color: #2d3866;
}

main {
    padding: 1em 3em 2em 3em;
}

.sidebar {
    padding: 1em;
    background-color: #f0e6d3;
}

.home-link {
    font-weight: bolder;
}

#homepage .speed-pattern img {
    max-width: 100%;
    max-height: 10em;
}

pre {
    text-wrap: pretty;
}

/* Code blocks */
pre[class*="language-"] {
    position: relative;
    background-color: #2d3866;
    color: #fff4de;
    border: solid 1px #1c2347;
    border-left: solid 0.5em #4f63b3;
    border-radius: 6px;
    padding: 1em 1.25em;
    margin: 1.5em 0;
    overflow-x: auto;
    font-family: "Menlo", "Consolas", "Monaco", "Liberation Mono", monospace;
    font-size: 0.9em;
    line-height: 1.5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

pre[class*="language-"] code {
    font-family: inherit;
    color: inherit;
    background: none;
    padding: 0;
}

:not(pre) > code[class*="language-"],
:not(pre) > code {
    background-color: #f0e6d3;
    color: #2d2a26;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-family: "Menlo", "Consolas", "Monaco", "Liberation Mono", monospace;
    font-size: 0.92em;
}

/* Prism tokens — colorization is pure CSS; markup is generated at build time */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #8a93b8;
    font-style: italic;
}

.token.punctuation {
    color: #a8b0d4;
}

.token.namespace {
    opacity: 0.7;
}

.token.property,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #ffb0a0;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #b8e8b0;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #ffd680;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #ffd680;
}

.token.function,
.token.class-name {
    color: #c5b3ff;
}

.token.tag {
    color: #f59574;
}

.token.regex,
.token.important,
.token.variable {
    color: #ffd680;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    padding: 0.35em 0.7em;
    background-color: rgba(255, 244, 222, 0.12);
    color: #fff4de;
    border: solid 1px rgba(255, 244, 222, 0.3);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8em;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.15s,
        border-color 0.15s,
        color 0.15s;
}

.copy-btn:hover,
.copy-btn:focus-visible {
    background-color: rgba(255, 244, 222, 0.22);
    border-color: rgba(255, 244, 222, 0.5);
    outline: none;
}

.copy-btn.copied {
    background-color: #4f63b3;
    border-color: #4f63b3;
    color: #fff4de;
}

@media screen and (min-width: 75em) {
    .mobile-hidden {
        display: block;
    }

    html {
        height: 100%;
    }

    body {
        grid-template-columns: 1fr 5fr 18em;
        grid-template-rows: auto 1fr;
        height: 100%;
    }

    #homepage {
        grid-template-columns: 0 6fr 18em;
        grid-template-rows: auto 1fr;
        height: 100%;
    }

    header {
        grid-row: 1/2;
        grid-column: 1/4;
    }

    .sidebar {
        grid-row: 2/3;
        grid-column: 3/4;
    }

    main {
        grid-row: 2/3;
        grid-column: 2/3;
    }

    nav {
        grid-row: 2/3;
        grid-column: 1/2;
    }

    #homepage nav {
        display: none;
    }

    .burger {
        display: none;
    }
}
