/* =========================================================================
   De Kunstenaars Rol — stylesheet.

   The vocabulary here is a gallery's, not a web app's: hairlines instead of
   shadows, square corners, plates on mounts, wall labels set as definition
   lists, letterspaced small capitals for the labels that surround a work.
   Nothing is cropped — a painting shown at the wrong aspect ratio is a
   painting misrepresented — so every plate is contained in its frame and
   the mount takes up the slack.

   Four themes re-declare the same custom properties. No dependencies.
   ========================================================================= */

/* ---------------------------------------------------------------- themes */
:root,
:root[data-theme="papier"] {
  --paper:      #f6f3ec;   /* the ground the work hangs against */
  --paper-2:    #efeae0;   /* mounts, insets, table stripes     */
  --card:       #fdfbf7;
  --ink:        #17140f;   /* headings                          */
  --ink-2:      #37312a;   /* body                              */
  --muted:      #6f665a;   /* labels, captions, metadata        */
  --line:       #ded6c7;   /* hairlines                         */
  --line-2:     #c6bba7;   /* hairlines that need to be seen    */
  --accent:     #8a3324;   /* madder — the one colour we use    */
  --accent-2:   #a94430;
  --gold:       #a67c2e;
  --plate-bg:   #eae4d8;   /* behind a contained image          */
  --scrim:      rgba(23, 20, 15, .58);
}

:root[data-theme="sepia"] {
  --paper:      #f0e3cd;
  --paper-2:    #e6d6ba;
  --card:       #f8efdf;
  --ink:        #2d2013;
  --ink-2:      #4b3925;
  --muted:      #7f6647;
  --line:       #d3bd9b;
  --line-2:     #bda27b;
  --accent:     #8a4a1c;
  --accent-2:   #a55e29;
  --gold:       #937128;
  --plate-bg:   #e2d0af;
  --scrim:      rgba(45, 32, 19, .58);
}

:root[data-theme="inkt"] {
  --paper:      #14130f;
  --paper-2:    #1c1a15;
  --card:       #1f1d18;
  --ink:        #f3efe5;
  --ink-2:      #cdc6b8;
  --muted:      #8e8677;
  --line:       #32302a;
  --line-2:     #4b473d;
  --accent:     #d9765d;
  --accent-2:   #e8907a;
  --gold:       #c9a24e;
  --plate-bg:   #22201a;
  --scrim:      rgba(0, 0, 0, .72);
}

:root[data-theme="contrast"] {
  --paper:      #ffffff;
  --paper-2:    #f0f0f0;
  --card:       #ffffff;
  --ink:        #000000;
  --ink-2:      #111111;
  --muted:      #3a3a3a;
  --line:       #000000;
  --line-2:     #000000;
  --accent:     #8a0016;
  --accent-2:   #b0001d;
  --gold:       #574000;
  --plate-bg:   #eeeeee;
  --scrim:      rgba(0, 0, 0, .78);
}

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "URW Palladio L", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
           Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --page:   1240px;
  --measure: 68ch;
  --gutter: clamp(20px, 4vw, 56px);
  --head-h: 66px;
  --ease:   cubic-bezier(.2, .6, .3, 1);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--serif);
  font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
  line-height: 1.62;
  background: var(--paper);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }
.prose a, a.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.prose a:hover, a.link:hover { color: var(--accent-2); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -.008em;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + .5vw, 1.4rem); }
h4 { font-size: 1.02rem; }

em, .title-it { font-style: italic; }

/* Letterspaced small capitals. Every label that sits beside a work — the
   eyebrow, the field names in a wall label, the inventory number — uses
   this, and nothing else does. */
.eyebrow, .label, .facets__label, .meta dt, .field {
  font-family: var(--sans);
  font-size: .705rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.inv {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; font-family: var(--sans); font-size: .85rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1560px; }
/* A reading column. Narrow enough that the essay sits centred on the page
   rather than pinned to one edge of a catalogue-width container, and wide
   enough that a figure floated to 46% is still worth looking at. */
.wrap--read { max-width: 900px; }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4.5vw, 56px); }
.rule { border: 0; border-top: 1px solid var(--line); }

.section-head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin-bottom: .5rem; }
.section-head p { color: var(--muted); }
.section-head .eyebrow { display: block; margin-bottom: .85rem; }

/* A heading with a hairline that runs to the end of the column. */
.head-rule {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: clamp(22px, 3vw, 36px);
}
.head-rule::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* --------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head__in {
  min-height: var(--head-h);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
}

/* The wordmark, rebuilt as type. The drawn SVG in images/merk/ carries the
   Dutch name in outlines and cannot be re-set, so the lockup is reproduced
   here instead: the phrase small and light, the surname large in the display
   serif, sharing a baseline. */
/* The phrase floats at the vertical middle of "Rol" — not on its baseline,
   and not lifted above centre. Plain box-centring gets within a few px of
   that: Rol has no descenders, so its glyphs ride slightly high in the em
   box, which happens to offset the phrase's own metrics almost exactly. */
.brand {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  color: var(--ink); line-height: 1;
}
/* Weights follow the drawn mark: the phrase is light, and "Rol" is a
   high-contrast serif at regular weight — not bold. */
.brand__pre {
  font-family: var(--sans); font-size: .8rem; font-weight: 300;
  letter-spacing: .005em; white-space: nowrap;
}
.brand__rol {
  font-family: var(--serif); font-size: 1.95rem; font-weight: 500;
  letter-spacing: -.012em;
}
@media (max-width: 460px) {
  .brand__pre { font-size: .72rem; }
  .brand__rol { font-size: 1.6rem; }
}

.site-foot__mark {
  display: flex; height: auto; width: auto; margin-bottom: 12px;
}
.site-foot__sub { margin-bottom: 10px; }

.nav { display: flex; gap: clamp(14px, 2vw, 30px); margin-inline-start: auto; }
.nav a {
  font-family: var(--sans); font-size: .84rem; letter-spacing: .04em;
  color: var(--ink-2); padding: 6px 0; border-bottom: 1.5px solid transparent;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.picker { position: relative; }
.picker__btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: .78rem; letter-spacing: .05em;
  color: var(--ink-2); padding: 7px 10px; border: 1px solid transparent;
}
.picker__btn:hover { border-color: var(--line); color: var(--ink); }
.picker__btn svg { width: 15px; height: 15px; }
.picker__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 120;
  min-width: 172px; padding: 5px;
  background: var(--card); border: 1px solid var(--line-2);
  display: none;
}
.picker.is-open .picker__menu { display: block; }
.picker__menu button {
  display: block; width: 100%; text-align: start;
  font-family: var(--sans); font-size: .84rem;
  padding: 8px 11px; color: var(--ink-2);
}
.picker__menu button:hover { background: var(--paper-2); color: var(--ink); }
.picker__menu button[aria-current="true"] { color: var(--accent); }
.picker__menu button[aria-current="true"]::after { content: " ·"; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid var(--line);
    margin-inline-start: auto;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .nav {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--card); border-bottom: 1px solid var(--line-2);
    padding: 6px var(--gutter) 14px;
    display: none;
  }
  .site-head.is-open .nav { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
  .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ------------------------------------------------- full-bleed image hero */
/* Ported from the DD-KunstenaarsRol prototype: a photograph filling the
   screen, a dark scrim over it, centred white type, and a pill button that
   scrolls to the first section. The scrim value (rgba(21,21,21,.5)) and the
   three self-portrait crops are the prototype's own choices, kept.

   Reserved for the pages that introduce something — the front page, the
   artists, the foundation. The catalogue and the essays open on their
   content instead: a reader who came to search or to read should not have
   to scroll past a poster first. */
.hero-img {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  background: #151515;
  text-align: center;
  isolation: isolate;
}
/* Inner pages get a band rather than a whole screen, as the prototype does. */
.hero-img--band { min-height: min(50svh, 400px); }

/* Sit the hero under the sticky header instead of below it, so the picture
   starts at the top of the window and the header floats over it. */
body.has-hero .hero-img:first-of-type {
  margin-top: calc(-1 * var(--head-h));
  padding-top: var(--head-h);
}

.hero-img__layer {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0; transition: opacity 1.5s var(--ease);
}
.hero-img__layer.is-on { opacity: 1; }
.hero-img__layer img { width: 100%; height: 100%; object-fit: cover; }
/* A slow drift while a slide holds, so a still photograph does not feel
   frozen. It restarts with each slide because the class is re-applied. */
.hero-img__layer.is-on img { animation: heroDrift 14s linear forwards; }
@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.06); } }

/* The prototype lays a flat rgba(21,21,21,.5) over the picture. That is the
   right weight, but a flat wash leaves the type fighting whatever happens to
   be bright underneath it — and these are paintings, so something always is.
   Same total darkness, distributed: a little more where the words sit, a
   little more top and bottom so the header and the dots stay readable. */
.hero-img::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 78% at 50% 50%, rgba(21, 21, 21, .34), transparent 72%),
    linear-gradient(rgba(21, 21, 21, .74), rgba(21, 21, 21, .40) 24%,
                    rgba(21, 21, 21, .40) 66%, rgba(21, 21, 21, .72));
}

.hero-img__in {
  position: relative; z-index: 2;
  color: #fff;
  padding-block: clamp(56px, 9vh, 120px);
}
.hero-img h1, .hero-img h2 { color: #fff; text-wrap: balance; }
.hero-img h1 { margin-inline: auto; max-width: 17ch; }
.hero-img .eyebrow { display: block; color: rgba(255, 255, 255, .78); margin-bottom: 1.1rem; }
.hero-img .lede {
  color: rgba(255, 255, 255, .88);
  max-width: 54ch; margin: 1.2rem auto 0;
  font-size: clamp(1.02rem, .96rem + .4vw, 1.2rem);
}
.hero-img--band h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
.hero-img--band .hero-img__in { padding-block: clamp(40px, 7vh, 84px); }

/* The prototype's btn-full-rounded, kept as the one rounded thing on the
   site: it belongs to the hero, and only to the hero. */
/* Two classes deep on purpose: the base .button is declared further down the
   file and would otherwise win on source order and paint the label in --ink,
   which on a dark photograph means invisible. */
.button.button--hero {
  border-radius: 999px; border-color: rgba(255, 255, 255, .8); color: #fff;
  padding: 13px 32px; margin-top: 2rem;
  /* Its own ground. A hairline outline alone disappears the moment the
     picture behind it turns pale. */
  background: rgba(21, 21, 21, .34);
  backdrop-filter: blur(2px);
}
.button.button--hero:hover { background: #fff; border-color: #fff; color: #151515; }

/* Madder on a dark photograph is close to invisible; the current page marker
   has to stay legible whatever is behind it. */
.site-head.is-over .nav a[aria-current="page"] { border-bottom-color: #fff; }

/* Slide timer, after the prototype's tp-bannertimer. */
.hero-img__timer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 2px; background: rgba(255, 255, 255, .18);
}
.hero-img__timer i { display: block; height: 100%; width: 0; background: rgba(255, 255, 255, .75); }
.hero-img__timer i.is-running { animation: heroTimer 7s linear forwards; }
@keyframes heroTimer { from { width: 0; } to { width: 100%; } }

.hero-img__dots {
  position: absolute; z-index: 3; bottom: 24px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
}
.hero-img__dots button {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .4); transition: background .2s var(--ease);
}
.hero-img__dots button[aria-current="true"] { background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hero-img__layer { transition: none; }
  .hero-img__layer.is-on img,
  .hero-img__timer i.is-running { animation: none; }
}

/* The header over a hero: no plate, no rule, and every token flipped to
   read on a photograph. Because these are inherited custom properties, the
   nav, the pickers and the logo all follow without knowing about it. */
.site-head.is-over {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  --ink:     #ffffff;
  --ink-2:   rgba(255, 255, 255, .92);
  --muted:   rgba(255, 255, 255, .72);
  --line:    rgba(255, 255, 255, .22);
  --line-2:  rgba(255, 255, 255, .38);
  --card:    rgba(24, 22, 18, .95);
  --paper-2: rgba(255, 255, 255, .12);
}

/* ------------------------------------------------------- editorial hero */
.hero { padding-block: clamp(44px, 6vw, 92px) clamp(36px, 5vw, 72px); }
.hero__in {
  display: grid; gap: clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 940px) {
  .hero__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
.hero h1 { margin-block: .5rem 1.1rem; text-wrap: balance; }
.hero .lede { font-size: clamp(1.06rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 46ch; }

.hero__plate { position: relative; }
.hero__plate .plate { aspect-ratio: 4 / 5; }
.hero__plate figcaption { margin-top: 12px; }

.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: clamp(28px, 4vw, 44px);
}
@media (min-width: 620px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--paper); padding: 16px 18px; }
.stat b {
  display: block; font-family: var(--serif); font-size: 1.7rem;
  font-weight: 600; color: var(--ink); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 4px; }

/* ---------------------------------------------------------------- plate */
/* A work sits contained on a mount, never cropped. The frame keeps the
   grid tidy; the mount absorbs whatever the picture's proportions are. */
.plate {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--plate-bg);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
}
.plate img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transition: transform .5s var(--ease);
}
.plate--free { aspect-ratio: auto; }
.plate--wide { aspect-ratio: 16 / 10; }
a:hover > .plate img, button:hover .plate img { transform: scale(1.022); }

.plate__inv {
  position: absolute; left: 8px; bottom: 7px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  padding: 2px 6px;
  opacity: 0; transition: opacity .2s var(--ease);
}
.piece:hover .plate__inv, .piece:focus-visible .plate__inv { opacity: 1; }

/* ----------------------------------------------------------------- grid */
.grid {
  display: grid; gap: clamp(22px, 2.6vw, 40px) clamp(18px, 2vw, 30px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
}
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* The catalogue holds uprights, landscapes and three-panel studies side by
   side. A square frame is the one ratio that wastes no mount on any of them;
   the portrait ratio is kept for the artist cards, which are all uprights. */
.grid .plate { aspect-ratio: 1 / 1; }
.grid--3 .artist-card .plate { aspect-ratio: 3 / 4; }

.piece { display: block; text-align: start; width: 100%; }
.piece__meta { padding-top: 11px; }
.piece__title {
  display: block; font-style: italic; color: var(--ink);
  font-size: 1.02rem; line-height: 1.3;
}
.piece__sub { display: block; margin-top: 3px; color: var(--muted); font-size: .9rem; }
.piece__tag { display: block; margin-top: 7px; }

.empty {
  grid-column: 1 / -1; text-align: center;
  padding: clamp(48px, 8vw, 96px) 0; border-block: 1px solid var(--line);
}
.empty h3 { margin-bottom: .4rem; }
.empty p { color: var(--muted); }

/* -------------------------------------------------------------- toolbar */
.toolbar { border-block: 1px solid var(--line); background: var(--paper); }
.toolbar__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding-block: 14px;
}
.search {
  position: relative; flex: 1 1 260px; min-width: 0;
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-2); padding: 0 12px; height: 40px;
  background: var(--card);
}
.search svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.search input {
  flex: 1; min-width: 0; border: 0; background: none; height: 100%;
  font-family: var(--sans); font-size: .9rem;
}
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }

.select { display: inline-flex; align-items: center; gap: 8px; }
.select select {
  height: 40px; border: 1px solid var(--line-2); background: var(--card);
  padding: 0 30px 0 11px; font-family: var(--sans); font-size: .86rem;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.btn-text {
  font-family: var(--sans); font-size: .82rem; color: var(--muted);
  border-bottom: 1px solid var(--line-2); padding-bottom: 1px;
}
.btn-text:hover { color: var(--accent); border-bottom-color: var(--accent); }

.count { margin-inline-start: auto; font-family: var(--sans); font-size: .84rem; color: var(--muted); }
.count b { color: var(--ink); font-weight: 600; }

.facets { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding-block: 9px; }
.facets + .facets { border-top: 1px dotted var(--line); }
.facets__label { flex: 0 0 auto; width: 92px; }
.chip {
  font-family: var(--sans); font-size: .8rem;
  padding: 5px 12px; border: 1px solid var(--line-2); color: var(--ink-2);
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.chip:hover { border-color: var(--ink-2); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

#facetGroups { padding-bottom: 12px; }
.filters-toggle { display: none; }
@media (max-width: 780px) {
  .filters-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--sans); font-size: .84rem;
    border: 1px solid var(--line-2); padding: 9px 13px;
  }
  .filters-toggle svg { width: 15px; height: 15px; }
  .filters-toggle__badge {
    background: var(--accent); color: #fff; font-size: .7rem;
    min-width: 17px; height: 17px; display: inline-grid; place-items: center;
  }
  #facetGroups { display: none; }
  .toolbar.is-open #facetGroups { display: block; }
  .facets__label { width: 100%; }
  .count { width: 100%; margin-inline-start: 0; }
}

/* ---------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; z-index: 300;
  background: var(--scrim);
  display: none; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}
.modal.is-open { display: flex; }
.modal__dialog {
  background: var(--paper); border: 1px solid var(--line-2);
  width: min(1120px, 100%); max-height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr);
  overflow: auto;
}
@media (min-width: 900px) {
  .modal__dialog { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
.modal__plate {
  background: var(--plate-bg); border-inline-end: 1px solid var(--line);
  display: grid; place-items: center; padding: clamp(16px, 3vw, 40px);
  min-height: 240px;
}
.modal__plate img { max-height: min(74vh, 780px); width: auto; }
.modal__body { padding: clamp(22px, 3vw, 40px); position: relative; }
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid transparent; color: var(--muted);
}
.modal__close:hover { border-color: var(--line-2); color: var(--ink); }
.modal__body h2 { font-style: italic; margin-bottom: .3rem; padding-right: 40px; }
.modal__artist { color: var(--muted); font-family: var(--sans); font-size: .88rem; }
.modal__desc { margin-top: 1.1rem; max-width: 46ch; }

/* Wall label. */
.meta { margin-top: 1.6rem; border-top: 1px solid var(--line); }
.meta__row {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.meta dt { padding-top: 2px; }
.meta dd { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 480px) { .meta__row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.pid { margin-top: 1.5rem; }
.pid__cite { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-top: 7px; }
.pid code {
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
  word-break: break-all; display: block; margin-top: 6px;
}

/* ---------------------------------------------------------------- prose */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.05em; }
.prose p { hyphens: auto; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ol { list-style: decimal; padding-inline-start: 1.4em; }
.prose ol li { margin-top: .45em; padding-inline-start: .3em; }
.prose ol li::marker { color: var(--muted); font-family: var(--sans); font-size: .85em; }

blockquote.pull {
  font-style: italic; font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem);
  color: var(--ink); line-height: 1.35;
  border-inline-start: 2px solid var(--accent); padding-inline-start: 1.1em;
}

/* Figures inside an essay: full measure on small screens, breaking out into
   the margin on wide ones — the way the source documents set them. */
.figure { margin-block: 1.9em; }
.figure figcaption {
  margin-top: 10px; font-family: var(--sans); font-size: .795rem;
  line-height: 1.45; color: var(--muted); max-width: 46ch;
}
@media (min-width: 1040px) {
  .figure--right { float: inline-end; width: 46%; margin: .4em 0 1.6em 2.4em; }
  .figure--left  { float: inline-start; width: 46%; margin: .4em 2.4em 1.6em 0; }
}
.figure-gallery {
  display: grid; gap: 16px; margin-block: 2em;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  clear: both;
}
.figure-gallery figcaption { grid-column: 1 / -1; }

/* ------------------------------------------------------------- articles */
.article-head { padding-block: clamp(32px, 5vw, 64px) clamp(20px, 3vw, 34px); }
.article-head h1 { max-width: 22ch; text-wrap: balance; margin-block: .6rem .9rem; }
.article-head .lede { font-size: 1.14rem; color: var(--muted); max-width: 52ch; font-style: italic; }
.byline {
  font-family: var(--sans); font-size: .8rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding-top: 1.1rem; margin-top: 1.4rem; border-top: 1px solid var(--line);
}
.source-note {
  clear: both; margin-top: 2.6em; padding: 16px 18px;
  border: 1px solid var(--line); background: var(--paper-2);
  font-family: var(--sans); font-size: .82rem; color: var(--muted);
  max-width: var(--measure);
}

.story-list { border-top: 1px solid var(--line); }
.story {
  display: grid; gap: clamp(16px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr);
  padding-block: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
@media (min-width: 720px) { .story { grid-template-columns: 208px minmax(0, 1fr); } }
.story .plate { aspect-ratio: 1 / 1; }
.story h3 { margin-bottom: .35rem; }
.story h3 a:hover { color: var(--accent); }
.story__lede { color: var(--muted); max-width: 60ch; }
.story__foot { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.pager {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: clamp(36px, 5vw, 64px); padding-top: 20px;
  border-top: 1px solid var(--line); font-family: var(--sans); font-size: .86rem;
}
.pager a { color: var(--ink-2); }
.pager a:hover { color: var(--accent); }

/* -------------------------------------------------------------- artists */
.artist-card { display: block; }
.artist-card .plate { aspect-ratio: 3 / 4; }
.artist-card h3 { margin-top: 14px; font-style: normal; }
.artist-card .dates { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: 2px; }
.artist-card p { margin-top: .6rem; color: var(--muted); font-size: .96rem; }

.artist-head {
  display: grid; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr);
  padding-block: clamp(32px, 5vw, 68px);
  align-items: start;
}
@media (min-width: 900px) { .artist-head { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); } }
.artist-head .plate { aspect-ratio: 3 / 4; }
.artist-head h1 { margin-block: .5rem .4rem; }
.artist-dates { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.artist-lede { margin-top: 1.2rem; max-width: 52ch; }
.artist-motto {
  font-style: italic; color: var(--ink); font-size: 1.2rem;
  padding-inline-start: 1em;
  border-inline-start: 2px solid var(--accent);
}
.artist-links { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--sans); font-size: .83rem; }
.artist-links a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.artist-links a:hover { border-bottom-color: currentColor; }

.chrono { border-top: 1px solid var(--line); max-width: 74ch; }
.chrono__row {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 18px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.chrono__y {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .05em; color: var(--accent); padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) { .chrono__row { grid-template-columns: minmax(0, 1fr); gap: 3px; } }

/* ---------------------------------------------------------------- misc */
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.band__in { max-width: 62ch; padding-block: clamp(40px, 6vw, 76px); }
.band h2 { margin-bottom: .7rem; }

.button {
  display: inline-block; font-family: var(--sans); font-size: .84rem;
  letter-spacing: .05em; padding: 12px 24px; border: 1px solid var(--ink);
  color: var(--ink); margin-top: 1.5rem;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.button:hover { background: var(--ink); color: var(--paper); }
.button--accent { border-color: var(--accent); color: var(--accent); }
.button--accent:hover { background: var(--accent); color: #fff; }

.note {
  border: 1px solid var(--line); background: var(--paper-2);
  padding: 16px 18px; font-family: var(--sans); font-size: .85rem; color: var(--muted);
  max-width: var(--measure);
}

.more-wrap { text-align: center; margin-top: clamp(32px, 4vw, 54px); }

/* --------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line-2); margin-top: clamp(48px, 7vw, 96px); }
.site-foot__grid {
  display: grid; gap: clamp(26px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  padding-block: clamp(40px, 5vw, 64px);
}
.site-foot h4 { font-family: var(--sans); font-size: .72rem; letter-spacing: .13em;
                text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.site-foot li + li { margin-top: 8px; }
.site-foot a { font-size: .93rem; color: var(--ink-2); }
.site-foot a:hover { color: var(--accent); }
.site-foot__mark { display: block; height: 34px; width: auto; margin-bottom: 14px; }
.site-foot__about { color: var(--muted); font-size: .93rem; max-width: 34ch; }
.site-foot__bar {
  border-top: 1px solid var(--line); padding-block: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between;
  font-family: var(--sans); font-size: .78rem; color: var(--muted);
}

.site-foot__mark { color: var(--ink); }

/* Floats inside prose must not escape their section. */
.clearfix::after { content: ""; display: block; clear: both; }
