/* Catalog style "demo11" — a fashion-house split screen: soft-white Bodoni panel left, off-black photo columns right. Mirrors /demo11/. */
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..600;1,6..96,400&family=Lato:wght@400;700&display=swap");

:root {
    --k: #141315;          /* the photo half */
    --k2: #201f22;
    --k3: #2d2b30;
    --paper: #ecebe8;      /* the text half */
    --ink: #17161a;
    --mute: #5f5b62;       /* secondary ink on paper (AA on --paper) */
    --mute-d: #a19da3;     /* secondary ink on the dark half */
    --y: #ffb500;          /* the single accent */
    --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
    --text: "Lato", "Source Sans 3", system-ui, sans-serif;
    --edge: clamp(20px, 3.4vw, 64px);
    --ease: cubic-bezier(.2, .7, .1, 1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--k); color: var(--ink); font: 400 16px/1.6 var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 400 0.86em/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.content :focus-visible, .colophon :focus-visible, .zoom :focus-visible { outline-color: var(--y); }

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

/* ── the split: paper panel left, dark half right ─────────────────────────────────────────── */
.page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    background: linear-gradient(90deg, var(--paper) 50%, var(--k) 50%);
}
.masthead { grid-column: 1; grid-row: 1; }
.stylebar { grid-column: 1; grid-row: 2; }
.categories { grid-column: 1; grid-row: 3 / 5; align-self: start; position: sticky; top: 0; }
.content { grid-column: 2; grid-row: 1 / 4; }
.colophon { grid-column: 2; grid-row: 4; }

/* masthead: the display line of the panel */
.masthead { padding: clamp(40px, 6vw, 96px) var(--edge) 28px; }
.brand { display: inline-flex; flex-direction: column; gap: 14px; text-decoration: none; }
.brand__mark { font: 400 clamp(84px, 11vw, 176px)/0.86 var(--display); font-optical-sizing: auto; letter-spacing: -0.03em; }
.brand__name { font: italic 400 clamp(26px, 2.4vw, 36px)/1 var(--display); }
.masthead__tagline { max-width: 32em; margin: 28px 0 0; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; }
.masthead__count { margin: 12px 0 0; color: var(--mute); font-size: 15px; }
.masthead__num { color: var(--ink); font: 400 22px/1 var(--display); }

/* style bar: a quiet strip on paper, the yellow button is the one loud thing */
.stylebar { padding: 8px var(--edge) 24px; }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px 0; padding-top: 20px; border-top: 1px solid rgb(23 22 26 / 0.16); }
.stylebar__label { width: 100%; color: var(--mute); font-size: 15px; }
.stylebar__value { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; padding: 0 16px; min-height: 50px; overflow-x: auto; white-space: nowrap; background: #fff; border: 1px solid rgb(23 22 26 / 0.18); border-right: 0; color: var(--ink); }
.stylebar__copy {
    min-height: 50px; padding: 0 28px; border: 0; border-radius: 0; background: var(--y); color: var(--ink);
    font: 700 16px/1 var(--text); cursor: pointer; transition: background 250ms ease, color 250ms ease;
}
.stylebar__copy:hover { background: var(--ink); color: var(--paper); }
.stylebar__copy.is-done { background: var(--ink); color: var(--y); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 4px 18px; width: 100%; margin-top: 10px; }
.stylebar__item { display: inline-flex; align-items: center; min-height: 32px; color: var(--mute); font-size: 14px; text-decoration: none; border-bottom: 1px solid transparent; }
.stylebar__item:hover { color: var(--ink); border-bottom-color: var(--ink); }
.stylebar__item.is-active { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--y); }

/* categories: the big craft list of the demo, pinned in the panel */
.categories { padding: 24px var(--edge) 48px; }
.categories__list { margin: 0; padding: 0; list-style: none; }
.categories__link {
    position: relative; display: inline-flex; align-items: baseline; gap: 10px; padding: 2px 0 2px 26px;
    color: var(--mute); font: 400 clamp(30px, 3vw, 46px)/1.08 var(--display); text-decoration: none;
    transition: color 250ms ease, transform 400ms var(--ease);
}
.categories__link::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--y); transform: scale(0); transition: transform 300ms var(--ease); }
.categories__link:hover { color: var(--ink); transform: translateX(6px); }
.categories__link.is-active { color: var(--ink); font-style: italic; }
.categories__link.is-active::before { transform: scale(1); }
.categories__count { font: 700 13px/1 var(--text); color: var(--mute); }

/* ── the dark half ────────────────────────────────────────────────────────────────────────── */
.content { padding: clamp(40px, 6vw, 96px) var(--edge) 72px; color: var(--paper); }
.listing__header { margin-bottom: 40px; }
.listing__title { margin: 0; font: 400 clamp(40px, 4.4vw, 72px)/0.95 var(--display); letter-spacing: -0.02em; }
.listing__intro { max-width: 40em; margin: 14px 0 0; color: var(--mute-d); font-size: 17px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--k3); color: var(--mute-d); font-size: 15px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 2px; }
.toolbar__label { margin-right: 10px; }
.toolbar__opt { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; font: 400 18px/1 var(--display); text-decoration: none; }
.toolbar__opt:hover { color: var(--paper); }
.toolbar__opt.is-active { color: var(--paper); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* two photo columns, the second one set lower: the opposed columns of the demo */
.listing { --off: clamp(60px, 9vw, 160px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px clamp(16px, 1.6vw, 28px); padding-bottom: var(--off); }
.post--card.post--even { transform: translateY(var(--off)); }
.post--card { display: flex; flex-direction: column; min-width: 0; }
.post__media { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--k2); }
.post__thumb {
    width: 100%; height: 100%; object-fit: cover; object-position: left top;
    transition: filter 500ms ease, transform 900ms var(--ease);
}
.post--card:hover .post__thumb { transform: scale(1.04); }
/* point at one: the rest go grey, like choosing a craft */
.listing:has(.post--card:hover) .post--card:not(:hover) .post__thumb { filter: grayscale(1) brightness(0.55); }
.post__body { display: flex; flex: 1; flex-direction: column; padding-top: 14px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 8px; color: var(--mute-d); font-size: 14px; }
.post__num { color: var(--paper); }
.post__cat { text-decoration: underline; text-decoration-color: var(--k3); text-underline-offset: 4px; }
.post__cat:hover { text-decoration-color: var(--y); }
.post__title { margin: 0 0 8px; font: 400 clamp(26px, 2.2vw, 36px)/1.04 var(--display); letter-spacing: -0.01em; }
.post__title a { text-decoration: none; }
.post__title a:hover { font-style: italic; }
.post__excerpt { margin: 0 0 18px; color: var(--mute-d); font-size: 15px; line-height: 1.5; }
.post__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin: auto 0 0; }
.btn {
    display: inline-flex; align-items: center; min-height: 44px; font: 700 15px/1.2 var(--text);
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px;
    transition: text-decoration-color 200ms ease, text-underline-offset 200ms ease, background 250ms ease, color 250ms ease;
}
.btn:hover { text-decoration-color: var(--y); text-underline-offset: 10px; }
.btn--primary { justify-content: center; gap: 8px; padding: 0 22px; min-height: 48px; background: var(--y); color: var(--ink); text-decoration: none; }
.btn--primary:hover { background: var(--paper); color: var(--ink); }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--k3); }
.pager__link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--mute-d); font: 400 22px/1 var(--display); text-decoration: none; }
.pager__link:hover { color: var(--paper); }
.pager__link.is-active { color: var(--paper); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.pager__link--prev, .pager__link--next { padding: 0 8px; font: 700 15px/1 var(--text); }
.pager__link--prev { margin-right: auto; }
.pager__link--next { margin-left: auto; }

/* ── one post, on the dark half ───────────────────────────────────────────────────────────── */
.post--full { max-width: 760px; }
.post__header { padding-bottom: 36px; }
.post--full .post__title { font-size: clamp(52px, 6vw, 112px); line-height: 0.92; letter-spacing: -0.025em; margin-bottom: 20px; }
.post--full .post__excerpt { font-size: 18px; line-height: 1.55; color: #c9c5cb; max-width: 36em; }
.post__shot { margin: 0 0 48px; }
.post__zoom { display: block; max-height: 760px; overflow: hidden; background: var(--k2); cursor: zoom-in; }
.post__zoom img { width: 100%; transition: transform 900ms var(--ease); }
.post__zoom:hover img { transform: scale(1.02); }
.post__caption { margin-top: 10px; color: var(--mute-d); font-size: 14px; }

.doc { color: #dedbd7; font-size: 17px; line-height: 1.65; }
.doc h2 { margin: 56px 0 16px; color: var(--paper); font: 400 clamp(32px, 3vw, 44px)/1.05 var(--display); letter-spacing: -0.01em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 32px 0 8px; color: var(--paper); font: italic 400 26px/1.15 var(--display); }
.doc h4, .doc h5, .doc h6 { margin: 24px 0 6px; color: var(--paper); font-size: 17px; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--y); }
.doc strong { color: var(--paper); }
.doc a { color: var(--paper); text-decoration-color: var(--y); text-underline-offset: 4px; }
.doc a:hover { color: var(--y); }
.doc code { padding: 1px 6px; background: var(--k2); color: #f3efe8; overflow-wrap: anywhere; }
.doc pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; background: var(--k2); border-left: 2px solid var(--y); }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 20px; padding: 2px 0 2px 22px; border-left: 2px solid var(--y); color: #c9c5cb; }
.doc blockquote p { margin-bottom: 10px; }
.doc hr { margin: 40px 0; border: 0; border-top: 1px solid var(--k3); }
.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 12px 10px 0; border-bottom: 1px solid var(--k3); text-align: left; vertical-align: top; }
.doc th { color: var(--mute-d); font-weight: 700; }
.doc td:first-child { color: var(--paper); white-space: nowrap; }

.tags { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 40px 0 0; padding: 18px 0 0; border-top: 1px solid var(--k3); list-style: none; }
.tags__item { font: italic 400 20px/1.3 var(--display); color: var(--mute-d); }
.tags__item::before { content: "— "; color: var(--y); font-style: normal; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 56px; background: var(--k3); border: 1px solid var(--k3); }
.post__nav-link { padding: 22px 22px 24px; background: var(--k); font: 400 clamp(22px, 2vw, 30px)/1.1 var(--display); text-decoration: none; transition: background 250ms ease; }
.post__nav-link:hover { background: var(--k2); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 8px; color: var(--mute-d); font: 400 14px/1 var(--text); }

.notice { padding: 28px 0; border-top: 2px solid var(--y); border-bottom: 1px solid var(--k3); font: 400 clamp(22px, 2vw, 30px)/1.3 var(--display); }
.notice p { margin: 0; }
.notice a { color: var(--paper); text-decoration-color: var(--y); }
.notice--error { border-top-color: #ff8a7a; color: #ffd2cb; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px var(--edge) 40px; border-top: 1px solid var(--k3); color: var(--mute-d); font-size: 14px; }
.colophon p { margin: 0; }
.colophon a { color: var(--paper); text-underline-offset: 4px; }
.colophon code { color: var(--paper); }

/* ── screenshot dialog ───────────────────────────────────────────────────────────────────── */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 0; background: var(--k); color: var(--paper); }
.zoom::backdrop { background: rgb(20 19 21 / 0.86); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--k); }
.zoom__close { min-height: 44px; padding: 0 24px; border: 0; border-radius: 0; background: var(--y); color: var(--ink); font: 700 15px/1 var(--text); cursor: pointer; }
.zoom__close:hover { background: var(--paper); }
.zoom__scroll { height: calc(94vh - 64px); overflow: auto; }
.zoom__img { width: 100%; }

/* ── stacked composition under 960 px: paper blocks, then the dark half ─────────────────────── */
@media (max-width: 959px) {
    .page { display: block; background: none; }
    .masthead, .stylebar, .categories { position: static; background: var(--paper); }
    .masthead { padding-top: 40px; }
    .categories { padding-bottom: 32px; }
    .categories__list { display: flex; flex-wrap: wrap; gap: 0 22px; }
    .categories__link { font-size: clamp(26px, 6vw, 34px); }
    .content { padding-top: 48px; }
    .listing { --off: 56px; }
}
@media (max-width: 600px) {
    .listing { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-bottom: 0; }
    .post--card.post--even { transform: none; }
    .post__media { aspect-ratio: 4 / 3; }
    .stylebar__value { flex-basis: 100%; border-right: 1px solid rgb(23 22 26 / 0.18); }
    .stylebar__copy { flex: 1 1 100%; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; text-align: left; }
    .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%; }
