/* Catalog style "demo31" — the album as a locals map by day or by night (follows the system theme): a glass side panel on the left (masthead, style bar, categories, tags) like the demo's panel, the posts as glowing beacons on a dotted map ground, Unbounded + IBM Plex Mono, one signal green. Mirrors /demo31/. */
@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
    --bg: #eef0ec;
    --ground-dot: rgb(16 20 24 / 0.09);
    --panel: rgb(250 251 249 / 0.9);
    --panel-solid: #fbfcfa;
    --chip: rgb(16 20 24 / 0.05);
    --chip-hover: rgb(16 20 24 / 0.09);
    --edge: rgb(16 20 24 / 0.1);
    --edge-2: rgb(16 20 24 / 0.2);
    --ink: #14161a;
    --ink-2: #3a3f48;
    --dim: #5d6470;
    --sig: #2c8a2a;
    --sig-ink: #fff;
    --sig-glow: rgb(44 138 42 / 0.28);
    --lilac: #8f84ff;
    --pink: #ff6fa3;
    --shadow: 0 24px 50px -28px rgb(20 30 20 / 0.45);
    --display: "Unbounded", "Arial Black", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --r: 18px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0b0d;
        --ground-dot: rgb(255 255 255 / 0.07);
        --panel: rgb(14 15 18 / 0.86);
        --panel-solid: #0f1013;
        --chip: rgb(255 255 255 / 0.05);
        --chip-hover: rgb(255 255 255 / 0.09);
        --edge: rgb(255 255 255 / 0.09);
        --edge-2: rgb(255 255 255 / 0.18);
        --ink: #eef0f4;
        --ink-2: #c9ccd4;
        --dim: #8d93a0;
        --sig: #9dff6a;
        --sig-ink: #0a0b0d;
        --sig-glow: rgb(157 255 106 / 0.4);
        --shadow: 0 24px 60px -24px #000;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg) radial-gradient(var(--ground-dot) 1.2px, transparent 1.6px) 0 0 / 22px 22px fixed; color: var(--ink); font: 400 15px/1.6 var(--mono); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 500 0.92em/1.4 var(--mono); }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 14px; background: var(--sig); color: var(--sig-ink); border-radius: 10px; }
.skip:focus { left: 16px; }

/* soft speciality glows lying on the map ground */
.deco { position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.deco--1 { width: 420px; height: 420px; right: 8%; top: 10%; background: var(--lilac); }
.deco--2 { width: 360px; height: 360px; right: 34%; bottom: -6%; background: var(--pink); opacity: 0.35; }
.deco--3 { width: 300px; height: 300px; left: 30%; top: 40%; background: var(--sig); opacity: 0.25; }
@media (prefers-color-scheme: dark) { .deco { opacity: 0.28; } .deco--2 { opacity: 0.2; } .deco--3 { opacity: 0.16; } }

/* the page: the side panel on the left, the map of posts on the right */
.page { display: grid; grid-template-columns: 372px minmax(0, 1fr); grid-template-rows: auto auto auto auto 1fr auto; column-gap: 32px; align-items: start; max-width: 1560px; margin: 0 auto; padding: 16px 24px 0 16px; }
.masthead, .stylebar, .categories, .tagcloud { grid-column: 1; background: var(--panel); backdrop-filter: blur(14px); border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); }
.content { grid-column: 2; grid-row: 1 / 6; min-width: 0; }
.colophon { grid-column: 1 / -1; grid-row: 6; }

/* masthead: the big counter of the panel */
.masthead { padding: 22px 22px 16px; border-top: 1px solid var(--edge); border-radius: var(--r) var(--r) 0 0; }
.masthead__inner { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.brand { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand__mark { font: 800 40px/1 var(--display); letter-spacing: -0.05em; }
.brand__name { font: 500 11.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.masthead__tagline { grid-column: 1 / -1; margin: 6px 0 4px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.masthead__count { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.masthead__count::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 10px var(--sig); animation: d31-pulse 1.8s infinite; order: 3; }
@keyframes d31-pulse { 50% { opacity: 0.3; } }
.masthead__num { font: 800 46px/1 var(--display); letter-spacing: -0.05em; color: var(--ink); text-shadow: 0 0 30px var(--sig-glow); }

/* style bar inside the panel */
.stylebar { padding: 12px 22px 14px; border-top: 1px solid var(--edge); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stylebar__label { width: 100%; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.stylebar__value { flex: 1 1 160px; min-width: 0; padding: 9px 10px; overflow-x: auto; white-space: nowrap; border-radius: 10px; background: var(--chip); border: 1px solid var(--edge); font-size: 12px; }
.stylebar__copy { padding: 10px 14px; border: 0; border-radius: 10px; background: var(--sig); color: var(--sig-ink); font: 600 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; box-shadow: 0 0 16px -4px var(--sig); }
.stylebar__copy.is-done { background: var(--ink); color: var(--bg); box-shadow: none; }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; max-height: 112px; overflow-y: auto; padding: 2px 0; scrollbar-width: thin; }
.stylebar__item { padding: 4px 9px; border-radius: 999px; background: var(--chip); font-size: 11.5px; text-decoration: none; color: var(--ink-2); }
.stylebar__item:hover { background: var(--chip-hover); color: var(--ink); }
.stylebar__item.is-active { background: var(--ink); color: var(--bg); }
.stylebar__tools { display: flex; flex-wrap: wrap; gap: 4px 12px; width: 100%; font-size: 12px; }
.stylebar__guide, .stylebar__download { color: var(--ink-2); text-underline-offset: 3px; }
.stylebar__guide:hover, .stylebar__download:hover { color: var(--sig); }
.stylebar__upload { width: 100%; }
.stylebar__upload-toggle { cursor: pointer; color: var(--ink-2); }
.upload-form { display: grid; gap: 8px; margin-top: 10px; }
.upload-form__label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.upload-form__input, .upload-form__file { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge-2); background: var(--panel-solid); color: var(--ink); font: inherit; font-size: 13px; }
.upload-form__note { color: var(--dim); font-size: 12px; }

/* categories: the speciality chips of the panel */
.categories { margin: 0; padding: 14px 22px; border-top: 1px solid var(--edge); }
.categories::before { content: "Category · tap one"; display: block; margin-bottom: 10px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.categories__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.categories__link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 6px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; font-size: 12.5px; text-decoration: none; color: var(--ink-2); }
.categories__link::before { content: ""; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sig); }
.categories__item:nth-child(3n+2) .categories__link::before { box-shadow: inset 0 0 0 1.5px var(--lilac); }
.categories__item:nth-child(3n) .categories__link::before { box-shadow: inset 0 0 0 1.5px var(--pink); }
.categories__link:hover { background: var(--chip-hover); border-color: var(--edge-2); color: var(--ink); }
.categories__link.is-active { background: var(--sig); color: var(--sig-ink); box-shadow: 0 0 16px -4px var(--sig); }
.categories__link.is-active::before { background: var(--sig-ink); box-shadow: none; width: 8px; height: 8px; margin: 0 4px 0 6px; }
.categories__count { font-size: 11px; color: var(--dim); }
.categories__link.is-active .categories__count { color: var(--sig-ink); opacity: 0.75; }
.catalog--post .categories { padding-bottom: 20px; border-bottom: 1px solid var(--edge); border-radius: 0 0 var(--r) var(--r); box-shadow: var(--shadow); }

/* listing header */
.content { padding: 8px 0 64px; }
.listing__header { margin: 6px 0 22px; }
.listing__title { margin: 0; font: 800 clamp(30px, 4.4vw, 62px)/0.95 var(--display); letter-spacing: -0.04em; text-transform: uppercase; }
.listing__intro { max-width: 62ch; margin: 12px 0 0; color: var(--ink-2); font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--edge); backdrop-filter: blur(12px); font-size: 12.5px; color: var(--dim); }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 2px; }
.toolbar__label { margin-right: 8px; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; }
.toolbar__opt { min-width: 36px; padding: 7px 9px; border-radius: 9px; text-align: center; text-decoration: none; color: var(--ink-2); }
.toolbar__opt:hover { color: var(--ink); background: var(--chip); }
.toolbar__opt.is-active { background: var(--ink); color: var(--bg); }

/* cards: beacons on the map — a glowing dot pinned to every screenshot */
.listing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.post--card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); background: var(--panel); border: 1px solid var(--edge); backdrop-filter: blur(12px); box-shadow: var(--shadow); transition: transform 0.25s ease, border-color 0.25s; }
.post--card:hover { transform: translateY(-3px); border-color: var(--edge-2); }
.post--card::before { content: ""; position: absolute; z-index: 2; left: 18px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--sig), 0 0 12px 3px var(--sig), 0 0 30px 8px var(--sig-glow); }
.post--even::before { box-shadow: 0 0 0 2px var(--lilac), 0 0 12px 3px var(--lilac), 0 0 30px 8px rgb(143 132 255 / 0.4); }
.post__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--chip); }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.post--card:hover .post__thumb { transform: scale(1.03); }
.post__body { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 20px; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.post__num { color: var(--sig); font-weight: 600; }
.post__cat { text-decoration: none; color: var(--ink-2); }
.post__cat:hover { color: var(--ink); text-decoration: underline; }
.post__title { margin: 0 0 8px; font: 800 24px/1.05 var(--display); letter-spacing: -0.03em; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post__excerpt { margin: 0 0 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.post__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--edge-2); color: var(--ink); font: 600 11.5px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; background: none; }
.btn:hover { border-color: var(--ink); }
.btn--primary { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); box-shadow: 0 0 18px -6px var(--sig); }
.btn--primary:hover { border-color: var(--sig); filter: brightness(1.08); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.pager__link { min-width: 42px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--edge); text-align: center; text-decoration: none; font-size: 13px; }
.pager__link:hover { border-color: var(--edge-2); }
.pager__link.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* one post: a card opened beside the panel */
.post--full { padding: 26px clamp(18px, 3vw, 40px) 36px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--edge); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.post--full .post__header { padding: 0 0 22px; }
.post--full .post__title { font-size: clamp(34px, 5vw, 68px); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.045em; }
.post--full .post__excerpt { max-width: 64ch; font-size: 15px; }
.post__shot { margin: 0 0 32px; }
.post__zoom { display: block; max-height: 640px; overflow: hidden; border-radius: 14px; border: 1px solid var(--edge); cursor: zoom-in; background: var(--chip); }
.post__zoom img { width: 100%; }
.post__caption { margin-top: 8px; color: var(--dim); font-size: 12px; }
.doc { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.doc h2 { margin: 40px 0 12px; font: 600 19px/1.2 var(--display); letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); }
.doc h2::before { content: ""; display: inline-block; width: 9px; height: 9px; margin: 0 12px 2px 0; border-radius: 50%; background: var(--sig); box-shadow: 0 0 10px var(--sig); }
.doc h3 { margin: 28px 0 8px; font: 600 16px/1.3 var(--display); color: var(--ink); }
.doc h4, .doc h5, .doc h6 { margin: 22px 0 6px; font-size: 15px; color: var(--ink); }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc strong { color: var(--ink); }
.doc a { color: var(--sig); text-underline-offset: 3px; }
.doc code { padding: 1px 6px; border-radius: 6px; background: var(--chip); color: var(--ink); }
.doc pre { margin: 0 0 18px; padding: 16px 18px; overflow-x: auto; border-radius: 12px; background: #0a0b0d; color: #dfe3ea; border: 1px solid var(--edge); font-size: 12.5px; }
.doc pre code { padding: 0; background: none; color: inherit; }
.doc blockquote { margin: 0 0 18px; padding: 4px 0 4px 16px; border-left: 2px solid var(--sig); color: var(--dim); }
.doc hr { margin: 30px 0; border: 0; border-top: 1px solid var(--edge); }
.doc-table { margin: 0 0 18px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc th, .doc td { padding: 9px 10px; border-bottom: 1px solid var(--edge); text-align: left; vertical-align: top; }
.doc th { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; padding: 0; list-style: none; }
.tags__item { padding: 4px 11px; border-radius: 999px; background: var(--chip); font-size: 12px; color: var(--ink-2); }
.tags__item::before { content: "● "; color: var(--sig); }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.post__nav-link { padding: 14px 16px; border-radius: 14px; background: var(--chip); border: 1px solid var(--edge); font: 600 15px/1.25 var(--display); text-decoration: none; }
.post__nav-link:hover { border-color: var(--sig); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 4px; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.post__back { color: var(--ink-2); }
.notice { padding: 18px 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--edge); }
.notice--error { border-color: #e2505f; color: #e2505f; }
.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 24px; padding: 20px 0 36px; border-top: 1px solid var(--edge); color: var(--dim); font-size: 12px; }
.colophon p { margin: 0; }

/* screenshot dialog */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 1px solid var(--edge); border-radius: 18px; background: var(--panel-solid); color: var(--ink); }
.zoom::backdrop { background: rgb(5 6 8 / 0.82); backdrop-filter: blur(4px); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--panel-solid); }
.zoom__close { padding: 10px 16px; border: 0; border-radius: 12px; background: var(--sig); color: var(--sig-ink); font: 600 12px/1 var(--display); text-transform: uppercase; cursor: pointer; }
.zoom__scroll { height: calc(94vh - 60px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 1180px) {
    .listing { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .page { display: block; padding: 12px 16px 0; }
    .masthead, .stylebar, .categories, .tagcloud { margin: 0; }
    .content { padding-top: 24px; }
    .catalog--post .categories { box-shadow: none; }
}
@media (max-width: 520px) {
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; }
    .post--full { padding: 20px 16px 26px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* long words and URLs in the doc and comments wrap instead of widening the page */
.doc p, .doc li, .doc blockquote, .doc td, .doc th, .comment__body { overflow-wrap: anywhere; }
.doc pre, .doc-table { max-width: 100%; }
