:root {
  --font-display: "Newsreader", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.salon-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 9px 12px;
  border: 1px solid rgba(243, 239, 231, 0.28);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.94);
  color: #f3efe7;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.salon-skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #00b7a8;
  outline-offset: 3px;
}

.salon-noscript {
  position: relative;
  z-index: 10;
  width: min(900px, calc(100vw - 32px));
  margin: 12px auto;
  padding: 12px 14px;
  border: 1px solid rgba(231, 200, 75, 0.44);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.9);
  color: #f3efe7;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
}

main[tabindex="-1"]:focus {
  outline: none;
}

.salon-foundation {
  --foundation-ink: rgba(8, 9, 11, 0.88);
  --foundation-paper: #d9d3c6;
  --foundation-bone: #f3efe7;
  --foundation-muted: #9a958a;
  --foundation-line: rgba(243, 239, 231, 0.14);
  --foundation-cyan: #00b7a8;
  --foundation-gold: #e7c84b;
  --foundation-red: #ff5a4d;
  --foundation-green: #9cc76c;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9;
  width: min(520px, calc(100vw - 32px));
  color: var(--foundation-paper);
  font-family: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
  transition: width 180ms ease;
}

.salon-foundation[data-open="false"] {
  width: min(330px, calc(100vw - 32px));
}

.salon-foundation[data-open="true"] {
  width: min(560px, calc(100vw - 32px));
}

.salon-foundation,
.salon-foundation * {
  box-sizing: border-box;
}

.salon-foundation__toggle,
.salon-foundation__panel {
  border: 1px solid var(--foundation-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 183, 168, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(231, 200, 75, 0.08), rgba(255, 90, 77, 0.055)),
    var(--foundation-ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px);
  pointer-events: auto;
}

.salon-foundation__toggle {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 9px 11px;
  color: var(--foundation-bone);
  font: inherit;
  text-align: left;
}

.salon-foundation[data-open="false"] .salon-foundation__toggle {
  min-height: 38px;
}

.salon-foundation__toggle span {
  color: var(--foundation-gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.salon-foundation__toggle strong {
  min-width: 0;
  overflow: hidden;
  color: var(--foundation-bone);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.salon-foundation__toggle i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--foundation-cyan);
  box-shadow: 0 0 18px var(--foundation-cyan);
}

.salon-foundation__panel {
  position: absolute;
  right: auto;
  bottom: calc(100% + 8px);
  left: 0;
  display: none;
  gap: 12px;
  width: 560px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  transform-origin: left bottom;
  transition: opacity 180ms ease, transform 180ms ease;
}

.salon-foundation[data-open="false"] .salon-foundation__panel {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
}

.salon-foundation[data-open="true"] .salon-foundation__panel {
  display: grid;
  max-height: min(640px, calc(100vh - 92px));
  overflow: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.salon-foundation__kicker {
  margin: 0;
  color: var(--foundation-gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.salon-foundation__thesis {
  margin: 0;
  color: var(--foundation-bone);
  font-family: "Newsreader", "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 0.96;
}

.salon-foundation__principles,
.salon-foundation__map,
.salon-foundation__status {
  display: grid;
  gap: 7px;
}

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

.salon-foundation__principles span,
.salon-foundation__status span,
.salon-foundation__map a {
  border: 1px solid rgba(243, 239, 231, 0.11);
  border-left: 3px solid var(--foundation-accent, var(--foundation-cyan));
  border-radius: 8px;
  background: rgba(243, 239, 231, 0.052);
}

.salon-foundation__principles span {
  min-height: 68px;
  padding: 8px;
  color: var(--foundation-paper);
  font-size: 12px;
  line-height: 1.35;
}

.salon-foundation__principles strong,
.salon-foundation__status strong,
.salon-foundation__map strong {
  display: block;
  margin-bottom: 4px;
  color: var(--foundation-bone);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.salon-foundation__status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.salon-foundation__status span {
  min-height: 58px;
  padding: 8px;
  color: var(--foundation-muted);
  font-size: 12px;
}

.salon-foundation__map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.salon-foundation__map a {
  min-height: 56px;
  padding: 8px;
  color: var(--foundation-paper);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.salon-foundation__map a:hover,
.salon-foundation__map a:focus-visible,
.salon-foundation__map a[aria-current="page"] {
  border-color: var(--foundation-accent, var(--foundation-cyan));
  background: color-mix(in srgb, var(--foundation-accent, var(--foundation-cyan)) 14%, rgba(243, 239, 231, 0.052));
  transform: translateY(-1px);
}

.salon-foundation__map a small {
  display: block;
  color: var(--foundation-muted);
  font-size: 11px;
  line-height: 1.25;
}

.salon-route {
  --route-ink: rgba(8, 9, 11, 0.74);
  --route-paper: #d9d3c6;
  --route-bone: #f3efe7;
  --route-muted: #9a958a;
  --route-line: rgba(243, 239, 231, 0.14);
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(240px, 0.9fr) minmax(120px, 0.42fr);
  gap: 8px;
  align-items: stretch;
  width: min(1180px, calc(100vw - 48px));
  margin: -8px auto 16px;
  color: var(--route-paper);
  font-family: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.salon-route,
.salon-route * {
  box-sizing: border-box;
}

.salon-route__step,
.salon-route__current,
.salon-route__trail a {
  border: 1px solid color-mix(in srgb, var(--route-accent, #00b7a8) 34%, var(--route-line));
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--route-accent, #00b7a8) 18%, transparent), transparent 36%),
    var(--route-ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.salon-route__step,
.salon-route__current {
  display: grid;
  min-width: 0;
  min-height: 54px;
  align-content: center;
  gap: 2px;
  padding: 9px 11px;
}

.salon-route__step {
  color: var(--route-paper);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.salon-route__step:hover,
.salon-route__step:focus-visible {
  border-color: var(--route-accent, #00b7a8);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--route-accent, #00b7a8) 28%, transparent), transparent 40%),
    rgba(8, 9, 11, 0.82);
  transform: translateY(-1px);
}

.salon-route__step span,
.salon-route__current span {
  color: var(--route-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.salon-route__step strong,
.salon-route__current strong {
  min-width: 0;
  overflow: hidden;
  color: var(--route-bone);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.salon-route__step--next {
  text-align: right;
}

.salon-route__current {
  border-color: color-mix(in srgb, var(--route-accent, #00b7a8) 58%, var(--route-line));
  text-align: center;
}

.salon-route__current small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--route-muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.salon-route__trail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.salon-route__trail a {
  display: grid;
  min-height: 26px;
  place-items: center;
  color: var(--route-paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.salon-route__trail a:hover,
.salon-route__trail a:focus-visible,
.salon-route__trail a[aria-current="page"] {
  border-color: var(--route-accent, #00b7a8);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--route-accent, #00b7a8) 28%, transparent), transparent 46%),
    rgba(8, 9, 11, 0.88);
  transform: translateY(-1px);
}

.salon-route + .entrance,
.salon-route + .room,
.salon-route + .salon,
.salon-route + .directorate,
.salon-route + .wing,
.salon-route ~ .wing {
  min-height: calc(100vh - 214px) !important;
}

@media (max-width: 760px) {
  .salon-route {
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    margin: 0 14px 10px;
  }

  .salon-route__step,
  .salon-route__current {
    min-height: 48px;
    text-align: left;
  }

  .salon-route__step--next {
    order: -1;
    text-align: left;
  }

  .salon-route__current {
    text-align: left;
  }

  .salon-route__current small {
    white-space: normal;
  }

  .salon-route__trail {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .salon-foundation {
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 2;
    width: auto;
    margin: 12px 18px 18px;
  }

  .salon-foundation__principles,
  .salon-foundation__status,
  .salon-foundation__map {
    grid-template-columns: 1fr;
  }

  .salon-foundation__panel {
    position: static;
    width: auto;
    max-width: none;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .salon-foundation__panel,
  .salon-foundation__map a,
  .salon-skip-link {
    transition: none;
  }
}


/* Gemini-seat 6.1: the Navigational Horizon Drift. */
.salon-horizon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 70;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--horizon-from, #00b7a8) 30%, transparent),
    color-mix(in srgb, var(--horizon-to, #e7c84b) 78%, transparent)
  );
  opacity: 0.7;
  transition: height 0.25s ease, opacity 0.25s ease;
}

.salon-horizon:hover,
.salon-horizon:focus-visible {
  height: 10px;
  opacity: 1;
  outline: none;
}

/* Gemini-seat 7: the Kinetic Stasis Protocol. Reduced-motion visitors
   receive authored tectonics instead of blank absence: an imperceptibly
   slow color-temperature drift, no kinetic stimulus, no displacement. */
@media (prefers-reduced-motion: reduce) {
  html::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55; /* above page content, below the horizon (70); audit fix: at 1 it sat under everything */
    pointer-events: none;
    mix-blend-mode: soft-light;
    background: linear-gradient(160deg, rgba(231, 200, 75, 0.16), rgba(0, 183, 168, 0.12));
    animation: kinetic-stasis 48s ease-in-out infinite alternate;
  }

  @keyframes kinetic-stasis {
    from { opacity: 0.2; }
    to { opacity: 0.62; }
  }
}


/* Audit fixes, fifth mandate. */
@media (max-width: 620px) {
  .salon-horizon {
    height: 3px;
  }

  .salon-horizon:hover {
    height: 3px;
  }
}

/* Contrast repair: route captions were #9a958a on near-black (~4.1:1). */
.salon-route__step span,
.salon-route__current span {
  color: #b3ada1;
}

/* Canvas self-description: visually hidden, present for screen readers.
   Each room describes its own canvas in its own register, so a visitor
   who cannot see the weather still receives an authored room. */
.salon-canvas-note {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Sixth mandate: the felt threshold, done honestly. Cross-document view
   transitions replace the retired iframe shell in browsers that offer them;
   everywhere else, navigation is plain and instant. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation-duration: 0.28s;
  }

  ::view-transition-new(root) {
    animation-duration: 0.28s;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* The archive tag: small, dated, always present. */
.salon-season-tag {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  display: grid;
  gap: 1px;
  padding: 6px 12px;
  border: 1px solid rgba(243, 239, 231, 0.2);
  border-radius: 5px;
  background: rgba(8, 9, 11, 0.72);
  text-decoration: none;
  text-align: right;
}

.salon-season-tag strong {
  color: #e7c84b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.salon-season-tag span {
  color: #b3ada1;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.salon-season-tag:hover,
.salon-season-tag:focus-visible {
  border-color: #e7c84b;
  outline: none;
}

@media (max-width: 760px) {
  .salon-season-tag {
    top: auto;
    right: 10px;
    bottom: 14px;
  }

  .salon-season-tag span {
    display: none;
  }
}


/* Season One atmosphere: founding rooms should feel busier than the current term. */
body {
  --archive-season-accent: #e7c84b;
  --archive-season-warm: #ff5a4d;
  --archive-season-cool: #00b7a8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.38;
  background:
    repeating-linear-gradient(90deg, rgba(231, 200, 75, 0.11) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(0deg, rgba(255, 90, 77, 0.09) 0 2px, transparent 2px 31px),
    linear-gradient(135deg, rgba(231, 200, 75, 0.12), transparent 44%, rgba(0, 183, 168, 0.08));
  mix-blend-mode: screen;
}

.topbar {
  border-bottom: 1px double rgba(231, 200, 75, 0.48) !important;
  background:
    repeating-linear-gradient(90deg, rgba(231, 200, 75, 0.09) 0 12px, rgba(255, 90, 77, 0.07) 12px 24px, transparent 24px 36px),
    rgba(8, 9, 11, 0.42) !important;
}

.backlink,
.directorate-link,
.salon-season-tag {
  box-shadow: 0 0 0 1px rgba(231, 200, 75, 0.14), 5px 5px 0 rgba(255, 90, 77, 0.1);
}

.salon-season-tag {
  border: 2px double rgba(231, 200, 75, 0.72);
  background:
    linear-gradient(135deg, rgba(231, 200, 75, 0.18), rgba(255, 90, 77, 0.12)),
    rgba(8, 9, 11, 0.84);
  transform: rotate(0.35deg);
}

.salon-season-tag strong {
  color: #e7c84b;
}

.salon-season-tag::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px dashed rgba(255, 90, 77, 0.45);
  border-radius: 8px;
  pointer-events: none;
}

.room,
.occupancy,
.visitors-wing {
  border-top: 1px solid rgba(231, 200, 75, 0.26);
  border-left: 3px double rgba(255, 90, 77, 0.38);
  box-shadow: inset 12px 0 0 rgba(231, 200, 75, 0.045);
}

.room > section,
.room > aside,
.room > article,
.occupancy > section,
.visitors-wing > section,
.trace-panel {
  border-color: rgba(231, 200, 75, 0.24) !important;
  box-shadow: 0 0 0 1px rgba(255, 90, 77, 0.09), 8px 8px 0 rgba(231, 200, 75, 0.045) !important;
}

.salon-canvas-note {
  border-left: 3px double rgba(231, 200, 75, 0.62) !important;
  background:
    linear-gradient(90deg, rgba(231, 200, 75, 0.14), rgba(255, 90, 77, 0.08)),
    rgba(8, 9, 11, 0.78) !important;
}

.room-number,
.eyebrow {
  color: color-mix(in srgb, var(--archive-season-accent) 72%, currentColor) !important;
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    opacity: 0.24;
  }
}
