:root {
  --paper: #f7f8f5;
  --ink: #28372f;
  --muted: #526157;
  --rust: #864528;
  --rule: #bac0b1;
  --field: #e8eadf;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  width: min(91%, 70rem);
  font-size: 1.0625rem;
  line-height: 1.55;
}
::selection { color: white; background: #46654f; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.skip-link { position: absolute; z-index: 2; padding: .6rem; background: var(--paper); }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
header {
  min-height: 4.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}
header b, header strong { font: bold 1.5rem/1.15 var(--serif); }
nav { display: flex; gap: clamp(.85rem, 3vw, 2rem); }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9rem;
  text-decoration: none;
}
nav a[aria-current] { color: var(--rust); text-decoration: underline; text-underline-offset: .45em; }
main { padding-top: clamp(2rem, 4vw, 4rem); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 {
  max-width: 18ch;
  font-size: clamp(2.85rem, 6.6vw, 5.85rem);
  line-height: 1.04;
  letter-spacing: -.04em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; letter-spacing: -.025em; margin: 0; }
.intro {
  max-width: 65ch;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  margin: 1.15rem 0 clamp(1.5rem, 3.4vw, 2.6rem);
  color: var(--muted);
}
.controls {
  border-top: 1.5px solid var(--ink);
  padding: .75rem 0;
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}
button, input { font: inherit; }
button {
  min-height: 44px;
  border: 1px solid #9aa494;
  padding: .45rem 1rem;
  background: transparent;
  color: var(--ink);
  border-radius: 2px;
  cursor: pointer;
  font-size: .91rem;
}
button:hover { background: #e4e8db; border-color: #546959; }
button[aria-pressed=true] { background: #344f40; color: #fff; border-color: #344f40; }
label {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .875rem;
  font-weight: 550;
}
.controls label { margin: 0 .75rem 0 auto; }
input[type=range] {
  width: clamp(5rem, 9vw, 8rem);
  height: 44px;
  margin: 0;
  accent-color: #37533e;
  cursor: pointer;
}
output { min-width: 4ch; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
figure {
  margin: 0;
  border: 1px solid var(--rule);
  background-color: var(--field);
  background-image: radial-gradient(#bcc5b5 .7px, transparent .85px);
  background-size: 12px 12px;
}
figcaption {
  padding: clamp(.75rem, 2vw, 1.35rem);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  font-size: .81rem;
  letter-spacing: .025em;
  color: #5e412d;
}
figcaption span { color: var(--muted); font-weight: 450; }
.stage {
  width: 100%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 1;
  min-height: 9.5rem;
}
.stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 32% 42%;
  transform: translateX(var(--pan, 0%)) scale(var(--magnification, 1));
  user-select: none;
  -webkit-user-drag: none;
}
.comparing { cursor: ew-resize; touch-action: pan-y; }
.reference-layer, .previous-outline { position: absolute; inset: 0; pointer-events: none; }
.reference-layer {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
  background: var(--field);
  background-image: radial-gradient(#bcc5b5 .7px, transparent .85px);
  background-size: 12px 12px;
}
.divider-mark {
  position: absolute;
  inset-block: 0;
  inset-inline-start: clamp(0px, var(--split), calc(100% - 2px));
  width: 2px;
  background: var(--rust);
  pointer-events: none;
}
.divider-mark::before, .divider-mark::after {
  content: '';
  position: absolute;
  left: -4px;
  width: 10px;
  height: 6px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.divider-mark::after { bottom: 0; transform: rotate(180deg); }
.comparison {
  padding: .35rem clamp(.75rem, 2vw, 1.35rem);
  border-top: 1px solid var(--rule);
  background: #f0f1e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}
.comparison input { width: clamp(6rem, 17vw, 11rem); }
.comparison-key { font-size: .85rem; color: var(--muted); }
article > section {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
  gap: clamp(1rem, 4vw, 4rem);
  margin: clamp(1.4rem, 3vw, 2.75rem) 0;
}
section p { max-width: 65ch; margin: 0 0 .75rem; }
section a, footer a { font-size: .93rem; }
.context-note {
  max-width: 69ch;
  color: var(--muted);
  margin: 1.75rem 0 2.4rem;
}
footer { border-top: 1px solid var(--rule); padding: 1.25rem 0 2.5rem; }
@media (max-width: 820px) {
  .controls label { order: 1; margin: 0; }
  .compare-button { margin-left: auto; }
}
@media (max-width: 620px) {
  header { min-height: 4rem; flex-wrap: wrap; gap: .15rem .8rem; }
  header b, header strong { font-size: 1.3rem; }
  nav a { font-size: .85rem; }
  .controls { gap: .4rem; }
  .controls button { padding: .4rem .72rem; }
  .controls label { flex-basis: 100%; }
  .controls label input { flex: 1; }
  .compare-button { margin-left: 0; }
  figcaption { font-size: .75rem; }
  .comparison-key { flex-basis: 100%; }
  article > section { grid-template-columns: 1fr; gap: .55rem; }
}
@media (forced-colors: active) {
  button[aria-pressed=true] { outline: 2px solid Highlight; }
  .divider-mark { background: CanvasText; }
}

.museum-object {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3.75rem);
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  border-block: 1px solid var(--rule);
}
.object-photo, .object-photo img { display: block; width: 100%; }
.object-photo img { height: auto; }
.museum-object h2, .context-note h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.45rem);
  margin-bottom: .7rem;
  text-wrap: balance;
}
.museum-object p + p { color: var(--muted); font-size: .88rem; }
.context-note { padding-block: 1rem; }
.context-note h2 { color: var(--ink); }
.context-note a { font-size: .93rem; }
@media (max-width: 620px) {
  .museum-object { grid-template-columns: 1fr; }
}
