/* Catalog style "demo7" — the album as an issue: a Fraunces cover masthead, then the posts as two-page spreads on a sideways track with a yellow progress rule; the post page is a feature spread. Mirrors /demo7/. */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..800&family=Hanken+Grotesk:wght@400;500;700&display=swap");

:root {
    --paper: #eef1ee;
    --tone: #e1e7e2;
    --ink: #0f1b14;
    --soft: #46544a;
    --field: #10301f;
    --field-2: #173f2a;
    --on-field: #eef1ee;
    --on-field-soft: #bccbbf;
    --green: #469a58;
    --green-ink: #2f7040;
    --yellow: #ffb500;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Hanken Grotesk", "Lato", system-ui, sans-serif;
    --edge: clamp(16px, 3.6vw, 64px);
    --spread-h: clamp(460px, 62vh, 620px);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); }
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(--green); outline-offset: 3px; }

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

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

/* masthead: the cover of the issue */
.masthead { padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 2.4vw, 32px); border-bottom: 1px solid var(--ink); }
.masthead__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand brand" "tag count"; align-items: end; gap: 18px 40px; }
.brand { grid-area: brand; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; text-decoration: none; }
.brand__mark {
    font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: clamp(96px, 21vw, 340px);
    line-height: 0.74; letter-spacing: -0.045em; color: var(--field); margin-left: -0.04em;
}
.brand__name { padding-bottom: 0.4em; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(20px, 2.4vw, 36px); color: var(--soft); white-space: nowrap; }
.masthead__tagline { grid-area: tag; max-width: 52ch; margin: 0; font-size: 18px; color: var(--soft); }
.masthead__count { grid-area: count; margin: 0; font-size: 15px; color: var(--soft); text-align: right; }
.masthead__num { font-family: var(--serif); font-size: 40px; font-weight: 400; color: var(--ink); line-height: 1; margin-right: 6px; }

/* style bar: the green issue bar with its yellow rule */
.stylebar { position: relative; margin: 0; padding: 0; background: var(--field); color: var(--on-field); box-shadow: 0 0 0 100vmax var(--field); clip-path: inset(0 -100vmax); }
.stylebar::before { content: ""; position: absolute; left: 0; top: 0; width: 34%; height: 3px; background: var(--yellow); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 0; }
.stylebar__label { font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--yellow); }
.stylebar__value { flex: 1 1 280px; min-width: 0; padding: 8px 0; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid rgb(238 241 238 / 0.35); color: var(--on-field); }
.stylebar__copy {
    min-height: 44px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink);
    font: 700 15px/1 var(--sans); cursor: pointer; transition: background 220ms ease, color 220ms ease, transform 160ms ease;
}
.stylebar__copy:hover { background: var(--on-field); }
.stylebar__copy:active { transform: scale(0.96); }
.stylebar__copy.is-done { background: var(--green); color: #fff; }
.stylebar :focus-visible { outline-color: var(--yellow); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 2px 18px; width: 100%; padding-top: 4px; border-top: 1px solid rgb(238 241 238 / 0.14); }
.stylebar__item { padding: 6px 0; font-size: 14px; color: var(--on-field-soft); text-decoration: none; font-variant-numeric: tabular-nums; }
.stylebar__item:hover { color: var(--on-field); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 5px; }
.stylebar__item.is-active { color: var(--yellow); font-weight: 700; }

/* categories: the contents line */
.categories { margin: clamp(32px, 4vw, 56px) 0 0; }
.categories__list { display: flex; flex-wrap: wrap; gap: 4px clamp(20px, 3vw, 44px); margin: 0; padding: 0; list-style: none; }
.categories__link {
    display: inline-flex; align-items: baseline; gap: 10px; min-height: 44px; padding-top: 6px;
    font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -0.01em; text-decoration: none;
}
.categories__count { font-family: var(--sans); font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.categories__link:hover { color: var(--green-ink); }
.categories__link.is-active { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--yellow); }

/* listing */
.content { padding: clamp(24px, 3vw, 40px) 0 clamp(64px, 8vw, 120px); }
.listing__header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 40px; margin-bottom: 28px; }
.listing__title { grid-column: 1; margin: 0; font-family: var(--serif); font-weight: 340; font-variation-settings: "opsz" 144; font-size: clamp(48px, 7vw, 112px); line-height: 0.92; letter-spacing: -0.03em; }
.listing__intro { grid-column: 1; max-width: 52ch; margin: 0; color: var(--soft); font-size: 18px; }
.toolbar { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--soft); font-size: 15px; }
.toolbar p { margin: 0; }
.toolbar__range { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink); }
.toolbar__view { display: flex; align-items: center; gap: 2px; }
.toolbar__label { margin-right: 8px; }
.toolbar__opt { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; }
.toolbar__opt:hover { background: var(--tone); }
.toolbar__opt.is-active { background: var(--field); color: var(--on-field); }

/* the track: spreads side by side, turned with the scrollbar, which is the issue's progress rule */
.listing {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(1180px, 86%); gap: clamp(16px, 2vw, 28px);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 0;
    padding-bottom: 22px; scrollbar-color: var(--yellow) var(--tone); scrollbar-width: thin;
}
.listing::-webkit-scrollbar { height: 6px; }
.listing::-webkit-scrollbar-track { background: var(--tone); }
.listing::-webkit-scrollbar-thumb { background: var(--yellow); }
.post--card {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); height: var(--spread-h);
    scroll-snap-align: start; background: var(--paper); box-shadow: inset 0 0 0 1px var(--tone);
}
.post--card::after { content: ""; position: absolute; top: 0; bottom: 0; left: 53.5%; width: 26px; translate: -50% 0; background: linear-gradient(90deg, transparent, rgb(15 27 20 / 0.10), transparent); pointer-events: none; }
.post--card .post__media { display: block; height: 100%; overflow: hidden; background: var(--tone); }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 1200ms cubic-bezier(.2, .7, .2, 1); }
.post--card:hover .post__thumb { transform: scale(1.04) translateX(-1%); }
.post--card .post__body { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 3.4vw, 56px) clamp(24px, 3vw, 52px) clamp(48px, 4vw, 64px); min-width: 0; }
.post--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.post--even::after { left: 46.5%; }
.post--even .post__media { order: 2; }
.post--even .post__body { background: var(--field); color: var(--on-field); }
.post__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 18px; color: var(--soft); font-size: 15px; }
.post--even .post__meta, .post--even .post__excerpt { color: var(--on-field-soft); }
.post__num { order: 9; }
.post--card .post__num { position: absolute; bottom: 18px; right: 24px; font-family: var(--serif); font-size: 15px; font-style: italic; }
.post__cat { color: var(--green-ink); font-weight: 700; text-decoration: none; }
.post--even .post__cat { color: var(--yellow); }
.post__cat:hover { text-decoration: underline; text-underline-offset: 4px; }
.post__title { margin: 0 0 18px; font-family: var(--serif); font-weight: 360; font-variation-settings: "opsz" 144; font-size: clamp(40px, 4.4vw, 76px); line-height: 0.96; letter-spacing: -0.025em; text-wrap: balance; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--green); }
.post--even .post__title a:hover { text-decoration-color: var(--yellow); }
.post__excerpt { max-width: 44ch; margin: 0 0 24px; color: var(--soft); font-size: 17px; }
.post__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: auto 0 0; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font: 700 16px/1.2 var(--sans);
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; text-decoration-color: var(--green);
    transition: color 200ms ease, background 220ms ease, text-underline-offset 200ms ease, transform 160ms ease;
}
.btn:hover { color: var(--green-ink); text-underline-offset: 10px; }
.btn--primary { padding: 0 28px; border-radius: 999px; background: var(--yellow); color: var(--ink); text-decoration: none; }
.btn--primary:hover { background: var(--field); color: var(--on-field); }
.btn--primary:active { transform: scale(0.96); }
.post--even .btn { text-decoration-color: var(--yellow); }
.post--even .btn:hover { color: var(--yellow); }
.post--even .btn--primary:hover { background: var(--on-field); color: var(--field); }
.post--even :focus-visible { outline-color: var(--yellow); }

.pager { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-top: clamp(32px, 4vw, 56px); padding-top: 18px; border-top: 1px solid var(--ink); }
.pager__link { min-width: 32px; min-height: 44px; padding-top: 8px; font-family: var(--serif); font-size: 24px; text-align: center; text-decoration: none; font-variant-numeric: tabular-nums; }
.pager__link:hover { color: var(--green-ink); }
.pager__link.is-active { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.pager__link--prev, .pager__link--next { font-style: italic; }
.pager__link--next { margin-left: auto; }

/* one post: a feature spread, then the photo page, then the article */
.post--full { max-width: 1400px; margin: 0 auto; }
.post--full .post__header {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "title meta" "title excerpt" "title actions";
    align-content: start; margin-bottom: clamp(24px, 3vw, 40px); background: var(--paper); box-shadow: inset 0 0 0 1px var(--tone);
}
.post--full .post__title {
    grid-area: title; margin: 0; padding: clamp(32px, 5vw, 80px) clamp(24px, 4vw, 64px); background: var(--field); color: var(--on-field);
    font-size: clamp(52px, 7.6vw, 140px); line-height: 0.9; display: flex; align-items: flex-end; min-height: clamp(320px, 42vw, 560px);
}
.post--full .post__meta { grid-area: meta; padding: clamp(28px, 4vw, 64px) clamp(24px, 4vw, 64px) 0; margin: 0 0 18px; }
.post--full .post__num { font-family: var(--serif); font-style: italic; color: var(--ink); }
.post--full .post__excerpt { grid-area: excerpt; padding: 0 clamp(24px, 4vw, 64px); font-family: var(--serif); font-weight: 340; font-size: clamp(22px, 2vw, 30px); line-height: 1.3; color: var(--ink); max-width: none; }
.post--full .post__actions { grid-area: actions; padding: 0 clamp(24px, 4vw, 64px) clamp(28px, 4vw, 56px); }
.post__shot { margin: 0 0 clamp(40px, 5vw, 72px); }
.post__zoom { display: block; max-height: min(780px, 80vh); overflow: hidden; background: var(--tone); cursor: zoom-in; }
.post__zoom img { width: 100%; transition: transform 1200ms cubic-bezier(.2, .7, .2, 1); }
.post__zoom:hover img { transform: scale(1.02); }
.post__caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--ink); color: var(--soft); font-size: 14px; font-style: italic; font-family: var(--serif); }

.doc { overflow-wrap: anywhere; max-width: 68ch; margin: 0 auto; font-size: 18px; line-height: 1.65; }
.doc > h2:first-child + p::first-letter { float: left; margin: 0.06em 0.1em 0 0; font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 144; font-size: 4.1em; line-height: 0.8; color: var(--field); }
.doc h2, .doc h3 { margin: 56px 0 14px; font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 144; font-size: clamp(32px, 3.2vw, 48px); line-height: 1; letter-spacing: -0.02em; }
.doc > h2:first-child { margin-top: 0; }
.doc h4, .doc h5, .doc h6 { margin: 28px 0 8px; font-size: 19px; font-weight: 700; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--green); }
.doc a { color: var(--green-ink); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.doc a:hover { color: var(--ink); text-decoration-color: var(--yellow); }
.doc code { padding: 1px 6px; background: var(--tone); border-radius: 3px; overflow-wrap: anywhere; }
.doc pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; background: var(--field); color: var(--on-field); }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 28px 0; padding: 0 0 0 clamp(18px, 3vw, 36px); border-left: 3px solid var(--yellow); font-family: var(--serif); font-weight: 340; font-size: 1.06em; line-height: 1.5; color: var(--ink); }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc hr { margin: 40px auto; width: 120px; border: 0; border-top: 1px solid var(--ink); }
.doc-table { margin: 0 0 22px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.doc th, .doc td { padding: 10px 14px 10px 0; border-bottom: 1px solid #c4cdc6; text-align: left; vertical-align: top; }
.doc th { border-bottom: 1px solid var(--ink); font-family: var(--serif); font-weight: 500; font-size: 18px; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; max-width: 68ch; margin: 48px auto 0; padding: 0; list-style: none; }
.tags__item { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--soft); }
.tags__item::before { content: "#"; color: var(--green); margin-right: 1px; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(56px, 7vw, 104px); border-top: 1px solid var(--ink); }
.post__nav-link { padding: 24px 0; font-family: var(--serif); font-weight: 360; font-size: clamp(26px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.015em; text-decoration: none; }
.post__nav-link:hover { color: var(--green-ink); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 8px; font-family: var(--sans); font-size: 15px; color: var(--soft); }

.notice { max-width: 60ch; padding: 28px 32px; background: var(--field); color: var(--on-field); font-family: var(--serif); font-size: 22px; line-height: 1.4; }
.notice p { margin: 0; }
.notice a { color: var(--yellow); }
.notice a:focus-visible { outline-color: var(--yellow); }
.notice--error { background: #5b1d17; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 24px 0 40px; border-top: 1px solid var(--ink); color: var(--soft); font-size: 14px; }
.colophon p { margin: 0; }
.colophon a { color: var(--green-ink); text-underline-offset: 4px; }

/* screenshot dialog */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.zoom::backdrop { background: rgb(16 48 31 / 0.88); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 12px; background: var(--field); border-bottom: 3px solid var(--yellow); }
.zoom__close { min-height: 40px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 700 15px/1 var(--sans); cursor: pointer; }
.zoom__close:focus-visible { outline-color: var(--on-field); }
.zoom__scroll { height: calc(94vh - 63px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 900px) {
    .listing { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; scroll-snap-type: none; padding-bottom: 0; gap: 28px; }
    .post--card, .post--even { grid-template-columns: minmax(0, 1fr); height: auto; }
    .post--card::after { display: none; }
    .post--card .post__media { aspect-ratio: 4 / 3; height: auto; }
    .post--even .post__media { order: 0; }
    .post--full .post__header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "meta" "excerpt" "actions"; }
    .post--full .post__title { min-height: 0; padding-top: 72px; }
    .listing__header { grid-template-columns: minmax(0, 1fr); }
    .toolbar { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .masthead__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "tag" "count"; }
    .masthead__count { text-align: left; }
    .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
    .brand__name { padding: 0; }
    .stylebar__copy { flex: 1 0 100%; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; text-align: left; border-top: 1px solid #c4cdc6; }
    .post__caption { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !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%; }
