/* Shared foundation for the internal editorial pages. */
.content-page *,
.content-page *::before,
.content-page *::after {
    box-sizing: border-box;
}
body.content-page {
    --page-ink: #f5f5f2;
    --page-paper: #050505;
    --page-panel: #0d0d0d;
    --page-line: rgba(255, 255, 255, 0.16);
    --page-line-strong: rgba(255, 255, 255, 0.34);
    --page-muted: #9a9a96;
    overflow: auto;
    background: var(--page-paper);
}

.content-page .container {
    width: 100%;
    max-width: 1440px;
    padding-inline: clamp(1rem, 4vw, 4rem);
}

.content-page main {
    min-height: 100vh;
    padding-top: 7rem;
}

.content-page a {
    text-underline-offset: 0.22em;
}

.content-page .section-code {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--secondary-bg-color);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.content-page .section-code::before {
    content: "";
    width: 1.8rem;
    height: 1px;
    background: currentColor;
}

.content-page .section-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(18rem, 1.25fr);
    gap: clamp(2rem, 8vw, 8rem);
    align-items: end;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--page-line);
}

.content-page .section-intro h2 {
    max-width: 12ch;
    margin-top: 0.85rem;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.content-page .section-intro p {
    max-width: 50rem;
    color: var(--page-muted);
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
    line-height: 1.75;
}

.content-page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-block: 2rem;
    border-top: 1px solid var(--page-line);
    color: var(--page-muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.content-page-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.content-page-footer a {
    color: inherit;
    text-decoration: none;
}

.content-page-footer a:hover,
.content-page-footer a:focus-visible {
    color: var(--secondary-bg-color);
}

.content-page .page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--page-ink);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.content-page .page-back::before {
    content: "←";
    color: var(--secondary-bg-color);
    transition: transform 0.2s ease;
}

.content-page .page-back:hover::before,
.content-page .page-back:focus-visible::before {
    transform: translateX(-0.25rem);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media screen and (max-width: 760px) {
    .content-page main {
        padding-top: 5.5rem;
    }

    .content-page .section-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-page-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .content-page *,
    .content-page *::before,
    .content-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}