:root {
  --paper: #eceef4;
  --mist: #e2e6f0;
  --surface: #f6f7fb;
  --ink: #1a2230;
  --ink-soft: #4a5568;
  --ink-faint: rgba(26, 34, 48, 0.42);
  --sage: #6b8f9c;
  --sage-deep: #3d5a66;
  --sage-mist: rgba(107, 143, 156, 0.2);
  --horizon: #c4a574;
  --horizon-mist: rgba(196, 165, 116, 0.28);
  --world-a: rgba(99, 132, 168, 0.35);
  --world-b: rgba(107, 143, 156, 0.25);
  --world-c: rgba(196, 165, 116, 0.22);
  --slate-mist: rgba(38, 48, 58, 0.09);
  --gold-leaf: rgba(198, 162, 88, 0.18);
  --gold-leaf-deep: rgba(168, 132, 58, 0.12);
  --gold-sheen: rgba(232, 214, 168, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 20px;
  --nav-h: 4.25rem;
  --section-jump-bar-h: 2.75rem;
  --anchor-offset: calc(var(--nav-h) + 6.35rem);
  --footer-fixed-pad: clamp(6.75rem, 22vmin, 9.5rem);
  --shell-max: min(72rem, 100% - 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 95% 72% at 50% 108%, var(--slate-mist), transparent 52%),
    radial-gradient(ellipse 55% 48% at 4% 92%, rgba(44, 54, 66, 0.07), transparent 46%),
    radial-gradient(ellipse 50% 44% at 96% 8%, rgba(58, 68, 82, 0.06), transparent 44%),
    linear-gradient(168deg, #e4e7ee 0%, var(--paper) 48%, #eef0f5 100%);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 44% at 14% 78%, var(--gold-leaf), transparent 58%),
    radial-gradient(ellipse 38% 48% at 91% 32%, var(--gold-leaf-deep), transparent 54%),
    radial-gradient(ellipse 30% 36% at 58% 91%, var(--gold-sheen), transparent 50%),
    radial-gradient(circle 42vw at 12% 22%, var(--world-a), transparent 58%),
    radial-gradient(circle 38vw at 92% 18%, var(--world-b), transparent 55%),
    radial-gradient(ellipse 90% 55% at 50% 108%, var(--horizon-mist), transparent 50%),
    radial-gradient(circle 28vw at 78% 78%, var(--world-c), transparent 52%);
  animation: field-drift 36s var(--ease) infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.52;
  mix-blend-mode: soft-light;
  background:
    repeating-linear-gradient(92deg, transparent 0, transparent 3px, rgba(35, 44, 54, 0.04) 3px, rgba(35, 44, 54, 0.04) 4px),
    repeating-linear-gradient(-3deg, transparent, transparent 11px, rgba(28, 36, 46, 0.045) 11px, rgba(28, 36, 46, 0.045) 12px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.032' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  background-size: auto, auto, 480px 480px;
}

@keyframes field-drift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(1.5%, -2%) scale(1.035) rotate(0.8deg); opacity: 0.93; }
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
em { color: var(--sage-deep); }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.042;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--sage-deep);
  color: var(--paper);
  z-index: 10000;
}

header.site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(to bottom, rgba(232, 235, 242, 0.94), rgba(236, 238, 244, 0.76), transparent);
  backdrop-filter: blur(14px);
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.mark-logo {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(28%) sepia(15%) saturate(680%) hue-rotate(152deg) brightness(94%) contrast(90%);
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
nav a[aria-current="page"] { color: var(--sage-deep); }
nav a:hover { color: var(--sage-deep); text-decoration: none; }

.site-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.85rem, 2.2vw, 1.65rem);
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.site-header__divider {
  display: block;
  width: 1px;
  height: 2.35rem;
  flex-shrink: 0;
  align-self: center;
  background: rgba(26, 34, 48, 0.22);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.35);
}

.nav-chicago-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.25;
  min-width: 0;
  max-width: 14rem;
}
.nav-chicago-widget__label {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.nav-chicago-widget__weather {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--sage-deep);
}
.nav-chicago-widget__clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.06rem;
  font-variant-numeric: tabular-nums;
}
.nav-chicago-widget__clock time { font-weight: 600; color: var(--ink); }

.section-jump {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
}
.section-jump-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(246, 247, 251, 0.82);
  border: none;
  border-bottom: 1px solid rgba(92, 117, 104, 0.22);
  backdrop-filter: blur(10px);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.section-jump-btn:first-child { border-top: 1px solid rgba(92, 117, 104, 0.22); }
.section-jump-btn:hover {
  color: var(--sage-deep);
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: calc(var(--footer-fixed-pad) + env(safe-area-inset-bottom, 0px));
}

.shell {
  width: var(--shell-max);
  margin: 0 auto;
  padding: calc(var(--anchor-offset) + clamp(1.25rem, 3vw, 2rem)) clamp(1rem, 4vw, 2rem) 2.5rem;
}

.hero {
  text-align: center;
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid rgba(92, 117, 104, 0.12);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.hero__kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 0.65rem;
  font-variation-settings: "SOFT" 100, "WONK" 0.5;
}

.hero__lede {
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.5;
}

.hero__status {
  margin: 1.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-deep);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(107, 143, 156, 0.15);
  border: 1px solid rgba(92, 117, 104, 0.18);
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(61, 90, 102, 0.2);
}

.section {
  margin-bottom: clamp(2.5rem, 6vw, 3.75rem);
}

.section__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}

.section h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  font-weight: 400;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(0.85rem, 2vw, 1.15rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.floor-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1rem, 2.5vw, 1.2rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(92, 117, 104, 0.12);
  box-shadow: 0 10px 32px rgba(44, 51, 46, 0.05);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

a.floor-card:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 165, 116, 0.42);
  box-shadow: 0 16px 40px rgba(44, 51, 46, 0.1);
  text-decoration: none;
}

.floor-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.floor-card__room {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.floor-card__badge {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(107, 143, 156, 0.12);
  border: 1px solid rgba(92, 117, 104, 0.14);
  white-space: nowrap;
}

.floor-card__badge.is-live {
  color: var(--sage-deep);
  background: rgba(107, 143, 156, 0.18);
}

.floor-card h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.floor-card p {
  flex: 1;
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.48;
}

.floor-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 0.65rem;
}

.floor-card__enter {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--horizon);
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.35rem);
}

@media (max-width: 720px) {
  .systems-grid { grid-template-columns: 1fr; }
}

.systems-card {
  padding: clamp(1.1rem, 2.5vw, 1.35rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(92, 117, 104, 0.12);
  box-shadow: 0 10px 32px rgba(44, 51, 46, 0.05);
}

.systems-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.systems-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.systems-card li + li { margin-top: 0.35rem; }

.topo-map {
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(99, 132, 168, 0.08) 0%, rgba(226, 230, 240, 0.75) 45%, rgba(236, 238, 244, 0.92) 100%);
  border: 1px solid rgba(92, 117, 104, 0.14);
  box-shadow: 0 18px 48px rgba(44, 51, 46, 0.08);
  overflow: hidden;
  position: relative;
}

.topo-map__canvas-wrap {
  position: relative;
  width: 100%;
  height: clamp(280px, 52vw, 420px);
  cursor: grab;
  touch-action: none;
}

.topo-map__canvas-wrap.is-dragging { cursor: grabbing; }

#topo-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.topo-map__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.topo-map__hint {
  align-self: flex-start;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(92, 117, 104, 0.12);
  backdrop-filter: blur(8px);
}

.topo-map__controls {
  align-self: flex-end;
  display: flex;
  gap: 0.35rem;
  pointer-events: auto;
}

.topo-map__btn {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(92, 117, 104, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--sage-deep);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.topo-map__btn:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(61, 90, 102, 0.28);
}

.topo-map__btn:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 2px;
}

.topo-map__labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.topo-label {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(92, 117, 104, 0.16);
  box-shadow: 0 4px 14px rgba(44, 51, 46, 0.12);
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.topo-label:hover {
  transform: translate(-50%, -52%);
  border-color: rgba(196, 165, 116, 0.45);
  box-shadow: 0 8px 20px rgba(44, 51, 46, 0.16);
  text-decoration: none;
  color: var(--sage-deep);
}

.topo-label.is-active {
  border-color: var(--sage-deep);
  color: var(--sage-deep);
}

.topo-map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid rgba(92, 117, 104, 0.1);
  background: rgba(255, 255, 255, 0.45);
}

.topo-map__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topo-map__legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--sage-deep);
}

.topo-map__legend span:nth-child(2)::before { background: #5a9a7a; }
.topo-map__legend span:nth-child(3)::before { background: rgba(99, 132, 168, 0.85); }
.topo-map__legend span:nth-child(4)::before { background: var(--horizon); }

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

footer.site-foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem) calc(1.1rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-top: 1px solid rgba(92, 117, 104, 0.12);
  background: linear-gradient(to top, rgba(236, 238, 244, 0.97) 0%, rgba(236, 238, 244, 0.9) 40%, rgba(236, 238, 244, 0.72) 100%);
  backdrop-filter: blur(12px);
}
footer.site-foot a {
  color: var(--sage-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

#floors, #systems, #pulse { scroll-margin-top: var(--anchor-offset); }

@media (max-width: 720px) {
  :root {
    --nav-h: 5.5rem;
    --anchor-offset: calc(var(--nav-h) + var(--section-jump-bar-h) + max(0.35rem, env(safe-area-inset-top, 0px)));
  }
  header.site {
    height: auto;
    min-height: var(--nav-h);
    padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
    padding-bottom: 0.35rem;
  }
  .section-jump { flex-direction: row; border-top: 1px solid rgba(92, 117, 104, 0.22); }
  .section-jump-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0.2rem;
    border-top: none;
    border-right: 1px solid rgba(92, 117, 104, 0.22);
    font-size: 0.56rem;
  }
  .section-jump-btn:last-child { border-right: none; }
  .section-jump-btn:first-child { border-top: none; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .floor-card { transition: none; }
  a.floor-card:hover { transform: none; }
  .topo-label { transition: none; }
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a0a0a;
  --mist: #0e0e0e;
  --surface: #121212;
  --ink: #f4f4f4;
  --ink-soft: #c2c2c2;
  --ink-faint: rgba(244, 244, 244, 0.48);
  --sage: #8ec5d1;
  --sage-deep: #6eb0bf;
  --sage-mist: rgba(110, 176, 191, 0.14);
  --horizon: #d4a574;
  --horizon-mist: rgba(212, 165, 116, 0.1);
  --theme-meta: #000000;
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 90% 55% at 50% 108%, rgba(110, 176, 191, 0.05), transparent 52%),
    linear-gradient(168deg, #0c0c0c 0%, #080808 48%, #050505 100%);
}

[data-theme="dark"] body::after {
  opacity: 0.12;
}

[data-theme="dark"] .floor-card,
[data-theme="dark"] .system-card,
[data-theme="dark"] .pulse-card {
  border-color: rgba(255, 255, 255, 0.07);
  background-color: #111111;
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.88), -5px -5px 14px rgba(255, 255, 255, 0.045);
}

@media (max-width: 768px) {
  :root {
    --nav-h: calc(3.15rem + env(safe-area-inset-top, 0px));
    --footer-fixed-pad: calc(3.85rem + env(safe-area-inset-bottom, 0px));
    --section-jump-bar-h: 2.65rem;
    --anchor-offset: calc(var(--nav-h) + var(--section-jump-bar-h) + 0.25rem);
  }

  header.site {
    height: var(--nav-h);
    min-height: var(--nav-h);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: 0;
  }

  .wrap {
    padding-inline: max(0.85rem, env(safe-area-inset-left, 0px)) max(0.85rem, env(safe-area-inset-right, 0px));
    padding-bottom: calc(var(--footer-fixed-pad) + env(safe-area-inset-bottom, 0px));
  }

  .systems-grid {
    grid-template-columns: 1fr;
  }
}
