@layer reset, tokens, base, layout, components, pages, states;

@layer tokens {
    :root {
        --paperzine-bg: #f5f0e8;
        --paperzine-panel: #ece6db;
        --paperzine-panel-strong: #e5ded1;
        --paperzine-blob: #e8e2d9;
        --paperzine-text: #1a1a1a;
        --paperzine-muted: #5c5c5c;
        --paperzine-subtle: #8a8378;
        --paperzine-header-bg: rgb(245 240 232 / 78%);
        --paperzine-yellow: #f8cc5a;
        --paperzine-orange: #ef9131;
        --paperzine-red: #bc3042;
        --paperzine-purple: #4e275f;
        --content-width: 72rem;
        --article-width: 48rem;
        --focus-ring: 0 0 0 2px rgb(239 145 49 / 65%);
        color-scheme: light;
    }

    [data-theme="dark"] {
        --paperzine-bg: #09090b;
        --paperzine-panel: #18181b;
        --paperzine-panel-strong: #232326;
        --paperzine-blob: #171512;
        --paperzine-text: #f4f4f5;
        --paperzine-muted: #a1a1aa;
        --paperzine-subtle: #71717a;
        --paperzine-header-bg: rgb(9 9 11 / 75%);
        color-scheme: dark;
    }

    @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) {
            --paperzine-bg: #09090b;
            --paperzine-panel: #18181b;
            --paperzine-panel-strong: #232326;
            --paperzine-blob: #171512;
            --paperzine-text: #f4f4f5;
            --paperzine-muted: #a1a1aa;
            --paperzine-subtle: #71717a;
            --paperzine-header-bg: rgb(9 9 11 / 75%);
            color-scheme: dark;
        }
    }
}

@layer reset {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html {
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        tab-size: 4;
    }

    body,
    h1,
    h2,
    h3,
    p,
    ul,
    ol,
    pre,
    figure {
        margin: 0;
    }

    h1,
    h2,
    h3 {
        font-size: inherit;
        font-weight: inherit;
    }

    body {
        min-height: 100vh;
    }

    a {
        color: inherit;
        text-decoration: inherit;
    }

    img,
    svg,
    canvas {
        display: block;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    button,
    input,
    textarea,
    select {
        color: inherit;
        font: inherit;
    }

    summary {
        display: list-item;
    }

    table {
        border-color: inherit;
        text-indent: 0;
    }

    [hidden] {
        display: none !important;
    }
}

@layer base {
    body {
        font-family: ui-sans-serif, system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    ::selection {
        background: rgb(239 145 49 / 30%);
        color: var(--paperzine-text);
    }

    :focus-visible {
        outline: none;
        box-shadow: var(--focus-ring);
    }

    .site-body {
        overflow-x: clip;
        background: var(--paperzine-bg);
        color: var(--paperzine-text);
    }

    .site-shell {
        position: relative;
        isolation: isolate;
        display: flex;
        min-height: 100svh;
        flex-direction: column;
    }

    .site-backdrop {
        position: absolute;
        inset: 0 0 auto;
        z-index: -10;
        height: 46rem;
        overflow: hidden;
        pointer-events: none;
    }

    .site-backdrop::before,
    .site-backdrop::after {
        border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%;
        background: var(--paperzine-blob);
        content: "";
    }

    .site-backdrop::before {
        position: absolute;
        top: -12rem;
        right: -16rem;
        width: 52rem;
        height: 52rem;
        transform: rotate(12deg);
    }

    .site-backdrop::after {
        position: absolute;
        top: -4rem;
        left: -14rem;
        width: 30rem;
        height: 30rem;
        border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%;
        opacity: 0.7;
    }

    .site-main {
        flex: 1;
    }

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

    .text-link {
        color: var(--paperzine-text);
        font-weight: 500;
        text-decoration: underline;
        text-decoration-color: color-mix(in srgb, var(--paperzine-text) 35%, transparent);
        text-underline-offset: 0.25rem;
        transition: text-decoration-color 150ms ease;
    }

    .text-link:hover {
        text-decoration-color: var(--paperzine-yellow);
    }
}

@layer layout {
    .site-container,
    .site-section,
    .home-hero {
        width: 100%;
        max-width: var(--content-width);
        margin-inline: auto;
        padding-inline: 1.5rem;
    }

    .site-section {
        padding-block: 2rem;
        scroll-margin-top: 6rem;
    }

    .section-intro {
        max-width: 42rem;
    }

    .section-eyebrow {
        color: var(--paperzine-muted);
        font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
        font-size: 0.75rem;
        font-weight: 500;
        letter-spacing: 0.22em;
        line-height: 1.25rem;
        text-transform: uppercase;
    }

    .section-title {
        margin-top: 0.75rem;
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 1.875rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 2.25rem;
    }

    .section-description {
        margin-top: 1rem;
        color: var(--paperzine-muted);
        line-height: 1.75rem;
    }

    @media (min-width: 40rem) and (max-width: 63.999rem) {
        .section-intro {
            max-width: none;
        }
    }

    @media (min-width: 40rem) {
        .section-title {
            font-size: 2.25rem;
            line-height: 2.5rem;
        }
    }

    @media (min-width: 64rem) {
        .site-container,
        .site-section,
        .home-hero {
            padding-inline: 2rem;
        }

        .site-section {
            padding-block: 3rem;
        }

    }
}

@layer components {
    .skip-link {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 60;
        padding: 0.5rem 1rem;
        border-radius: 9999px;
        background: var(--paperzine-orange);
        color: var(--paperzine-text);
        font-size: 0.875rem;
        font-weight: 600;
        transform: translateY(-6rem);
        transition: transform 150ms ease;
    }

    .skip-link:focus {
        transform: translateY(0);
        box-shadow: var(--focus-ring), 0 0 0 4px var(--paperzine-bg);
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
        border-bottom: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        background: var(--paperzine-header-bg);
        backdrop-filter: blur(8px);
    }

    .site-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-block: 1rem;
    }

    .site-brand {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 0.75rem;
        border-radius: 1rem;
        transition: color 150ms ease;
    }

    .site-brand:hover {
        color: var(--paperzine-text);
    }

    .site-brand:focus-visible,
    .site-header__cta:focus-visible,
    .site-nav__link:focus-visible,
    .site-footer__link:focus-visible,
    .primary-cta:focus-visible,
    .secondary-cta:focus-visible,
    .carousel-dot:focus-visible {
        box-shadow: var(--focus-ring), 0 0 0 4px var(--paperzine-bg);
    }

    .site-brand__icon {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 1rem;
    }

    .site-brand__copy {
        min-width: 0;
    }

    .site-brand__name {
        font-size: 1.125rem;
        font-weight: 600;
        letter-spacing: -0.025em;
        line-height: 1.75rem;
    }

    .site-brand__tagline {
        overflow: hidden;
        color: var(--paperzine-muted);
        font-size: 0.75rem;
        letter-spacing: 0.22em;
        line-height: 1rem;
        text-overflow: ellipsis;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .site-header__actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .site-nav {
        display: none;
        align-items: center;
        gap: 1.25rem;
        color: var(--paperzine-muted);
        font-size: 0.875rem;
        font-weight: 500;
    }

    .site-nav__link,
    .site-footer__link {
        border-radius: 9999px;
        transition: color 150ms ease;
    }

    .site-nav__link {
        padding: 0.25rem 0.5rem;
    }

    .site-footer__link {
        padding-inline: 0.25rem;
    }

    .site-nav__link:hover,
    .site-footer__link:hover {
        color: var(--paperzine-text);
    }

    .site-header__cta,
    .primary-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        background: var(--paperzine-orange);
        color: var(--paperzine-text);
        font-weight: 600;
        text-align: center;
        transition: box-shadow 150ms ease;
    }

    .site-header__cta {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .site-header__cta:hover {
        box-shadow: 0 10px 24px rgb(239 145 49 / 35%);
    }

    .primary-cta {
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .primary-cta:hover {
        box-shadow: 0 16px 36px rgb(239 145 49 / 30%);
    }

    .site-footer {
        border-top: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
    }

    .site-footer__inner {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding-block: 2rem;
        color: var(--paperzine-muted);
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .site-footer__languages {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
        width: 100%;
        padding-top: 1rem;
        border-top: 1px solid color-mix(in srgb, var(--paperzine-text) 8%, transparent);
        font-size: 0.875rem;
    }

    .site-footer__language {
        color: var(--paperzine-muted);
        transition: color 150ms ease;
    }

    a.site-footer__language:hover {
        color: var(--paperzine-text);
    }

    .site-footer__language--current {
        color: var(--paperzine-text);
        font-weight: 600;
    }

    .site-footer__links {
        display: flex;
        flex-wrap: wrap;
        gap: 1.25rem;
    }

    @media (min-width: 40rem) {
        .site-header__cta {
            padding-inline: 1.25rem;
        }

        .primary-cta {
            width: auto;
        }
    }

    @media (min-width: 64rem) {
        .site-nav {
            display: flex;
        }

        .site-footer__inner {
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
        }
    }
}

@layer pages {
    .home-hero {
        display: grid;
        align-items: center;
        gap: 3rem;
        padding-top: 3rem;
        padding-bottom: 4rem;
    }

    .home-hero__copy {
        max-width: 38rem;
        text-align: center;
    }

    .home-hero__title {
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: clamp(2.75rem, 12vw, 3.5rem);
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 1.05;
        text-wrap: balance;
        /* Long words (German "Nachbearbeiten") would otherwise widen the column on phones. */
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .home-hero__title-tail {
        color: var(--paperzine-muted);
    }

    .home-hero__promise {
        margin-top: 1rem;
        color: var(--paperzine-muted);
        font-size: 0.875rem;
        font-weight: 600;
        line-height: 1.25rem;
    }

    .home-hero__action {
        display: flex;
        justify-content: center;
        margin-top: 2.75rem;
    }

    .phone-preview {
        position: relative;
        width: 100%;
        max-width: 20rem;
        margin-inline: auto;
    }

    .phone-preview__frame {
        position: relative;
        padding: 0.5rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 45%, transparent);
        border-radius: 2.6rem;
        background: #171310;
        box-shadow: 0 25px 50px -12px rgb(0 0 0 / 30%);
    }

    .phone-preview__image {
        width: 100%;
        border-radius: 2.1rem;
    }

    .site-section--shots {
        position: relative;
        isolation: isolate;
        padding-block: 4rem;
    }

    .site-section--shots::before {
        position: absolute;
        inset: 0 50%;
        z-index: -1;
        width: 100vw;
        border-block: 1px solid color-mix(in srgb, var(--paperzine-text) 8%, transparent);
        background: var(--paperzine-panel);
        content: "";
        transform: translateX(-50%);
    }

    .site-section--features {
        padding-top: 4rem;
    }

    .press-mention {
        padding-block: 0 3rem;
    }

    /*
     * The card's only link stretches over the whole card, so the card is one click target.
     * The caption dissolves (display: contents) so outlet, quote and link can be ordered freely.
     */
    .press-mention__card {
        position: relative;
        display: grid;
        gap: 0.75rem;
        margin: 1rem 0 0;
        padding: 1.5rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 10%, transparent);
        border-radius: 1.5rem;
        background: var(--paperzine-panel);
        transition:
            background-color 150ms ease,
            border-color 150ms ease;
    }

    .press-mention__caption {
        display: contents;
    }

    .press-mention__outlet {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        order: 0;
    }

    .press-mention__label {
        color: var(--paperzine-text);
        font-size: 1.0625rem;
        font-weight: 600;
    }

    .press-mention__author {
        color: var(--paperzine-muted);
        font-size: 0.9375rem;
    }

    .press-mention__quote {
        order: 1;
        margin: 0;
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 1.375rem;
        font-weight: 600;
        line-height: 1.3;
        text-wrap: balance;
    }

    .press-mention__source {
        order: 2;
        font-size: 0.9375rem;
    }

    .press-mention__link::after {
        position: absolute;
        inset: 0;
        border-radius: inherit;
        content: "";
    }

    .press-mention__link:focus-visible {
        outline: none;
    }

    .press-mention__card:has(.press-mention__link:focus-visible) {
        box-shadow: var(--focus-ring);
    }

    /* Only on devices with a real pointer; touch screens would keep the hover state after a tap. */
    @media (hover: hover) {
        .press-mention__card:hover {
            border-color: color-mix(in srgb, var(--paperzine-text) 30%, transparent);
            background: var(--paperzine-panel-strong);
        }

        .press-mention__card:hover .press-mention__link {
            text-decoration-color: var(--paperzine-text);
        }
    }

    @media (min-width: 64rem) {
        .press-mention__card {
            grid-template-columns: auto minmax(0, 1fr) auto;
            gap: 2rem;
            align-items: center;
            padding: 1.5rem 2rem;
        }

        .press-mention__outlet,
        .press-mention__source {
            white-space: nowrap;
        }
    }

    .latest-release__action {
        margin-top: 2rem;
    }

    .changelog-page__release {
        margin-top: 3rem;
        padding-top: 2rem;
        border-top: 1px solid color-mix(in srgb, var(--paperzine-text) 10%, transparent);
        scroll-margin-top: 6rem;
    }

    .changelog-page__version {
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 1.5rem;
        font-weight: 800;
        line-height: 2rem;
    }

    .changelog-page__release .latest-release__list {
        margin-top: 1.25rem;
    }

    .latest-release__list {
        display: grid;
        gap: 1.5rem;
        max-width: 42rem;
        margin-top: 2rem;
        padding: 0;
        list-style: none;
    }

    .latest-release__entry {
        padding-left: 1.25rem;
        border-left: 2px solid var(--paperzine-orange);
    }

    .latest-release__title {
        color: var(--paperzine-text);
        font-size: 1.0625rem;
        font-weight: 600;
        line-height: 1.5rem;
    }

    .latest-release__description {
        margin-top: 0.25rem;
        color: var(--paperzine-muted);
        font-size: 0.9375rem;
        line-height: 1.5rem;
    }

    .site-section--looks {
        padding-block: 4rem;
    }

    .look-switcher {
        display: grid;
        gap: 1.5rem;
    }

    .look-switcher__intro {
        order: 0;
        margin-bottom: 0.5rem;
    }

    /* Below desktop, the controls wrapper dissolves so the look chips can sit under the photo. */
    .look-switcher__controls {
        display: contents;
    }

    .look-switcher__group {
        min-inline-size: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .look-switcher__group:first-of-type {
        order: 1;
    }

    .look-switcher__stage {
        order: 2;
        width: 100%;
        max-width: 26rem;
        margin-inline: auto;
    }

    .look-switcher__group:last-of-type {
        order: 3;
    }

    .look-switcher__legend {
        margin-bottom: 0.75rem;
        padding: 0;
        color: var(--paperzine-subtle);
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.18em;
        text-transform: uppercase;
    }

    .look-switcher__options {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .look-switcher__option {
        display: block;
        cursor: pointer;
    }

    .look-switcher__option-body {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 2.5rem;
        padding: 0.375rem 0.875rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 14%, transparent);
        border-radius: 999px;
        background: transparent;
        color: var(--paperzine-muted);
        font-size: 0.875rem;
        font-weight: 500;
        line-height: 1.25rem;
        white-space: nowrap;
        transition:
            background-color 150ms ease,
            border-color 150ms ease,
            color 150ms ease;
    }

    .look-switcher__option:hover .look-switcher__option-body {
        border-color: color-mix(in srgb, var(--paperzine-text) 30%, transparent);
        color: var(--paperzine-text);
    }

    .look-switcher__input:checked + .look-switcher__option-body {
        border-color: var(--paperzine-text);
        background: var(--paperzine-text);
        color: var(--paperzine-bg);
    }

    .look-switcher__input:focus-visible + .look-switcher__option-body {
        box-shadow: var(--focus-ring);
    }

    .look-switcher__option-icon {
        width: 1.5rem;
        height: 1.5rem;
        margin-left: -0.25rem;
        object-fit: contain;
    }

    .look-switcher__scene,
    .look-switcher__image {
        display: none;
    }

    .look-switcher__frame {
        position: relative;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 1.5rem;
        background: var(--paperzine-panel);
        box-shadow: 0 25px 50px -12px rgb(0 0 0 / 30%);
    }

    .look-switcher__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .look-switcher__compare {
        position: absolute;
        bottom: 1rem;
        left: 50%;
        z-index: 1;
        padding: 0.5rem 1rem;
        border: 1px solid rgb(255 255 255 / 30%);
        border-radius: 999px;
        background: rgb(9 9 11 / 65%);
        color: #f5f0e8;
        font-size: 0.8125rem;
        font-weight: 600;
        cursor: pointer;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        transform: translateX(-50%);
        backdrop-filter: blur(6px);
    }

    .look-switcher__compare[hidden],
    .look-switcher:has(#look-film-original:checked) .look-switcher__compare {
        display: none;
    }

    .look-switcher__compare:focus-visible {
        outline: none;
        box-shadow: var(--focus-ring);
    }

    .look-switcher.is-comparing .look-switcher__compare {
        border-color: var(--paperzine-orange);
        color: var(--paperzine-orange);
    }

    .look-switcher__credit {
        margin-top: 0.75rem;
        color: var(--paperzine-subtle);
        font-size: 0.8125rem;
        line-height: 1.25rem;
        text-align: center;
    }

    /* One rule per scene and per look; keep in sync with LookSwitcher.kt. */
    .look-switcher:has(#look-scene-summer:checked) .look-switcher__scene--summer,
    .look-switcher:has(#look-scene-indoor:checked) .look-switcher__scene--indoor,
    .look-switcher:has(#look-scene-portrait:checked) .look-switcher__scene--portrait,
    .look-switcher:has(#look-scene-winter:checked) .look-switcher__scene--winter,
    .look-switcher:has(#look-scene-dusk:checked) .look-switcher__scene--dusk,
    .look-switcher:has(#look-film-original:checked) .look-switcher__image--original,
    .look-switcher:has(#look-film-pastel-400:checked) .look-switcher__image--pastel-400,
    .look-switcher:has(#look-film-vivid-100:checked) .look-switcher__image--vivid-100,
    .look-switcher:has(#look-film-vivid-50:checked) .look-switcher__image--vivid-50,
    .look-switcher:has(#look-film-golden:checked) .look-switcher__image--golden,
    .look-switcher:has(#look-film-steine:checked) .look-switcher__image--steine,
    .look-switcher:has(#look-film-faded:checked) .look-switcher__image--faded,
    .look-switcher:has(#look-film-cine-800:checked) .look-switcher__image--cine-800,
    .look-switcher:has(#look-film-grayscale:checked) .look-switcher__image--grayscale,
    .look-switcher:has(#look-film-noir:checked) .look-switcher__image--noir,
    .look-switcher:has(#look-film-sepia:checked) .look-switcher__image--sepia,
    .look-switcher:has(#look-film-arctic:checked) .look-switcher__image--arctic {
        display: block;
    }

    .look-switcher.is-comparing .look-switcher__image {
        display: none;
    }

    .look-switcher.is-comparing .look-switcher__image--original {
        display: block;
    }

    @media (max-width: 39.999rem) {
        /* On phones the look chips scroll sideways in one row instead of wrapping. */
        .look-switcher__options--looks {
            flex-wrap: nowrap;
            margin-inline: -1.5rem;
            padding-inline: 1.5rem;
            overflow-x: auto;
            scroll-padding-inline: 1.5rem;
            scroll-snap-type: x proximity;
            scrollbar-width: none;
        }

        .look-switcher__options--looks::-webkit-scrollbar {
            display: none;
        }

        .look-switcher__options--looks .look-switcher__option {
            flex: 0 0 auto;
            scroll-snap-align: start;
        }
    }

    @media (min-width: 64rem) {
        .look-switcher {
            grid-template-columns: minmax(0, 1fr) 26rem;
            gap: 3rem;
            align-items: start;
        }

        .look-switcher {
            align-items: center;
        }

        .look-switcher__controls {
            display: grid;
            gap: 2rem;
            align-content: start;
        }

        .look-switcher__intro {
            margin-bottom: 0;
        }

        .look-switcher__stage {
            margin-inline: 0;
        }
    }

    .site-section--zines {
        position: relative;
        isolation: isolate;
        padding-block: 4.5rem;
    }

    .site-section--zines::before {
        position: absolute;
        inset: 0 50%;
        z-index: -1;
        width: 100vw;
        border-block: 1px solid color-mix(in srgb, var(--paperzine-text) 8%, transparent);
        background: var(--paperzine-panel);
        content: "";
        transform: translateX(-50%);
    }

    .zines-feature {
        display: grid;
        gap: 2.5rem;
    }

    .zines-feature__copy {
        align-self: center;
        max-width: 32rem;
    }

    .zines-feature__description {
        margin-top: 1rem;
        color: var(--paperzine-muted);
        font-size: 1.125rem;
        line-height: 1.875rem;
    }

    .zines-feature__copy .secondary-cta {
        margin-top: 1.75rem;
    }

    .zines-feature__photos {
        display: grid;
        grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
        gap: 1rem;
        align-items: center;
        justify-items: center;
    }

    .zines-feature__booklet,
    .zines-feature__unfolded {
        border-radius: 0.25rem;
        box-shadow: 0 24px 32px rgb(0 0 0 / 22%);
    }

    .zines-feature__booklet {
        width: 100%;
        transform: rotate(-1.5deg);
    }

    .zines-feature__unfolded {
        width: 100%;
        transform: rotate(1.5deg) translateY(0.75rem);
    }

    .feature-page {
        padding-top: 4.5rem;
        padding-bottom: 3rem;
    }

    .feature-page > .section-intro {
        max-width: 50rem;
    }

    .feature-page > .section-intro .section-title {
        max-width: 44rem;
        font-size: clamp(2.75rem, 9vw, 4rem);
        line-height: 1.05;
        text-wrap: balance;
    }

    .feature-page > .section-intro .section-description {
        max-width: 38rem;
        font-size: 1.125rem;
        line-height: 1.875rem;
    }

    .section-action {
        margin-top: 3rem;
        text-align: center;
    }

    .secondary-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 22%, transparent);
        border-radius: 9999px;
        color: var(--paperzine-text);
        font-weight: 600;
        transition: border-color 150ms ease, background-color 150ms ease;
    }

    .secondary-cta:hover {
        border-color: color-mix(in srgb, var(--paperzine-text) 45%, transparent);
        background: color-mix(in srgb, var(--paperzine-text) 5%, transparent);
    }

    .campaign-story {
        display: grid;
        gap: 3.5rem;
        margin-top: 3rem;
    }

    .campaign-group__copy {
        max-width: 42rem;
    }

    .feature-page .campaign-group {
        position: relative;
        padding-top: 3.5rem;
        border-top: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        scroll-margin-top: 9rem;
    }

    .feature-page .campaign-group::before {
        position: absolute;
        top: 2.75rem;
        right: 0;
        color: color-mix(in srgb, var(--paperzine-text) 10%, transparent);
        content: attr(data-chapter);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 4.5rem;
        font-weight: 800;
        line-height: 1;
    }

    .feature-page .campaign-group__copy {
        position: relative;
        z-index: 1;
        max-width: 36rem;
        padding-right: 3.5rem;
    }

    .feature-page .campaign-group__title {
        font-size: 2rem;
        line-height: 2.25rem;
        text-wrap: balance;
    }

    .feature-page .campaign-story {
        gap: 4rem;
        margin-top: 4rem;
    }

    .campaign-group__title {
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 1.875rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 2.25rem;
    }

    .campaign-group__description {
        margin-top: 0.75rem;
        color: var(--paperzine-muted);
        line-height: 1.75rem;
    }

    .campaign-group__beats {
        display: grid;
        gap: 3.5rem;
        margin-top: 2rem;
    }

    .campaign-group--unlabelled .campaign-group__beats {
        margin-top: 0;
    }

    .campaign-beat {
        display: grid;
        gap: 1.75rem;
    }

    .campaign-beat__copy {
        align-self: center;
        max-width: 30rem;
    }

    .campaign-beat__title {
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 1.75rem;
    }

    .campaign-beat__description {
        margin-top: 0.625rem;
        color: var(--paperzine-muted);
        line-height: 1.625rem;
    }

    .campaign-beat__description--standalone {
        margin-top: 0;
    }

    .feature-page .campaign-beat__image--phone {
        max-width: 18rem;
    }

    .campaign-beat__film-look-label {
        margin-top: 1.5rem;
        color: var(--paperzine-text);
        font-size: 0.875rem;
        font-weight: 600;
    }

    .campaign-beat__film-look-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem 0.75rem;
        margin-top: 0.75rem;
        padding: 0;
        list-style: none;
    }

    .campaign-beat__film-look {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 0.625rem;
        color: var(--paperzine-muted);
        font-size: 0.8125rem;
        line-height: 1.125rem;
    }

    .campaign-beat__film-look-icon {
        flex: 0 0 auto;
        width: 2rem;
        height: 2rem;
        object-fit: contain;
    }

    .campaign-beat__screenshots {
        display: grid;
        position: relative;
        min-width: 0;
        gap: 1rem;
        align-items: center;
        justify-items: center;
        overflow: visible;
    }

    .campaign-beat__image {
        width: 100%;
        filter: drop-shadow(0 24px 28px rgb(0 0 0 / 20%));
    }

    .campaign-beat__image--phone {
        max-width: 22rem;
    }

    .campaign-beat__image--crop {
        max-width: 34rem;
        border-radius: 1.5rem;
    }

    .campaign-beat__image--focus {
        max-width: 22rem;
        border-radius: 1.5rem;
    }

    .campaign-beat__screenshots--zines {
        gap: 1rem;
    }

    .campaign-beat__screenshots--zines .campaign-beat__image {
        width: 100%;
        max-width: 22rem;
    }

    .campaign-beat__image--zine-print {
        border-radius: 0;
    }

    .campaign-beat__screenshots--orientation {
        display: block;
        width: 100%;
        aspect-ratio: 1 / 1.1;
        isolation: isolate;
    }

    .campaign-beat__image--portrait {
        position: absolute;
        bottom: 0;
        left: 27%;
        z-index: 1;
        width: 46%;
        transform: rotate(3deg);
        transform-origin: center;
    }

    .campaign-beat__image--landscape {
        position: absolute;
        top: 5%;
        left: 2%;
        z-index: 2;
        width: 96%;
        transform: rotate(-3deg);
        transform-origin: center;
    }

    .campaign-beat__screenshots--themes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        isolation: isolate;
    }

    .campaign-beat__image--theme-black {
        z-index: 1;
        transform: translateX(8%);
    }

    .campaign-beat__image--theme-light {
        z-index: 2;
        transform: translate(-8%, 1.5rem);
    }

    .campaign-beat__image--theme-settings {
        grid-column: 1 / -1;
        z-index: 3;
        max-width: 15rem;
        margin-top: -3rem;
    }

    .carousel-scroller {
        padding-bottom: 1rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    /* Swiping, the dots and the arrow buttons replace the scrollbar. */
    .carousel-scroller::-webkit-scrollbar {
        display: none;
    }

    .carousel-track {
        display: flex;
        gap: 1rem;
    }

    .carousel-slide {
        flex-shrink: 0;
        width: 100%;
        scroll-snap-align: start;
    }

    .carousel-dots {
        position: sticky;
        left: 0;
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .carousel-dot {
        display: block;
        width: 0.625rem;
        height: 0.625rem;
        border-radius: 9999px;
        background: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transition: background-color 150ms ease, transform 150ms ease;
    }

    .carousel-dot:hover {
        background: color-mix(in srgb, var(--paperzine-text) 55%, transparent);
    }

    .example-carousel__step {
        display: inline-flex;
        width: 2.25rem;
        height: 2.25rem;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        margin-inline: 0.5rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 16%, transparent);
        border-radius: 999px;
        background: var(--paperzine-panel);
        color: var(--paperzine-text);
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        transition:
            background-color 150ms ease,
            border-color 150ms ease,
            opacity 150ms ease;
    }

    .example-carousel__step[hidden] {
        display: none;
    }

    .example-carousel__step:hover:not(:disabled) {
        border-color: color-mix(in srgb, var(--paperzine-text) 32%, transparent);
        background: color-mix(in srgb, var(--paperzine-text) 12%, transparent);
    }

    .example-carousel__step:focus-visible {
        outline: none;
        box-shadow: var(--focus-ring);
    }

    .example-carousel__step:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .maker-card {
        padding: 2rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 2rem;
        background: var(--paperzine-panel);
    }

    .maker-card__identity {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .maker-card__portrait {
        width: 4rem;
        height: 4rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 1rem;
        object-fit: cover;
    }

    .maker-card__name {
        color: var(--paperzine-text);
        font-weight: 600;
    }

    .maker-card__link {
        color: var(--paperzine-text);
        font-size: 0.875rem;
        text-decoration: underline;
        text-decoration-color: color-mix(in srgb, var(--paperzine-text) 35%, transparent);
        text-underline-offset: 0.25rem;
    }

    .maker-card__copy {
        display: grid;
        gap: 1rem;
        margin-top: 1.5rem;
        color: var(--paperzine-muted);
        line-height: 1.75rem;
    }

    .film-look-example {
        margin-top: 2.5rem;
    }

    .film-look-example + .film-look-example {
        margin-top: 3.5rem;
        /* Skip rendering photo stories until they approach the viewport. */
        content-visibility: auto;
        contain-intrinsic-size: auto 48rem;
    }

    .film-look-header {
        display: grid;
        grid-template-columns: 4rem minmax(0, 1fr);
        max-width: 48rem;
        align-items: center;
        gap: 0 1rem;
    }

    .film-look-header > div {
        display: contents;
    }

    .film-look-header__icon {
        flex-shrink: 0;
        width: 4rem;
        height: 4rem;
        margin-top: 0.25rem;
        object-fit: contain;
    }

    .film-look-header__title {
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 1.5rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 2rem;
    }

    .film-look-header__description {
        grid-column: 1 / -1;
        max-width: 42rem;
        margin-top: 0.75rem;
        color: var(--paperzine-muted);
        line-height: 1.75rem;
    }

    .film-look-header__hint {
        grid-column: 1 / -1;
        margin-top: 1rem;
        color: var(--paperzine-subtle);
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .sample-carousel {
        margin-top: 1.5rem;
    }

    .sample-carousel__photo {
        overflow: hidden;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 1.75rem;
        background: var(--paperzine-panel);
    }

    .sample-carousel__image {
        width: 100%;
        aspect-ratio: 3 / 4;
        object-fit: cover;
        transition: transform 300ms ease;
    }

    .sample-carousel__image:hover {
        transform: scale(1.05);
    }

    .faq-grid {
        display: grid;
        gap: 1rem;
        margin-top: 2rem;
    }

    .faq-column {
        display: grid;
        gap: 1rem;
    }

    .faq-item {
        overflow: hidden;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 1.5rem;
        background: var(--paperzine-panel);
        transition: background-color 150ms ease;
    }

    .faq-item[open] {
        background: color-mix(in srgb, var(--paperzine-text) 8%, transparent);
    }

    .faq-item__summary {
        display: flex;
        cursor: pointer;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1.5rem;
        color: var(--paperzine-text);
        font-size: 1.125rem;
        font-weight: 600;
        letter-spacing: -0.025em;
        line-height: 1.75rem;
        list-style: none;
    }

    .faq-item__summary::-webkit-details-marker {
        display: none;
    }

    .faq-item__summary:focus-visible {
        box-shadow: inset var(--focus-ring);
    }

    .faq-item__icon {
        flex-shrink: 0;
        color: var(--paperzine-text);
        font-size: 1.5rem;
        line-height: 1;
        transition: transform 150ms ease;
    }

    .faq-item[open] .faq-item__icon {
        transform: rotate(45deg);
    }

    .faq-item__answer {
        margin-top: -0.75rem;
        padding: 0 1.5rem 1.5rem;
        color: var(--paperzine-muted);
        line-height: 1.75rem;
    }

    .final-cta {
        padding-top: 2rem;
        padding-bottom: 5rem;
    }

    .final-cta__card {
        overflow: hidden;
        padding: 2rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 2rem;
        background: var(--paperzine-panel);
        box-shadow: 0 24px 48px rgb(0 0 0 / 12%);
        text-align: center;
    }

    .final-cta__title {
        max-width: 42rem;
        margin: 0.75rem auto 0;
    }

    .final-cta__copy {
        max-width: 42rem;
        margin: 1.25rem auto 0;
        color: var(--paperzine-muted);
        line-height: 1.75rem;
    }

    .final-cta__action {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    }

    .final-cta__qr {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .final-cta__qr-frame {
        padding: 0.5rem;
        border-radius: 0.75rem;
        background: white;
    }

    .final-cta__qr-image {
        width: 7rem;
        height: 7rem;
    }

    .final-cta__qr-caption {
        color: var(--paperzine-subtle);
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .legal-article,
    .default-page {
        width: 100%;
        max-width: var(--article-width);
        margin-inline: auto;
        padding: 4rem 1.5rem;
        color: var(--paperzine-muted);
        line-height: 2rem;
    }

    .legal-article h1,
    .default-page h1 {
        color: var(--paperzine-text);
        font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
        font-size: 2.25rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 2.5rem;
    }

    .legal-article h2,
    .default-page h2 {
        margin-top: 2.5rem;
        color: var(--paperzine-text);
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: -0.025em;
        line-height: 2rem;
    }

    .legal-article p,
    .default-page p {
        margin-top: 1rem;
    }

    .legal-article a,
    .default-page a {
        color: var(--paperzine-text);
        text-decoration: underline;
    }

    .legal-effective-date {
        color: var(--paperzine-subtle);
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .legal-lead {
        margin-top: 1rem;
        font-size: 1.125rem;
    }

    .default-page__content {
        margin-top: 2rem;
    }

    @media (max-width: 63.999rem) {
        .campaign-beat__screenshots--orientation {
            width: 70%;
            margin-inline: auto;
        }

        .campaign-beat__image--theme-black,
        .campaign-beat__image--theme-light {
            width: 70%;
            justify-self: center;
        }
    }

    @media (min-width: 40rem) and (max-width: 63.999rem) {
        .home-hero__copy,
        .campaign-group__copy,
        .campaign-beat__copy,
        .film-look-header__description {
            max-width: none;
        }
    }

    @media (min-width: 40rem) {
        .home-hero__title {
            font-size: 3.75rem;
            line-height: 1;
        }

        .campaign-beat__screenshots--count-2:not(.campaign-beat__screenshots--orientation) {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .film-look-header {
            display: flex;
            gap: 1.25rem;
            align-items: flex-start;
        }

        .film-look-header > div {
            display: block;
        }

        .film-look-header__icon {
            width: 5rem;
            height: 5rem;
        }

        .film-look-header__hint--small-only {
            display: none;
        }

        .sample-carousel .carousel-slide {
            width: calc((100% - 1rem) / 2);
        }

        .final-cta__card {
            padding: 2.5rem;
        }

        .final-cta__copy {
            font-size: 1.125rem;
            line-height: 2rem;
        }

        /* Only for desktop-like devices; on a tablet or phone the button already opens Google Play. */
        @media (hover: hover) and (pointer: fine) {
            .final-cta__qr {
                display: flex;
            }
        }

        .legal-article h1,
        .default-page h1 {
            font-size: 3rem;
            line-height: 1;
        }

    }

    @media (min-width: 48rem) and (max-width: 63.999rem) {
        .campaign-beat--film-looks {
            grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
            gap: 2.5rem;
            align-items: center;
        }
    }

    @media (min-width: 48rem) {
        .film-look-header__hint--mobile-only {
            display: none;
        }

        .sample-carousel--three .carousel-scroller {
            padding-bottom: 0;
            overflow: visible;
        }

        .sample-carousel--three .carousel-track {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .sample-carousel--three .carousel-slide {
            width: auto;
        }

        .sample-carousel--three .carousel-dots {
            display: none;
        }

        .sample-carousel--five .carousel-slide {
            width: calc((100% - 2rem) / 3);
        }
    }

    @media (min-width: 64rem) {
        .home-hero {
            grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
            gap: 4rem;
            padding-top: 3rem;
            padding-bottom: 4rem;
        }

        .home-hero__copy {
            text-align: left;
        }

        .home-hero__action {
            justify-content: flex-start;
        }

        .home-hero__title {
            font-size: clamp(4rem, 5.2vw, 4.75rem);
            line-height: 1.02;
        }

        .phone-preview {
            max-width: 21rem;
            margin-right: 0;
            margin-left: auto;
        }

        .campaign-story {
            gap: 4rem;
            margin-top: 3.5rem;
        }

        .zines-feature {
            grid-template-columns: minmax(15rem, 0.82fr) minmax(0, 1.18fr);
            gap: 4rem;
            align-items: center;
        }

        .campaign-group__title {
            font-size: 2.25rem;
            line-height: 2.5rem;
        }

        .campaign-group__description {
            font-size: 1.125rem;
            line-height: 2rem;
        }

        .campaign-group__beats {
            gap: 4.5rem;
            margin-top: 3rem;
        }

        .campaign-beat {
            grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
            gap: 3.5rem;
            align-items: center;
        }

        /*
         * The film-look beat pairs a long look list with a tall phone. Centering left a large empty
         * block above the copy on the homepage, so top-align the copy with the phone instead.
         */
        .campaign-beat--film-looks .campaign-beat__copy {
            align-self: start;
            padding-top: 2rem;
        }

        .campaign-group__beats > .campaign-beat:nth-child(even) {
            grid-template-columns: minmax(0, 1.28fr) minmax(15rem, 0.72fr);
        }

        .campaign-group__beats > .campaign-beat:nth-child(even) .campaign-beat__copy {
            order: 2;
        }

        .campaign-group__beats > .campaign-beat:nth-child(even) .campaign-beat__screenshots {
            order: 1;
        }

        .campaign-beat__screenshots--themes {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.5rem;
        }

        .campaign-beat__image--theme-black {
            transform: translate(8%, -1rem);
        }

        .campaign-beat__image--theme-light {
            transform: none;
        }

        .campaign-beat__image--theme-settings {
            grid-column: auto;
            max-width: none;
            margin-top: 0;
            transform: translate(-8%, 1rem);
        }

        .campaign-beat__screenshots--standard.campaign-beat__screenshots--count-2
            .campaign-beat__image:first-child {
            transform: translateY(1.5rem);
        }

        .campaign-beat__screenshots--standard.campaign-beat__screenshots--count-2
            .campaign-beat__image:last-child {
            transform: translateY(-1.5rem);
        }

        .campaign-beat__screenshots--zines {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .campaign-beat__screenshots--zines .campaign-beat__image:first-child {
            transform: translateY(1.5rem);
        }

        .campaign-beat__screenshots--zines .campaign-beat__image:last-child {
            transform: translateY(-1.5rem);
        }

        .campaign-beat__title {
            font-size: 1.5rem;
            line-height: 2rem;
        }

        .maker-card {
            display: grid;
            grid-template-columns: 0.8fr 1.2fr;
            gap: 2.5rem;
            padding: 2.5rem;
        }

        .maker-card__copy {
            margin-top: 0;
        }

        .faq-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            align-items: start;
            margin-top: 2.5rem;
        }

        .final-cta {
            padding-top: 3rem;
            padding-bottom: 6rem;
        }

        .final-cta__card {
            padding: 3rem;
        }

        .legal-article,
        .default-page {
            padding-inline: 2rem;
        }
    }

}

@layer components {
    .example-carousel__step-icon {
        display: block;
        width: 1rem;
        height: 1rem;
    }

    .example-carousel__step-icon svg {
        display: block;
        width: 100%;
        height: 100%;
    }
}

@layer states {
    @media (prefers-reduced-motion: reduce) {
        html {
            scroll-behavior: auto;
        }

        *,
        *::before,
        *::after {
            scroll-behavior: auto !important;
            transition-duration: 0.01ms !important;
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
        }

        .sample-carousel__image:hover {
            transform: none;
        }
    }
}

/*
 * Inter is self-hosted from /assets/fonts (SIL OFL 1.1, license in the same
 * directory). Variable latin subset: one file covers every weight in use.
 */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-variable.woff2") format("woff2");
}

/*
 * Reserve the scrollbar gutter on every page so centered content (and the
 * sticky navbar) does not shift horizontally between long and short pages.
 * Overlay-scrollbar platforms are unaffected. The overflow-y fallback covers
 * browsers without scrollbar-gutter support.
 */
html {
    overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
    html {
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}

/*
 * Classic (non-overlay) scrollbars: thin, dark thumb on a transparent track
 * so the bar blends into the page instead of showing a bright system gutter.
 * Platforms with native overlay scrollbars ignore this and already show the
 * scrollbar only while scrolling.
 */
@supports (scrollbar-color: auto) {
    html {
        scrollbar-color: color-mix(in srgb, var(--paperzine-text) 22%, transparent) transparent;
        scrollbar-width: thin;
    }
}

/* A light film grain over the whole page; sits above backgrounds, below content. */
body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    content: "";
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
    position: fixed;
    z-index: 40;
}

@layer components {
    .example-carousel__scroller {
        scroll-timeline: --example-carousel-scroll inline;
    }

    .example-carousel__dot[data-carousel-index="1"] {
        background-color: #ef9131;
        transform: scale(1.25);
    }

    .example-carousel:has(.example-carousel__slide:target) .example-carousel__dot {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    .example-carousel:has(.example-carousel__slide:nth-child(1):target)
        .example-carousel__dot[data-carousel-index="1"],
    .example-carousel:has(.example-carousel__slide:nth-child(2):target)
        .example-carousel__dot[data-carousel-index="2"],
    .example-carousel:has(.example-carousel__slide:nth-child(3):target)
        .example-carousel__dot[data-carousel-index="3"],
    .example-carousel:has(.example-carousel__slide:nth-child(4):target)
        .example-carousel__dot[data-carousel-index="4"],
    .example-carousel:has(.example-carousel__slide:nth-child(5):target)
        .example-carousel__dot[data-carousel-index="5"] {
        background-color: #ef9131;
        transform: scale(1.25);
    }

    @supports (animation-timeline: --example-carousel-scroll) {
        .example-carousel__dot {
            animation-duration: auto;
            animation-timing-function: linear;
            animation-timeline: --example-carousel-scroll;
        }

        .example-carousel--count-2 .example-carousel__dot[data-carousel-index="1"] {
            animation-name: example-carousel-dot-2-1;
        }

        .example-carousel--count-2 .example-carousel__dot[data-carousel-index="2"] {
            animation-name: example-carousel-dot-2-2;
        }

        .example-carousel--count-3 .example-carousel__dot[data-carousel-index="1"] {
            animation-name: example-carousel-dot-3-1;
        }

        .example-carousel--count-3 .example-carousel__dot[data-carousel-index="2"] {
            animation-name: example-carousel-dot-3-2;
        }

        .example-carousel--count-3 .example-carousel__dot[data-carousel-index="3"] {
            animation-name: example-carousel-dot-3-3;
        }

        .example-carousel--count-5 .example-carousel__dot[data-carousel-index="1"] {
            animation-name: example-carousel-dot-5-1;
        }

        .example-carousel--count-5 .example-carousel__dot[data-carousel-index="2"] {
            animation-name: example-carousel-dot-5-2;
        }

        .example-carousel--count-5 .example-carousel__dot[data-carousel-index="3"] {
            animation-name: example-carousel-dot-5-3;
        }

        .example-carousel--count-5 .example-carousel__dot[data-carousel-index="4"] {
            animation-name: example-carousel-dot-5-4;
        }

        .example-carousel--count-5 .example-carousel__dot[data-carousel-index="5"] {
            animation-name: example-carousel-dot-5-5;
        }
    }

}

@supports not (animation-timeline: --example-carousel-scroll) {
    .example-carousel__dots {
        display: none;
    }

    .example-carousel__scroller {
        scroll-padding-inline: 1rem;
    }

    .example-carousel__track {
        padding-inline: 1rem;
    }

    .example-carousel .example-carousel__slide {
        flex-basis: 86%;
        width: auto;
    }

    @media (min-width: 640px) {
        .example-carousel--count-2 .example-carousel__track {
            padding-inline: 0;
        }

        .example-carousel--count-2 .example-carousel__slide {
            flex-basis: auto;
        }

        .example-carousel--count-3 .example-carousel__slide,
        .example-carousel--count-5 .example-carousel__slide {
            flex-basis: 44%;
        }
    }

    @media (min-width: 768px) {
        .example-carousel--count-3 .example-carousel__track {
            padding-inline: 0;
        }

        .example-carousel--count-3 .example-carousel__slide {
            flex-basis: auto;
        }

        .example-carousel--count-5 .example-carousel__slide {
            flex-basis: 29%;
        }
    }
}

@keyframes example-carousel-dot-2-1 {
    0%,
    49.999% {
        background-color: #ef9131;
        transform: scale(1.25);
    }

    50%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }
}

@keyframes example-carousel-dot-2-2 {
    0%,
    49.999% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    50%,
    100% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@keyframes example-carousel-dot-3-1 {
    0%,
    24.999% {
        background-color: #ef9131;
        transform: scale(1.25);
    }

    25%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }
}

@keyframes example-carousel-dot-3-2 {
    0%,
    24.999%,
    75%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    25%,
    74.999% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@keyframes example-carousel-dot-3-3 {
    0%,
    74.999% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    75%,
    100% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@keyframes example-carousel-dot-5-1 {
    0%,
    12.499% {
        background-color: #ef9131;
        transform: scale(1.25);
    }

    12.5%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }
}

@keyframes example-carousel-dot-5-2 {
    0%,
    12.499%,
    37.5%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    12.5%,
    37.499% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@keyframes example-carousel-dot-5-3 {
    0%,
    37.499%,
    62.5%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    37.5%,
    62.499% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@keyframes example-carousel-dot-5-4 {
    0%,
    62.499%,
    87.5%,
    100% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    62.5%,
    87.499% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@keyframes example-carousel-dot-5-5 {
    0%,
    87.499% {
        background-color: color-mix(in srgb, var(--paperzine-text) 25%, transparent);
        transform: scale(1);
    }

    87.5%,
    100% {
        background-color: #ef9131;
        transform: scale(1.25);
    }
}

@layer components {
    .site-theme-toggle {
        display: inline-flex;
        width: 2.25rem;
        height: 2.25rem;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 9999px;
        background: transparent;
        color: var(--paperzine-muted);
        cursor: pointer;
        transition: color 150ms ease;
    }

    .site-theme-toggle:hover {
        color: var(--paperzine-text);
    }

    .site-theme-toggle__icon {
        display: none;
        width: 1.25rem;
        height: 1.25rem;
    }

    .site-theme-toggle__icon svg {
        width: 100%;
        height: 100%;
    }

    /* Light theme shows the moon (the target), dark theme the sun. */
    .site-theme-toggle__moon {
        display: block;
    }

    [data-theme="dark"] .site-theme-toggle__moon {
        display: none;
    }

    [data-theme="dark"] .site-theme-toggle__sun {
        display: block;
    }

    @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) .site-theme-toggle__moon {
            display: none;
        }

        :root:not([data-theme="light"]) .site-theme-toggle__sun {
            display: block;
        }
    }
}

/* Paperzine: feature grid on the landing page. */
@layer components {
    .feature-grid {
        display: grid;
        gap: 1rem;
        margin-top: 2rem;
    }

    .feature-card {
        padding: 1.5rem;
        border: 1px solid color-mix(in srgb, var(--paperzine-text) 12%, transparent);
        border-radius: 1.5rem;
        background: var(--paperzine-panel);
    }

    .feature-card__description {
        margin-top: 0.75rem;
        color: var(--paperzine-muted);
    }

    @media (min-width: 48rem) {
        .feature-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            align-items: start;
            margin-top: 2.5rem;
        }
    }
}

/* Paperzine: screenshot showcase on the landing page. */
@layer components {
    .showcase-grid {
        display: grid;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    @media (min-width: 48rem) {
        .showcase-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            justify-items: center;
            margin-top: 2.5rem;
        }
    }
}
