/* Blog shared components — STRUCTURE ONLY. Every colour, font and radius comes from the custom properties below,
   which each project skin sets on :root or on its layout's body (either works). The defaults are neutral (system
   colours and currentColor) so a component is readable before any skin exists. Variable reference:
   Areas/Blog/AUTHORING.md.

   How skins on body still work: the base tokens get their defaults on :root only (so a body rule overrides them).
   The DERIVED tokens (muted ink, rules, accent, focus, backdrops) are never declared here under their public names;
   instead each is resolved into a private --_blog-* twin on both :root and body, as "the skin's value if it set one,
   else the formula over the base tokens". Resolving on body means a skin that sets --blog-ink on body also recolours
   every derived token, and a skin may still override any derived token itself, on :root or body. Components read
   only the private twins of derived tokens. */

:root {
    --blog-ink: CanvasText;
    --blog-surface: Canvas;
    --blog-radius: 4px;
    --blog-gap: 1rem;
    --blog-font-ui: system-ui, sans-serif;
    --blog-font-mono: ui-monospace, monospace;
    --blog-tile-ratio: 2 / 3;
    /* The tile shape on phones, where the grid shows three per row: cropped shorter so it stays a few screens long. */
    --blog-tile-ratio-phone: 3 / 4;
    --blog-lightbox-backdrop: rgb(0 0 0 / 0.86);
    --blog-lightbox-ink: #fff;
    /* Width / height of one clip, as a number (clips are 1080×1620): sizes an enlarged comparison to the screen. */
    --blog-clip-aspect: 0.6667;
    /* The page-width rule for project skins (the user, 2026-10-23): from 64rem up the page content spans 60% of the
       window, leaving 20% at each end; narrower, it spans the window. A skin adds its gutters around it. It is a
       percentage, so it resolves against the page box's parent (the body), which excludes the scrollbar. Mirrored by
       BlogMediaHtml.ImageSizes (a test pins the two). */
    --blog-page-width: 100%;
    /* The reading column (.blog-column): pages that are one column of text (feeds, posts, the changelog). It spans
       the whole page (the user, 2026-10-23: no narrow text), its type growing on wide screens (17 px up to 1920,
       20 px at 2560). */
    --blog-column-width: 100%;
    --blog-column-font: clamp(1em, 0.47em + 0.47vw, 1.2em);
}

@media (min-width: 64rem) {
    :root {
        --blog-page-width: 60%;
    }
}

/* ---- Reading column: one shared rule for every single-column page (the shared section and entry views, and any
   project view that is a column of text). It is a block, so everything in it is centred as one column. ---- */

.blog-column {
    width: 100%;
    max-width: var(--blog-column-width);
    margin-inline: auto;
    font-size: var(--blog-column-font);
}

/* ---- Sticky header: a layout marks its header data-blog-sticky-header. blog-components.js publishes the header's
   height as --blog-sticky-header-height, so anchor jumps (and a skin's own sticky panels) land below it. ---- */

[data-blog-sticky-header] {
    position: sticky;
    top: 0;
    z-index: 20;
}

html {
    scroll-padding-top: calc(var(--blog-sticky-header-height, 5rem) + 0.75rem);
}

:root,
body {
    --_blog-ink-muted: var(--blog-ink-muted, color-mix(in srgb, var(--blog-ink) 68%, transparent));
    --_blog-surface-raised: var(--blog-surface-raised, color-mix(in srgb, var(--blog-ink) 6%, var(--blog-surface)));
    --_blog-rule: var(--blog-rule, color-mix(in srgb, var(--blog-ink) 22%, transparent));
    --_blog-accent: var(--blog-accent, var(--blog-ink));
    --_blog-accent-ink: var(--blog-accent-ink, var(--blog-surface));
    --_blog-focus: var(--blog-focus, var(--_blog-accent));
    --_blog-media-backdrop: var(--blog-media-backdrop, color-mix(in srgb, var(--blog-ink) 10%, var(--blog-surface)));
    --_blog-placeholder-ink: var(--blog-placeholder-ink, var(--_blog-ink-muted));
}

.blog-visually-hidden,
.blog-matrix-table td .blog-tile-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---- Media figure ---- */

.blog-media {
    margin: calc(var(--blog-gap) * 1.5) 0;
}

.blog-media-frame {
    display: block;
    position: relative;
    background: var(--_blog-media-backdrop);
    border-radius: var(--blog-radius);
    overflow: hidden;
}

.blog-media-frame img,
.blog-media-frame video {
    display: block;
    width: 100%;
    height: auto;
}

a.blog-media-frame {
    cursor: zoom-in;
}

.blog-media-caption {
    margin-top: 0.5em;
    font-family: var(--blog-font-ui);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--_blog-ink-muted);
}

.blog-media-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25em;
    min-height: 10rem;
    padding: 1rem;
    border: 1px dashed var(--_blog-rule);
    border-radius: var(--blog-radius);
    background: var(--_blog-media-backdrop);
    color: var(--_blog-placeholder-ink);
    font-family: var(--blog-font-ui);
    font-size: 0.875rem;
    text-align: center;
}

.blog-media-placeholder-name {
    font-family: var(--blog-font-mono);
    font-size: 0.75rem;
}

/* ---- Player (added by blog-components.js; without JS the native controls stay) ----
   Before the first press: a Play button over the poster (.blog-player-start--center) or, on autoplaying loops, a
   Pause/Play chip in the corner (--corner). After it: the start button goes and the bar appears under the frame —
   play/pause, a timeline-style seek bar with a playhead, and the time. data-player-state on the buttons draws the
   glyph. The skin hooks are the --blog-player-* tokens below (Areas/Blog/AUTHORING.md). */

.blog-player-frame {
    display: block;
    position: relative;
}

.blog-player-bar,
.blog-player-start {
    --_blog-player-ink: var(--blog-player-ink, var(--blog-ink));
    --_blog-player-fill: var(--blog-player-fill, var(--_blog-accent));
    --_blog-player-track: var(--blog-player-track, color-mix(in srgb, var(--_blog-player-ink) 24%, transparent));
    --_blog-player-head: var(--blog-player-head, var(--_blog-player-ink));
}

.blog-player-start {
    position: absolute;
    z-index: 1;
    border: 0;
    font: 0.8125rem/1.2 var(--blog-font-ui);
    cursor: pointer;
}

.blog-player-start--center {
    top: 50%;
    left: 50%;
    width: 3.5rem;
    height: 3.5rem;
    margin: -1.75rem 0 0 -1.75rem;
    border-radius: 50%;
    background: var(--_blog-player-fill);
    color: var(--_blog-accent-ink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blog-surface) 55%, transparent);
}

.blog-player-start--corner {
    right: 0.5rem;
    bottom: 0.5rem;
    padding: 0.3em 0.7em;
    border: 1px solid var(--_blog-rule);
    border-radius: var(--blog-radius);
    background: color-mix(in srgb, var(--blog-surface) 82%, transparent);
    color: var(--blog-ink);
}

.blog-player-start[hidden],
.blog-player-bar[hidden] {
    display: none;
}

/* Play = a right-pointing triangle; Pause = two bars. Both in currentColor. */
.blog-player-glyph {
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto;
    border-style: solid;
    border-width: 0.5em 0 0.5em 0.85em;
    border-color: transparent transparent transparent currentColor;
    transform: translateX(0.1em);
}

.blog-player-start--center .blog-player-glyph {
    font-size: 1.5rem;
}

[data-player-state="playing"] > .blog-player-glyph {
    width: 0.8em;
    height: 1em;
    border: 0;
    border-left: 0.28em solid currentColor;
    border-right: 0.28em solid currentColor;
    transform: none;
}

.blog-player-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.4rem;
    color: var(--_blog-player-ink);
    font-family: var(--blog-font-ui);
}

.blog-player-toggle {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--_blog-player-track);
    border-radius: var(--blog-radius);
    background: transparent;
    color: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

.blog-player-time {
    flex: none;
    min-width: 7.5em;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: color-mix(in srgb, var(--_blog-player-ink) 72%, transparent);
}

/* The seek bar: a thin track filled up to the playhead (--_blog-player-progress, set by the JS), and a tall narrow
   playhead like an animation timeline's. The input itself is a tall transparent band, so it is easy to grab. */
.blog-player-scrub {
    --_blog-player-progress: 0%;
    flex: 1 1 auto;
    min-width: 0;
    height: 2rem;
    margin: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.blog-player-scrub:disabled {
    cursor: progress;
    opacity: 0.5;
}

.blog-player-scrub::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--_blog-player-fill) var(--_blog-player-progress), var(--_blog-player-track) var(--_blog-player-progress));
}

.blog-player-scrub::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--_blog-player-fill) var(--_blog-player-progress), var(--_blog-player-track) var(--_blog-player-progress));
}

.blog-player-scrub::-webkit-slider-thumb {
    width: 4px;
    height: 1.25rem;
    margin-top: calc(2px - 0.625rem);
    border: 0;
    border-radius: 1px;
    background: var(--_blog-player-head);
    box-shadow: 0 0 0 2px var(--blog-surface);
    appearance: none;
    -webkit-appearance: none;
}

.blog-player-scrub::-moz-range-thumb {
    width: 4px;
    height: 1.25rem;
    border: 0;
    border-radius: 1px;
    background: var(--_blog-player-head);
    box-shadow: 0 0 0 2px var(--blog-surface);
}

/* ---- Focus (every interactive component) ---- */

.blog-tile:focus-visible,
.blog-media-frame:focus-visible,
.blog-player-start:focus-visible,
.blog-player-toggle:focus-visible,
.blog-player-scrub:focus-visible,
.blog-compare-play:focus-visible,
.blog-compare-range:focus-visible,
.blog-credits summary:focus-visible,
.blog-nav a:focus-visible,
.blog-feed a:focus-visible,
.blog-pages a:focus-visible,
.blog-panel a:focus-visible,
.blog-used-pages a:focus-visible,
.blog-lightbox-close:focus-visible,
.blog-matrix-scroll:focus-visible {
    outline: 2px solid var(--_blog-focus);
    outline-offset: 2px;
}

/* The lightbox close button sits on the dark backdrop, where a skin's page focus colour can vanish: ring it in the
   lightbox ink, which every skin keeps readable on that backdrop. */
.blog-lightbox-close:focus-visible {
    outline-color: var(--blog-lightbox-ink);
}

/* ---- Skip link (_BlogSkipLink): off-screen until focused. Skins set its colours under their body class. ---- */

.blog-skip {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    z-index: 30;
    padding: 0.4rem 0.8rem;
    background: var(--blog-ink);
    color: var(--blog-surface);
    font: 600 0.9375rem/1.2 var(--blog-font-ui);
}

.blog-skip:focus {
    left: 0.5rem;
}

/* ---- Tile (matrix cell): poster at rest, muted preview on hover/focus, click → lightbox ---- */

.blog-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: zoom-in;
}

.blog-tile-frame {
    display: block;
    position: relative;
    aspect-ratio: var(--blog-tile-ratio);
    overflow: hidden;
    border-radius: var(--blog-radius);
    background: var(--_blog-media-backdrop);
    outline: 1px solid var(--_blog-rule);
    outline-offset: -1px;
}

.blog-tile-frame video,
.blog-tile-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-tile-play {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.45rem 0 0.45rem 0.75rem;
    border-color: transparent transparent transparent var(--_blog-accent);
    filter: drop-shadow(0 0 2px var(--blog-surface));
    opacity: 0.85;
}

.blog-tile.is-previewing .blog-tile-play {
    opacity: 0;
}

.blog-tile-label {
    font-family: var(--blog-font-ui);
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--_blog-ink-muted);
}

.blog-tile--missing {
    cursor: default;
}

.blog-tile--missing .blog-tile-frame {
    min-height: 0;
    border: 0;
}

/* ---- Thumbnail (link cards): one decorative still; the skin sizes and crops its box ---- */

.blog-thumb {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- Animation matrix: action rows × weapon columns; CSS-only weapon filter (rules emitted by the partial) ---- */

.blog-matrix {
    margin: calc(var(--blog-gap) * 2) 0;
    font-family: var(--blog-font-ui);
}

.blog-matrix-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 var(--blog-gap);
    padding: 0;
    border: 0;
}

.blog-matrix-filter legend {
    float: left;
    margin-right: 0.5rem;
    padding: 0;
    font-size: 0.875rem;
    color: var(--_blog-ink-muted);
}

.blog-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.blog-chip {
    display: inline-block;
    padding: 0.3em 0.75em;
    border: 1px solid var(--_blog-rule);
    border-radius: var(--blog-radius);
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--blog-ink);
    cursor: pointer;
    user-select: none;
}

.blog-chip-input:checked + .blog-chip {
    border-color: var(--_blog-accent);
    background: var(--_blog-accent);
    color: var(--_blog-accent-ink);
}

.blog-chip-input:focus-visible + .blog-chip {
    outline: 2px solid var(--_blog-focus);
    outline-offset: 2px;
}

.blog-matrix-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

/* No negative margin: the border spacing keeps every tile 0.5rem inside the scroll box, so focus rings
   (2px + 2px offset) on the edge tiles are not clipped by its overflow. */
.blog-matrix-table {
    border-collapse: separate;
    border-spacing: 0.5rem;
}

.blog-matrix-table thead th {
    padding: 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.blog-matrix-action {
    position: sticky;
    left: 0;
    z-index: 1;
    padding-right: 0.75rem;
    background: var(--blog-surface);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.blog-matrix-table td {
    width: 8.5rem;
    min-width: 7rem;
    vertical-align: top;
}

/* Wider than a phone: the matrix fills the page width. Fixed layout splits the room left of the action column evenly
   between the weapon columns, so the tiles grow with the page; the table never gets narrower than every column at
   its minimum (beyond that the scroll region takes over), and a tile never gets wider than the cap (a filtered,
   single-weapon matrix keeps normal-sized tiles). The partial sets --blog-matrix-columns to its weapon count; the
   filter hides whole columns, which a fixed layout handles. Skins tune the three sizes below. */
@media (min-width: 40.0625rem) {
    .blog-matrix {
        --_blog-matrix-action: var(--blog-matrix-action-width, 7.5rem);
        --_blog-matrix-tile-min: var(--blog-matrix-tile-min, 6.25rem);
        --_blog-matrix-tile-max: var(--blog-matrix-tile-max, 13rem);
    }

    .blog-matrix-table {
        table-layout: fixed;
        width: 100%;
        min-width: calc(var(--_blog-matrix-action) + var(--blog-matrix-columns, 8) * var(--_blog-matrix-tile-min)
            + (var(--blog-matrix-columns, 8) + 2) * 0.5rem);
    }

    .blog-matrix-table thead th:first-child {
        width: var(--_blog-matrix-action);
    }

    .blog-matrix-table td {
        width: auto;
        min-width: 0;
    }

    .blog-matrix-table td > .blog-tile,
    .blog-matrix-table td > .blog-matrix-na {
        max-width: var(--_blog-matrix-tile-max);
    }
}

/* Tile labels in the matrix are visually hidden (the column/row headers label them); see .blog-visually-hidden. */

.blog-matrix-na {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: var(--blog-tile-ratio);
    border: 1px dashed var(--_blog-rule);
    border-radius: var(--blog-radius);
    font-size: 0.75rem;
    color: var(--_blog-ink-muted);
}

/* Phones: each action becomes one stacked group of tiles, labelled by weapon; empty cells disappear. */
@media (max-width: 640px) {
    .blog-matrix-table,
    .blog-matrix-table tbody,
    .blog-matrix-table tr,
    .blog-matrix-table th,
    .blog-matrix-table td {
        display: block;
        margin: 0;
    }

    .blog-matrix-table thead {
        display: none;
    }

    /* Three tiles per row, cropped shorter (3:4 instead of 2:3), so the grid stays a few screens long on a phone;
       the lightbox still shows the whole clip. */
    .blog-matrix {
        --blog-tile-ratio: var(--blog-tile-ratio-phone);
    }

    .blog-matrix-table tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem 0.5rem;
        margin-bottom: calc(var(--blog-gap) * 1.25);
    }

    .blog-matrix-action {
        position: static;
        grid-column: 1 / -1;
        padding: 0 0 0.25rem;
        border-bottom: 1px solid var(--_blog-rule);
        font-size: 1rem;
    }

    .blog-matrix-table td {
        width: auto;
        min-width: 0;
    }

    .blog-matrix-table td.blog-matrix-cell--na {
        display: none;
    }

    .blog-matrix-table td::before {
        content: attr(data-weapon-label);
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.8125rem;
        line-height: 1.25;
        color: var(--_blog-ink-muted);
    }
}

/* ---- Before/after slider: side by side by default (and when durations differ); overlay + range when they match ---- */

.blog-compare {
    margin: calc(var(--blog-gap) * 2) 0;
    font-family: var(--blog-font-ui);
}

.blog-compare-stage {
    --compare-pos: 50%;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.blog-compare-layer {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--blog-radius);
    background: var(--_blog-media-backdrop);
}

.blog-compare-layer video,
.blog-compare-layer .blog-media-placeholder {
    display: block;
    width: 100%;
    height: auto;
}

.blog-compare-tag {
    position: absolute;
    top: 0.5rem;
    padding: 0.15em 0.5em;
    border-radius: var(--blog-radius);
    background: color-mix(in srgb, var(--blog-surface) 80%, transparent);
    color: var(--blog-ink);
    font-size: 0.75rem;
}

.blog-compare-layer--old .blog-compare-tag {
    left: 0.5rem;
}

.blog-compare-layer--new .blog-compare-tag {
    right: 0.5rem;
}

.blog-compare-range {
    display: none;
}

.blog-compare--overlay .blog-compare-stage {
    display: block;
    overflow: hidden;
    border-radius: var(--blog-radius);
}

.blog-compare--overlay .blog-compare-layer {
    border-radius: 0;
}

.blog-compare--overlay .blog-compare-layer--new {
    position: absolute;
    inset: 0;
    clip-path: inset(0 0 0 var(--compare-pos));
}

/* The divider line follows the range value. */
.blog-compare--overlay .blog-compare-stage::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--compare-pos);
    width: 2px;
    margin-left: -1px;
    background: var(--_blog-accent);
    pointer-events: none;
}

/* The range is a band across the middle of the stage; only its round thumb on the divider is drawn. A native thumb
   travels from half its width to the far end minus half its width, so a stage-wide range would put the thumb's centre
   off the divider (by up to half a thumb, more towards the ends). The range is therefore one thumb wider than the
   stage and starts half a thumb to the left: the thumb's centre then lands exactly on value% of the stage, where the
   divider line is drawn, at every size. */
.blog-compare-stage {
    --_blog-compare-thumb: 2.25rem;
}

.blog-compare--overlay .blog-compare-range {
    display: block;
    position: absolute;
    top: 50%;
    left: calc(var(--_blog-compare-thumb) / -2);
    z-index: 2;
    width: calc(100% + var(--_blog-compare-thumb));
    height: var(--_blog-compare-thumb);
    margin: calc(var(--_blog-compare-thumb) / -2) 0 0;
    background: transparent;
    cursor: ew-resize;
    appearance: none;
    -webkit-appearance: none;
}

.blog-compare-range::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
}

.blog-compare-range::-moz-range-track {
    height: 100%;
    background: transparent;
}

.blog-compare-range::-webkit-slider-thumb {
    width: var(--_blog-compare-thumb);
    height: var(--_blog-compare-thumb);
    border: 2px solid var(--_blog-accent-ink);
    border-radius: 50%;
    background: var(--_blog-accent);
    appearance: none;
    -webkit-appearance: none;
}

.blog-compare-range::-moz-range-thumb {
    width: var(--_blog-compare-thumb);
    height: var(--_blog-compare-thumb);
    border: 2px solid var(--_blog-accent-ink);
    border-radius: 50%;
    background: var(--_blog-accent);
}

.blog-compare-range[hidden] {
    display: none;
}

/* Seek bars of the slider (blog-components.js): one under each clip side by side; overlaid, the first is the one
   bar for both. On phones the time goes under the bar so the bar keeps its width. */
.blog-compare-scrubs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 0.5rem;
}

.blog-compare--overlay .blog-compare-scrubs {
    grid-template-columns: minmax(0, 1fr);
}

.blog-compare--overlay .blog-compare-scrubs .blog-player-bar + .blog-player-bar {
    display: none;
}

@media (max-width: 640px) {
    .blog-compare--side .blog-compare-scrubs .blog-player-bar {
        flex-wrap: wrap;
        gap: 0;
    }

    .blog-compare--side .blog-compare-scrubs .blog-player-scrub {
        flex-basis: 100%;
    }

    .blog-compare--side .blog-compare-scrubs .blog-player-time {
        min-width: 0;
        margin-left: auto;
    }
}

.blog-compare-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.6rem;
}

.blog-compare-play {
    padding: 0.35em 0.9em;
    border: 1px solid var(--_blog-accent);
    border-radius: var(--blog-radius);
    background: var(--_blog-accent);
    color: var(--_blog-accent-ink);
    font: 0.875rem/1.2 var(--blog-font-ui);
    cursor: pointer;
}

/* Enlarge (added by blog-components.js, one button for every enlargeable component): beside a comparison's accent
   Play button it is the quiet labelled partner; at the end of a video's player bar it is the corner-marks icon alone,
   the size of the play/pause toggle. */
.blog-enlarge {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.35em 0.8em;
    border: 1px solid var(--_blog-rule);
    border-radius: var(--blog-radius);
    background: transparent;
    color: inherit;
    font: 0.875rem/1.2 var(--blog-font-ui);
    cursor: zoom-in;
}

.blog-enlarge--icon {
    flex: none;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-color: var(--_blog-player-track);
    font-size: 1rem;
}

/* Four corner marks: "this opens to fill the screen". */
.blog-enlarge::before {
    content: "";
    width: 0.8em;
    height: 0.8em;
    background:
        linear-gradient(currentColor, currentColor) top left / 0.35em 1.5px,
        linear-gradient(currentColor, currentColor) top left / 1.5px 0.35em,
        linear-gradient(currentColor, currentColor) top right / 0.35em 1.5px,
        linear-gradient(currentColor, currentColor) top right / 1.5px 0.35em,
        linear-gradient(currentColor, currentColor) bottom left / 0.35em 1.5px,
        linear-gradient(currentColor, currentColor) bottom left / 1.5px 0.35em,
        linear-gradient(currentColor, currentColor) bottom right / 0.35em 1.5px,
        linear-gradient(currentColor, currentColor) bottom right / 1.5px 0.35em;
    background-repeat: no-repeat;
}

.blog-enlarge:focus-visible {
    outline: 2px solid var(--_blog-focus);
    outline-offset: 2px;
}

.blog-compare-note {
    font-size: 0.8125rem;
    color: var(--_blog-ink-muted);
}

.blog-compare--overlay .blog-compare-note--side {
    display: none;
}

/* ---- Lightbox ---- */

.blog-lightbox {
    width: 100vw;
    max-width: 100vw;
    /* dvh excludes mobile browser chrome; vh is the fallback for browsers without it. */
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blog-lightbox-ink);
}

.blog-lightbox::backdrop {
    background: var(--blog-lightbox-backdrop);
}

.blog-lightbox-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 3.5rem 1rem 1.5rem;
    box-sizing: border-box;
}

.blog-lightbox-figure {
    margin: 0;
    max-width: 100%;
}

.blog-lightbox-stage {
    position: relative;
}

/* The player sits on the dark backdrop: it takes the lightbox ink, which every skin keeps readable there. */
.blog-lightbox .blog-player-bar {
    --_blog-player-ink: var(--blog-lightbox-ink);
    margin-top: 0.6rem;
}

.blog-lightbox .blog-player-scrub::-webkit-slider-thumb {
    box-shadow: none;
}

.blog-lightbox .blog-player-scrub::-moz-range-thumb {
    box-shadow: none;
}

.blog-lightbox-stage > img,
.blog-lightbox-stage > video {
    display: block;
    max-width: min(100%, 92vw);
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    margin: 0 auto;
}

/* A click on an open image closes it (blog-components.js). */
.blog-lightbox-stage > img {
    cursor: zoom-out;
}

/* A clip also has its player bar under it. */
.blog-lightbox-stage > video {
    max-height: calc(100vh - 10.5rem);
    max-height: calc(100dvh - 10.5rem);
}

/* An enlarged comparison (the whole figure, live: wipe, seek bars, Play both) as big as the screen allows. Its height
   budget leaves room for Close, the seek bars, the controls and the caption; its width follows from that height and
   the clip aspect (two clips side by side, one when overlaid), capped by the window. */
.blog-lightbox .blog-compare.is-enlarged {
    --_blog-enlarged-height: calc(100vh - 13rem);
    --_blog-enlarged-height: calc(100dvh - 13rem);
    width: min(94vw, calc(var(--_blog-enlarged-height) * 2 * var(--blog-clip-aspect) + 0.5rem));
    margin: 0;
    color: var(--blog-lightbox-ink);
}

.blog-lightbox .blog-compare--overlay.is-enlarged {
    width: min(94vw, calc(var(--_blog-enlarged-height) * var(--blog-clip-aspect)));
}

.blog-lightbox .is-enlarged .blog-media-caption,
.blog-lightbox .is-enlarged .blog-compare-note {
    color: color-mix(in srgb, var(--blog-lightbox-ink) 78%, transparent);
}

/* An enlarged video figure (the look-dev turntable and any other playable figure video, with its bar and caption):
   the clip as tall as the screen allows, its width following from the video's own aspect, the figure shrink-wrapped
   to it so the bar and caption line up under the clip. */
.blog-lightbox .blog-media.is-enlarged {
    width: fit-content;
    max-width: 94vw;
    margin: 0;
    color: var(--blog-lightbox-ink);
}

.blog-lightbox .blog-media.is-enlarged video {
    width: auto;
    max-width: 94vw;
    max-height: calc(100vh - 11rem);
    max-height: calc(100dvh - 11rem);
}

/* Already large: no Enlarge inside the lightbox. */
.blog-lightbox .is-enlarged .blog-enlarge {
    display: none;
}

.blog-lightbox-caption:empty {
    display: none;
}

.blog-lightbox-caption {
    margin-top: 0.75rem;
    font: 0.9375rem/1.4 var(--blog-font-ui);
    text-align: center;
}

.blog-lightbox-close {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4em 0.9em;
    border: 1px solid currentColor;
    border-radius: var(--blog-radius);
    background: transparent;
    color: var(--blog-lightbox-ink);
    font: 0.9375rem/1.2 var(--blog-font-ui);
    cursor: pointer;
}

/* ---- Panels: "Powered by" / "Used in" ---- */

.blog-panel {
    margin: calc(var(--blog-gap) * 1.5) 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid var(--_blog-accent);
    background: var(--_blog-surface-raised);
    font-family: var(--blog-font-ui);
}

.blog-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.blog-panel-text {
    margin: 0.3rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--_blog-ink-muted);
}

/* Pages of one project another relies on (_BlogUsedPages): each a linked title over its usedIn note. */
.blog-used-pages {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--blog-font-ui);
}

.blog-used-pages span {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--_blog-ink-muted);
}

/* ---- Project nav ---- */

.blog-nav {
    font-family: var(--blog-font-ui);
}

.blog-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-nav a {
    color: inherit;
    text-decoration: none;
}

.blog-nav a:hover {
    text-decoration: underline;
}

.blog-nav a[aria-current] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
}

/* ---- Feed / wiki list and pages list ---- */

.blog-feed,
.blog-pages {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-feed-item,
.blog-pages-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--_blog-rule);
}

.blog-feed-title,
.blog-pages-title {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.3;
}

.blog-feed-title a,
.blog-pages-title a {
    color: inherit;
}

.blog-feed-date {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--blog-font-ui);
    font-size: 0.8125rem;
    color: var(--_blog-ink-muted);
}

.blog-feed-summary,
.blog-pages-summary {
    margin: 0.35rem 0 0;
    line-height: 1.5;
}

.blog-pages-group + .blog-pages-group {
    margin-top: calc(var(--blog-gap) * 2);
}

.blog-pages-group-title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    color: var(--_blog-ink-muted);
}

.blog-empty {
    color: var(--_blog-ink-muted);
}

/* ---- Credits: deliberately small, but a real focusable disclosure ---- */

.blog-credits {
    margin-top: calc(var(--blog-gap) * 3);
    font-family: var(--blog-font-ui);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--_blog-ink-muted);
}

.blog-credits summary {
    display: inline-block;
    cursor: pointer;
    list-style: none;
}

.blog-credits summary::-webkit-details-marker {
    display: none;
}

.blog-credits[open] summary {
    text-decoration: underline;
}

.blog-credits ul {
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
}

.blog-credits a {
    color: inherit;
}

/* Motion ignores prefers-reduced-motion by the user's ruling (2026-10-22); see Areas/Blog/AUTHORING.md. */
