:root {
  color-scheme: dark;
  --black: #080806;
  --ink: #11100d;
  --oak: #24160d;
  --oak-light: #432918;
  --stone: #79756b;
  --stone-dark: #2b2a25;
  --paper: #e8dcc2;
  --paper-bright: #f5ead3;
  --muted: #b9ad94;
  --brass: #c7a15b;
  --brass-pale: #ead394;
  --brass-dark: #755527;
  --oxblood: #641b20;
  --green: #243b34;
  --blue: #182d3a;
  --line: rgba(199, 161, 91, 0.34);
  --line-soft: rgba(232, 220, 194, 0.13);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  --font-label: "Arial Narrow", "Avenir Next Condensed", "Segoe UI", sans-serif;
  --page: min(1500px, calc(100% - 3rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 100% 5px,
    radial-gradient(circle at 50% 0, rgba(199, 161, 91, 0.1), transparent 42rem),
    var(--black);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.08;
  pointer-events: none;
}

body.is-dialog-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--brass);
  color: var(--black);
}

:focus-visible {
  outline: 2px solid var(--brass-pale);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  padding: 0.8rem 1rem;
  background: var(--paper-bright);
  color: var(--black);
  transform: translateY(-170%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.archive-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.75rem max(1.25rem, calc((100vw - 1500px) / 2));
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(42, 27, 16, 0.98), rgba(16, 13, 10, 0.97)),
    var(--oak);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.archive-header::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brass-dark), var(--brass-pale), var(--brass-dark), transparent);
  content: "";
  opacity: 0.55;
}

.archive-seal {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.archive-seal img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.archive-seal span {
  display: grid;
  min-width: 0;
}

.archive-seal small,
.kicker,
.room-number,
.catalogue-type,
.field-label,
.accession-number,
.directory-number,
.stat-label {
  color: var(--brass);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.25;
  text-transform: uppercase;
}

.archive-seal strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-actions,
.viewer-actions,
.record-actions,
.filter-row,
.room-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.text-button,
.search-button,
.icon-button,
.museum-button,
.filter-button,
.catalogue-card,
.directory-card,
.cross-reference,
.search-result {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(12, 10, 8, 0.34);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 240ms ease,
    background 240ms ease,
    color 240ms ease,
    transform 300ms var(--ease);
}

.text-button {
  padding: 0.65rem 0.78rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.68rem 0.8rem;
  color: var(--muted);
}

.search-button kbd {
  min-width: 1.5rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--line-soft);
  color: var(--brass-pale);
  font: inherit;
  text-align: center;
}

.text-button:hover,
.search-button:hover,
.icon-button:hover,
.museum-button:hover,
.filter-button:hover,
.filter-button.is-active {
  border-color: var(--brass);
  background: rgba(199, 161, 91, 0.11);
  color: var(--paper-bright);
}

#archive-app {
  min-height: calc(100vh - 160px);
}

.loading-room {
  display: grid;
  min-height: 68vh;
  place-items: center;
  align-content: center;
  gap: 1rem;
  color: var(--muted);
}

.loading-room img {
  animation: archive-breathe 2s ease-in-out infinite;
}

.page-enter {
  animation: room-enter 600ms var(--ease) both;
}

.entrance-hall {
  position: relative;
  isolation: isolate;
  min-height: 92svh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(9, 8, 6, 0.92), rgba(9, 8, 6, 0.18) 35%, rgba(9, 8, 6, 0.18) 65%, rgba(9, 8, 6, 0.92)),
    linear-gradient(180deg, transparent 70%, #0b0907),
    url("assets/collection/duck-coin-intro-poster.jpg") center / cover no-repeat;
}

.entrance-hall::before {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 42%;
  background:
    repeating-linear-gradient(90deg, transparent 0 9.5%, rgba(199, 161, 91, 0.2) 9.5% 10%, transparent 10% 19.5%, rgba(199, 161, 91, 0.2) 19.5% 20%),
    repeating-linear-gradient(0deg, transparent 0 23%, rgba(199, 161, 91, 0.18) 23% 25%),
    linear-gradient(180deg, rgba(92, 104, 100, 0.32), transparent);
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  content: "";
  opacity: 0.65;
}

.entrance-hall::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(245, 234, 211, 0.2), transparent 34%),
    linear-gradient(90deg, rgba(36, 22, 13, 0.98) 0 8%, transparent 8% 92%, rgba(36, 22, 13, 0.98) 92%),
    linear-gradient(180deg, transparent 0 74%, rgba(8, 8, 6, 0.92));
  content: "";
  pointer-events: none;
}

.hall-architecture {
  position: relative;
  z-index: 1;
  display: grid;
  width: var(--page);
  min-height: 92svh;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 7rem);
  padding: clamp(7rem, 14vh, 12rem) 0 clamp(3rem, 8vh, 6rem);
}

.hall-introduction {
  align-self: center;
  max-width: 860px;
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.92);
}

.institution-strap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  color: var(--brass-pale);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.institution-strap::before {
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.hall-introduction h1,
.room-hero h1,
.record-heading h1,
.section-heading h2,
.dialog-heading h2,
.anthology-plaque h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.hall-introduction h1 {
  max-width: 12ch;
  font-size: clamp(3.6rem, 8.5vw, 8.8rem);
}

.hall-introduction > p:not(.institution-strap) {
  max-width: 62ch;
  margin: 1.6rem 0 0;
  color: var(--paper-bright);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.museum-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.museum-button--brass {
  margin-top: 2rem;
  border-color: var(--brass);
  background: linear-gradient(145deg, var(--brass-pale), #b78c45 55%, var(--brass-dark));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  color: #17110a;
}

.museum-button--brass:hover {
  background: linear-gradient(145deg, #fff1bc, var(--brass));
  color: #080806;
  transform: translateY(-2px);
}

.archive-desk {
  position: relative;
  align-self: end;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-top: 5px solid #6f4826;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 50%, transparent 50%) 0 0 / 14px 100%,
    linear-gradient(180deg, #382316, #1a110b);
  box-shadow: var(--shadow);
}

.archive-desk::before,
.archive-desk::after {
  position: absolute;
  top: -78px;
  width: 44px;
  height: 76px;
  border: 1px solid var(--brass-dark);
  border-radius: 50% 50% 8px 8px;
  background: radial-gradient(circle at 50% 18%, #f2d992, #8b642b 30%, #1a120a 70%);
  box-shadow: 0 -12px 50px rgba(234, 211, 148, 0.2);
  content: "";
}

.archive-desk::before {
  left: 14%;
}

.archive-desk::after {
  right: 14%;
}

.desk-plaque {
  padding: 1rem;
  border: 1px solid var(--brass-dark);
  background: rgba(7, 6, 5, 0.72);
  text-align: center;
}

.desk-plaque strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.desk-plaque span {
  color: var(--muted);
  font-size: 0.78rem;
}

.museum-section,
.room-body,
.record-page {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.museum-section--stone {
  width: 100%;
  padding-right: max(1.5rem, calc((100vw - 1500px) / 2));
  padding-left: max(1.5rem, calc((100vw - 1500px) / 2));
  border-block: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 82px 82px,
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px) 0 0 / 82px 82px,
    #171713;
}

.section-heading {
  display: grid;
  max-width: 850px;
  gap: 0.65rem;
  margin-bottom: 2.25rem;
}

.section-heading--split {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: 2rem;
}

.section-heading h2 {
  font-size: clamp(2.5rem, 5.5vw, 5.4rem);
}

.section-heading p,
.room-hero p,
.record-summary,
.anthology-plaque p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.directory-card {
  position: relative;
  display: grid;
  min-height: 230px;
  align-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem;
  border-width: 0 1px 1px 0;
  background:
    linear-gradient(145deg, rgba(63, 39, 23, 0.75), rgba(16, 13, 10, 0.93)),
    var(--oak);
  text-align: left;
}

.directory-card::after {
  position: absolute;
  right: 1.25rem;
  bottom: 1.15rem;
  color: var(--brass-dark);
  content: "→";
  font-family: var(--font-display);
  font-size: 1.6rem;
  transition: color 240ms ease, transform 300ms var(--ease);
}

.directory-card:hover {
  z-index: 1;
  border-color: var(--brass);
  background:
    linear-gradient(145deg, rgba(99, 62, 33, 0.78), rgba(24, 18, 12, 0.96)),
    var(--oak);
  transform: translateY(-4px);
}

.directory-card:hover::after {
  color: var(--brass-pale);
  transform: translateX(4px);
}

.directory-card h3,
.catalogue-card h3,
.search-result h3,
.record-section h2,
.art-label h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
}

.directory-card h3 {
  max-width: 13ch;
  font-size: 1.75rem;
}

.directory-card p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.directory-monogram {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid var(--brass-dark);
  border-radius: 50%;
  color: var(--brass);
  font-family: var(--font-display);
  font-size: 0.8rem;
}

.collection-triptych {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr 0.82fr;
  gap: 1rem;
}

.artwork-feature {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
  cursor: pointer;
}

.artwork-feature:not(:first-child) {
  min-height: 430px;
}

.artwork-feature img,
.artwork-feature video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease), filter 500ms ease;
}

.artwork-feature:hover img,
.artwork-feature:hover video {
  filter: brightness(1.08);
  transform: scale(1.025);
}

.art-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.15rem;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 4, 0.96) 44%);
  text-shadow: 0 2px 12px #000;
}

.art-label h3 {
  margin-top: 0.25rem;
  font-size: 1.55rem;
}

.art-label p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.anthology-plaque {
  position: relative;
  display: grid;
  max-width: 1040px;
  margin: 0 auto;
  grid-template-columns: 0.28fr 1fr;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--brass-dark);
  background:
    linear-gradient(135deg, rgba(199, 161, 91, 0.07), transparent 38%),
    #12100d;
  box-shadow: inset 0 0 0 9px #0d0b09, inset 0 0 0 10px var(--line);
}

.anthology-plaque::before {
  display: grid;
  width: 6rem;
  height: 6rem;
  place-items: center;
  align-self: start;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brass);
  content: "A";
  font-family: var(--font-display);
  font-size: 2.5rem;
}

.anthology-plaque h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.archive-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.archive-stat {
  display: grid;
  gap: 0.45rem;
  padding: 1.4rem;
  border-right: 1px solid var(--line);
  background: rgba(17, 15, 12, 0.75);
}

.archive-stat:last-child {
  border-right: 0;
}

.archive-stat strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 400;
  line-height: 1;
}

.archive-stat span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
}

.breadcrumb {
  width: var(--page);
  margin: 0 auto;
  padding: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.breadcrumb a {
  color: var(--brass-pale);
  text-decoration: none;
}

.breadcrumb span {
  padding: 0 0.55rem;
  color: var(--brass-dark);
}

.room-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.97), rgba(12, 11, 9, 0.82) 52%, rgba(7, 7, 6, 0.4)),
    radial-gradient(circle at 80% 30%, rgba(199, 161, 91, 0.22), transparent 26rem),
    linear-gradient(150deg, var(--oak-light), var(--ink));
}

.room-hero::before {
  position: absolute;
  inset: 0 0 0 auto;
  width: 44%;
  border-left: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 17%, rgba(199, 161, 91, 0.12) 17% 18%),
    repeating-linear-gradient(0deg, transparent 0 24%, rgba(199, 161, 91, 0.1) 24% 25%);
  content: "";
  opacity: 0.75;
}

.room-hero[data-wing="university"] {
  background: linear-gradient(90deg, #101310 30%, rgba(16, 19, 16, 0.72)), radial-gradient(circle at 78% 30%, #3c4a32, #101310 64%);
}

.room-hero[data-wing="engineering"],
.room-hero[data-wing="atomic-drapery"] {
  background: linear-gradient(90deg, #0d1418 30%, rgba(13, 20, 24, 0.72)), radial-gradient(circle at 78% 30%, #3b2a17, #0d1418 64%);
}

.room-hero[data-wing="ecclesiastical"] {
  background: linear-gradient(90deg, #100b09 30%, rgba(16, 11, 9, 0.76)), radial-gradient(circle at 78% 30%, #522026, #100b09 64%);
}

.room-hero[data-wing="timeline-n"] {
  background: linear-gradient(90deg, #101419 30%, rgba(16, 20, 25, 0.74)), radial-gradient(circle at 78% 30%, #344751, #101419 64%);
}

.room-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  width: var(--page);
  min-height: 420px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.35fr);
  align-items: end;
  gap: 4rem;
  padding: 5rem 0 3.5rem;
}

.room-hero h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 7vw, 7rem);
}

.room-hero p {
  max-width: 60ch;
  margin-top: 1.25rem;
}

.room-register {
  align-self: end;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(8, 8, 6, 0.62);
}

.room-register strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
}

.room-register p {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
}

.room-body {
  display: grid;
  gap: 3.5rem;
}

.curator-note,
.timeline-notice,
.empty-cabinet {
  padding: 1.4rem;
  border-left: 3px solid var(--brass);
  background: rgba(199, 161, 91, 0.07);
  color: var(--muted);
}

.curator-note strong,
.timeline-notice strong,
.empty-cabinet strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--paper-bright);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.filter-row {
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.filter-button {
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.catalogue-card {
  position: relative;
  display: grid;
  min-height: 210px;
  align-content: space-between;
  gap: 1.3rem;
  padding: 1.2rem;
  border-color: var(--line-soft);
  background:
    linear-gradient(155deg, rgba(232, 220, 194, 0.035), transparent 45%),
    #13110e;
  text-align: left;
}

.catalogue-card--with-media {
  min-height: 330px;
  overflow: hidden;
}

.catalogue-card--with-media .catalogue-card__media {
  position: absolute;
  inset: 0;
}

.catalogue-card--with-media .catalogue-card__media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 4, 3, 0.05), #080806 85%);
  content: "";
}

.catalogue-card__media img,
.catalogue-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalogue-card__content,
.catalogue-card__footer {
  position: relative;
  z-index: 1;
}

.catalogue-card h3 {
  margin-top: 0.45rem;
  font-size: 1.55rem;
}

.catalogue-card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.catalogue-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--brass);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalogue-card:hover {
  border-color: var(--brass);
  background-color: #191510;
  transform: translateY(-3px);
}

.deposit-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.deposit-status::before {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brass-dark);
  content: "";
}

.deposit-status--present::before {
  background: #6f9b79;
}

.record-page {
  padding-top: 2rem;
}

.record-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.52fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.record-heading h1 {
  max-width: 14ch;
  margin-top: 0.75rem;
  font-size: clamp(3rem, 7vw, 7rem);
}

.record-summary {
  max-width: 62ch;
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.record-actions {
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.record-card {
  align-self: end;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(199, 161, 91, 0.08), transparent 40%),
    #15120f;
  box-shadow: var(--shadow);
}

.record-card dl,
.record-fields {
  display: grid;
  gap: 0;
  margin: 0;
}

.record-card div,
.record-field {
  display: grid;
  grid-template-columns: minmax(100px, 0.38fr) 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.record-card div:last-child,
.record-field:last-child {
  border-bottom: 0;
}

.record-card dt,
.record-card dd,
.record-field dt,
.record-field dd {
  margin: 0;
}

.record-card dd,
.record-field dd {
  color: var(--muted);
  font-size: 0.86rem;
}

.record-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  padding-top: clamp(3rem, 7vw, 6rem);
}

.record-main,
.record-aside {
  display: grid;
  align-content: start;
  gap: 2.4rem;
}

.record-section {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-soft);
}

.record-section h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

.record-prose {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.8;
}

.record-prose h2,
.record-prose h3 {
  margin: 2rem 0 0.7rem;
  color: var(--paper-bright);
  font-weight: 400;
}

.record-prose p,
.record-prose ul {
  margin: 0.75rem 0;
}

.record-prose a {
  color: var(--brass-pale);
  text-decoration-color: var(--brass-dark);
  text-underline-offset: 3px;
}

.record-hero-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #090806;
  box-shadow: var(--shadow);
}

.record-hero-media img,
.record-hero-media video {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.record-hero-media button {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
}

.catalogue-only-plate {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 2rem;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(199, 161, 91, 0.035) 18px 19px),
    #0f0d0a;
  text-align: center;
}

.catalogue-only-plate span {
  display: block;
  width: 4rem;
  margin: 0 auto 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--brass);
  color: var(--brass);
  font-family: var(--font-display);
  font-size: 2rem;
}

.catalogue-only-plate strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
}

.catalogue-only-plate p {
  max-width: 32ch;
  margin: 0.65rem auto 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cross-reference-list {
  display: grid;
  gap: 0.55rem;
}

.cross-reference {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  border-color: var(--line-soft);
}

.cross-reference:hover {
  border-color: var(--brass);
  background: rgba(199, 161, 91, 0.07);
  transform: translateX(3px);
}

.cross-reference strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
}

.cross-reference span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-footer {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1.5rem, calc((100vw - 1500px) / 2));
  border-top: 1px solid var(--line);
  background: #0b0a08;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dialog {
  color: var(--paper);
}

dialog::backdrop {
  background: rgba(3, 3, 2, 0.82);
  backdrop-filter: blur(9px);
}

.catalogue-dialog,
.viewer-dialog {
  width: min(1040px, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--brass-dark);
  border-radius: 2px;
  background: #12100d;
  box-shadow: 0 30px 100px #000;
}

.dialog-heading,
.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #2c1c11, #17100b);
}

.dialog-heading h2,
.viewer-toolbar h2 {
  margin-top: 0.2rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 1.5rem;
}

.catalogue-search {
  display: block;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
}

.catalogue-search input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-bright);
  color: #17130f;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.search-status {
  min-height: 2.6rem;
  padding: 0.75rem 1.25rem 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.search-results {
  display: grid;
  max-height: 58vh;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1.25rem;
  overflow-y: auto;
}

.search-result {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border-color: var(--line-soft);
  text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
  border-color: var(--brass);
  background: rgba(199, 161, 91, 0.07);
}

.search-result h3 {
  font-size: 1.2rem;
}

.search-result p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.search-result > span:last-child {
  color: var(--brass);
}

.viewer-dialog {
  width: min(1500px, calc(100% - 1rem));
  height: calc(100svh - 1rem);
  max-height: none;
}

.viewer-toolbar {
  min-height: 74px;
}

.viewer-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.viewer-actions output {
  min-width: 3.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.viewer-stage {
  display: grid;
  height: calc(100% - 132px);
  place-items: center;
  overflow: auto;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%) 0 0 / 28px 28px,
    #080806;
}

.viewer-stage img,
.viewer-stage video {
  max-width: none;
  max-height: none;
  transform-origin: center;
  transition: width 180ms ease;
}

.viewer-stage video {
  width: min(900px, 92vw);
  max-height: calc(100svh - 180px);
}

.viewer-note {
  height: 58px;
  margin: 0;
  padding: 0.75rem 1.25rem;
  overflow: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes room-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes archive-breathe {
  50% {
    filter: drop-shadow(0 0 22px rgba(199, 161, 91, 0.45));
    transform: scale(1.025);
  }
}

@media (max-width: 1120px) {
  .directory-grid,
  .catalogue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-triptych {
    grid-template-columns: 1fr 1fr;
  }

  .artwork-feature:first-child {
    grid-column: 1 / -1;
  }

  .archive-actions > .text-button:last-child {
    display: none;
  }
}

@media (max-width: 850px) {
  :root {
    --page: min(100% - 2rem, 1500px);
  }

  .archive-header {
    min-height: 70px;
    padding-inline: 1rem;
  }

  .archive-seal small,
  .archive-actions .text-button {
    display: none;
  }

  .archive-seal strong {
    max-width: 34vw;
  }

  .search-button {
    font-size: 0;
  }

  .search-button svg,
  .search-button kbd {
    font-size: 0.85rem;
  }

  .hall-architecture,
  .room-hero-inner,
  .record-masthead,
  .record-layout,
  .section-heading--split,
  .anthology-plaque {
    grid-template-columns: 1fr;
  }

  .hall-architecture {
    align-items: end;
    padding-top: 7rem;
  }

  .archive-desk {
    max-width: 520px;
  }

  .room-hero-inner {
    gap: 2rem;
  }

  .room-register {
    max-width: 420px;
  }

  .record-layout {
    gap: 3rem;
  }

  .record-aside {
    grid-row: 1;
  }

  .anthology-plaque::before {
    width: 4rem;
    height: 4rem;
    font-size: 1.7rem;
  }

  .archive-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-stat:nth-child(2) {
    border-right: 0;
  }

  .archive-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  :root {
    --page: min(100% - 1.25rem, 1500px);
  }

  .archive-seal strong {
    width: min(210px, calc(100vw - 145px));
    max-width: none;
    font-size: 0.85rem;
  }

  .archive-header {
    gap: 0.45rem;
  }

  .archive-header .archive-actions {
    position: absolute;
    top: 14px;
    right: 1rem;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .search-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    justify-content: center;
    padding: 0;
    border-color: var(--brass);
    background: var(--brass);
    color: var(--black);
  }

  .search-button svg {
    color: var(--black);
  }

  .archive-seal img {
    width: 36px;
    height: 36px;
  }

  .search-button kbd {
    display: none;
  }

  .entrance-hall,
  .hall-architecture {
    min-height: calc(100svh - 70px);
  }

  .hall-introduction h1 {
    max-width: 95%;
    font-size: clamp(2.8rem, 12.8vw, 4.1rem);
  }

  .hall-introduction {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hall-introduction > p:not(.institution-strap) {
    max-width: 92%;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .directory-grid,
  .catalogue-grid,
  .collection-triptych {
    grid-template-columns: 1fr;
  }

  .directory-card {
    min-height: 190px;
  }

  .artwork-feature,
  .artwork-feature:not(:first-child) {
    min-height: 420px;
    grid-column: auto;
  }

  .room-hero h1,
  .record-heading h1 {
    font-size: clamp(2.8rem, 15vw, 5.2rem);
  }

  .record-card div,
  .record-field {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .archive-footer {
    display: grid;
    text-align: center;
  }

  .dialog-heading,
  .viewer-toolbar {
    align-items: flex-start;
  }

  .viewer-toolbar h2 {
    max-width: 48vw;
    font-size: 1.2rem;
  }

  .viewer-actions .text-button[data-viewer-fullscreen],
  .viewer-actions output {
    display: none;
  }

  .viewer-stage {
    height: calc(100% - 128px);
  }

  .search-result {
    grid-template-columns: 1fr auto;
  }

  .search-result .catalogue-type {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .archive-header,
  .archive-footer,
  .record-actions,
  .breadcrumb,
  dialog {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .record-page {
    width: 100%;
  }

  .record-summary,
  .record-prose,
  .record-card dd,
  .record-field dd {
    color: #333;
  }
}
