/* Catalog style "demo13" — a luxury publisher's index: cool grey, huge Bodoni rows, a precise Geist, one deep green chapter for the doc. Mirrors /demo13/. */
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..700;1,6..96,400..700&family=Geist:wght@400;500;600&display=swap");

:root {
    --ground: #e3e5e8;
    --paper: #eef0f2;
    --ink: #121315;
    --soft: #4b4f56;
    --rule: #c3c7cd;
    --deep: #0e3221;
    --green: #469a58;
    --mist: #e6eee8;
    --yellow: #ffb500;
    --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
    --sans: "Geist", "Lato", system-ui, sans-serif;
    --edge: clamp(16px, 3vw, 48px);
    --ease: cubic-bezier(.16, 1, .3, 1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.55 var(--sans); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
code { font: 400 0.86em/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; padding: 10px 18px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 600; text-decoration: none; }
.skip:focus { left: 12px; }
.deco { display: none; }

.page { display: flex; flex-direction: column; width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 var(--edge); }

/* ── the ink bar on top (the demo's header sits on a solid ink bar) ────────────────────────── */
.stylebar { order: -1; margin: 0 calc(-1 * var(--edge)); padding: 10px var(--edge); background: var(--ink); color: #eef0f2; }
.stylebar :focus-visible { outline-color: var(--yellow); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.stylebar__label { font-family: var(--serif); font-style: italic; font-size: 18px; }
.stylebar__value { flex: 0 1 auto; min-width: 0; max-width: 100%; padding: 6px 12px; overflow-x: auto; white-space: nowrap; border-radius: 6px; background: #24262a; color: #f4f5f6; font-size: 13px; }
.stylebar__copy { min-height: 36px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 600 14px/1 var(--sans); cursor: pointer; transition: background 250ms ease; }
.stylebar__copy:hover { background: #fff; }
.stylebar__copy.is-done { background: var(--green); color: #fff; }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-left: auto; }
.stylebar__item { display: inline-flex; align-items: center; min-height: 32px; color: #b9bcc2; font-size: 13px; text-decoration: none; }
.stylebar__item:hover { color: #fff; }
.stylebar__item.is-active { color: var(--yellow); }

/* ── masthead: a title page ────────────────────────────────────────────────────────────────── */
.masthead { padding: clamp(48px, 7vw, 112px) 0 clamp(28px, 3vw, 44px); }
.masthead__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 72px); align-items: end; }
.brand { grid-row: span 2; display: block; text-decoration: none; }
.brand__mark { display: block; font: 400 clamp(84px, 13vw, 232px)/0.84 var(--serif); font-optical-sizing: auto; letter-spacing: -0.035em; }
.brand__name { display: block; margin: 0.12em 0 0 0.6em; font: italic 400 clamp(36px, 5vw, 88px)/0.95 var(--serif); letter-spacing: -0.02em; }
.masthead__tagline { margin: 0; max-width: 34ch; font: 400 clamp(22px, 1.9vw, 30px)/1.3 var(--serif); }
.masthead__count { margin: 0; color: var(--soft); font-size: 15px; }
.masthead__num { color: var(--ink); font: italic 500 22px/1 var(--serif); }

/* ── categories: the Magazines / People / Roles switch ─────────────────────────────────────── */
.categories { margin: 0 0 8px; padding-top: 20px; border-top: 1px solid var(--ink); }
.categories__list { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 4px; border-radius: 999px; background: #d4d7db; list-style: none; }
.categories__link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; transition: background 250ms ease, color 250ms ease; }
.categories__link:hover { background: var(--paper); }
.categories__link.is-active { background: var(--ink); color: #fff; }
.categories__count { color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.categories__link.is-active .categories__count { color: #b9bcc2; }

/* ── the index ─────────────────────────────────────────────────────────────────────────────── */
.content { padding: clamp(40px, 5vw, 72px) 0 96px; }
.listing__header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; margin-bottom: 28px; }
.listing__title { margin: 0; font: 400 clamp(48px, 6vw, 112px)/0.95 var(--serif); letter-spacing: -0.03em; }
.listing__intro { grid-column: 1; margin: 0; max-width: 46ch; color: var(--soft); }
.toolbar { grid-column: 2; grid-row: 1 / span 2; align-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--soft); font-size: 14px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 2px; }
.toolbar__label { margin-right: 8px; }
.toolbar__opt { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; border-radius: 999px; text-decoration: none; font-variant-numeric: tabular-nums; }
.toolbar__opt:hover { background: var(--paper); color: var(--ink); }
.toolbar__opt.is-active { background: var(--ink); color: #fff; }

.listing { border-bottom: 1px solid var(--rule); }
.post--card {
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 15vw, 260px);
    grid-template-areas: "body media"; gap: clamp(16px, 3vw, 48px); align-items: center;
    padding: clamp(22px, 2.4vw, 36px) 0; border-top: 1px solid var(--rule);
    transition: opacity 400ms ease;
}
.listing:has(.post--card:hover) .post--card:not(:hover) { opacity: 0.42; }
.post__media { grid-area: media; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; background: var(--rule); }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.06); filter: grayscale(0.85) contrast(1.05); transition: transform 1200ms var(--ease), filter 600ms ease; }
.post--card:hover .post__thumb { transform: scale(1); filter: none; }
.post__body {
    grid-area: body; display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
    grid-template-areas: "title meta" "excerpt actions"; gap: 10px clamp(16px, 3vw, 48px); align-items: start;
}
.post__title { grid-area: title; margin: 0; font: 400 clamp(44px, 5.6vw, 104px)/0.98 var(--serif); font-optical-sizing: auto; letter-spacing: -0.03em; }
.post__title a { display: inline-block; text-decoration: none; transition: transform 700ms var(--ease); }
.post__title a:hover, .post--card:hover .post__title a { font-style: italic; transform: translateX(0.12em); }
.post__meta { grid-area: meta; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin: 0; padding-top: 0.6em; color: var(--soft); font-size: 14px; text-align: right; }
.post__num { color: var(--ink); font: italic 500 20px/1.2 var(--serif); }
.post__cat { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.post__cat:hover { text-decoration-color: var(--ink); }
.post__excerpt { grid-area: excerpt; max-width: 62ch; margin: 0; color: var(--soft); font-size: 16px; }
.post__actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 18px; margin: 0; }
.btn {
    display: inline-flex; align-items: center; min-height: 40px; font: 500 15px/1.2 var(--sans);
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
    transition: text-underline-offset 250ms ease, background 250ms ease;
}
.btn:hover { text-underline-offset: 9px; }
.btn--primary { gap: 8px; padding: 0 20px; min-height: 44px; border-radius: 999px; background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 600; }
.btn--primary:hover { background: var(--ink); color: #fff; }

.pager { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-top: 48px; }
.pager__link { min-width: 32px; color: var(--soft); font: 400 clamp(32px, 3vw, 48px)/1 var(--serif); text-decoration: none; }
.pager__link:hover { color: var(--ink); font-style: italic; }
.pager__link.is-active { color: var(--ink); font-style: italic; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--yellow); text-underline-offset: 8px; }
.pager__link--prev, .pager__link--next { font: 500 15px/1 var(--sans); align-self: center; text-decoration: underline; text-underline-offset: 6px; }

/* ── one post: grey title page, then the deep green chapter ───────────────────────────────── */
.post__header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); grid-template-areas: "meta meta" "title excerpt" "title actions"; gap: 20px clamp(24px, 5vw, 96px); align-items: end; padding-bottom: clamp(32px, 4vw, 56px); }
.post--full .post__meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 0; text-align: left; }
.post--full .post__title { align-self: end; font-size: clamp(60px, 10vw, 196px); line-height: 0.9; letter-spacing: -0.035em; }
.post--full .post__excerpt { align-self: end; font: 400 clamp(19px, 1.6vw, 24px)/1.4 var(--serif); color: var(--ink); }
.post--full .post__actions { align-self: start; justify-content: flex-start; }
.post__shot { margin: 0 0 clamp(48px, 6vw, 88px); }
.post__zoom { display: block; max-height: 760px; overflow: hidden; background: var(--rule); cursor: zoom-in; }
.post__zoom img { width: 100%; transition: transform 1200ms var(--ease); }
.post__zoom:hover img { transform: scale(1.015); }
.post__caption { margin-top: 10px; color: var(--soft); font-size: 14px; }

.doc {
    display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); column-gap: clamp(24px, 5vw, 96px);
    padding: clamp(48px, 6vw, 96px) 0; background: var(--deep); color: var(--mist);
    box-shadow: 0 0 0 100vmax var(--deep); clip-path: inset(0 -100vmax);
    font-size: 17px; line-height: 1.65;
}
.doc > * { grid-column: 2; min-width: 0; }
.doc :focus-visible { outline-color: var(--yellow); }
.doc h2 { grid-column: 1; margin: 0 0 32px; padding-top: 4px; color: #fff; font: italic 400 clamp(34px, 3.6vw, 60px)/1 var(--serif); letter-spacing: -0.02em; }
.doc h2 ~ h2 { margin-top: 56px; }
.doc h2 ~ h2 + * { margin-top: 56px; }
.doc h3 { margin: 28px 0 8px; color: #fff; font: 400 26px/1.15 var(--serif); }
.doc h4, .doc h5, .doc h6 { margin: 22px 0 6px; color: #fff; font-size: 17px; font-weight: 600; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--green); }
.doc strong { color: #fff; font-weight: 600; }
.doc a { color: #fff; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.doc a:hover { color: var(--yellow); }
.doc code { padding: 1px 6px; border-radius: 4px; background: #174630; color: #f1f6f2; overflow-wrap: anywhere; }
.doc pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; border-radius: 4px; background: #0a2618; }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 20px; padding: 0 0 0 24px; border-left: 1px solid var(--green); color: #cfdcd3; font-family: var(--serif); font-size: 19px; line-height: 1.5; }
.doc blockquote p { margin-bottom: 12px; }
.doc hr { margin: 40px 0; border: 0; border-top: 1px solid #23503a; }
.doc-table { margin: 0 0 20px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 10px 14px 10px 0; border-bottom: 1px solid #23503a; text-align: left; vertical-align: top; }
.doc th { color: #b3c8ba; font-weight: 500; }
.doc td:first-child { color: #fff; font-family: var(--serif); font-size: 18px; white-space: nowrap; }

.tags { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 40px 0 0; padding: 0; list-style: none; }
.tags__item { font: italic 400 22px/1.3 var(--serif); }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: 48px; border-top: 1px solid var(--ink); }
.post__nav-link { padding: 22px 0; font: 400 clamp(30px, 3.4vw, 60px)/1 var(--serif); letter-spacing: -0.02em; text-decoration: none; }
.post__nav-link:hover { font-style: italic; }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 8px; color: var(--soft); font: 500 14px/1 var(--sans); letter-spacing: 0; }

.notice { padding: 32px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); font: 400 clamp(24px, 2.4vw, 36px)/1.25 var(--serif); }
.notice p { margin: 0; }
.notice--error { color: #8e2a1f; border-top-color: #8e2a1f; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px 0 40px; border-top: 1px solid var(--ink); color: var(--soft); font-size: 14px; }
.colophon p { margin: 0; }
.colophon code { color: var(--ink); }

/* ── screenshot dialog ───────────────────────────────────────────────────────────────────── */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 4px; background: var(--ink); color: #fff; }
.zoom::backdrop { background: rgb(18 19 21 / 0.84); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--ink); }
.zoom__close { min-height: 42px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 600 15px/1 var(--sans); cursor: pointer; }
.zoom__close:focus-visible { outline-color: #fff; }
.zoom__scroll { height: calc(94vh - 62px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 1100px) {
    .post__body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "title" "excerpt" "actions"; }
    .post__meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 0; text-align: left; }
    .post__actions { justify-content: flex-start; }
}
@media (max-width: 800px) {
    .masthead__inner { grid-template-columns: minmax(0, 1fr); }
    .brand { grid-row: auto; }
    .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; width: 100%; }
    .post--card { grid-template-columns: minmax(0, 1fr) 96px; align-items: start; }
    .post__media { margin-top: 30px; }
    .post__header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "title" "excerpt" "actions"; }
    .doc { grid-template-columns: minmax(0, 1fr); }
    .doc > *, .doc h2 { grid-column: 1; }
    .doc h2 { margin-bottom: 16px; }
    .doc h2 ~ h2 + * { margin-top: 0; }
    .stylebar__list { margin-left: 0; }
    .categories__list { border-radius: 26px; }
}
@media (max-width: 520px) {
    .post--card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "body"; }
    .post__media { margin-top: 0; width: 140px; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; text-align: left; border-top: 1px solid var(--rule); }
    .doc td:first-child { white-space: normal; }
}
@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%; }
