/* Catalog style "demo16" — the album as an open DEPO issue: every post a two-page spread on deep green, Playfair Display and paper. Mirrors /demo16/. */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Hanken+Grotesk:wght@400;500;600;700&display=swap");

:root {
    --deep: #0e2619;
    --field: #15382a;
    --green: #469a58;
    --paper: #eeeeea;
    --paper-2: #e1e2dc;
    --ink: #13201a;
    --soft: #56625a;
    --yellow: #ffb500;
    --on-deep: rgb(238 238 234 / 0.78);
    --serif: "Playfair Display", Georgia, serif;
    --sans: "Hanken Grotesk", system-ui, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --edge: clamp(16px, 3.4vw, 56px);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--deep); color: var(--paper); font: 400 16px/1.6 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 500 0.86em/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 16px; background: var(--yellow); color: var(--ink); border-radius: 999px; font-weight: 600; }
.skip:focus { left: 16px; }

.page { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 var(--edge); }

/* decoration: a faint vertical gutter line down the middle of the page, like an open issue */
.deco { display: none; }
.catalog--list .deco--1 {
    display: block; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; pointer-events: none;
    background: linear-gradient(rgb(238 238 234 / 0), rgb(238 238 234 / 0.08) 20%, rgb(238 238 234 / 0.08) 80%, rgb(238 238 234 / 0));
}

/* ── masthead: the cover line ─────────────────────────────────────────────────────────────── */
.masthead { padding: clamp(40px, 7vw, 88px) 0 28px; text-align: center; }
.masthead__inner { display: flex; flex-direction: column; align-items: center; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.brand__mark { font: 900 clamp(84px, 17vw, 216px)/0.82 var(--serif); letter-spacing: -0.035em; color: var(--yellow); }
.brand__name { margin-top: 14px; font: 400 italic clamp(24px, 3vw, 36px)/1.1 var(--serif); color: var(--paper); }
.masthead__tagline { max-width: 40ch; margin: 18px auto 0; color: var(--on-deep); font-size: 17px; }
.masthead__count { margin: 10px 0 0; font: 400 italic 17px/1.3 var(--serif); color: var(--on-deep); }
.masthead__num { color: var(--paper); font-style: normal; font-weight: 600; }

/* ── style bar: a slim ruled strip ────────────────────────────────────────────────────────── */
.stylebar { margin: 12px 0 0; padding: 14px 0; border-top: 1px solid rgb(238 238 234 / 0.18); border-bottom: 1px solid rgb(238 238 234 / 0.18); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.stylebar__label { font: 400 italic 17px/1 var(--serif); color: var(--on-deep); }
.stylebar__value { flex: 1 1 260px; min-width: 0; padding: 9px 14px; overflow-x: auto; white-space: nowrap; background: var(--field); color: var(--paper); border-radius: 4px; }
.stylebar__copy { min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 600 15px/1 var(--sans); cursor: pointer; transition: background 200ms ease; }
.stylebar__copy:hover { background: var(--paper); }
.stylebar__copy.is-done { background: var(--green); color: #fff; }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; }
.stylebar__item { font: 400 italic 15px/1.8 var(--serif); color: var(--on-deep); text-decoration: none; }
.stylebar__item:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.stylebar__item.is-active { color: var(--yellow); }

/* ── categories: "In this issue" ──────────────────────────────────────────────────────────── */
.categories { margin: 34px 0 0; }
.categories__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.categories__item + .categories__item::before { content: "·"; padding: 0 14px; color: rgb(238 238 234 / 0.4); }
.categories__item { display: flex; align-items: center; }
.categories__link { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 0; font: 500 clamp(18px, 2vw, 22px)/1.2 var(--serif); text-decoration: none; }
.categories__link:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 6px; }
.categories__link.is-active { font-style: italic; color: var(--yellow); }
.categories__count { font: 500 13px/1 var(--sans); color: var(--on-deep); }

/* ── listing header ───────────────────────────────────────────────────────────────────────── */
.content { padding: 28px 0 80px; }
.listing__header { margin: 0 auto 44px; text-align: center; }
.listing__title { margin: 0; font: 500 clamp(40px, 5.2vw, 76px)/1 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.listing__intro { max-width: 52ch; margin: 14px auto 0; color: var(--on-deep); font-size: 17px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 28px; margin-top: 22px; }
.toolbar p { margin: 0; }
.toolbar__range { font: 400 italic 17px/1.3 var(--serif); color: var(--on-deep); }
.toolbar__view { display: flex; align-items: center; gap: 6px; }
.toolbar__label { margin-right: 6px; font-size: 14px; color: var(--on-deep); }
.toolbar__opt { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgb(238 238 234 / 0.32); border-radius: 50%; font-size: 14px; font-weight: 600; text-decoration: none; transition: background 200ms ease, color 200ms ease, border-color 200ms ease; }
.toolbar__opt:hover { border-color: var(--yellow); }
.toolbar__opt.is-active { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* ── the list: one open spread per post ───────────────────────────────────────────────────── */
.listing { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 96px); max-width: 1120px; margin: 0 auto; }
.post--card {
    position: relative; display: grid; grid-template-columns: 1fr 1fr; perspective: 2400px;
    filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.38));
}
/* page edges: the stacked leaves either side of the spread */
.post--card::before, .post--card::after {
    content: ""; position: absolute; top: 4px; bottom: 4px; width: 8px; z-index: -1;
    background: repeating-linear-gradient(90deg, var(--paper-2) 0 1px, #c9cbc3 1px 2px);
}
.post--card::before { left: -6px; border-radius: 3px 0 0 3px; }
.post--card::after { right: -6px; border-radius: 0 3px 3px 0; }
.post--even .post__media { order: 2; }

.post__media {
    position: relative; display: block; min-height: 100%; aspect-ratio: 4 / 3; overflow: hidden;
    background: var(--paper-2); border-radius: 3px 0 0 3px;
    transform-origin: right center; transition: transform 700ms var(--ease);
}
.post--even .post__media { border-radius: 0 3px 3px 0; transform-origin: left center; }
.post__media::after { /* the fold shading at the gutter */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgb(0 0 0 / 0) 82%, rgb(0 0 0 / 0.28));
}
.post--even .post__media::after { background: linear-gradient(270deg, rgb(0 0 0 / 0) 82%, rgb(0 0 0 / 0.28)); }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.post--card:hover .post__media { transform: rotateY(5deg); }
.post--even.post--card:hover .post__media { transform: rotateY(-5deg); }

.post__body {
    position: relative; display: flex; flex-direction: column; padding: clamp(24px, 4vw, 48px) clamp(22px, 4vw, 48px) 56px;
    background: linear-gradient(90deg, var(--paper-2), var(--paper) 14%); color: var(--ink); border-radius: 0 3px 3px 0;
}
.post--even .post__body { background: linear-gradient(270deg, var(--paper-2), var(--paper) 14%); border-radius: 3px 0 0 3px; }
.post__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 18px; font-size: 14px; color: var(--soft); }
/* the number becomes the folio at the foot of the page */
.post--card .post__num { position: absolute; left: clamp(22px, 4vw, 48px); right: clamp(22px, 4vw, 48px); bottom: 20px; display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid #cfd1c9; font: 500 13px/1 var(--sans); letter-spacing: 0.04em; color: var(--soft); }
.post--card .post__num::after { content: "DEPO"; }
.post__cat { font: 400 italic 17px/1.2 var(--serif); color: var(--field); text-decoration: none; }
.post__cat:hover { text-decoration: underline; text-underline-offset: 4px; }
.post__date { font-size: 14px; }
.post__title { margin: 0 0 18px; font: 500 clamp(32px, 3.6vw, 52px)/1 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.post__excerpt { margin: 0 0 24px; font: 400 17px/1.6 var(--serif); color: #2a3530; text-wrap: pretty; }
.post--card .post__excerpt::first-letter { float: left; margin: 6px 10px 0 0; font: 500 64px/0.8 var(--serif); color: var(--field); }
.post__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: auto 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none; transition: background 220ms ease, color 220ms ease; }
.btn--primary { background: var(--deep); color: var(--paper); }
.btn--primary:hover { background: var(--field); }
.post__more { min-height: 44px; padding: 0; border-radius: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.post__more:hover { text-decoration-thickness: 2px; text-decoration-color: var(--green); }

/* ── pager: the turn buttons under the book ───────────────────────────────────────────────── */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 64px; }
.pager__link { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 999px; font: 500 18px/1 var(--serif); text-decoration: none; color: var(--on-deep); }
.pager__link:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--yellow); }
.pager__link.is-active { color: var(--yellow); font-style: italic; }
.pager__link--prev, .pager__link--next { padding: 0 20px; border: 1px solid rgb(238 238 234 / 0.32); font: 600 14px/1 var(--sans); color: var(--paper); }
.pager__link--prev::before { content: "← "; white-space: pre; }
.pager__link--next::after { content: " →"; white-space: pre; }
.pager__link--prev:hover, .pager__link--next:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); text-decoration: none; }

/* ── one post: a plate on the left, the text page on the right ────────────────────────────── */
.post--full { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1120px; margin: 0 auto; }
.post--full .post__header { max-width: 860px; margin: 0 auto; padding: 8px 0 44px; text-align: center; }
.post--full .post__meta { justify-content: center; color: var(--on-deep); }
.post--full .post__num { color: var(--yellow); font: 400 italic 17px/1.2 var(--serif); }
.post--full .post__cat { color: var(--paper); }
.post--full .post__title { margin-bottom: 20px; font-size: clamp(48px, 7.4vw, 104px); line-height: 0.96; letter-spacing: -0.03em; }
.post--full .post__excerpt { max-width: 56ch; margin: 0 auto 28px; font-size: 19px; color: var(--on-deep); }
.post--full .post__actions { justify-content: center; }
.post--full .btn--primary { background: var(--yellow); color: var(--ink); }
.post--full .btn--primary:hover { background: var(--paper); }
.post--full .post__back { min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: 7px; }
.post--full .post__back:hover { text-decoration-color: var(--yellow); }

.post__shot { margin: 0 auto 0; width: 100%; padding: 14px; background: var(--paper); border-radius: 3px 3px 0 0; }
.post__zoom { display: block; max-height: 760px; overflow: hidden; cursor: zoom-in; }
.post__zoom img { width: 100%; }
.post__caption { margin: 12px 4px 0; font: 400 italic 15px/1.4 var(--serif); color: var(--soft); text-align: center; }

.doc {
    position: relative; padding: clamp(28px, 6vw, 72px) clamp(20px, 8vw, 120px) clamp(48px, 7vw, 80px);
    background: linear-gradient(var(--paper-2), var(--paper) 40px); color: var(--ink); border-radius: 0 0 3px 3px;
    font: 400 18px/1.65 var(--serif);
    box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.45);
}
.doc > * { max-width: 760px; margin-left: auto; margin-right: auto; }
/* docs write "## Section", which the renderer prints as <h3>: h2 and h3 are both section heads */
.doc h2, .doc h3 { margin-top: 56px; margin-bottom: 14px; font: 500 clamp(30px, 3.4vw, 44px)/1.05 var(--serif); letter-spacing: -0.02em; }
.doc h2:first-child, .doc h3:first-child { margin-top: 0; }
.doc h3 + p::first-letter { float: left; margin: 6px 10px 0 0; font: 500 66px/0.8 var(--serif); color: var(--field); }
.doc h4 { margin: 34px auto 8px; font: 500 italic 24px/1.2 var(--serif); }
.doc h5, .doc h6 { margin: 24px auto 6px; font: 600 16px/1.3 var(--sans); }
.doc p, .doc ul, .doc ol { margin-top: 0; margin-bottom: 16px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--green); }
.doc strong { font-weight: 700; }
.doc a { color: var(--field); text-decoration-color: var(--green); text-underline-offset: 3px; }
.doc a:hover { text-decoration-thickness: 2px; }
.doc code { padding: 1px 6px; background: var(--paper-2); border-radius: 3px; font-size: 0.8em; overflow-wrap: anywhere; }
.doc pre { margin-bottom: 20px; padding: 18px 20px; overflow-x: auto; background: var(--deep); color: var(--paper); border-radius: 4px; }
.doc pre code { padding: 0; background: none; font-size: 14px; overflow-wrap: normal; }
.doc blockquote { margin-top: 0; margin-bottom: 20px; padding: 2px 0 2px 22px; border-left: 3px solid var(--yellow); font-style: italic; color: #2a3530; }
.doc blockquote p { margin-bottom: 8px; }
.doc hr { margin: 36px auto; border: 0; border-top: 1px solid #cfd1c9; }
.doc-table { margin-bottom: 20px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font: 400 15px/1.5 var(--sans); }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid #cfd1c9; text-align: left; vertical-align: top; }
.doc th { font: 400 italic 16px/1.3 var(--serif); color: var(--soft); border-bottom-color: var(--ink); }
.doc td code { overflow-wrap: anywhere; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin: 40px 0 0; padding: 0; list-style: none; }
.tags__item { font: 400 italic 17px/1.6 var(--serif); color: var(--on-deep); }
.tags__item + .tags__item::before { content: "·"; padding: 0 12px; color: rgb(238 238 234 / 0.4); font-style: normal; }

.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.post__nav-link { display: block; padding: 22px 0; border-top: 1px solid rgb(238 238 234 / 0.24); font: 500 clamp(22px, 2.4vw, 30px)/1.15 var(--serif); text-decoration: none; }
.post__nav-link:hover { border-top-color: var(--yellow); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 6px; font: 500 14px/1 var(--sans); color: var(--on-deep); }
.post__nav-link--newer .post__nav-label::before { content: "← "; }
.post__nav-link--older .post__nav-label::after { content: " →"; }

/* ── notice, colophon ─────────────────────────────────────────────────────────────────────── */
.notice { max-width: 640px; margin: 0 auto; padding: 32px 36px; background: var(--paper); color: var(--ink); border-radius: 3px; font: 400 19px/1.5 var(--serif); text-align: center; box-shadow: 0 30px 50px -24px rgb(0 0 0 / 0.5); }
.notice p { margin: 0; }
.notice a { color: var(--field); text-underline-offset: 4px; }
.notice--error { border-top: 4px solid #b3261e; color: #7d1a14; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 0 44px; border-top: 1px solid rgb(238 238 234 / 0.18); color: var(--on-deep); font: 400 italic 16px/1.4 var(--serif); }
.colophon p { margin: 0; }
.colophon code { font-style: normal; color: var(--paper); }
.colophon a { text-decoration-color: var(--yellow); text-underline-offset: 4px; }

/* ── screenshot dialog ────────────────────────────────────────────────────────────────────── */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 4px; background: var(--deep); color: var(--paper); }
.zoom::backdrop { background: rgb(6 18 11 / 0.88); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--deep); }
.zoom__close { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 600 15px/1 var(--sans); cursor: pointer; }
.zoom__scroll { height: calc(94vh - 64px); overflow: auto; }
.zoom__img { width: 100%; }

/* ── phones: single pages, one under the other ────────────────────────────────────────────── */
@media (max-width: 760px) {
    .catalog--list .deco--1 { display: none; }
    .post--card { grid-template-columns: 1fr; perspective: none; }
    .post--card::before, .post--card::after { display: none; }
    .post--even .post__media { order: 0; }
    .post__media, .post--even .post__media { border-radius: 3px 3px 0 0; }
    .post__media::after, .post--even .post__media::after { background: linear-gradient(180deg, rgb(0 0 0 / 0) 80%, rgb(0 0 0 / 0.18)); }
    .post__body, .post--even .post__body { background: var(--paper); border-radius: 0 0 3px 3px; }
    .post--card:hover .post__media, .post--even.post--card:hover .post__media { transform: none; }
    .post__shot { padding: 8px; }
    .doc { font-size: 17px; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; }
    .categories__list { gap: 0 18px; }
    .categories__item + .categories__item::before { content: none; }
}
@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%; }
