:root {
  --pme-black: #070908;
  --pme-charcoal: #111512;
  --pme-wall: #1a1f1b;
  --pme-bone: #e9e1d2;
  --pme-soft: #c3c5b8;
  --pme-muted: #969b90;
  --pme-green: #bdcd92;
  --pme-acid: #9fbd54;
  --pme-line: #46503f;
  --pme-paper: #d9d4c2;
  --pme-ink: #171b16;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pme-black); }

.pme-shell {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.pme-skip {
  position: absolute;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  padding: .75rem 1rem;
  color: var(--pme-black) !important;
  background: var(--pme-green);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}
.pme-skip:focus { transform: translateY(0); }

.pme-top-rail {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 4rem;
  padding: .65rem clamp(1rem, 3vw, 2rem);
  color: var(--pme-bone);
  background: #060807;
  border-bottom: 1px solid #31382e;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.pme-brand {
  color: var(--pme-bone) !important;
  font-weight: 600;
  letter-spacing: .18em;
  text-decoration: none;
  white-space: nowrap;
}
.pme-context {
  min-width: 0;
  color: var(--pme-muted);
  font-size: .78rem;
  letter-spacing: .08em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.pme-utilities { display: flex; align-items: center; gap: .4rem; }
.pme-utility {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem .65rem;
  color: var(--pme-soft) !important;
  text-decoration: none;
  white-space: nowrap;
}
.pme-utility:hover { color: var(--pme-green) !important; }
.pme-utility[aria-disabled="true"] {
  color: #81877d !important;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: .24rem;
}

.pme-location-rail {
  position: sticky;
  z-index: 60;
  top: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.25rem;
  padding: .35rem clamp(1rem, 3vw, 2rem);
  color: var(--pme-muted);
  background: rgba(10, 13, 11, .98);
  border-block: 1px solid #2b3329;
  box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .22);
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.pme-location-status {
  display: flex;
  flex: 0 1 19rem;
  align-items: baseline;
  gap: .6rem;
  min-width: 0;
  padding-right: .85rem;
  border-right: 1px solid #343d31;
}
.pme-location-status strong {
  color: var(--pme-green);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pme-current-room {
  min-width: 0;
  overflow: hidden;
  color: var(--pme-bone);
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pme-location-progress { display: none; }
.pme-location-links {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.pme-room-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .35rem .68rem;
  color: var(--pme-muted) !important;
  border: 1px solid transparent;
  font-size: .76rem;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}
.pme-room-link:hover,
.pme-room-link[aria-current="location"] {
  color: var(--pme-green) !important;
  border-color: #59684a;
  background: #151a16;
}

.pme-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.25rem;
}
.pme-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: .85rem 1.35rem;
  color: var(--pme-black) !important;
  background: #eef2ee;
  border: 1px solid #eef2ee;
  border-radius: .18rem;
  font: 700 .9rem/1.2 "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.pme-hero-actions a + a {
  color: var(--pme-bone) !important;
  background: transparent;
  border-color: #667863;
}
.pme-hero-actions a:hover {
  background: #fff;
  border-color: #fff;
}
.pme-hero-actions a + a:hover {
  color: var(--pme-green) !important;
  background: rgba(189, 205, 146, .08);
  border-color: var(--pme-green);
}
.pme-hero-actions a:focus-visible {
  outline: 3px solid var(--pme-acid);
  outline-offset: 4px;
}

.pme-arrival {
  position: fixed;
  z-index: 80;
  top: 1rem;
  left: 50%;
  width: min(calc(100% - 2rem), 34rem);
  padding: .8rem 1rem;
  color: var(--pme-bone);
  background: rgba(7, 9, 8, .96);
  border: 1px solid var(--pme-green);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .5);
  font: 500 .78rem/1.35 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
  animation: pme-arrival 4.25s both;
}
@keyframes pme-arrival {
  0% { opacity: 0; transform: translate(-50%, -.75rem); }
  9%, 75% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; visibility: hidden; }
}

.pme-object-label {
  margin-top: .8rem;
  padding: .85rem 0 0;
  color: var(--pme-soft);
  border-top: 1px solid rgba(189, 205, 146, .34);
  font: 400 .84rem/1.45 "Helvetica Neue", Arial, sans-serif;
}
.pme-object-label p { margin: .28rem 0 !important; max-width: 52rem; }
.pme-object-id {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  margin-bottom: .4rem;
  color: var(--pme-green);
  font-size: .69rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pme-object-title {
  color: var(--pme-bone);
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: 1.08rem;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.pme-object-meta,
.pme-object-credit { color: var(--pme-muted); font-size: .76rem; }
.pme-object-status {
  display: inline-flex;
  margin-top: .4rem;
  padding: .25rem .45rem;
  color: #d8e7b2;
  border: 1px solid #667653;
  font-size: .66rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.pme-object-status--hold { color: #e6c7a0; border-color: #8f6746; }

/* Light-room labels use a dedicated ink palette. Muted museum text remains
   quiet, but never inherits the pale display palette used on charcoal walls. */
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-label {
  color: #3b4137;
  border-top-color: rgba(42, 55, 31, .38);
}
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-id { color: #34451e; }
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-title { color: #20241d; }
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-meta,
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-credit { color: #343b31; }
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-status {
  color: #34451e;
  border-color: #53692b;
  background: rgba(255, 255, 255, .3);
}
:is(.room.paper, .room.light, .pme-exit-passage) .pme-object-status--hold {
  color: #5b351a;
  border-color: #7a4d27;
}

.pme-upcoming-objects {
  padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem;
  color: var(--pme-bone);
  background: #0b0e0c;
  border-block: 1px solid #31392f;
}
.pme-upcoming-inner { width: min(100%, 68rem); margin-inline: auto; }
.pme-upcoming-head {
  display: grid;
  grid-template-columns: minmax(10rem, .42fr) minmax(0, 1.58fr);
  gap: 2rem;
  margin-bottom: 1.6rem;
}
.pme-upcoming-head small {
  color: var(--pme-green);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.pme-upcoming-head h2 {
  margin: 0;
  color: var(--pme-bone);
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.pme-upcoming-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #3a4436;
  border: 1px solid #3a4436;
}
.pme-upcoming-card { padding: 1.2rem; background: #131714; }
.pme-upcoming-card h3 { margin: .3rem 0 .55rem; color: var(--pme-bone); }
.pme-upcoming-card p { margin: 0; color: var(--pme-soft); }

.pme-studio-portal {
  padding: clamp(2.4rem, 5vw, 4.25rem) 1.5rem;
  color: var(--pme-bone);
  background: radial-gradient(ellipse at 80% 0, rgba(185, 204, 133, .15), transparent 40%), #0b0e0c;
  border-block: 1px solid #586349;
}
.pme-studio-portal .pme-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, .65fr);
  gap: 2rem;
  align-items: center;
}
.pme-studio-portal small { color: var(--pme-green); letter-spacing: .14em; text-transform: uppercase; }
.pme-studio-portal h2 {
  margin: .45rem 0 .65rem;
  color: var(--pme-bone);
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  text-transform: uppercase;
}
.pme-studio-portal p { margin: 0; color: var(--pme-soft); }
.pme-primary-action,
.pme-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1rem;
  font: 600 .74rem/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.pme-primary-action { color: var(--pme-black) !important; background: var(--pme-green); }
.pme-secondary-action { color: var(--pme-green) !important; border: 1px solid #697855; }

.pme-practice-studio { position: relative; border-top: 3px solid var(--pme-green) !important; }
.pme-practice-studio::before {
  content: "Practice Studio";
  position: absolute;
  z-index: 2;
  top: 0;
  left: clamp(1rem, 4vw, 3rem);
  padding: .45rem .65rem;
  color: var(--pme-black);
  background: var(--pme-green);
  font: 700 .68rem/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pme-studio-contract {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 1.25rem 0 1.75rem;
  background: #4a5442;
  border: 1px solid #4a5442;
}
.pme-studio-contract > div { padding: 1rem; background: rgba(8, 11, 9, .84); }
.pme-studio-contract small { display: block; color: var(--pme-green); letter-spacing: .1em; text-transform: uppercase; }
.pme-studio-contract p { margin: .35rem 0 0 !important; color: var(--pme-soft); }
.pme-studio-finish {
  margin-top: 1.5rem;
  padding: 1.25rem;
  color: var(--pme-bone);
  background: rgba(5, 8, 6, .58);
  border: 1px solid #59664b;
}

.pme-evidence-cabinet {
  padding: 2.2rem 1.5rem 3rem;
  color: var(--pme-muted);
  background: #0a0c0b;
  border-top: 1px solid #30372f;
  font: 400 .87rem/1.55 "Helvetica Neue", Arial, sans-serif;
}
.pme-evidence-cabinet h2 { margin: 0 0 .7rem; color: var(--pme-bone); }
.pme-evidence-cabinet a { color: var(--pme-green) !important; }

.pme-exit-passage {
  padding: clamp(3.5rem, 7vw, 6rem) 1.5rem;
  color: var(--pme-ink);
  background: linear-gradient(135deg, #ded8c5, #aeb79d);
}
.pme-exit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, .8fr);
  gap: 3rem;
  align-items: center;
}
.pme-exit-passage small { letter-spacing: .14em; text-transform: uppercase; }
.pme-exit-passage h2 {
  margin: .45rem 0 .7rem;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: .95;
  text-transform: uppercase;
}
.pme-exit-passage p { max-width: 44rem; }
.pme-exit-actions { display: grid; gap: .65rem; }
.pme-exit-actions .pme-primary-action { background: var(--pme-ink); color: var(--pme-bone) !important; }
.pme-exit-actions .pme-secondary-action { color: var(--pme-ink) !important; border-color: rgba(23, 27, 22, .48); }

.pme-global-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  color: var(--pme-muted);
  background: #050706;
  border-top: 1px solid #30372f;
  font: 400 .78rem/1.45 "Helvetica Neue", Arial, sans-serif;
}
.pme-footer-context strong { display: block; color: var(--pme-bone); letter-spacing: .1em; }
.pme-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }

.pme-legacy-nav { display: none !important; }
.pme-canonical-anchor { display: block; position: relative; top: -1rem; visibility: hidden; }

/* The Exhibition Map becomes one connected gallery rail. */
#program-map-page-wireframe .pm-poster-rail {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  max-width: 72rem !important;
}
#program-map-page-wireframe .pm-exhibit,
#program-map-page-wireframe .pm-exhibit--opener {
  width: 100% !important;
  margin: 0 !important;
  padding: 3rem 0 !important;
  border-top: 1px solid rgba(189, 205, 146, .28);
}
#program-map-page-wireframe .pm-exhibit:first-child { border-top: 0; }
#program-map-page-wireframe .pm-poster-card {
  display: grid !important;
  grid-template-columns: minmax(17rem, .78fr) minmax(0, 1.22fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
#program-map-page-wireframe .pm-exhibit:nth-child(even) .pm-poster { grid-column: 2; grid-row: 1; }
#program-map-page-wireframe .pm-exhibit:nth-child(even) .pm-label { grid-column: 1; grid-row: 1; }
#program-map-page-wireframe .pm-poster { max-height: 44rem; }
#program-map-page-wireframe .pm-label { padding-top: 0 !important; }
#program-map-page-wireframe .pm-label h4 { font-size: clamp(1.65rem, 3vw, 2.55rem) !important; }
#program-map-page-wireframe .pm-use-band { margin-top: 0; }
#program-map-page-wireframe .pm-boundary { border-top: 0 !important; }

:is(.pme-utility, .pme-room-link, .pme-primary-action, .pme-secondary-action, .pme-brand):focus-visible {
  outline: 3px solid #d7e5ad;
  outline-offset: .22rem;
}
[id^="room-w"], [id^="exhibit-"], #chapter-start, #chapter-collection, #practice-studio, #optional-wing, #exit-passage { scroll-margin-top: 4.4rem; }
#program-map-page-wireframe [id^="exhibit-"],
#program-map-page-wireframe #chapter-collection { scroll-margin-top: 5rem; }

#program-map-page-wireframe .pme-location-rail--exhibits .pme-location-status {
  flex-basis: 24rem;
}
#program-map-page-wireframe .pme-location-rail--exhibits .pme-room-link {
  position: relative;
  flex-direction: column;
  justify-content: center;
  gap: .06rem;
  min-width: 3.75rem;
  padding: .3rem .62rem .45rem;
}
#program-map-page-wireframe .pme-location-rail--exhibits .pme-room-link::after {
  content: "";
  position: absolute;
  right: .58rem;
  bottom: .17rem;
  left: .58rem;
  height: 2px;
  background: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
#program-map-page-wireframe .pme-location-rail--exhibits .pme-room-link[aria-current="location"] {
  color: #d7e5ad !important;
  border-color: #788b61;
  background: radial-gradient(ellipse at 50% 0%, rgba(209, 227, 165, .18), rgba(21, 26, 22, .96) 68%);
  box-shadow: 0 0 1rem rgba(198, 218, 151, .16), inset 0 1px rgba(230, 239, 204, .12);
}
#program-map-page-wireframe .pme-location-rail--exhibits .pme-room-link[aria-current="location"]::after {
  background: #c9dda0;
  box-shadow: 0 0 .75rem rgba(207, 229, 159, .72);
}
#program-map-page-wireframe .pme-location-number {
  color: inherit;
  font-weight: 650;
  line-height: 1;
}
#program-map-page-wireframe .pme-location-access {
  color: #8f9985;
  font-size: .5rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
}
#program-map-page-wireframe .pme-room-link[aria-current="location"] .pme-location-access { color: #b8c99a; }

@media (max-width: 820px) {
  .pme-top-rail { grid-template-columns: 1fr auto; }
  .pme-context { grid-column: 1 / -1; grid-row: 2; }
  .pme-location-status { flex-basis: 14rem; }
  #program-map-page-wireframe .pme-location-rail--exhibits .pme-location-status { flex-basis: 18rem; }
  .pme-studio-portal .pme-shell,
  .pme-exit-grid,
  .pme-upcoming-head { grid-template-columns: 1fr; }
  .pme-studio-contract { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #program-map-page-wireframe .pm-poster-card,
  #program-map-page-wireframe .pm-exhibit:nth-child(even) .pm-poster-card {
    grid-template-columns: minmax(13rem, .9fr) minmax(0, 1.1fr) !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 560px) {
  .pme-shell { width: min(100% - 1.75rem, 72rem); }
  .pme-top-rail { gap: .5rem; padding-inline: .85rem; }
  .pme-context { font-size: .68rem; }
  .pme-utilities .pme-utility:nth-child(2) { display: none; }
  .pme-location-rail {
    min-height: 3.5rem;
    padding-inline: .65rem;
    background: #090c0a;
  }
  .pme-location-status { flex: 0 0 8.5rem; gap: .35rem; padding-right: .55rem; }
  #program-map-page-wireframe .pme-location-rail--exhibits { min-height: 4rem; }
  #program-map-page-wireframe .pme-location-rail--exhibits .pme-location-status {
    display: grid;
    flex-basis: 10.5rem;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .08rem .38rem;
    align-items: baseline;
  }
  #program-map-page-wireframe .pme-location-rail--exhibits .pme-location-progress {
    display: block;
    color: #aebd91;
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .11em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  #program-map-page-wireframe .pme-location-rail--exhibits .pme-current-room { grid-column: 1 / -1; }
  #program-map-page-wireframe .pme-location-rail--exhibits .pme-room-link { min-width: 3.6rem; }
  .pme-location-status strong { font-size: .59rem; }
  .pme-current-room { font-size: .69rem; }
  .pme-room-link { min-width: 2.75rem; justify-content: center; }
  .pme-hero-actions { display: grid; grid-template-columns: 1fr; }
  .pme-hero-actions a { width: 100%; }
  .pme-upcoming-grid,
  .pme-studio-contract { grid-template-columns: 1fr; }
  .pme-global-footer { grid-template-columns: 1fr; }
  .pme-footer-links { justify-content: flex-start; }
  #program-map-page-wireframe .pm-poster-card,
  #program-map-page-wireframe .pm-exhibit:nth-child(even) .pm-poster-card {
    display: block !important;
  }
  #program-map-page-wireframe .pm-exhibit:nth-child(even) .pm-poster,
  #program-map-page-wireframe .pm-exhibit:nth-child(even) .pm-label { grid-column: auto; grid-row: auto; }
  #program-map-page-wireframe .pm-label { padding-top: 1rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pme-arrival { animation: none; position: relative; top: auto; left: auto; width: 100%; transform: none; }
}
