/* Catalog style "demo40" — the album as a premium newsstand at dusk: warm lamp light, walnut shelves with brass lips, every screenshot standing on its own shelf. Mirrors /demo40/. */
/*
 * Layout: the masthead is a lit kiosk sign (Cormorant Garamond, a glowing lamp dot); the style bar
 * is a walnut counter; the list is a three-column stand where each thumbnail stands on a walnut
 * ledge that carries its number and section like a shelf label, the text sits under the ledge.
 * A post is one shelf: the screenshot on a ledge, the doc set as a warm reading page.
 */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Lato:wght@400;700&family=Poppins:wght@500;600&display=swap");

:root {
    --bg: #17130f;
    --bg-2: #1f1913;
    --lamp: #f2b45a;
    --lamp-soft: rgb(242 180 90 / 0.14);
    --brass: #c99a5b;
    --warm: #f6efe4;
    --muted: #bfb09c;
    --line: rgb(201 154 91 / 0.25);
    --walnut: #3d2b1f;
    --walnut-2: #5a3f2c;
    --walnut-3: #2a1d15;
    --paper: #efe4d0;
    --ink: #241b14;
    --serif: "Cormorant Garamond", Georgia, serif;
    --label: "Poppins", system-ui, sans-serif;
    --body: "Lato", system-ui, sans-serif;
    --ledge: linear-gradient(180deg, #e2b878 0 2px, #8a6440 2px 3px, var(--walnut-2) 3px, var(--walnut) 60%, var(--walnut-3));
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
    margin: 0; overflow-x: hidden; color: var(--warm); font: 400 16px/1.6 var(--body);
    background:
        radial-gradient(70% 40% at 50% 0%, rgb(242 180 90 / 0.12), transparent 70%),
        radial-gradient(50% 30% at 10% 60%, rgb(70 154 88 / 0.08), transparent 70%),
        var(--bg);
    background-attachment: fixed;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 400 0.88em/1.45 ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
::selection { background: var(--lamp); color: var(--ink); }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 30; padding: 10px 18px; border-radius: 999px; background: var(--lamp); color: var(--ink); font: 600 14px/1.2 var(--label); text-decoration: none; }
.skip:focus { left: 16px; }
.deco { display: none; }
.page { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* masthead: the lit kiosk sign */
.masthead { position: relative; padding: 64px 0 34px; text-align: center; }
.masthead::before { content: ""; position: absolute; left: 50%; top: 0; width: min(560px, 80%); height: 18px; transform: translateX(-50%); border-radius: 0 0 50% 50%; background: linear-gradient(180deg, #ffd79a, transparent); filter: blur(7px); opacity: 0.8; }
.masthead__inner { display: grid; justify-items: center; gap: 16px; }
.brand { display: grid; justify-items: center; gap: 10px; text-decoration: none; }
.brand__mark { font: 500 clamp(64px, 11vw, 140px)/0.85 var(--serif); letter-spacing: 0.02em; color: var(--warm); text-shadow: 0 0 40px rgb(242 180 90 / 0.25); }
.brand__name { display: inline-flex; align-items: center; gap: 12px; font: 600 12px/1 var(--label); letter-spacing: 0.3em; text-transform: uppercase; color: var(--lamp); }
.brand__name::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 4px rgb(242 180 90 / 0.18), 0 0 18px 5px rgb(242 180 90 / 0.5); }
.masthead__tagline { max-width: 52ch; margin: 0; color: var(--muted); font: 500 italic 21px/1.4 var(--serif); }
.masthead__count { margin: 0; font: 600 11px/1 var(--label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.masthead__num { color: var(--warm); font: 500 26px/1 var(--serif); letter-spacing: 0; margin-right: 6px; }

/* style bar: the walnut counter */
.stylebar { position: relative; margin: 8px 0 0; padding: 20px 22px 18px; border-radius: 4px; background: var(--ledge), var(--walnut); box-shadow: 0 26px 40px -20px rgb(0 0 0 / 0.9); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.stylebar__label { font: 600 11px/1 var(--label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--lamp); }
.stylebar__value { flex: 1 1 280px; min-width: 0; padding: 9px 14px; overflow-x: auto; white-space: nowrap; border-radius: 3px; background: rgb(0 0 0 / 0.3); color: var(--warm); }
.stylebar__copy { min-height: 42px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--lamp); color: var(--ink); font: 600 14px/1 var(--label); cursor: pointer; box-shadow: 0 8px 26px -10px rgb(242 180 90 / 0.8); }
.stylebar__copy:hover { background: #ffc877; }
.stylebar__copy.is-done { background: var(--paper); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding-top: 8px; border-top: 1px dashed rgb(246 239 228 / 0.16); }
.stylebar__item { padding: 4px 11px; border: 1px solid rgb(246 239 228 / 0.18); border-radius: 999px; font: 500 12.5px/1.4 var(--label); text-decoration: none; color: rgb(246 239 228 / 0.8); }
.stylebar__item:hover { border-color: var(--lamp); color: var(--lamp); }
.stylebar__item.is-active { background: var(--lamp); border-color: var(--lamp); color: var(--ink); }
.stylebar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: 100%; font-size: 14px; }
.stylebar__tools a, .stylebar__upload-toggle { color: var(--lamp); cursor: pointer; }

/* categories: brass-rimmed signs */
.categories { margin: 34px 0 8px; }
.categories__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.categories__link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font: 500 13px/1 var(--label); letter-spacing: 0.04em; text-decoration: none; color: var(--warm); }
.categories__link:hover { border-color: var(--lamp); color: var(--lamp); }
.categories__link.is-active { background: var(--lamp); border-color: var(--lamp); color: var(--ink); }
.categories__count { font-size: 11px; opacity: 0.7; }

/* list */
.content { padding: 28px 0 80px; }
.listing__header { margin-bottom: 44px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.listing__title { margin: 0; font: 500 clamp(44px, 6vw, 84px)/0.95 var(--serif); }
.listing__intro { max-width: 60ch; margin: 10px 0 0; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font: 500 13px/1.4 var(--label); }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 6px; }
.toolbar__label { margin-right: 6px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 11px; }
.toolbar__opt { min-width: 34px; padding: 5px 9px; border-radius: 999px; text-align: center; text-decoration: none; }
.toolbar__opt.is-active { background: var(--lamp); color: var(--ink); }

.listing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 72px clamp(24px, 3vw, 44px); }
.post--card { position: relative; display: flex; flex-direction: column; }
.post--card::before { content: ""; position: absolute; inset: -34px 4% auto; height: 60%; z-index: -1; background: radial-gradient(60% 70% at 50% 0%, var(--lamp-soft), transparent 75%); pointer-events: none; }
.post__media { display: block; padding: 0 7%; }
.post__thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 2px; box-shadow: 0 20px 30px -16px rgb(0 0 0 / 0.95), 0 0 0 1px rgb(255 255 255 / 0.05); transform-origin: 50% 100%; transition: transform 0.5s cubic-bezier(.2, .7, .2, 1); }
.post--odd .post__thumb { transform: rotate(-0.8deg); }
.post--even .post__thumb { transform: rotate(0.8deg); }
.post--card:hover .post__thumb { transform: translateY(-10px) rotate(0deg); }
.post__body { display: flex; flex: 1; flex-direction: column; }
/* the shelf ledge: number and section as its label */
.post--card .post__meta { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: -4px 0 0; padding: 14px 18px 12px; border-radius: 3px; background: var(--ledge), var(--walnut); box-shadow: 0 22px 34px -16px rgb(0 0 0 / 0.95); font: 600 10.5px/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: rgb(246 239 228 / 0.65); }
.post__num { color: var(--lamp); }
.post__cat { text-decoration: none; }
.post__cat:hover { color: var(--lamp); }
.post__date { margin-left: auto; }
.post--card .post__title { margin: 22px 4px 8px; font: 500 30px/1.05 var(--serif); }
.post__title a { text-decoration: none; }
.post__title a:hover { color: var(--lamp); }
.post--card .post__excerpt { margin: 0 4px 20px; color: var(--muted); font-size: 15px; }
.post__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: auto 4px 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 18px; border: 1px solid rgb(201 154 91 / 0.5); border-radius: 999px; font: 600 13px/1 var(--label); text-decoration: none; color: var(--warm); }
.btn:hover { border-color: var(--lamp); color: var(--lamp); }
.btn--primary { background: var(--lamp); border-color: var(--lamp); color: var(--ink); }
.btn--primary:hover { background: #ffc877; color: var(--ink); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 64px; }
.pager__link { min-width: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; text-align: center; text-decoration: none; font: 500 14px/1 var(--label); }
.pager__link:hover { border-color: var(--lamp); }
.pager__link.is-active { background: var(--lamp); border-color: var(--lamp); color: var(--ink); }

/* one post: one shelf + a warm reading page */
.post--full { max-width: 1000px; margin: 0 auto; }
.post__header { padding: 16px 0 34px; text-align: center; }
.post--full .post__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0 0 16px; font: 600 11px/1.3 var(--label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.post--full .post__date { margin-left: 0; }
.post--full .post__title { margin: 0; font: 500 clamp(48px, 7vw, 96px)/0.95 var(--serif); }
.post--full .post__excerpt { max-width: 60ch; margin: 18px auto 24px; color: var(--muted); font: 500 italic 21px/1.45 var(--serif); }
.post--full .post__actions { justify-content: center; }
.post__shot { margin: 0 0 56px; }
.post__zoom { display: block; max-height: 720px; overflow: hidden; padding: 0; border: 0; border-radius: 2px; background: none; cursor: zoom-in; box-shadow: 0 30px 50px -20px rgb(0 0 0 / 0.95); }
.post__zoom img { width: 100%; }
.post__shot::after { content: ""; display: block; height: 16px; margin: -2px -3% 0; border-radius: 3px; background: var(--ledge); box-shadow: 0 22px 34px -16px rgb(0 0 0 / 0.95); }
.post__caption { margin-top: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.doc { padding: clamp(24px, 5vw, 56px); border-radius: 6px; background: linear-gradient(170deg, var(--paper), #e6d8bf); color: var(--ink); font-size: 17px; box-shadow: 0 30px 50px -30px rgb(0 0 0 / 0.9); }
.doc h2 { margin: 44px 0 12px; font: 600 34px/1.1 var(--serif); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 30px 0 8px; font: 600 24px/1.15 var(--serif); }
.doc h4, .doc h5, .doc h6 { margin: 24px 0 6px; font: 600 12px/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc a { color: #7a4d14; text-underline-offset: 3px; }
.doc code { padding: 1px 6px; border-radius: 4px; background: rgb(61 43 31 / 0.1); }
.doc pre { margin: 0 0 18px; padding: 18px 20px; overflow-x: auto; border-radius: 4px; background: var(--walnut-3); color: var(--paper); }
.doc pre code { padding: 0; background: none; }
.doc blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--brass); font: 500 italic 20px/1.45 var(--serif); }
.doc hr { margin: 32px 0; border: 0; border-top: 1px dashed rgb(36 27 20 / 0.3); }
.doc-table { margin: 0 0 18px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 9px 10px; border-bottom: 1px solid rgb(36 27 20 / 0.15); text-align: left; vertical-align: top; }
.doc th { font: 600 11px/1.3 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: #5d4c3c; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 34px 0 0; padding: 0; list-style: none; }
.tags__item { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 12.5px/1.4 var(--label); color: var(--muted); }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.post__nav-link { padding: 18px 20px 16px; border-radius: 3px; background: var(--ledge), var(--walnut); font: 500 24px/1.15 var(--serif); text-decoration: none; box-shadow: 0 22px 34px -18px rgb(0 0 0 / 0.95); }
.post__nav-link:hover { color: var(--lamp); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 4px; font: 600 10.5px/1.3 var(--label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--lamp); }

.notice { padding: 20px 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); }
.notice--error { border-color: #d0694f; color: #f0a58f; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.colophon p { margin: 0; }
.colophon a { color: var(--lamp); }

/* screenshot dialog */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 6px; background: var(--walnut-3); color: var(--warm); }
.zoom::backdrop { background: rgb(12 9 7 / 0.86); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--ledge), var(--walnut); }
.zoom__close { min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--lamp); color: var(--ink); font: 600 14px/1 var(--label); cursor: pointer; }
.zoom__scroll { height: calc(94vh - 58px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 1080px) { .listing { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .listing { grid-template-columns: 1fr; gap: 60px; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; }
    .post__date { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.doc p, .doc li, .doc blockquote, .doc td, .doc th, .comment__body { overflow-wrap: anywhere; }
.doc pre, .doc-table { max-width: 100%; }
