@font-face {
  font-family: Archivo;
  src: url("media/type/archivo-400.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url("media/type/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Archivo, Arial, sans-serif;
  background: #101821;
  color: #e6f4f3;
  --subtle: #b3c7cc;
  --line: #ffffff29;
  --accent: #ace8d9;
  --gutter: clamp(18px, 6.2vw, 104px);
  --measure: 1470px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #dbfff7; outline-offset: 4px; }
h1, h2, p, figure, ul, ol { margin: 0; }
h1, h2 { font-family: Instrument, Georgia, serif; font-weight: 400; }
.systems-skip { position: fixed; z-index: 10; top: 12px; left: 12px; transform: translateY(-180%); padding: 12px; background: #e7fbff; color: #0c1920; }
.systems-skip:focus { transform: none; }

.systems-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 79px;
  gap: 4px 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.systems-signature { font: 34px/.9 Instrument, Georgia, serif; letter-spacing: -.045em; }
.systems-mast nav { display: flex; flex-wrap: wrap; gap: 0 clamp(14px, 3vw, 37px); }
.systems-mast nav a, .systems-index a { display: inline-flex; align-items: center; min-height: 44px; color: var(--subtle); }
.systems-mast nav a:hover, .systems-index a:hover, .systems-mast nav a[aria-current] { color: white; text-decoration: underline; text-underline-offset: 6px; }

.systems-hero {
  max-width: var(--measure);
  position: relative;
  isolation: isolate;
  margin: 0 auto;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(250px, .83fr) minmax(0, 1.17fr);
  gap: clamp(20px, 3vw, 50px);
  padding: clamp(52px, 9vw, 117px) var(--gutter) clamp(43px, 8vw, 95px);
}
.systems-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 83% at 73% 51%,#243d4a 0%,transparent 94%);
}
.systems-hero h1 { font-size: clamp(76px, 10.3vw, 155px); line-height: .82; letter-spacing: -.058em; }
.systems-hero p { max-width: 34ch; margin-top: 26px; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.52; color: var(--subtle); }
.systems-enter {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
  min-height: 44px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
}
.systems-enter span { transition: transform .22s ease; }
.systems-enter:hover span { transform: translateY(3px); }
.systems-portrait {
  min-width: 0;
  border: 1px solid var(--line);
  background: #182a35;
  position: relative;
}
.systems-portrait::before, .systems-portrait::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 28px;
  height: 28px;
  pointer-events: none;
}
.systems-portrait::before { top: -1px; left: -1px; border-top: 1px solid #b6f4ee; border-left: 1px solid #b6f4ee; }
.systems-portrait::after { bottom: -1px; right: -1px; border-bottom: 1px solid #b6f4ee; border-right: 1px solid #b6f4ee; }
.systems-portrait canvas {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 5;
  background: radial-gradient(ellipse at 49% 48%, #25474b 0, #172732 66%);
}
.systems-portrait figcaption {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 9px 10px;
  gap: 6px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #bfd4d7;
  font: 12px/1.4 Consolas, monospace;
}

.systems-index, .systems-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px var(--gutter);
  gap: 0 clamp(15px, 3.4vw, 53px);
  border-block: 1px solid var(--line);
}
.systems-index {
  justify-content: center;
  background: linear-gradient(90deg, transparent, #f4feff72 45%, transparent 90%);
  border-color: #174d6537;
}
.systems-index a {
  color: #174359;
  font-weight: 650;
}
.systems-index a:hover { color: #09283a; }
.systems-index a:focus-visible, .systems-footer a:focus-visible { outline-color: #125f74; }
.systems-exhibit {
  --stage: #132636;
  --exhibit-accent: #cef6ff;
  --line: #bcecff35;
  margin: auto;
  max-width: var(--measure);
  scroll-margin-top: 16px;
  padding: clamp(52px, 8.5vw, 122px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(198px, .8fr) minmax(0, 1.5fr);
  gap: clamp(24px, 6vw, 100px);
  border-bottom: 1px solid #1c526439;
  align-items: start;
  color: #102e42;
}
.exhibit-lede { min-width: 0; align-self: center; }
.exhibit-lede h2 {
  font-size: clamp(53px, 7.2vw, 113px);
  line-height: .86;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.exhibit-lede p {
  max-width: 36ch;
  margin-top: 22px;
  color: #234a5e;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
}
.exhibit-lede .systems-instruction {
  color: #174359;
  font-size: .9rem;
  font-weight: 650;
  margin-top: 20px;
}
.exhibit-stage {
  --subtle: #bbd8e1;
  min-width: 0;
  position: relative;
  color-scheme: dark;
  color: #edfaff;
  border: 1px solid #4e819e;
  background: radial-gradient(ellipse at 25% 0%, var(--stage), #0b1c2a 80%);
  box-shadow: 0 1px #eaffff4d inset, 0 17px 42px -28px #133c59b8;
}
.exhibit-stage::before {
  content: "";
  width: clamp(42px, 15%, 112px);
  height: 1px;
  position: absolute;
  inset: -1px auto auto -1px;
  z-index: 1;
  background: linear-gradient(90deg, #f1fcff, #95cee3, transparent);
  pointer-events: none;
}
.exhibit-stage a { text-decoration-thickness: 1px; text-underline-offset: .25em; }
.exhibit-stage a:hover { color: var(--exhibit-accent); }
.exhibit-stage button, .exhibit-stage select, .exhibit-stage input[type="search"] { min-height: 42px; }
.exhibit-stage button {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 13px;
  background: #ffffff08;
}
.exhibit-stage button:hover:not(:disabled), .exhibit-stage button[aria-pressed="true"] { border-color: var(--exhibit-accent); color: var(--exhibit-accent); background: #ffffff10; }
.systems-status { color: #c7dadd; line-height: 1.4; font-size: .875rem; }
.stage-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 14px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
}
.stage-bar span { color: var(--subtle); font-size: .875rem; }

.exhibit-brain { --stage: #18394a; --exhibit-accent: #b8efff; }
.brain-stage { position: relative; padding: clamp(15px, 4vw, 33px); }
.brain-stage form { display: grid; gap: 8px; }
.brain-stage label { color: var(--exhibit-accent); }
.brain-input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.brain-input-row input {
  width: 100%;
  background: #081923;
  border: 1px solid #6bacc4;
  border-radius: 0;
  padding: 8px 11px;
  min-width: 0;
}
.brain-input-row button { color: var(--exhibit-accent); }
.brain-terms { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 24px; }
.brain-terms button { border-radius: 99px; padding-inline: 17px; }
.brain-notes { min-height: 223px; margin-top: 7px; border-top: 1px solid var(--line); }
.brain-note { padding: 11px 2px; border-bottom: 1px solid var(--line); }
.brain-note h3 { font-size: clamp(15px, 1.4vw, 18px); font-weight: 570; margin: 5px 0 3px; }
.brain-note p { font-size: .875rem; color: var(--subtle); line-height: 1.5; }
.brain-note p:first-child { font: 11px/1.35 Consolas, monospace; color: var(--exhibit-accent); }
.brain-note mark { color: inherit; background: #5daec961; border-bottom: 1px solid #b8efff; }
.brain-note[hidden] { display: none; }

.exhibit-atlas { --stage: #1c2e50; --exhibit-accent: #d5e3ff; }
.atlas-stage {
  --atlas-base: #111a35;
  --atlas-halo: #456887;
  --atlas-ink: #a5ebff;
}
.atlas-stage[data-mood="ember"] { --atlas-base: #271530; --atlas-halo: #914743; --atlas-ink: #ffbe95; }
.atlas-stage[data-mood="moss"] { --atlas-base: #10231e; --atlas-halo: #506d44; --atlas-ink: #c6f198; }
.atlas-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.atlas-controls select { padding: 5px 6px; background: #17202e; border: 1px solid var(--line); border-radius: 3px; }
.atlas-visual {
  background: radial-gradient(ellipse at 50% 32%,var(--atlas-halo),transparent 57%),var(--atlas-base);
  position: relative;
  min-width: 0;
}
.atlas-visual canvas { display: block; width: 100%; aspect-ratio: 38 / 21; }
.atlas-team-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0 10px 12px; }
.atlas-team-list button { font-size: .85rem; }
.atlas-team-list i { display: inline-block; width: 9px; aspect-ratio: 1; border-radius: 50%; border: 1px solid #ff9391; margin-left: 4px; box-shadow: 0 0 6px #ff9391; }
.atlas-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px 13px; flex-wrap: wrap; padding: 14px clamp(13px, 3vw, 25px); border-top: 1px solid var(--line); }

.exhibit-room { --stage: #19364a; --exhibit-accent: #c2eaff; }
.room-track { list-style: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 0; }
.room-track li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px clamp(9px, 2vw, 24px) 19px;
  min-height: 135px;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
}
.room-track li:last-child { border-right: 0; }
.room-track li > span { font: 30px/1 Instrument, Georgia, serif; color: #a8dcf5; }
.room-track li p { margin-top: 7px; color: #c6dce7; font-size: .8rem; line-height: 1.4; }
.room-track li[aria-current] { background: #b5e3ff1b; border-bottom-color: var(--exhibit-accent); }
.room-track li[data-complete] { border-bottom-color: #82d6b4; }
.room-action, .sentinel-actions { padding: 14px clamp(15px, 4vw, 30px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px 15px; flex-wrap: wrap; align-items: center; }

.exhibit-sentinel { --stage: #163143; --exhibit-accent: #bbeeff; }
.sentinel-instrument { position: relative; min-width: 0; overflow: hidden; }
.sentinel-instrument canvas { display: block; width: 100%; aspect-ratio: 70 / 37; background: #0d201e; }
.sentinel-lines {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px;
  padding: 1px 0 0;
  background: var(--line);
}
.sentinel-lines li { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 8px; padding: 10px 9px; background: #112a38; font-size: .85rem; }
.sentinel-lines i { width: 6px; height: 6px; border-radius: 50%; background: #92a6a2; }
.sentinel-lines span { grid-column: 2; font-size: .71rem; line-height: 1.3; color: var(--subtle); }
.sentinel-lines [data-state="ok"] i { background: #a0efcb; box-shadow: 0 0 9px #a0efcb; }
.sentinel-lines [data-state="fault"] i { background: #ff9c97; box-shadow: 0 0 9px #ff9c97; }
.sentinel-lines [data-state="fault"] span { color: #ffb1ae; }
.sentinel-actions > div { display: flex; gap: 6px; flex-wrap: wrap; }

.exhibit-meter { --stage: #263f56; --exhibit-accent: #daeaff; }
.meter-readout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: end; padding: clamp(18px, 4vw, 34px); }
.meter-readout > p { align-self: center; display: grid; gap: 5px; }
.meter-readout > p output { font: clamp(50px, 6vw, 89px)/.84 Instrument,Georgia,serif; letter-spacing: -.035em; color: var(--exhibit-accent); }
.meter-readout > p span { color: var(--subtle); font-size: .88rem; }
.meter-key { display: grid; gap: 8px; margin: 0; }
.meter-key div { display: flex; justify-content: space-between; gap: 6px; padding: 0 0 5px; border-bottom: 1px solid var(--line); }
.meter-key dt { font-size: .83rem; color: var(--subtle); }
.meter-key dd { margin: 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.meter-stack { margin: 0 clamp(18px, 4vw, 34px) 12px; min-height: 14px; display: flex; gap: 3px; }
.meter-stack i { flex: var(--part); background: #ad9bd2; transition: flex .30s ease; }
.meter-stack i:nth-child(2) { background: #a0cbc9; }
.meter-stack i:nth-child(3) { background: #ffccaa; }
.meter-slider { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px 12px; padding: clamp(13px, 3vw, 22px) clamp(18px, 4vw, 34px); color: var(--subtle); font-size: .86rem; }
.meter-slider input { width: 100%; min-width: 0; margin: 0; accent-color: var(--exhibit-accent); min-height: 40px; }
.meter-slider output { font-variant-numeric: tabular-nums; }

.systems-footer {
  justify-content: space-between;
  padding-block: 28px;
  color: #102e42;
  border-color: #174d6537;
  background: #d5ecef3d;
}
.systems-footer a { text-underline-offset: 4px; padding: 7px 0; }
.systems-footer a:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .systems-exhibit { gap: 30px; }
  .room-track { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .room-track li:nth-child(2) { border-right: 0; }
  .room-track li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .room-track li { grid-template-columns: auto 1fr; min-height: 91px; }
}
@media (max-width: 700px) {
  .systems-hero, .systems-exhibit { grid-template-columns: minmax(0,1fr); }
  .systems-hero { padding-top: 42px; }
  .systems-hero h1 { font-size: clamp(75px, 16vw, 112px); }
  .systems-mast { padding-block: 12px 5px; }
  .systems-mast nav { gap: 0 15px; }
  .systems-index { justify-content: flex-start; }
  .exhibit-lede .systems-instruction { margin-top: 10px; }
}
@media (max-width: 390px) {
  .meter-readout { grid-template-columns: 1fr; }
  .stage-bar { gap: 6px 10px; }
  .atlas-controls { gap: 5px; }
  .atlas-controls button { padding-inline: 7px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation: none !important; transition: none !important; }
}
.room-visual { overflow: hidden; position: relative; aspect-ratio: 1860 / 846; background: #201b17; border-bottom: 1px solid var(--line); }
.room-visual img { display:block; width:100%; height:100%; object-fit:cover; }
.room-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: 28%;
  height: 100%;
  top: 0;
  left: calc(24% + var(--station, 0) * 13%);
  background: linear-gradient(105deg, transparent 5%, #c9f0ff7b 60%, transparent 95%);
  mix-blend-mode: soft-light;
  transition: left .6s cubic-bezier(.18,.8,.25,1);
}
#sentinel button[aria-disabled="true"] { opacity: .58; cursor: wait; }
