
@font-face{font-family:Libre;src:url(fonts/libre-franklin-variable.ttf)}*{box-sizing:border-box}body{margin:0;background:#000;color:#fff;font:300 15px Libre,Arial,sans-serif}button,a{font:inherit;color:inherit}button{cursor:pointer;background:none;border:0}a{text-decoration:none}button:focus-visible,a:focus-visible{outline:1px solid white;outline-offset:4px}[hidden]{display:none!important}.preview-note{color:#aaa;font-size:11px;border-bottom:1px solid #242424;padding:9px 28px;letter-spacing:.04em}header{padding:22px 28px 0}.identity{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.name{font-size:18px;font-weight:400}.links{display:flex;gap:24px;font-size:14px}.tabs{display:flex;justify-content:center;gap:24px;flex-wrap:wrap}.tabs button{font-size:22px;padding:0 0 7px;font-weight:300}.tabs button[aria-pressed=true]{font-weight:650;border-bottom:1px solid white}.modes{display:flex;justify-content:space-between;align-items:center;margin-top:16px}.modes button{min-height:44px;padding:8px 5px;font-size:16px;color:#aaa}.modes button[aria-pressed=true]{color:white;border-bottom:1px solid white}.content{padding:12px 28px 24px}.stage{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:32px;min-height:500px;align-items:center}.stage.no-info{grid-template-columns:1fr}.picture{position:relative;min-width:0}.hero{width:100%;height:min(57vh,580px);display:block;object-fit:contain}.arrow{position:absolute;top:45%;width:44px;height:44px;background:#0009;font-size:25px;border-radius:50%}.prev{left:0}.next{right:0}.caption{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-top:12px;font-size:12px}.caption button{padding:8px 0;text-decoration:underline;text-underline-offset:5px}.count{font-variant-numeric:tabular-nums;letter-spacing:.06em}.hint{font-size:11px;color:#888;text-align:center;margin:6px 0 18px}.angles{display:flex;justify-content:center;gap:12px}.angles button{width:72px;height:58px;padding:4px;border:1px solid #252525}.angles button[aria-pressed=true]{border-color:#aaa}.angles img{width:100%;height:100%;object-fit:contain}.info{align-self:center;border-top:1px solid #444;padding-top:18px}.info-head{display:flex;justify-content:space-between;align-items:start}.info h1{font-size:22px;line-height:1.35;font-weight:400;margin:0 0 16px}.info p{color:#bcbcbc;font-size:13px;line-height:1.8}.info .small{font-size:11px;color:#777}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:32px 24px;padding-top:12px}.tile{text-align:left;padding:0;align-self:start}.tile img{width:100%;height:190px;object-fit:contain;display:block;margin-bottom:12px}.grid.photos .tile img{height:auto;max-height:350px;object-fit:contain}.tile-title{display:block;font-size:12px;color:#ccc}.tile-sub{display:block;font-size:11px;color:#777;margin-top:5px}.grid-heading{color:#888;font-size:12px;margin:12px 0 14px}.about{position:fixed;inset:0;background:#000c;z-index:4;display:grid;place-items:center;padding:24px}.about-card{background:#0b0b0b;border:1px solid #333;padding:32px;max-width:520px}.about-card h2{font-size:28px;font-weight:400}.about-card p{line-height:1.8;color:#ccc}.about-card button{float:right}.video{width:100%;height:58vh}.film-credit{font-size:13px;color:#aaa}.book-caption{text-align:center;color:#aaa;font-size:13px;margin-bottom:12px}@media(max-width:850px){.grid{grid-template-columns:repeat(3,1fr)}.stage{grid-template-columns:minmax(0,1fr) 240px;gap:20px}.hero{height:48vh}.tabs button{font-size:18px}}@media(max-width:600px){header{padding:16px 16px 0}.preview-note{padding:8px 16px}.identity{margin-bottom:20px}.tabs{gap:12px 18px}.tabs button{font-size:16px}.content{padding:12px 16px 24px}.stage{display:block;min-height:0}.hero{height:43vh}.info{margin-top:24px}.grid{grid-template-columns:repeat(2,1fr);gap:24px 18px}.tile img{height:160px}.links{gap:16px}.name{font-size:16px}}

html{min-height:100%;scrollbar-width:none}body{min-height:100dvh}header{padding-top:18px}.identity{margin-bottom:18px}.content{padding-top:12px}.stage{min-height:0}.hero{height:calc(100dvh - 300px);min-height:280px;max-height:680px}.stage.no-info{grid-template-columns:1fr}.picture{width:100%}.caption{display:grid;grid-template-columns:1fr auto 1fr;min-height:36px}.caption .count{grid-column:2;font-size:13px}.caption .zoom-button{grid-column:3;justify-self:end}.caption .work-title{grid-column:1;font-size:13px}.angles{flex-wrap:wrap}.angles button{min-height:58px}.grid.photos{align-items:start}.grid.photos .tile img{max-height:none}.grid:not(.photos) .tile img{height:220px}.tile-sub{margin-top:10px}.tile-title:empty{display:none}.status{text-align:center;padding:80px 24px;color:#aaa;font-size:13px}.status button{text-decoration:underline}.about{width: min(500px, calc(100vw - 32px));height:auto;max-height:85dvh;inset:0;margin:auto;padding:28px;background:#0a0a0a;border:1px solid #444;color:white;overflow:auto}.about::backdrop,.zoom::backdrop{background:#000c}.about h2{font-size:28px;font-weight:400;margin:12px 0 20px}.about p{line-height:1.8;color:#bbb}.dialog-close{display:block;margin-left:auto;min-width:44px;min-height:44px}.about a{text-decoration:underline;text-underline-offset:5px}.zoom{background:#000;color:white;border:0;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;padding:12px;margin:0}.zoom .dialog-close{position:fixed;right:16px;top:12px;padding:8px 12px;background:#000c;z-index:1}.zoom-scroll{height:100%;overflow:auto}.zoom img{display:block;width:160%;max-width:none;height:auto;margin:48px 0 0}.film-credit{display:flex;justify-content:space-between}.film-credit span{font-size:12px;color:#888}.video{height:calc(100dvh - 205px);min-height:280px}.hint{margin-bottom:14px}.tile{min-width:0}a:focus-visible,button:focus-visible{outline-offset:3px}.modes button{min-width:64px}.site-loading{opacity:.55}@media(min-width:1000px){.stage.no-info .picture{max-width:1400px;margin:auto}}@media(max-width:600px){.hero{height:calc(100dvh - 330px);min-height:220px}.grid:not(.photos) .tile img{height:175px}.grid{gap:22px 16px}.caption .work-title{font-size:11px}.caption .count{font-size:12px}.caption .zoom-button{font-size:12px}.identity{margin-bottom:16px}.hint{font-size:11px}.about{display:block}.video{height:55dvh}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

dialog:not([open]){display:none!important}.about{display:block;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0}

/* Make alternate views easier to identify and select. */
.angles{gap:14px;margin-top:8px}
.angles button{width:100px;height:80px;min-height:80px;padding:6px;border:1px solid #666;background:#0c0c0c}
.angles button[aria-pressed=true]{border:2px solid #fff;padding:5px;background:#161616}
.angles button:hover{border-color:#ddd;background:#161616}
.hint{font-size:13px;color:#bcbcbc;margin:8px 0 16px}
.picture:has(.angles) .hero{height:calc(100dvh - 358px)}
@media(max-width:600px){.picture:has(.angles) .hero{height:calc(100dvh - 388px)}}
@media(max-width:360px){.angles{gap:10px}.angles button{width:88px;height:72px;min-height:72px}}

/* A slightly tighter header gives the work more room. */
header{padding:14px 24px 0}
.identity{margin-bottom:12px}
.tabs button{font-size:21px;padding-bottom:5px}
.modes{margin-top:10px}
.content{padding:8px 24px 24px}
.hero{height:calc(100dvh - 296px);max-height:687px}
.picture:has(.angles) .hero{height:calc(100dvh - 354px)}
.video{height:calc(100dvh - 201px)}
.grid{gap:28px 20px}
.grid:not(.photos) .tile img{height:222px}
@media(max-width:850px){.tabs button{font-size:17.5px}}
@media(max-width:600px){
 header{padding:12px 12px 0}
 .identity{margin-bottom:10px}
 .tabs{gap:10px 16px}
 .tabs button{font-size:15.5px}
 .content{padding:8px 12px 24px}
 .hero{height:calc(100dvh - 326px)}
 .picture:has(.angles) .hero{height:calc(100dvh - 384px)}
 .video{height:calc(55dvh + 4px)}
 .grid{gap:20px 14px}
 .grid:not(.photos) .tile img{height:177px}
}

/* Enlarge the ten framed works within their existing black canvas. */
.hero.framed-work,.tile img.framed-work{transform:scale(1.12);clip-path:inset(5.357142857%)}

.picture:has(.framed-work),.tile:has(.framed-work){overflow:hidden}

/* A small extra increase for the colorful framed works. */
.hero.colorful-frame,.tile img.colorful-frame{transform:scale(1.176);clip-path:inset(7.482993197%)}

/* Fit enlarged images first; preserve detailed viewing at their native size. */
.zoom{overflow:hidden}
.zoom .zoom-scroll{display:flex;align-items:center;justify-content:center;overflow:auto;padding:60px 10px 12px}
.zoom img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 96px);margin:0;object-fit:contain}
.zoom.is-detail .zoom-scroll{display:block}
.zoom.is-detail img{max-width:none;max-height:none;margin:0 auto}
.zoom-detail{position:fixed;left:20px;top:12px;min-height:44px;padding:8px 12px;background:#000;z-index:2;text-decoration:underline;text-underline-offset:4px}

.labelled-image { position: relative; }
.labelled-image .arrow { top: 50%; transform: translateY(-50%); }
.artwork-label { display: block; font-size: 13px; line-height: 1.45; color: #ddd; }
.artwork-label > * { display: block; }
.artwork-label cite { font-style: italic; color: white; }
.picture > .artwork-label, .artist-note { max-width: 34rem; margin: 12px auto 0; text-align: center; }
.artist-note { font-size: 13px; color: #ccc; }
.artist-note summary { cursor: pointer; }
.artist-note p { text-align: left; line-height: 1.6; }

.viewer-tools { margin: 14px auto 0; max-width: 44rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1px solid #303030; }
.page-controls { grid-column: 2; display: flex; align-items: center; gap: clamp(8px,2vw,26px); }
.viewer-tools button { font-size: 14px; min-height: 44px; padding: 0 5px; }
.viewer-tools button:hover { text-decoration: underline; text-underline-offset: 4px; }
.viewer-tools .count { color: #aaa; font-size: 12px; }
.viewer-zoom { justify-self: end; color: #bbb; }
.angles button { background: transparent; border: 1px solid #333; }
.angles button[aria-pressed=true] { background: transparent; border: 1px solid #aaa; padding: 6px; }
@media(max-width:480px) { .viewer-tools {grid-template-columns:1fr auto;} .page-controls {grid-column:1;justify-self:start;} }


.image-viewport {min-width:0;min-height:0;overflow:auto;scrollbar-width:none;}
.picture .image-viewport .hero {width:100%;height:100%;min-height:0;max-height:none;display:block;margin-inline:auto;}
.viewer-tools {border:0;max-width:none;margin-top:24px;grid-template-columns:1fr auto 1fr;}
.viewer-tools button:first-of-type {justify-self:start;} .viewer-tools button:last-of-type {justify-self:end;}
.viewer-tools button:disabled {opacity:.35;cursor:default;}
footer {display:grid;justify-items:center;padding:0 16px max(8px, env(safe-area-inset-bottom));}
#background {
  display: flex;
}
#background button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}
#background button::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1px solid #888;
  border-radius: 50%;
  background: #000;
}
#background button[data-background="white"]::before {
  background: #fff;
}
#background button[aria-pressed="true"]::before {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}
#background button:focus-visible {
  outline-color: currentColor;
  outline-offset: -5px;
}
.image-viewport {display:flex;flex-direction:column;}
.picture .image-viewport .hero {flex:none;margin-block:auto;}
.grid {column-gap:clamp(12px,1.4vw,20px);}
.grid:not(.photos) .tile img {height:232px;}
@media(max-width:600px){.grid:not(.photos) .tile img{height:185px;}}

.side-viewer {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  gap: 8px;
  align-items: center;
}
.side-viewer > button {
  min-height: 44px;
  padding: 0;
  background: transparent;
  font-size: 14px;
}
.side-previous { justify-self: start; }
.side-next { justify-self: end; }
.side-viewer > button:hover { text-decoration: underline; text-underline-offset: 4px; }
@media(max-width:600px) {
  .side-viewer { grid-template-columns: 57px minmax(0, 1fr) 57px; gap: 5px; }
  .side-viewer > button { font-size: 12px; }
}

/* Slightly larger artwork information throughout the preview. */
.artwork-label, .artist-note { font-size: 13.5px; }
.viewer-tools .count { font-size: 12.5px; }
.tile-title { font-size: 12.5px; }
.tile-sub { font-size: 11.5px; }
.caption .work-title { font-size: 13.5px; }
.caption .count { font-size: 13.5px; }
@media(max-width:600px) {
  .caption .work-title { font-size: 11.5px; }
  .caption .count { font-size: 12.5px; }
}

.light-background {
  background: #fff;
  color: #171717;
}
.light-background :is(.modes button, .artwork-label, .artwork-label cite, .artist-note,
  .viewer-tools .count, .tile-title, .tile-sub, .grid-heading, .film-credit, .caption) {
  color: #171717;
}
.light-background :is(.modes button, .tabs button)[aria-pressed="true"] {
  border-color: currentColor;
}
.light-background :is(button, a):focus-visible {
  outline-color: currentColor;
}
.light-background .about {
  color: #fff;
}

/* Give the image the space left after the caption and viewer controls. */
body:has(> footer:not([hidden])) {
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  height: 100dvh;
}

header {
  background: transparent;
}

body:has(> footer:not([hidden])) header {
  padding-top: 10px;
}

body:has(> footer:not([hidden])) .identity {
  margin-bottom: 6px;
}

body:has(> footer:not([hidden])) .modes {
  margin-top: 2px;
}

.content:has(.stage),
.stage.no-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.content:has(.stage) {
  padding-block: 2px 4px;
}

.stage.no-info .picture {
  display: grid;
  grid-template-rows: minmax(140px, 1fr);
  max-width: none;
  margin: 0;
  overflow: visible;
}

.stage .side-viewer {
  grid-template-rows: minmax(0, 1fr);
}

.image-viewport {
  contain: size;
  align-self: stretch;
}

.picture > .artwork-label,
.artist-note {
  position: relative;
  top: 13px;
  margin-top: 8px;
}

.picture > .artwork-label {
  margin-top: clamp(12px, 2dvh, 18px);
}

.viewer-tools {
  width: 100%;
  margin-top: 4px;
}

.viewer-magnify {
  display: flex;
  gap: clamp(2px, 1vw, 14px);
  justify-self: start;
}

.viewer-tools .count {
  align-self: end;
  margin-bottom: 5px;
  color: #fff;
  font-size: 13px;
}

.angles button {
  height: 60px;
  min-height: 60px;
}

@media (min-width: 851px) {
  body:has(.video) {
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  header {
    flex: none;
  }

  .content:has(.video) {
    flex: 1;
    min-height: 0;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
  }

  .video {
    flex: 1;
    height: 0;
    min-height: 0;
  }
}

/* The outline follows the artwork so the page color shows around each frame. */
img[src*="/book/black/"] {
  mask: var(--frame-outline, none) center / contain no-repeat;
}
img[src$="/book/black/page-02.webp"] { --frame-outline: url("media/book/outlines/page-02.svg"); --frame-viewer-scale: 1.144; }
img[src$="/book/black/page-03.webp"] { --frame-outline: url("media/book/outlines/page-03.svg"); --frame-viewer-scale: 1.727; }
img[src$="/book/black/page-04.webp"] { --frame-outline: url("media/book/outlines/page-04.svg"); --frame-viewer-scale: 1.470; }
img[src$="/book/black/page-05.webp"] { --frame-outline: url("media/book/outlines/page-05.svg"); --frame-viewer-scale: 1.199; }
img[src$="/book/black/page-06.webp"] { --frame-outline: url("media/book/outlines/page-06.svg"); --frame-viewer-scale: 1.604; }
img[src$="/book/black/page-07.webp"] { --frame-outline: url("media/book/outlines/page-07.svg"); --frame-viewer-scale: 1.432; }
img[src$="/book/black/page-08.webp"] { --frame-outline: url("media/book/outlines/page-08.svg"); --frame-viewer-scale: 1.625; }
img[src$="/book/black/page-09.webp"] { --frame-outline: url("media/book/outlines/page-09.svg"); --frame-viewer-scale: 1.737; }
img[src$="/book/black/page-10.webp"] { --frame-outline: url("media/book/outlines/page-10.svg"); --frame-viewer-scale: 1.536; }
img[src$="/book/black/page-11.webp"] { --frame-outline: url("media/book/outlines/page-11.svg"); --frame-viewer-scale: 1.653; }

/* Keep the original scans and let the gallery background show outside the collage. */
img:is([src$="/artwork/art-09.webp"], [src$="/artwork/art-09.jpg"]) {
  mask: url("media/artwork/francis-and-lennon-outline.svg") center / contain no-repeat;
  --artwork-viewer-scale: 1.17;
}

/* Enlarge framed works in the viewer while keeping the entire outline in view. */
.hero.framed-work[src*="/book/black/"] {
  transform: scale(var(--frame-viewer-scale, 1.12));
}

/* Fill more of the viewer with the artwork inside the scan's white margin. */
.hero[src$="/artwork/art-09.webp"] {
  transform: scale(var(--artwork-viewer-scale));
}

.image-viewport:not(.is-zoomed):has(.hero.framed-work, .hero[src$="/artwork/art-09.webp"]) {
  overflow: clip;
}

.picture .image-viewport.is-zoomed .hero {
  width: calc(100% * var(--zoom-scale));
  height: calc(100% * var(--zoom-scale));
}

.image-viewport.is-zoomed {
  cursor: grab;
}

.image-viewport.is-zoomed:active {
  cursor: grabbing;
}

.image-viewport:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

/* Fit the artwork's visible outline in the zoom view as well. */
.zoom:not(.is-detail) img:is([src*="/book/black/"], [src$="/artwork/art-09.webp"], [src$="/artwork/art-09.jpg"]) {
  scale: var(--frame-viewer-scale, var(--artwork-viewer-scale));
}

.zoom:not(.is-detail) .zoom-scroll {
  overflow: clip;
}

@media (max-width: 850px) {
  .content[aria-label="Artwork"] .side-viewer {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .content[aria-label="Artwork"] .image-viewport {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .content[aria-label="Artwork"] ~ .zoom {
    padding-inline: 0;
  }

  .content[aria-label="Artwork"] ~ .zoom .zoom-scroll {
    padding-inline: 6px;
  }
}

@media (max-width: 600px) {
  .viewer-magnify button,
  .viewer-tools > button {
    font-size: 12px;
  }

  .angles button {
    width: clamp(48px, 18vw, 100px);
    height: 48px;
    min-height: 48px;
  }
}

.identity .name {
  font-size: clamp(20px, 1.6vw, 23px);
}
@media (min-width: 760px) {
  header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  header .identity { display: contents; }
  header .name { grid-area: 1 / 1; justify-self: start; }
  header .tabs { grid-area: 1 / 2; }
  header .links { grid-area: 1 / 3; justify-self: end; }
  header .modes { grid-column: 1 / -1; }
}
@media (max-width: 759px) {
  header, body:has(> footer:not([hidden])) header { padding-top: 6px; }
  header .identity, body:has(> footer:not([hidden])) .identity { margin-bottom: 2px; }
}
