/*
 * rogerfarnham.com - the public site.
 *
 * The old site's shape is kept on purpose: name and menu on the left, the work
 * on the right. Everything else is quietly modern: Inter, generous spacing, a
 * details block above the words, and three things visitors choose for
 * themselves under "Display" (text size, light or dark, contrast). Sizes are in
 * rem so both those choices and the browser's own zoom scale everything.
 */

/* ---- palette: light (default), dark, high contrast ----------------------- */

:root {
  --paper: #ffffff;
  --ink: #1b1b1a;
  --ink-strong: #000000;
  --muted: #6b6a66;
  --rule: #e7e5e0;
  --soft: #f4f3ef;              /* hover wash */
  --line: rgba(27, 27, 26, .28); /* link underline: present, never "oppressive" */
  --accent: #1f4e9c;            /* focus rings */
  --blueprint: #1f4e9c;
  --pill: #efeee9;
  --pill-ink: #4a4945;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-body: 1.0625rem;         /* 17px at the normal text size */
  --fs-small: .875rem;
  --fs-h1: 1.75rem;
  --fs-h2: 1.25rem;
  --fs-h3: 1.0625rem;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --side: clamp(14rem, 24vw, 21rem);  /* the left column */
  /* One column for everything on a page - words, details, galleries, tables -
     so they always share the same edges. It stops growing on big screens so
     lines of words stay a comfortable length (about 80 letters). */
  --col: 48rem;
  --measure: var(--col);
  --wide: var(--col);
  color-scheme: light;
}

/* the visitor's text size */
html { font-size: 100%; }
html.text-l { font-size: 112.5%; }
html.text-xl { font-size: 125%; }

/* dark: chosen, or automatic when the device prefers it */
:root.theme-dark {
  --paper: #121211; --ink: #ecebe7; --ink-strong: #ffffff; --muted: #a4a29c; --rule: #2d2c29;
  --soft: #1c1c1a; --line: rgba(236, 235, 231, .35); --accent: #8fb3ec; --blueprint: #8fb3ec;
  --pill: #262522; --pill-ink: #cfcdc6; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --paper: #121211; --ink: #ecebe7; --ink-strong: #ffffff; --muted: #a4a29c; --rule: #2d2c29;
    --soft: #1c1c1a; --line: rgba(236, 235, 231, .35); --accent: #8fb3ec; --blueprint: #8fb3ec;
    --pill: #262522; --pill-ink: #cfcdc6; color-scheme: dark;
  }
}

/* high contrast: pure ink, firmer lines and underlines, bigger focus rings */
:root.contrast-high { --ink: #000; --ink-strong: #000; --muted: #262626; --rule: #6b6b6b; --line: #000; --pill: #fff; --pill-ink: #000; --soft: #f0f0f0; }
:root.contrast-high.theme-dark { --paper: #000; --ink: #fff; --ink-strong: #fff; --muted: #e0e0e0; --rule: #9a9a9a; --line: #fff; --pill: #000; --pill-ink: #fff; --soft: #1a1a1a; }
@media (prefers-color-scheme: dark) {
  :root.contrast-high:not(.theme-light) { --paper: #000; --ink: #fff; --ink-strong: #fff; --muted: #e0e0e0; --rule: #9a9a9a; --line: #fff; --pill: #000; --pill-ink: #fff; --soft: #1a1a1a; }
}
.contrast-high a { text-decoration-thickness: 2px; }
.contrast-high :focus-visible { outline-width: 3px; }
.contrast-high .type { border: 1px solid currentColor; }

/* Roger's chosen colour for the site (Settings). It applies in light mode
   only, so that a visitor's dark mode or high contrast always wins. */
:root:not(.theme-dark):not(.contrast-high) body.bg-paper { --paper: #f6f2e9; --soft: #eee8dc; --rule: #e2dacb; --pill: #ebe4d6; }
:root:not(.theme-dark):not(.contrast-high) body.bg-stone { --paper: #ebeae6; --soft: #e1dfd9; --rule: #d3d1ca; --pill: #dedcd5; }
:root:not(.theme-dark):not(.contrast-high) body.bg-sage  { --paper: #e5ebe3; --soft: #dae3d8; --rule: #c9d3c6; --pill: #d6dfd3; }
:root:not(.theme-dark):not(.contrast-high) body.bg-sky   { --paper: #e5edf5; --soft: #d9e4ef; --rule: #c6d3e0; --pill: #d4e0ec; }
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) body:not(.bg-blueprint) { --paper: #121211; --soft: #1c1c1a; --rule: #2d2c29; --pill: #262522; }
}
/* the blueprint page: blueprint blue, always, the same deep blue in light and dark mode */
body.bg-blueprint {
  --paper: #163a75; --ink: #ffffff; --ink-strong: #ffffff; --muted: #d5e0f3; --rule: rgba(255, 255, 255, .28);
  --soft: rgba(255, 255, 255, .08); --line: rgba(255, 255, 255, .55); --accent: #ffffff; --blueprint: #ffffff;
  --pill: rgba(255, 255, 255, .14); --pill-ink: #ffffff; color-scheme: dark;
}

/* ---- base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px;
    text-decoration-color: var(--line); text-underline-offset: .22em; transition: text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: absolute; top: .5rem; left: .5rem; z-index: 30; background: var(--paper); padding: .5rem .75rem; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---- the left-hand column ------------------------------------------------- */

.side {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--side);
  padding: 4.5rem 1.5rem 2rem var(--gutter);
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: flex-start;
}
.site-name {
  font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em;
  text-decoration: none; color: var(--ink-strong);
  margin-bottom: 2.6rem;
}
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: 0; }
.side nav a {
  display: inline-block; padding: .22rem 0; color: var(--muted); text-decoration: none;
  transition: color .15s;
}
.side nav a:hover { color: var(--ink-strong); }
.side nav a[aria-current] { color: var(--ink-strong); font-weight: 550; }
.menu-toggle { display: none; }

/* Settings > A note under the menu */
.side-note { margin-top: 1.8rem; max-width: 15rem; font-size: var(--fs-small); line-height: 1.5; color: var(--muted); }
.side-note a { color: var(--ink); }
.side-credit { margin: 1rem 0 0; max-width: 15rem; font-size: .8rem; line-height: 1.4; color: var(--muted); }
.side-credit a { color: inherit; }
.note-under, .credit-under { display: none; }
.cover-link { display: block; }

/* Display: text size, colours, contrast */
.display { margin-top: 2.2rem; }
.display-toggle {
  display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-size: var(--fs-small);
  color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: .35rem .85rem; cursor: pointer;
}
.display-toggle:hover, .display-toggle[aria-expanded="true"] { color: var(--ink); border-color: var(--muted); }
.display-panel { margin-top: .8rem; padding: .9rem; border: 1px solid var(--rule); border-radius: .75rem; background: var(--paper); max-width: 17rem; }
.display-panel[hidden] { display: none; }
.pref { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .8rem; }
.pref:last-child { margin-bottom: 0; }
.pref-name { width: 100%; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pref button {
  font: inherit; font-size: .85rem; color: var(--ink); background: var(--soft); border: 1px solid transparent;
  border-radius: .5rem; padding: .3rem .65rem; cursor: pointer; min-height: 2.1rem;
}
.pref button:hover { border-color: var(--rule); }
.pref button.on { background: var(--ink); color: var(--paper); }
.pref .a-l { font-size: 1rem; } .pref .a-xl { font-size: 1.2rem; }

/* ---- the content column ----------------------------------------------------- */

.content {
  margin-left: var(--side);
  padding: 4.5rem var(--gutter) 6rem 0;
  max-width: calc(var(--side) + var(--wide) + var(--gutter));
  position: relative;
}

h1, h2, h3 { color: var(--ink-strong); line-height: 1.25; }
h1 { font-size: var(--fs-h1); font-weight: 650; margin: 0 0 .9rem; letter-spacing: -.025em; }
h2 { font-size: var(--fs-h2); font-weight: 600; margin: 2.4rem 0 .7rem; letter-spacing: -.015em; }
h3 { font-size: var(--fs-h3); font-weight: 600; margin: 1.8rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }

.subtitle { margin: -.4rem 0 1.4rem; color: var(--muted); font-size: 1.05rem; }
.subtitle strong { font-weight: 600; color: var(--ink); }
.intro { color: var(--muted); max-width: var(--measure); }

/* the facts above the words */
.facts {
  display: flex; flex-wrap: wrap; gap: .9rem 2.6rem;
  margin: 0 0 2.2rem; padding: 1rem 0; max-width: var(--col);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.facts div { min-width: 0; }
.facts dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.facts dd { margin: 0; font-weight: 500; }

/* the words */
.prose { max-width: var(--measure); }
/* links within a page: the list at the top, and room above a section jumped to */
.on-this-page { margin: 0 0 2rem; padding: .9rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.prose .on-this-page ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; }
.prose .on-this-page li { margin: 0; }
.prose [id] { scroll-margin-top: 1.5rem; }
@media (max-width: 52rem) { .prose [id] { scroll-margin-top: 5rem; } }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--muted); }
.prose .f { font-size: var(--fs-small); color: var(--muted); }
.prose .c { text-align: center; }
.prose .r { text-align: right; }
.prose blockquote {
  margin: 1.6rem 0; padding: .1rem 0 .1rem 1.3rem; border-left: 3px solid var(--rule);
  font-size: 1.1rem; font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* pictures among the words: a size, and a side the words wrap round */
.prose figure { margin: 1.8rem auto; }
.prose figure img { width: 100%; border-radius: 2px; }
.prose figure.w33 { width: 33%; } .prose figure.w50 { width: 50%; } .prose figure.w66 { width: 66%; }
.prose figure.fl { float: left; margin: .4rem 1.8rem 1rem 0; }
.prose figure.fr { float: right; margin: .4rem 0 1rem 1.8rem; }
.prose h2, .prose h3 { clear: both; }
.prose::after { content: ""; display: block; clear: both; }
figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: .5rem; line-height: 1.45; }

/* styled display titles: the word stays whole in the markup, CSS spaces it */
.t-spaced, .t-blueprint { letter-spacing: .42em; font-weight: 600; }
/* letter-spaced words, from the editor's spacing button; wider in a title */
.ls { letter-spacing: .3em; }
/* words in another lettering (the words toolbar's Lettering); fonts every device has */
.ff-times   { font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 1.08em; }
.ff-georgia { font-family: Georgia, "Times New Roman", serif; }
.ff-courier { font-family: "Courier New", Courier, "Liberation Mono", monospace; }
h1 .ls, .t-spaced .ls { letter-spacing: .42em; }
h1 strong { font-weight: 800; }
.t-blueprint { color: var(--blueprint); text-transform: lowercase; }

/* ---- galleries and the lightbox ---------------------------------------------- */

.gallery {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.2rem 3.5%; margin: 2.6rem 0; max-width: var(--wide); align-items: start;
}
/* Normal is three to a row, as the old site had them; Small four, Large two */
.gallery figure { margin: 0; grid-column: span 4; }
.gallery figure.g-s { grid-column: span 3; }
.gallery figure.g-l { grid-column: span 6; }
.gallery figure.g-full { grid-column: span 12; }
.gallery a.lb { display: block; cursor: zoom-in; overflow: hidden; border-radius: 2px; }
.gallery a.lb img { transition: transform .5s ease; }
.gallery a.lb:hover img { transform: scale(1.015); }
.credit { display: block; font-size: .78rem; margin-top: .2rem; opacity: .85; }
.story-link { display: inline-flex; vertical-align: -.15em; margin-left: .3rem; color: var(--ink); }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 4.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 5rem); max-width: 100%; width: auto; object-fit: contain; }
.lightbox figcaption { margin-top: .5rem; }
.lightbox figcaption { text-align: center; max-width: 40rem; }
.lightbox button {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 2.9rem; height: 2.9rem; padding: 0; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { border-color: var(--muted); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-zoom { top: 1rem; right: 4.6rem; }
.lb-zoom svg { display: block; }
.lightbox.zooming .lb-zoom { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lightbox.zooming img { cursor: none; touch-action: none; }
.lb-lens {
  position: fixed; z-index: 101; width: 16rem; height: 16rem; border-radius: 50%; pointer-events: none;
  background-color: var(--paper); background-repeat: no-repeat;
  border: 2px solid var(--paper); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 .8rem 2rem -.6rem rgba(0, 0, 0, .5);
}
.lb-lens[hidden] { display: none; }
/* while magnifying: the lens size and how much larger */
.lb-zoombar { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 102;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; padding: .35rem .6rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; font-size: .85rem; max-width: calc(100% - 11rem); }
.lb-zoombar[hidden] { display: none; }
.lb-zoombar div { display: flex; align-items: center; gap: .2rem; }
.lb-zoombar span { color: var(--muted); margin-right: .25rem; }
.lightbox .lb-zoombar button { position: static; width: auto; height: auto; min-height: 2rem; padding: .2rem .65rem;
  border-radius: 999px; font-size: .85rem; border: 1px solid transparent; background: var(--soft); }
.lightbox .lb-zoombar button.on { background: var(--ink); color: var(--paper); }

/* ---- lists of things ------------------------------------------------------------- */

/* the exhibition filter: All / Solo / Group / Liaison */
.filter { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.4rem; }
.filter a { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .95rem; border: 1px solid var(--rule);
  border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .95rem; transition: border-color .15s, background .15s; }
.filter a:hover { border-color: var(--muted); }
.filter a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter-about { color: var(--muted); margin: -.6rem 0 1.2rem; max-width: var(--measure); }

.exhibitions { width: 100%; max-width: var(--wide); border-collapse: collapse; margin: .5rem 0 1.5rem; font-variant-numeric: tabular-nums; }
.exhibitions th {
  text-align: left; font-weight: 500; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 0 1rem .7rem 0; border-bottom: 1px solid var(--ink);
}
.exhibitions td { padding: .95rem 1rem .95rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.exhibitions tbody tr { transition: background .15s; }
.exhibitions tbody tr:hover { background: var(--soft); }
.exhibitions .yr { width: 6rem; color: var(--muted); padding-left: .4rem; white-space: nowrap; }
.exhibitions .ti a { font-weight: 500; text-decoration-line: none; }  /* Roger: no underline on the shows */
.exhibitions .ti a:hover { text-decoration-line: underline; }
.exhibitions .ve { color: var(--muted); font-size: var(--fs-small); padding-top: 1.05rem; }
.exhibitions .ty { width: 7.5rem; }
.exhibitions small { display: block; font-size: var(--fs-small); color: var(--muted); margin-top: .2rem; }
.exhibitions small strong { font-weight: 600; color: var(--ink); }
.type { display: inline-block; font-size: .78rem; padding: .12rem .6rem; border-radius: 999px; background: var(--pill); color: var(--pill-ink); white-space: nowrap; }

.dated { list-style: none; padding: 0; max-width: var(--measure); font-variant-numeric: tabular-nums; }
.dated li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.dated .yr { color: var(--muted); }
.dated .ti a { font-weight: 500; }
.dated small { display: block; color: var(--muted); font-size: var(--fs-small); margin-top: .2rem; }

.link-group ul, .press ul, .related ul, .downloads ul { list-style: none; padding: 0; max-width: var(--measure); }
.link-group li, .press li, .related li, .downloads li { margin-bottom: .6rem; }
/* the Links page, kept tight: one link to a line, little space between */
.link-group { margin-bottom: 1.8rem; }
.link-group h2 { margin: 1.6rem 0 .5rem; }
.link-group ul { margin: 0; }
.link-group li { margin-bottom: .2rem; line-height: 1.45; }
.link-group .note { color: var(--muted); }
.downloads .size { color: var(--muted); font-size: var(--fs-small); margin-left: .4rem; }
.downloads .note { display: block; color: var(--muted); font-size: var(--fs-small); }
.press, .related, .downloads { margin-top: 2.8rem; }
.downloads { margin-bottom: 2.4rem; }
.press h2, .related h2, .downloads h2, .link-group h2 { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

.results { list-style: none; padding: 0; max-width: var(--measure); }
.results li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.results li > a, .results li > div > a:first-child { font-weight: 500; }
.results li.with-thumb { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; align-items: start; }
.results .thumb img { width: 5.5rem; height: 4.2rem; object-fit: cover; border-radius: 3px; background: var(--soft); }
@media (max-width: 500px) { .results li.with-thumb { grid-template-columns: 4rem 1fr; gap: .8rem; } .results .thumb img { width: 4rem; height: 3.2rem; } }
.results .kind { display: block; font-size: var(--fs-small); color: var(--muted); }
.results p { margin: .35rem 0 0; font-size: var(--fs-small); color: var(--muted); }
.count { color: var(--muted); }
.results mark { background: color-mix(in srgb, #f2d46b 55%, transparent); color: inherit; border-radius: 2px; padding: 0 .1em; }
.contrast-high .results mark { background: #ffe14d; color: #000; }
.search-tip, .search-note { color: var(--muted); max-width: var(--measure); }
.search-note a { color: var(--ink); font-weight: 500; }

/* ---- forms ------------------------------------------------------------------------ */

form.search { display: flex; gap: .6rem; max-width: 34rem; margin-bottom: 1.4rem; }
input, textarea { font: inherit; color: var(--ink); width: 100%; padding: .7rem .9rem;
  border: 1px solid var(--rule); border-radius: .6rem; background: var(--paper); }
input:focus, textarea:focus { border-color: var(--muted); outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; }
form.search button, form.contact button {
  padding: .7rem 1.3rem; border: 1px solid var(--ink); border-radius: .6rem;
  background: var(--ink); color: var(--paper); cursor: pointer; font-weight: 500; white-space: nowrap;
}
form.search button:hover, form.contact button:hover { opacity: .85; }
form.contact { max-width: 34rem; display: grid; gap: .35rem; }
form.contact label { margin-top: .8rem; font-weight: 500; font-size: .95rem; }
form.contact button { justify-self: start; margin-top: 1.2rem; }
.hp { position: absolute; left: -9999px; }
.notice { padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: .6rem; max-width: 34rem; background: var(--soft); }
.notice.error { border-color: #b33a3a; color: #b33a3a; background: transparent; }

.edit-this {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  display: inline-flex; align-items: center; gap: .4rem;
  background: #1b1b1a; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .25);
  padding: .65rem 1.15rem; font-size: .95rem; font-weight: 500; border-radius: 999px; box-shadow: 0 .5rem 1.5rem -.5rem rgba(0, 0, 0, .45);
}
.preview-note { background: #fff6d6; color: #3d3410; border: 1px solid #e5c95a; border-radius: .6rem; padding: .7rem 1rem; margin: 0 0 1.6rem; max-width: var(--measure); }
.site-foot { margin-top: 5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-size: var(--fs-small); color: var(--muted); max-width: var(--wide); }

/* ---- How it looks: chosen per page ---------------------------------------------- */

/* width: the words and pictures widen together, so their edges stay lined up */
body.w-wide { --col: 66rem; --measure: var(--col); --wide: var(--col); }
body.w-full { --col: 300rem; --measure: var(--col); --wide: var(--col); }

/* the title's lettering and size; fonts every device already has */
h1.tf-times   { font-family: "Times New Roman", Times, "Liberation Serif", serif; font-weight: 400; letter-spacing: 0; }
h1.tf-georgia { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: 0; }
h1.tf-courier { font-family: "Courier New", Courier, "Liberation Mono", monospace; font-weight: 400; letter-spacing: 0; }
h1.tf-times strong, h1.tf-georgia strong, h1.tf-courier strong { font-weight: 700; }
/* the same lettering for the title in the lists (a serif reads small beside Inter, so a touch larger) */
span.tf-times   { font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 1.1em; letter-spacing: 0; }
span.tf-georgia { font-family: Georgia, "Times New Roman", serif; font-size: 1.02em; letter-spacing: 0; }
span.tf-courier { font-family: "Courier New", Courier, "Liberation Mono", monospace; letter-spacing: 0; }
h1 span.tf-times, h1 span.tf-georgia, h1 span.tf-courier { font-size: 1em; }
h1.ts-s  { font-size: 1.35rem; }
h1.ts-l  { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h1.ts-xl { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; }

/* the main picture right across the top, as wide as the words and pictures below it,
   starting where a page's title would (level with the name), not tight to the edge */
.hero { margin: 0; }
.hero img { width: 100%; }
body.has-hero .hero { width: 100%; max-width: var(--wide); margin: 0 0 2.6rem; }
body.has-hero .hero a.lb { display: block; cursor: zoom-in; }
body.has-hero .hero img { height: auto; }

/* the front page as one big picture (the Home page's choice): everything right of the menu */
body.has-cover .content { padding: 0; max-width: none; }
.cover { margin: 0; }
.cover img { width: 100%; height: 100vh; height: 100dvh; object-fit: cover; }
/* shown whole: never cropped, centred in the space with the page's colour round it, like a mount */
.cover.whole { --pad-y: clamp(2.5rem, 8vh, 6rem); --cap: 0rem;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 100vh; height: 100dvh; padding: var(--pad-y) clamp(2rem, 7vw, 7rem); }
.cover.whole.has-cap { --cap: 3.6rem; }
.cover.whole.has-go { --cap: 3.4rem; }
.cover.whole.has-cap.has-go { --cap: 7rem; }
.cover.whole .cover-frame { display: flex; flex-direction: column; max-width: 100%; }
/* the picture whole, leaving room under it for its caption */
.cover.whole img { width: auto; height: auto; max-width: 100%; object-fit: contain;
  max-height: calc(100vh - 2 * var(--pad-y) - var(--cap)); max-height: calc(100dvh - 2 * var(--pad-y) - var(--cap)); }
/* the caption, like a label on a gallery wall, exactly as wide as the picture above it */
.cover-cap { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  width: 0; min-width: 100%; margin-top: .7rem; color: var(--muted); line-height: 1.35; }
.cover-cap .cap-title { display: block; font-style: italic; font-size: 1.05rem; }
.cover-cap .cap-line { display: block; font-size: .8rem; margin-top: .15rem; }
.cover-cap .cap-right { font-size: .95rem; white-space: nowrap; }
/* filling the screen: the caption sits under the picture, in from the edges */
.cover:not(.whole) .cover-cap { width: auto; padding: 0 2rem; }
/* the button under it that opens the page the picture opens */
.cover-go { margin: .9rem 0 0; }
.cover:not(.whole) .cover-go { padding: 0 2rem; }
.cover-go a { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; border: 1px solid var(--muted);
  border-radius: 999px; color: var(--ink); background: var(--paper); text-decoration: none; font-size: .95rem; }
.cover-go a:hover, .cover-go a:focus-visible { border-color: var(--ink); }
.cover-go .book { flex: none; }
body.has-cover .site-foot { margin: 0; padding: 1.2rem var(--gutter) 2rem 2rem; }

/* ---- the front page laid out visually (includes/front.php) --------------------------- */
/* boxes on a 12-column grid; rows grow to fit the words, a picture never pushes them */
.front-layout { --row: 2.5rem; --gap: 1.2rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--row), auto); gap: var(--gap); max-width: 88rem; }
.fb { grid-column: var(--x) / span var(--w); grid-row: var(--y) / span var(--h); min-width: 0; margin: 0; }
.fb-text .fb-words { max-width: none; }
.fb-text .fb-words > :first-child { margin-top: 0; }
.fb-text .fb-words > :last-child { margin-bottom: 0; }
.fb-text.fs-s { font-size: .85em; } .fb-text.fs-l { font-size: 1.3em; } .fb-text.fs-xl { font-size: 1.9em; line-height: 1.25; }
.fb-text.fa-c { text-align: center; } .fb-text.fa-r { text-align: right; }
.fb-text.tf-times { font-family: "Times New Roman", Times, "Liberation Serif", serif; }
.fb-text.tf-georgia { font-family: Georgia, "Times New Roman", serif; }
.fb-text.tf-courier { font-family: "Courier New", Courier, "Liberation Mono", monospace; }
.fb-pic { display: flex; flex-direction: column; }
.fb-frame { position: relative; flex: 1; min-height: 0; }
.fb-frame > img, .fb-frame > a, .fb-frame > a > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fb-frame img { object-fit: contain; object-position: center top; }
.fit-fill .fb-frame img { object-fit: cover; object-position: center; }
.fb-link { display: block; }
.fb-link:hover img { opacity: .92; }
.fb-cap { flex: none; margin-top: .5rem; font-size: var(--fs-small); color: var(--muted); }
.fb-cap:empty { display: none; }
body.has-layout .content { max-width: none; }

/* Story of the Print: every story as a picture, each opening its story */
.story-grid { list-style: none; padding: 0; margin: 2.4rem 0; max-width: var(--wide);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 2rem 1.6rem; }
.story-grid a, .story-grid li > div { display: block; text-decoration: none; color: var(--ink); }
/* every box the same square, each picture shown whole in it (never cropped), as his framed prints are */
.story-grid .pic { display: block; aspect-ratio: 1; overflow: hidden; }
.story-grid .pic img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: transform .5s ease; }
/* the small book that marks a Story of the Print, beside its title, as it sits beside a gallery caption */
.story-grid .pic-book { flex: none; color: var(--muted); transform: translateY(.15em); }
.story-grid .pic-book .book { width: 1.05rem; height: auto; display: block; }
.story-grid a:hover .pic-book { color: var(--ink); }
.story-grid a:hover .pic img { transform: scale(1.03); }
.story-grid .ti { display: flex; gap: .45rem; align-items: baseline; margin-top: .6rem; font-weight: 500; line-height: 1.35; }
.story-grid a:hover .ti { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .22em; }
.story-grid .yr { display: block; color: var(--muted); font-size: var(--fs-small); margin-top: .15rem; }

/* the front page starts level with the first line of the menu (Home), not with the name */
@media (min-width: 52.01rem) {
  .front .content { padding-top: 9.3rem; }
}

/* ---- phones and narrow windows: one column, menu behind a button ------------------ */

@media (max-width: 52rem) {
  :root { --fs-h1: 1.5rem; }
  .side { position: sticky; top: 0; bottom: auto; z-index: 20; width: auto; padding: .9rem var(--gutter);
          flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
          background: var(--paper); border-bottom: 1px solid var(--rule); overflow: visible; }
  .site-name { margin: 0; font-size: 1.15rem; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid var(--rule);
                 border-radius: 999px; padding: .4rem .95rem; color: var(--ink); cursor: pointer; }
  .side nav { flex-basis: 100%; display: none; padding: 1rem 0 .4rem; max-height: calc(100vh - 4.5rem); overflow-y: auto; }
  .side nav.open { display: block; }
  /* the note under the menu: under the page on a phone, not in the header strip */
  .side .side-note, .side .side-credit { display: none; }
  .note-under { display: block; margin-top: 2.5rem; }
  .note-under .side-note { max-width: none; margin-top: 0; }
  body.has-cover .note-under { margin-top: 0; padding: 1.2rem var(--gutter); }
  .credit-under { display: block; max-width: none; margin: 1.2rem 0 0; }
  body.has-cover .credit-under { margin: 0; padding: .6rem var(--gutter) 2rem; }
  .side nav a { padding: .45rem 0; font-size: 1.05rem; }
  .content { margin: 0; padding: 2rem var(--gutter) 4rem; max-width: none; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
  .gallery figure, .gallery figure.g-s { grid-column: span 1; }
  .gallery figure.g-l, .gallery figure.g-full { grid-column: span 2; }
  .prose figure.w33, .prose figure.w50, .prose figure.w66 { width: 100%; }
  .prose figure.fl, .prose figure.fr { float: none; margin: 1.4rem 0; }
  .facts { gap: .8rem 1.6rem; }
  .lightbox { padding: 3.5rem .5rem; }
  body.has-hero .hero { margin: 0 0 2rem; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
  /* the front page's boxes, one under another, in reading order */
  .front-layout { display: flex; flex-direction: column; gap: 1.6rem; }
  .fb-frame { position: static; }
  .fb-frame > img, .fb-frame > a, .fb-frame > a > img { position: static; width: 100%; height: auto; }
  .cover img { height: calc(100vh - 4.3rem); height: calc(100dvh - 4.3rem); }
  /* no fixed height: the note and credit come straight after the picture, not a screen below it */
  .cover.whole { --pad-y: 1.5rem; height: auto; padding: var(--pad-y) var(--gutter); }
  .cover.whole img { height: auto; max-height: calc(100vh - 4.3rem - 2 * var(--pad-y) - var(--cap)); max-height: calc(100dvh - 4.3rem - 2 * var(--pad-y) - var(--cap)); }
  .cover-cap .cap-right { white-space: normal; text-align: right; }
  .cover:not(.whole) .cover-cap, .cover:not(.whole) .cover-go { padding: 0 var(--gutter); }
  body.has-cover .site-foot { padding: 1.2rem var(--gutter) .6rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
  .lb-zoombar { top: auto; bottom: 4.6rem; max-width: calc(100% - 1rem); }

  /* the exhibition table becomes stacked rows */
  .exhibitions thead { position: absolute; left: -9999px; }
  .exhibitions, .exhibitions tbody, .exhibitions tr, .exhibitions td { display: block; width: auto; }
  .exhibitions tr { display: grid; grid-template-columns: 3.8rem minmax(0, 1fr); column-gap: .6rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
  .exhibitions td { border: 0; padding: 0; }
  .exhibitions .yr { grid-row: span 3; padding-left: 0; }
  .exhibitions .ve { font-size: var(--fs-small); margin-top: .2rem; padding-top: 0; }
  .exhibitions .ty { width: auto; margin-top: .4rem; }
}

/* ---- print: for Roger to mark up changes on paper ---------------------------------- */

/* The whole site on one page (admin: /admin/whole-site) */
.ws-bar { margin-bottom: 2.5rem; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-radius: .5rem; }
.ws-bar h1 { margin-top: 0; }
.ws-opts { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.ws-opts span { color: var(--muted); }
.ws-opts a[aria-current] { font-weight: 600; text-decoration: none; }
.ws-print { font: inherit; padding: .55rem 1.2rem; border: 0; border-radius: .4rem; background: var(--ink); color: var(--paper); cursor: pointer; margin-right: 1rem; }
.ws-contents ol { padding-left: 2.5rem; }
.ws-contents span { color: var(--muted); font-size: .9em; }
.ws-page { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--rule); }
.ws-addr { font-size: .85rem; color: var(--muted); }
.ws-addr a { margin-left: 1rem; }
.no-pics .gallery, .no-pics .prose figure img { display: none; }
.no-pics .prose figure { margin: .5rem 0; float: none; width: auto; }

@media print {
  :root { --paper: #fff; --ink: #000; --muted: #444; --rule: #bbb; }
  .side, .edit-this, .lightbox, form.search, .display, .note-under, .credit-under { display: none !important; }
  .content { margin: 0; padding: 0; max-width: none; }
  a { text-decoration: none; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery figure { grid-column: span 1 !important; }
  .ws-bar, .ws-addr a { display: none !important; }
  .ws-page { break-before: page; margin: 0; padding: 0; border: 0; }
  .ws-addr { margin: 0 0 1rem; }
  figure, img { break-inside: avoid; }
  .whole-site .ws-contents a::after, .whole-site .ws-addr::after { content: none; }
}
