/* Stage s30 (from s29): the media piece on a dark ground; type in a light or a dark ink, no shadows, halos, veils, plates
   or rounded corners. */
/* the ink of the caption and of the bottom text, one per band; app.js flips html.ink-cap-dark and .ink-bot-dark where the
   scene behind turns light, and the registered colours ease over 0.6 s. The signature, the title and the intro have one
   fixed colour each (--logo-ink, --title-ink). */
@property --title-ink { syntax: '<color>'; inherits: true; initial-value: #030303; }
@property --lede-ink { syntax: '<color>'; inherits: true; initial-value: #030303; }
@property --glow-t { syntax: '<color>'; inherits: true; initial-value: rgba(255, 255, 255, 0.2); }
@property --glow-l { syntax: '<color>'; inherits: true; initial-value: rgba(255, 255, 255, 0.2); }
@property --ink-cap { syntax: '<color>'; inherits: true; initial-value: #fff; }
@property --ink-bot { syntax: '<color>'; inherits: true; initial-value: #fff; }
@font-face { font-family: 'Imbue'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../../fonts/imbue-latin-var.woff2') format('woff2'); }
/* the axes (axes.js) arrive from app.js as --edge, --top-line, --bot-gap, --logo-top, --logo-h; the values here hold until then */
:root {
  --font-period: 'Imbue', Georgia, serif; /* the title and the clock, a narrow Didone */
  --period-weight: 200;
  --clock-weight: 400; /* the clock is squeezed sideways by --clock-k, so it takes a heavier weight to keep the stems */
  --clock-k: 0.625;
  --clock-shrink: 0px;
  --title-ink: #030303; /* the title and the intro: near-black, lifted a little by app.js over a very dark sky, easing over 1.2 s */
  --logo-ink: #fff; /* the signature */
  --lede-ink: #030303;
  --glow-t: rgba(255, 255, 255, 0.2); /* a very faint light halo behind the black title and intro */
  --glow-l: rgba(255, 255, 255, 0.2);
  --edge: 40px;
  --top-line: 76px;
  --bot-gap: 24px;
  --logo-top: 14px;
  --logo-h: 48px;
  --title-size: 48px;
  --title-off: 0px;
  --clock-size: 100px;
  --clock-fig: 89px;
  --clock-pad: 0px;
  --cx-l: 110px;
  --cx-r: 1175px;
  --col-bottom: 36px;
  --play: 73px;
  --step: 29px;
  --ctl-gap: 9.5px;
  --lede-gap: 12px;
  --cap-gap: 54px;
  --about-gap: 72px;
  --years-bottom: 36px;
  --clock-digit: 0.55em;
  --font-display: 'Spectral', Georgia, serif;
  --font-text: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --title-weight: 600;
  --title-tracking: -0.012em;
  --ui-weight: 600;
  --label-tracking: 0.13em;
  --num-weight: 600;
  --num-tracking: 0em;
  --num-variant: tabular-nums lining-nums;
  --num-feature: "tnum" 1, "lnum" 1;
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, 0.88);
  --ink-faint: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.55);
  --ground: #0d0f12;
  --ink-cap: #fff;
  --ink-bot: #fff;
  --drop: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.35));
  --waterloo: #5d9ef0;
  --charing: #f39a3c;
  --loc-w: 190px;
  --loc-h: 203px;
  --col: clamp(300px, 25vw, 380px);
  color-scheme: dark;
  transition: --ink-cap 0.6s ease, --ink-bot 0.6s ease, --title-ink 1.2s ease, --lede-ink 1.2s ease, --glow-t 1.2s ease, --glow-l 1.2s ease;
}

html.ink-cap-dark { --ink-cap: #07080a; }
html.ink-bot-dark { --ink-bot: #07080a; }

.hdr {
  --ink: var(--title-ink);
  --ink-soft: var(--lede-ink);
  --ink-faint: var(--lede-ink);
  --line: var(--title-ink);
}

.cap,
.op,
.info,
.tip {
  --ink: var(--ink-cap);
  --ink-soft: color-mix(in srgb, var(--ink-cap) 88%, transparent);
  --ink-faint: color-mix(in srgb, var(--ink-cap) 72%, transparent);
  --line: color-mix(in srgb, var(--ink-cap) 55%, transparent);
}

html.ink-cap-dark .cap,
html.ink-cap-dark .op,
html.ink-cap-dark .info,
html.ink-cap-dark .tip {
  --ink-soft: var(--ink-cap);
  --ink-faint: var(--ink-cap);
}

html.ink-bot-dark .years,
html.ink-bot-dark .col {
  --ink-soft: var(--ink-bot);
  --ink-faint: var(--ink-bot);
}

.years,
.col {
  --ink: var(--ink-bot);
  --ink-soft: color-mix(in srgb, var(--ink-bot) 88%, transparent);
  --ink-faint: color-mix(in srgb, var(--ink-bot) 72%, transparent);
  --line: color-mix(in srgb, var(--ink-bot) 55%, transparent);
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  touch-action: pan-x pan-y; /* no pinch or double-tap zoom */
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.45 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
}

.num {
  font-family: var(--font-num);
  font-weight: var(--num-weight);
  font-variant-numeric: var(--num-variant);
  font-feature-settings: var(--num-feature);
  letter-spacing: var(--num-tracking);
}

#stage {
  position: fixed;
  inset: 0;
}

body[data-cur='pointer'] .mc-canvas {
  cursor: pointer;
}

body[data-cur='grab'] .mc-canvas {
  cursor: grab;
}

body[data-cur='grabbing'],
body[data-cur='grabbing'] .mc-canvas {
  cursor: grabbing;
}

body[data-cur='zoom'] .mc-canvas {
  cursor: zoom-in;
}

/* the preloader: the ground, the canvas a worker draws on, the step line; it fades into the scene at ready */
.pre3 { position: fixed; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.pre3.is-done { opacity: 0; transition: opacity 0.7s ease; }
.pre3[hidden] { display: none; }
.pre3-ground { position: absolute; inset: 0; background: var(--ground); }
.pre3-box { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
.pre3-cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.pre3-text { position: absolute; left: 16px; right: 16px; top: 56%; margin: 0; font: 500 16px/1.35 var(--font-ui); color: var(--ink-faint); text-align: center; }
/* without a worker the still drawing is uncovered by a veil of the ground that the compositor slides right */
.pre3-veil { display: none; position: absolute; top: 0; bottom: 0; left: 0; width: 110%; --p: 0;
  background: linear-gradient(90deg, rgba(13, 15, 18, 0), var(--ground) 9.09%, var(--ground));
  transform: translateX(calc(var(--p) * 100% - 9.09%)); transition: transform var(--d, 0ms) linear; will-change: transform; }
.pre3.is-still .pre3-veil { display: block; }
.pre3.is-text .pre3-box { display: none; }

/* ---------------------------------------------------------------- the signature, top centre on the central axis */
/* fixed colour and place: nothing here follows the scene */
.logo {
  position: fixed;
  left: 50%;
  top: var(--logo-top);
  z-index: 6;
  width: var(--logo-w);
  height: var(--logo-h);
  transform: translateX(-50%);
  background: var(--logo-ink);
  -webkit-mask: url('signature.svg') center / contain no-repeat;
  mask: url('signature.svg') center / contain no-repeat;
  pointer-events: none;
}

/* ---------------------------------------------------------------- the title and its description, top left */
/* the title's capitals stand on the top line: its line box is lifted by --title-off (app.js, from the face's metrics) */
/* the title keeps to one line: the column is as wide as the longer of the title and the intro's measure */
.hdr {
  position: fixed;
  left: var(--edge);
  top: calc(var(--top-line) - var(--title-off));
  z-index: 6;
  width: max-content;
  max-width: calc(100vw - 2 * var(--edge));
}

.hdr-title {
  margin: 0;
  font: var(--period-weight) var(--title-size)/1 var(--font-period);
  letter-spacing: 0;
  padding-right: 0.17em; /* about 4 % of the title's width, the intro's margin past its end */
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 0 8px var(--glow-t);
}

.hdr-lede {
  width: 0; /* the intro is as wide as the title and a small margin: the column is the title's width, which only the window's size sets */
  min-width: 100%;
  max-width: 100%;
  margin: var(--lede-gap) 0 0;
  font: 400 16px/1.45 var(--font-text);
  color: var(--ink-soft);
  text-shadow: 0 0 8px var(--glow-l);
}

/* the two columns of the bottom corners: the clock over Credits, the play group over About; each is one box, its parts
   centred on its axis, and its foot sets the links' baseline */
.col {
  position: fixed;
  bottom: var(--col-bottom);
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.col-l {
  left: var(--cx-l);
}

.col-r {
  left: var(--cx-r);
}

.col-l .bot-link {
  margin-top: var(--cap-gap);
}

.col-r .bot-link {
  margin-top: var(--about-gap);
}

/* the tracking after the last letter is balanced by the same space before the first, so the ink is centred */
.bot-link {
  padding: 3px 0 2px 0.1em;
  border: 0;
  border-bottom: 1.5px dotted var(--line);
  border-radius: 0;
  background: none;
  font: var(--ui-weight) 16px/1 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.3s ease;
}

.bot-link:focus-visible,
.bot-link[aria-expanded='true'] {
  color: var(--ink);
  border-bottom-style: solid;
  border-bottom-color: var(--ink);
}

@media (hover: hover) {
  .bot-link:hover {
    color: var(--ink);
    border-bottom-style: solid;
    border-bottom-color: var(--ink);
  }
}

/* the credits: a compact dark panel over the Credits link, its text on the page's left margin */
.credits {
  position: fixed;
  bottom: calc(var(--bot-gap) + 32px);
  left: calc(var(--edge) - 24px);
  z-index: 10;
  box-sizing: border-box;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - var(--bot-gap) - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 14px 24px 14px;
  background: rgba(10, 12, 15, 0.94);
  color: var(--ink-soft);
  font: 400 16px/1.4 var(--font-text);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.credits.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.credits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credits-title {
  margin: 0;
  font: var(--title-weight) 26px/1.1 var(--font-display);
  letter-spacing: var(--title-tracking);
  color: var(--ink);
}

.credits-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-right: -9px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}

.credits-close svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .credits-close:hover {
    color: #fff;
  }

  .credits-close:hover svg {
    transform: scale(1.15);
  }
}

.credits-lede {
  margin: 8px 0 0;
}

.credits-kick {
  margin: 14px 0 4px;
  font: var(--ui-weight) 16px/1.3 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.credits-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits-list li + li {
  margin-top: 8px;
}

.credits-what {
  margin: 0;
  font: var(--title-weight) 17px/1.25 var(--font-display);
  letter-spacing: var(--title-tracking);
  color: var(--ink);
}

.credits-museum {
  font: 500 16px/1.3 var(--font-ui);
  letter-spacing: 0;
  color: var(--ink-soft);
}

.credits-line {
  margin: 2px 0 0;
}

.credits-sig {
  margin-top: 14px;
}

.credits a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

.credits a:focus-visible {
  text-decoration-color: #fff;
}

@media (hover: hover) {
  .credits a:hover {
    text-decoration-color: #fff;
  }
}

/* ---------------------------------------------------------------- the clock, bottom left beside the sun's start */
/* its box is the digits' nominal height, the digits centred in it from the face's metrics (app.js layClock); each digit
   in a cell as wide as the widest, so the minutes do not shift it */
.big-clock {
  display: flex;
  justify-content: center;
  height: var(--clock-fig);
  pointer-events: none;
  color: var(--ink);
  transition: opacity 0.3s ease;
}

.big-clock-time {
  display: flex;
  margin-top: var(--clock-pad);
  margin-right: var(--clock-shrink);
  font: var(--clock-weight) var(--clock-size)/1 var(--font-period);
  transform: scaleX(var(--clock-k));
  transform-origin: 0 50%;
  letter-spacing: 0;
  white-space: nowrap;
}

.big-clock-time .cd,
.big-clock-time .cc {
  display: flex;
  flex: none;
  justify-content: center;
  width: var(--clock-digit);
}

.big-clock-time .cc {
  width: var(--clock-colon);
}

/* ---------------------------------------------------------------- the arc over the scene, with no veil */
.arc-block {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64%;
  z-index: 3;
  pointer-events: none;
  transform-origin: 100% 100%;
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.32s ease;
}

.arc-block canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* the hovered thumbnail grows in place over its neighbours: laid out at its grown size and scaled down onto the
   thumbnail at rest, so the transition ends on a sharp image (arc.js _growSync sets the variables) */
.grow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6;
  width: var(--gw, 120px);
  height: var(--gh, 84px);
  background: #2b2a27;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform-origin: var(--ox, 0) var(--oy, 0);
  transform: translate(var(--gx, 0), var(--gy, 0)) scale(var(--sx, 1), var(--sy, 1));
  transition: transform 0.16s cubic-bezier(0.25, 0.7, 0.3, 1), opacity 0s linear 0.16s, visibility 0s linear 0.16s;
  will-change: transform;
}

.grow.is-on {
  opacity: 1;
  visibility: visible;
  transform: translate(var(--gx, 0), var(--gy, 0)) scale(1, 1);
  transition: transform 0.16s cubic-bezier(0.25, 0.7, 0.3, 1), opacity 0s, visibility 0s;
}

.grow.is-cut {
  transition: none;
}

.grow img {
  display: block;
  width: 100%;
  height: 100%;
}

/* the bridge's colour as a frame over the image's edge, as on the thumbnails */
.grow::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--gc, #fff);
}

body.is-full .grow,
body.no-gl .grow {
  visibility: hidden;
  opacity: 0;
}

/* previous, play and next in one row, centred on the big circle: white strokes, the circles drawn in a 100-unit box so the
   strokes scale with them */
.ctl-group {
  display: flex;
  align-items: center;
  gap: var(--ctl-gap);
}

.ctl {
  position: relative;
  width: var(--step);
  height: var(--step);
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  filter: var(--drop);
  transition: opacity 0.3s ease;
}

.ctl > svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ctl .ring circle {
  fill: rgba(255, 255, 255, 0);
  stroke: #fff;
  stroke-width: 5.52;
  transition: fill 0.15s ease;
}

@media (hover: hover) {
  .ctl:not(:disabled):hover .ring circle {
    fill: rgba(255, 255, 255, 0.14);
  }
}

.ctl:disabled {
  opacity: 0.35;
  cursor: default;
}

.ctl .glyph {
  fill: none;
  stroke: currentColor;
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ctl-play {
  width: var(--play);
  height: var(--play);
}

.ctl-play .ring circle {
  stroke-width: 2.74;
}

.ctl-play .glyph {
  fill: currentColor;
  stroke: none;
}

.ctl-play .g-pause,
.ctl-play.is-playing .g-play {
  display: none;
}

.ctl-play.is-playing .g-pause {
  display: block;
}

/* the year filter, bottom centre on the central axis: a label and three dashed choices, their underlines on the lower
   bottom line */
.years {
  position: fixed;
  left: 50%;
  bottom: var(--years-bottom);
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

.yr-label {
  margin-right: 4px;
  font: 500 16px/1 var(--font-ui);
  color: var(--ink-faint);
}

.yr {
  padding: 3px 1px 3px;
  border: 0;
  border-bottom: 1.5px dotted color-mix(in srgb, var(--ink) 60%, transparent);
  background: none;
  color: var(--ink);
  font: 600 17px/1 var(--font-num);
  font-variant-numeric: var(--num-variant);
  font-feature-settings: var(--num-feature);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

body.is-year .yr:not(.is-on) {
  opacity: 0.55;
}

body.is-year .yr.is-on {
  border-bottom: 1.5px solid var(--ink);
}

.yr:focus-visible {
  border-bottom-style: solid;
  border-bottom-color: var(--ink);
  opacity: 1;
}

@media (hover: hover) {
  .yr:hover {
    border-bottom-style: solid;
    border-bottom-color: var(--ink);
    color: #fff;
    opacity: 1;
  }
}

.yr-all {
  margin-left: 8px;
  font: 500 16px/1 var(--font-ui);
}

.yr-sep {
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------- the locator, top right: no box, no fill */
/* in the right column on the right margin, its top on the top line */
.loc {
  position: fixed;
  right: var(--edge);
  top: var(--top-line);
  z-index: 4;
  width: var(--loc-w);
  height: var(--loc-h);
  margin: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.loc.is-live {
  opacity: 1;
}

.loc canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* fullscreen: the arc shrinks into the bottom-right corner and becomes the small widget there */
body.is-full .arc-block {
  transform: translate(-16px, -14px) scale(0.18);
  opacity: 0;
}

body.is-full .years,
body.is-full .hdr,
body.is-full .logo,
body.is-full .col,
body.is-full .ctl,
body.is-full .bot-link,
body.is-full .loc {
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------- overlays by the open canvas */
.cap,
.op,
.info,
.fs-btn,
.tip,
.pad {
  position: fixed;
  left: 0;
  top: 0;
}

.cap,
.op,
.info {
  z-index: 5;
  box-sizing: border-box;
  transform-origin: 0 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.cap.is-live,
.op.is-live {
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}

/* the boxes are wider than what they hold, so they pass the pointer through to the thumbnails under them;
   only the text, the slider and the buttons take it */
.cap,
.op,
.info,
.op-side {
  pointer-events: none;
}

.cap-title,
.cap-when,
.cap-info,
.op-range,
.op-toggle,
.info .dz {
  pointer-events: auto;
}

/* while a hovered frame's canvas peeks in, the open canvas's caption and slider step aside for its tip */
body.is-peeking .cap.is-live,
body.is-peeking .op.is-live {
  opacity: 0;
}

.cap {
}

.cap-kicker {
  display: none;
  margin: 0 0 4px;
  font: var(--ui-weight) 16px/1.2 var(--font-ui);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cap-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cap-title {
  font: var(--title-weight) 21px/1.2 var(--font-display);
  letter-spacing: var(--title-tracking);
  color: var(--ink);
}

.cap-when {
  margin-top: 2px;
  font: 500 16px/1.35 var(--font-ui);
  color: var(--ink-soft);
}

.cap-info {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease;
}

.cap-info svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.44;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cap-info[aria-expanded='true'] {
  color: var(--ink);
}

@media (hover: hover) {
  .cap-info:hover {
    color: var(--ink);
  }

}

/* the museum right after the title, in the interface face */
.cap-museum,
.tip-museum,
.fc-museum {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.cap-museum {
  font-size: 17px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .cap-museum {
    white-space: normal;
  }
}

/* a: under the slider; title and museum wrap to a second line, the date line stays one line */
[data-caption='a'] .cap {
  width: max-content;
}

[data-caption='a'] .cap-head {
  align-items: flex-start;
}

[data-caption='a'] .cap-head .cap-title {
  min-width: 0;
}

[data-caption='a'] .cap-info {
  margin-top: -2px;
}

[data-caption='a'] .cap-when {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* a beside a painting too tall for a caption under it (caption.js): the column of b, in a's type */
[data-caption='a'] .cap.is-beside .cap-title {
  text-wrap: balance;
}

/* b: in the sky beside the painting, from its top; the details continue under it */
[data-caption='b'] .cap-head {
  align-items: flex-start;
}

[data-caption='b'] .cap-title {
  font-size: 24px;
  line-height: 1.15;
  text-wrap: balance;
}

[data-caption='b'] .cap-info {
  margin-top: -1px;
}

[data-caption='b'] .cap-when {
  margin-top: 6px;
}

/* c: a fixed block in the text column, under the description; it never moves with the camera */
[data-caption='c'] .cap-kicker {
  display: block;
}

[data-caption='c'] .cap-head {
  align-items: flex-start;
}

[data-caption='c'] .cap-title {
  font-size: 25px;
  line-height: 1.15;
  text-wrap: balance;
}

[data-caption='c'] .cap-when {
  margin-top: 6px;
}

[data-caption='c'] .cap,
[data-caption='c'] .info {
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

/* the painting's opacity: a slider the painting's width right under it, the value and the eye beside its end */
.op {
  height: 26px;
}

.op-range {
  display: block;
  width: 100%;
  height: 26px;
  margin: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: none;
}

.op-range::-webkit-slider-runnable-track {
  height: 3px;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
}

/* the thumb is a white dot drawn in SVG, with a faint dark ring */
.op-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7.5px;
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='8.5' fill='rgba(0,0,0,0.25)'/%3E%3Ccircle cx='9' cy='9' r='8' fill='%23fff'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.op-range::-moz-range-track {
  height: 3px;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
}

.op-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='8.5' fill='rgba(0,0,0,0.25)'/%3E%3Ccircle cx='9' cy='9' r='8' fill='%23fff'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.op-side {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  height: 26px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.op.is-flip .op-side {
  left: auto;
  right: calc(100% + 10px);
  flex-direction: row-reverse;
}

.op-val {
  min-width: 2.6em;
  font-size: 16px;
  color: var(--ink-soft);
}

.op.is-flip .op-val {
  text-align: right;
}

.op-toggle {
  width: 30px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.op-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.op-toggle .g-eye-off,
.op-toggle[aria-pressed='true'] .g-eye {
  display: none;
}

.op-toggle[aria-pressed='true'] .g-eye-off {
  display: block;
}

.op.is-off .op-range,
.op.is-off .op-val {
  opacity: 0.45;
}

/* the details: white text with a soft dark shadow, no plate */
.info {
  padding: 2px 4px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.info.is-live.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

/* the dating as a small infographic (details panel and full screen): the hours on a day axis, the days when the sun
   gives them, how it was judged, the year shares as bars; white marks with a soft dark shadow */
.dz {
  max-width: 330px;
  color: var(--ink);
}

.dz-kick {
  margin: 0 0 2px;
  font: var(--ui-weight) 16px/1.3 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dz-main {
  margin: 0;
  font: 600 19px/1.25 var(--font-ui);
  color: var(--ink);
}

.dz-line {
  margin: 6px 0 0;
  font: 500 16px/1.35 var(--font-ui);
  color: var(--ink);
  text-wrap: balance;
}

.dz-axis {
  position: relative;
  height: 30px;
  margin: 7px 22px 2px;
}

.dz-base,
.dz-tick,
.dz-win,
.dz-best {
  position: absolute;
  display: block;
}

.dz-base {
  left: 0;
  right: 0;
  top: 5px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.dz-tick {
  top: 2px;
  width: 1px;
  height: 7px;
  margin-left: -0.5px;
  background: rgba(255, 255, 255, 0.5);
}

.dz-win {
  top: 1px;
  height: 9px;
  min-width: 4px;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.55);
}

.dz-best {
  top: -2px;
  width: 3px;
  height: 15px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(13, 15, 18, 0.9);
}

.dz-lab {
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink-faint);
}

.dz-how {
  margin: 4px 0 0;
  font: 400 16px/1.35 var(--font-text);
  color: var(--ink-soft);
  text-wrap: balance;
}

.dz-kick-years {
  margin-top: 12px;
}

.dz-years {
  display: grid;
  gap: 3px;
  margin-top: 2px;
}

.dz-yr {
  display: grid;
  grid-template-columns: 42px 1fr 40px;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.3;
}

.dz-y {
  color: var(--ink-soft);
}

.dz-p {
  text-align: right;
}

.dz-bar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.dz-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.dz-bar i.is-some {
  min-width: 2px;
}

.fs-btn {
  z-index: 5;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  filter: var(--drop);
}

.fs-btn.is-live {
  pointer-events: auto;
}

.fs-btn svg {
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .fs-btn:hover svg {
    transform: scale(1.15);
  }
}

.fs-btn svg,
.full-edge svg,
.full-close svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* previous and next over the open painting's edges, white chevrons, shown while the pointer is on the painting */
.pad {
  z-index: 5;
  width: 46px;
  height: 92px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  transform-origin: 0 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 8px rgba(0, 0, 0, 0.45));
  transition: opacity 0.16s ease, visibility 0s linear 0.16s;
}

.pad svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

body.is-over-open .pad.is-live {
  opacity: 0.9;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.16s ease, visibility 0s linear 0s;
}

@media (hover: hover) {
  body.is-over-open .pad.is-live:hover {
    opacity: 1;
  }

  .pad-prev:hover svg {
    transform: translateX(-2px);
  }

  .pad-next:hover svg {
    transform: translateX(2px);
  }
}

body.is-over-open .pad.is-live:disabled {
  opacity: 0.3;
  cursor: default;
}

/* the label of a passed frame under the pointer */
.tip {
  z-index: 6;
  max-width: 340px;
  padding: 2px 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tip.is-live {
  opacity: 1;
}

.tip-title {
  font: var(--title-weight) 17px/1.25 var(--font-display);
  letter-spacing: var(--title-tracking);
  color: var(--ink);
}

.tip-museum {
  font-size: 16px;
}

.tip-when {
  margin-top: 2px;
  font: 500 16px/1.35 var(--font-ui);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- fullscreen, on the dark ground */
.full {
  position: fixed;
  inset: 0;
  z-index: 10;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.full.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

.full-ground {
  position: absolute;
  inset: 0;
  background: var(--ground);
}

.full.on-scene .full-ground {
  background: rgba(10, 12, 15, 0.88);
}

/* the painting left of a column with its title and dating; the column goes under it on narrow screens */
.full {
  --fc-col: 300px;
}

.full-fig {
  position: absolute;
  inset: 24px calc(var(--fc-col) + 96px) 24px 76px;
  margin: 0;
  transform: scale(0.97);
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.full.is-open .full-fig {
  transform: none;
}

.full-fig img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.full-fig img.is-shown {
  opacity: 1;
}

.full button {
  font: inherit;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.full-edge {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 96px;
  margin-top: -66px;
  display: grid;
  place-items: center;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.full-edge:focus-visible {
  opacity: 1;
  color: var(--ink);
}

@media (hover: hover) {
  .full-edge:hover {
    opacity: 1;
    color: var(--ink);
  }
}

.full-edge:disabled {
  opacity: 0.2;
  cursor: default;
}

.full-prev {
  left: 12px;
}

.full-next {
  right: calc(var(--fc-col) + 40px);
}

.full-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  opacity: 0.8;
}

.full-close:focus-visible {
  opacity: 1;
  color: var(--ink);
}

@media (hover: hover) {
  .full-close:hover {
    opacity: 1;
    color: var(--ink);
  }
}

.full-cap {
  position: absolute;
  right: 28px;
  top: 50%;
  width: var(--fc-col);
  max-height: calc(100% - 112px);
  overflow: auto;
  transform: translateY(-50%);
  scrollbar-width: thin;
}

.fc-title {
  margin: 0 0 20px;
  font: var(--title-weight) 24px/1.2 var(--font-display);
  letter-spacing: var(--title-tracking);
  color: var(--ink);
  text-wrap: balance;
}

.fc-museum {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .full-fig {
    inset: 18px 56px 270px;
  }

  .full-next {
    right: 12px;
  }

  .full-cap {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 14px;
    width: auto;
    max-height: 244px;
    transform: none;
  }

  .fc-title {
    margin-bottom: 10px;
    font-size: 20px;
  }
}

/* ---------------------------------------------------------------- the variant switcher, top right (a dev control) */
.dev {
  position: fixed;
  top: 6px;
  right: 6px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font: 600 13px/1 var(--font-ui);
}

.dev-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  filter: var(--drop);
}

.dev-btn:hover,
.dev-btn[aria-expanded='true'] {
  color: #fff;
  background: rgba(12, 14, 18, 0.7);
}

.dev-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.dev-btn svg circle {
  fill: currentColor;
}

.dev-panel {
  padding: 8px 10px;
  background: rgba(12, 14, 18, 0.92);
  color: rgba(255, 255, 255, 0.8);
}

.dev[hidden],
.dev-panel[hidden] {
  display: none;
}

.dev-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dev-row + .dev-row {
  margin-top: 6px;
}

.dev-key {
  width: 54px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dev-row button {
  width: 26px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font: 600 13px/1 var(--font-ui);
  cursor: pointer;
}

.dev-row button[aria-pressed='true'] {
  background: #fff;
  border-color: #fff;
  color: #111;
}

/* ---------------------------------------------------------------- tuning panel (?tune=1) */
.tune {
  position: fixed;
  top: calc(var(--top-line) + 8px);
  right: 12px;
  z-index: 20;
  width: 260px;
  max-height: 60vh;
  overflow: auto;
  padding: 8px 10px 10px;
  background: rgba(12, 14, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font: 400 13px/1.35 var(--font-ui);
}

.tune-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 13px/1 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tune button,
.tune select {
  font: inherit;
  color: var(--ink);
  background: #1b1e24;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  padding: 2px 6px;
}

.tune-row {
  display: grid;
  grid-template-columns: 96px 1fr 50px;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  color: var(--ink-soft);
}

.tune-row select {
  grid-column: 2 / 4;
}

.tune-row input {
  width: 100%;
  accent-color: #fff;
}

.tune-row output {
  text-align: right;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* the slider's own colour is the band's ink, so its ring follows it */
.op-range {
  color: var(--ink);
}

/* white icons keep their colour on every sky: a dark ring inside the white one stays visible over light fog */
.ctl:focus-visible,
.fs-btn:focus-visible,
.pad:focus-visible,
.dev-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(7, 8, 10, 0.9);
}

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

.errors {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 30;
  max-width: 46%;
  max-height: 40%;
  overflow: auto;
  white-space: pre-wrap;
  font: 13px/1.35 var(--font-num);
  color: #8a1c12;
  background: #fbe9e7;
  border: 1px solid #d9534f;
  padding: 8px 10px;
}

.nogl {
  position: fixed;
  left: 18px;
  right: 18px;
  top: 40%;
  max-width: 640px;
  z-index: 6;
  color: var(--ink);
  font: 400 18px/1.5 var(--font-text);
}

body.no-gl .big-clock,
body.no-gl .loc,
body.no-gl .arc-block,
body.no-gl .ctl,
body.no-gl .years {
  display: none;
}

/* laptops, and tablets on their side: a shorter arc block gives the open painting more of the screen (app.js LAPTOP_MQ) */
@media (min-width: 1000px) and (max-width: 1600px) and (max-height: 960px) {
  :root {
    --col: clamp(260px, 25vw, 350px);
  }

  .arc-block {
    height: 52%;
  }
}

/* phones and narrow windows */
@media (max-width: 760px) {
  .hdr-lede {
    display: none;
  }

  .info {
    max-width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pre3.is-done {
    transition-delay: 0s;
  }

  .grow,
  .grow.is-on,
  .arc-block,
  .ctl,
  .loc,
  .logo,
  .bot-link,
  .credits,
  .credits.is-open,
  .big-clock,
  .cap,
  .op,
  .info,
  .tip,
  .pad,
  .full,
  .full.is-open,
  .full-fig,
  .full-fig img,
  .full-edge {
    transition: none;
  }
}

/* the dating graphic in the details panel takes the caption's ink; full screen keeps white on its dark ground */
.info .dz-base,
.info .dz-tick {
  background: var(--line);
}

.info .dz-win,
.info .dz-best,
.info .dz-bar i {
  background: var(--ink);
  box-shadow: none;
}

.info .dz-bar {
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}

html.ink-cap-dark .op-range::-webkit-slider-thumb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='8.5' fill='rgba(255,255,255,0.35)'/%3E%3Ccircle cx='9' cy='9' r='8' fill='%2307080a'/%3E%3C/svg%3E");
}

html.ink-cap-dark .op-range::-moz-range-thumb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='8.5' fill='rgba(255,255,255,0.35)'/%3E%3Ccircle cx='9' cy='9' r='8' fill='%2307080a'/%3E%3C/svg%3E");
}

/* dating panel variants (?panel=a|b|c): sentence case, one left axis, figures in the period face */
.dz[data-panel] {
  max-width: 330px;
  color: var(--ink);
}

.dp-lab {
  margin: 0 0 6px;
  font: 500 16px/1.3 var(--font-ui);
  color: var(--ink-faint);
}

.dp-big {
  margin: 0;
  font: 300 42px/1.05 var(--font-period);
  color: var(--ink);
  white-space: nowrap;
}

.dp-big-ui {
  font: 600 22px/1.25 var(--font-ui);
  white-space: normal;
}

.dp-line {
  margin: 8px 0 0;
  font: 400 16px/1.45 var(--font-text);
  color: var(--ink);
  text-wrap: pretty;
}

.dp-dim {
  margin-top: 2px;
  color: var(--ink-soft);
}

.dp-gap {
  margin-top: 18px;
}

.dp-arc {
  position: relative;
  height: 80px;
  margin: 10px 0 2px;
}

.dp-arc svg {
  display: block;
  width: 100%;
  height: 56px;
  overflow: visible;
}

.dp-arc-base,
.dp-arc-win {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.dp-arc-base {
  stroke: var(--line);
  stroke-width: 1px;
}

.dp-arc-win {
  stroke: var(--ink);
  stroke-width: 4px;
  stroke-linecap: butt;
}

.dp-arc-lab {
  position: absolute;
  top: 60px;
  transform: translateX(-50%);
  font-size: 16px;
  line-height: 1;
  color: var(--ink-faint);
  white-space: nowrap;
}

.dp-arc-lab:first-of-type {
  transform: none;
}

.dp-figs {
  display: flex;
  gap: 28px;
  margin-top: 2px;
}

.dp-fig {
  display: flex;
  flex-direction: column;
  color: var(--ink-soft);
}

.dp-fig.is-top {
  color: var(--ink);
}

.dp-fig-n {
  font: 300 36px/1.05 var(--font-period);
}

.dp-fig-y {
  margin-top: 2px;
  font: 400 16px/1.3 var(--font-text);
  color: var(--ink-faint);
}

.dp-grid {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px 14px;
  align-items: baseline;
}

.dp-k {
  font: 500 16px/1.45 var(--font-ui);
  color: var(--ink-faint);
}

.dp-v p {
  margin: 0;
}

.dp-vh {
  font: 300 34px/1.05 var(--font-period);
  color: var(--ink);
  white-space: nowrap;
}

.dp-vt {
  font: 400 16px/1.45 var(--font-text);
  color: var(--ink);
}

.dp-yr {
  display: flex;
  justify-content: space-between;
  max-width: 150px;
  font: 400 16px/1.5 var(--font-text);
  color: var(--ink);
}

.dp-yr-p {
  color: var(--ink-soft);
}

.dp-big .num,
.dp-fig-n .num,
.dp-vh .num {
  font-family: inherit;
  font-weight: inherit;
}

.dp-to {
  margin: 0 0.3em;
  font-size: 0.5em;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.dp-arc {
  height: 84px;
  margin: 10px 0 10px;
}

.dp-arc-win {
  stroke-width: 5px;
}

@media (max-height: 860px) {
  .dp-arc { height: 62px; margin: 6px 0; }
  .dp-arc svg { height: 38px; }
  .dp-arc-lab { top: 42px; }
  .dp-gap { margin-top: 12px; }
  .dp-fig-n { font-size: 32px; }
}
