/* B&W paper + prism accents — rainbow only where it earns rent */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Syne:wght@500;600;700&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: #f7f7f7;
  --color-text: #111111;
  --color-accent: #111111;
  --color-accent-2: #333333;
  --color-accent-300: #222222;
  --color-accent-400: #111111;
  --color-divider: #111111;
  --color-neutral-100: #ffffff;
  --color-neutral-200: #f5f5f5;
  --color-neutral-300: #e8e8e8;
  --color-neutral-400: #bbbbbb;
  --color-neutral-500: #888888;
  --color-neutral-600: #555555;
  --color-neutral-700: #333333;
  --color-neutral-800: #1a1a1a;
  --color-neutral-900: #0a0a0a;
  --font-heading: "Syne", "IBM Plex Mono", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  /* Prism room spectrum — high chroma, thin strokes only */
  --prism-mind: #7c3aed;    /* violet — air / intellect */
  --prism-body: #e11d48;    /* rose — blood / vessel */
  --prism-oracle: #d97706;  /* amber — sun / lot */
  --prism-voice: #0891b2;   /* cyan — throat / wave */
  --prism-canon: #059669;   /* emerald — record / growth */
  --prism: linear-gradient(
    90deg,
    #e11d48 0%,
    #d97706 20%,
    #ca8a04 35%,
    #059669 50%,
    #0891b2 65%,
    #7c3aed 82%,
    #c026d3 100%
  );
  --prism-soft: linear-gradient(
    90deg,
    color-mix(in srgb, #e11d48 70%, #111) 0%,
    color-mix(in srgb, #d97706 70%, #111) 25%,
    color-mix(in srgb, #059669 70%, #111) 50%,
    color-mix(in srgb, #0891b2 70%, #111) 75%,
    color-mix(in srgb, #7c3aed 70%, #111) 100%
  );
}

html, body {
  background: #ffffff !important;
  color: #111111 !important;
  font-family: var(--font-body) !important;
  overflow-x: hidden !important;
}

/* sticky chrome: banner + masthead stick as one unit, no clip */
.site-chrome {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #fff;
  border-bottom: 2px solid #111;
  /* create stacking context that doesn't get clipped by parents */
  isolation: isolate;
}
.site-chrome .bw-banner {
  border-bottom: 1px solid #111;
}
.site-chrome .cait-masthead {
  position: relative !important;
  top: auto !important;
  background: #fff !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
}
/* parents must not clip sticky descendants */
.site-frame, x-dc, [data-dc], .sc-host {
  overflow: visible !important;
}
/* rails sit below chrome */
.site-rail {
  top: 96px !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  color: #111111 !important;
  letter-spacing: -0.02em;
  line-height: 1.12 !important;
  text-shadow: none !important;
}

h1 { font-size: clamp(40px, 7vw, 64px) !important; letter-spacing: -0.03em !important; }
h2 { font-size: clamp(22px, 3.2vw, 28px) !important; }

a { color: #111111 !important; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #000 !important; }

/* —— Black segment borders (paper cuts) —— */
.cait-masthead {
  background: #fff !important;
  border-bottom: 2px solid #111 !important;
  backdrop-filter: none !important;
}

.cold-open,
.motion-archive,
.rooms-index,
[data-screen-label="Visual Range"] > div,
[data-screen-label="Honest Status"] > div,
[data-screen-label="Out of Scope"] > div,
[data-screen-label="Credits"] > div,
[data-screen-label="Changelog"] > div,
[data-screen-label="Footer"] {
  border-color: #111 !important;
}

.segment-frame {
  border: 2px solid #111 !important;
  border-radius: 0 !important;
  padding: 16px 18px;
  margin: 0 0 28px;
  background: #fff;
}

.archive-signal {
  border-top: 2px solid #111 !important;
  border-bottom: 2px solid #111 !important;
  background: transparent !important;
}

.motion-archive__inner {
  border-top: 2px solid #111 !important;
  border-bottom: 2px solid #111 !important;
}

.room-list {
  border: 2px solid #111 !important;
  border-bottom: 2px solid #111 !important;
}

.room-link {
  border-top: 1px solid #111 !important;
}

.room-link:first-child {
  border-top: none !important;
}

.cait-portrait,
.cait-range,
.motion-art {
  background: #fafafa !important;
  border: 2px solid #111 !important;
  border-radius: 0 !important;
  box-sizing: border-box;
}
.cait-portrait {
  border: 2px solid #111 !important;
  outline: 1px solid #111;
  outline-offset: 4px;
  margin-bottom: 36px !important;
}

.cait-portrait figcaption,
.cait-range figcaption {
  border-top: 1px solid #111 !important;
}

/* kill dark nocturne texture */
.cold-open::before,
.motion-art::before {
  display: none !important;
}

/* prism pulse dot (signal open) */
.signal-pulse {
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: var(--prism) !important;
  background-size: 200% 100% !important;
  box-shadow: none !important;
  animation: prism-shift 4s linear infinite !important;
}

@keyframes prism-shift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .signal-pulse { animation: none !important; background: #7c3aed !important; }
}

/* —— Wordmark air symbol: prism tint —— */
.wordmark-element {
  color: transparent !important;
  background: var(--prism) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  text-shadow: none !important;
  font-size: 1.05em !important;
}

.wordmark-name,
.masthead-link,
.masthead-link.is-active {
  color: #111 !important;
  text-shadow: none !important;
}

.masthead-link.is-active::after {
  background: var(--prism) !important;
  height: 2px !important;
}

.tag, .tag-outline {
  border: 1px solid #111 !important;
  color: #111 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* —— Prism hairline utilities —— */
.prism-rule {
  height: 2px;
  width: 100%;
  border: none;
  background: var(--prism);
  margin: 0 0 20px;
}

.prism-rule--short {
  width: 120px;
  height: 2px;
  background: var(--prism);
  transform: rotate(-2deg);
  transform-origin: left center;
  margin: 0 0 12px;
}

.prism-edge {
  border-left: 3px solid transparent !important;
  border-image: var(--prism) 1 !important;
}

.quote-prism {
  border-left: 3px solid transparent !important;
  border-image: var(--prism) 1 !important;
  padding-left: 18px !important;
  margin-bottom: 36px;
}

/* —— Five rooms: one spectral edge each —— */
.room-link {
  --room-edge: #111;
  position: relative;
  display: grid !important;
  grid-template-columns: 34px 28px 82px minmax(0, 1fr) 20px !important;
  gap: 10px !important;
  align-items: center !important;
}

/* Override the black force: colored left rail */
.room-link::before {
  content: "" !important;
  position: absolute !important;
  top: 10px !important;
  bottom: 10px !important;
  left: 0 !important;
  width: 3px !important;
  background: var(--room-edge) !important;
  transform: skewY(-14deg) !important;
  opacity: 1 !important;
  border-radius: 0 !important;
}

.room-link--mind  { --room-edge: var(--prism-mind); }
.room-link--body  { --room-edge: var(--prism-body); }
.room-link--oracle { --room-edge: var(--prism-oracle); }
.room-link--voice { --room-edge: var(--prism-voice); }
.room-link--canon { --room-edge: var(--prism-canon); }

/* legacy class aliases from original markup */
.room-link--cyan { --room-edge: var(--prism-voice); }
.room-link--gold { --room-edge: var(--prism-oracle); }

.room-link__number {
  color: var(--room-edge) !important;
  font-weight: 600 !important;
}

.room-link__name {
  color: #111 !important;
  font-weight: 600 !important;
}

.room-link__symbol {
  font-size: 14px;
  line-height: 1;
  color: var(--room-edge);
  min-width: 1.2em;
  text-align: center;
}

.room-link__arrow {
  color: var(--room-edge) !important;
}

.room-link:hover {
  background: color-mix(in srgb, var(--room-edge) 6%, #fff) !important;
}

/* masthead nav: tiny prism underlines on hover */
.masthead-link:hover {
  color: #111 !important;
}
.masthead-link[data-room="mind"]:hover { color: var(--prism-mind) !important; }
.masthead-link[data-room="body"]:hover { color: var(--prism-body) !important; }
.masthead-link[data-room="oracle"]:hover { color: var(--prism-oracle) !important; }
.masthead-link[data-room="voice"]:hover { color: var(--prism-voice) !important; }
.masthead-link[data-room="canon"]:hover { color: var(--prism-canon) !important; }

/* rooms intro skew rule → prism */
.rooms-index__intro {
  border-top: 2px solid #111 !important;
  position: relative;
}
.rooms-index__intro::before {
  content: "" !important;
  position: absolute !important;
  top: -2px !important;
  left: 0 !important;
  width: 140px !important;
  height: 3px !important;
  background: var(--prism) !important;
  transform: rotate(-2deg) !important;
  transform-origin: left center !important;
}

/* status columns left rails */
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.status-cell {
  border: 2px solid #111;
  padding: 12px 14px;
  position: relative;
}
.status-cell--stable { border-left: 3px solid var(--prism-canon) !important; }
.status-cell--moving { border-left: 3px solid var(--prism-oracle) !important; }

/* out-of-scope marks: prism ✕ cycle */
.out-x {
  font-weight: 700;
  background: var(--prism);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* buttons: black frame, primary fill black */
.btn, .btn-primary, .btn-ghost {
  background: transparent !important;
  color: #111 !important;
  border: 2px solid #111 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.btn-primary {
  background: #111 !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: #000 !important;
}

/* —— Caitified symbolic emoticons —— */
.kao {
  font-family: "IBM Plex Mono", "Noto Sans Symbols 2", "Segoe UI Symbol", "Apple Color Emoji", monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #111;
}
.kao--prism {
  background: var(--prism);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glyph-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 14px 0 22px;
  padding: 10px 12px;
  border: 2px solid #111;
  font-family: "IBM Plex Mono", "Noto Sans Symbols 2", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.glyph-row .g {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.glyph-row .g b {
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
}
.glyph-row .g[data-room="mind"] b { color: var(--prism-mind); }
.glyph-row .g[data-room="body"] b { color: var(--prism-body); }
.glyph-row .g[data-room="oracle"] b { color: var(--prism-oracle); }
.glyph-row .g[data-room="voice"] b { color: var(--prism-voice); }
.glyph-row .g[data-room="canon"] b { color: var(--prism-canon); }

/* footer prism symbols */
.footer-glyphs {
  letter-spacing: 0.35em !important;
  background: var(--prism);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  font-size: 18px !important;
}

code, pre {
  background: #f0f0f0 !important;
  color: #111 !important;
  border-radius: 0 !important;
  border: 1px solid #111;
}

/* build banner */
.bw-banner {
  background: #111;
  color: #fff;
  font: 500 11px/1.4 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 2px solid #111;
}
.bw-banner .prism-word {
  background: var(--prism);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

/* ========== PRISM RAILS FIX + AMBIENT FIELD ========== */

/* Reading column stays quiet; fields live in side rails */
.site-shell {
  position: relative;
  max-width: none;
  margin: 0;
  width: 100%;
}
.site-main {
  min-width: 0;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
  background: #fff;
}
.site-rail {
  pointer-events: none;
  user-select: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  line-height: 1.55;
  color: rgba(17, 17, 17, 0.28);
  letter-spacing: 0.04em;
  z-index: 1;
}
.site-rail--left { border-right: 1px solid rgba(17,17,17,0.12); }
.site-rail--right { text-align: right; border-left: 1px solid rgba(17,17,17,0.12); }
.site-frame > header,
.site-frame > section {
  position: relative;
  z-index: 2;
}
/* keep content readable between rails */
.site-frame > section,
.site-frame > header .masthead-inner {
  /* center column already max-width 680 */
}

.rail-block {
  margin-bottom: 28px;
  border: 1px solid rgba(17,17,17,0.18);
  padding: 10px 8px;
  position: relative;
}
.rail-block::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--prism);
}
.site-rail--right .rail-block::before {
  left: auto; right: 0;
}
.rail-k {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.45);
  margin-bottom: 6px;
}
.rail-quote {
  color: rgba(17,17,17,0.55);
  font-size: 10px;
  line-height: 1.5;
}
.rail-math {
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
  color: rgba(17,17,17,0.32);
}
.rail-face {
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #111;
  margin-top: 6px;
}
.rail-face .prism {
  background: var(--prism);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========== FOUR SHAPES — large structural marks in the rails ========== */
/* △ triangle (structure) · ⬡ dodecahedron (complexity) · ○ circle/gap (hidden) · ◆ gömböc (return) */
.rail-shapes {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-around !important;
  align-items: center !important;
  pointer-events: none !important;
  padding: 8vh 0 !important;
  opacity: 0.22 !important;
}
.rail-shapes .shape {
  font-size: clamp(48px, 6vw, 72px) !important;
  line-height: 1 !important;
  color: #111 !important;
  font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", sans-serif !important;
  animation: drift-y 9s ease-in-out infinite !important;
}
.rail-shapes .shape:nth-child(2) { animation-delay: 1.5s; }
.rail-shapes .shape:nth-child(3) { animation-delay: 3s; }
.rail-shapes .shape:nth-child(4) { animation-delay: 4.5s; }
.site-rail--right .rail-shapes .shape:nth-child(1) { animation-delay: 0.5s; }
.site-rail--right .rail-shapes .shape:nth-child(2) { animation-delay: 2s; }
.site-rail--right .rail-shapes .shape:nth-child(3) { animation-delay: 3.5s; }
.site-rail--right .rail-shapes .shape:nth-child(4) { animation-delay: 5s; }
@media (prefers-reduced-motion: reduce) {
  .rail-shapes .shape { animation: none !important; }
}

/* floating geo / orbit marks */
.rail-orbit {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(17,17,17,0.15);
  border-radius: 50%;
  animation: orbit-spin 48s linear infinite;
}
.rail-orbit::after {
  content: "";
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--prism-mind);
  top: -3px; left: 50%;
  transform: translateX(-50%);
}
.site-rail--left .rail-orbit { bottom: 12%; left: 18%; }
.site-rail--right .rail-orbit {
  top: 18%; right: 14%;
  animation-direction: reverse;
  animation-duration: 36s;
}
.site-rail--right .rail-orbit::after { background: var(--prism-oracle); }

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}
@keyframes drift-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.rail-drift {
  animation: drift-y 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .rail-orbit, .rail-drift, .signal-pulse { animation: none !important; }
}

@media (max-width: 1100px) {
  .site-shell { grid-template-columns: 1fr; }
  .site-rail { display: none; }
}
@media (min-width: 1101px) {
  .site-frame > section[style*="max-width:680px"],
  .cold-open,
  .rooms-index,
  .motion-archive {
    /* already centered */
  }
}

/* —— THE LEFT LINES YOU MEANT: per-row colored rail —— */
.room-list {
  border: 2px solid #111 !important;
  border-left: none !important; /* don't steal the per-row color */
  overflow: visible;
}
.room-link {
  border-left: 5px solid var(--room-edge) !important;
  padding-left: 12px !important;
}
.room-link::before {
  /* kill old skewed pseudo — border-left is the real rail */
  display: none !important;
}
.room-link--mind  { --room-edge: #7c3aed !important; border-left-color: #7c3aed !important; }
.room-link--body  { --room-edge: #e11d48 !important; border-left-color: #e11d48 !important; }
.room-link--oracle { --room-edge: #d97706 !important; border-left-color: #d97706 !important; }
.room-link--voice { --room-edge: #0891b2 !important; border-left-color: #0891b2 !important; }
.room-link--canon { --room-edge: #059669 !important; border-left-color: #059669 !important; }

/* rainbow icons (use widely-supported glyphs) */
.room-link__symbol {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--room-edge) !important;
  filter: none !important;
}
.room-link--mind .room-link__symbol { color: #7c3aed !important; }
.room-link--body .room-link__symbol { color: #e11d48 !important; }
.room-link--oracle .room-link__symbol { color: #d97706 !important; }
.room-link--voice .room-link__symbol { color: #0891b2 !important; }
.room-link--canon .room-link__symbol { color: #059669 !important; }

.room-link__kao {
  color: var(--room-edge) !important;
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* clickable hover light-up */
.is-clickable,
a, .btn, .room-link, .masthead-link {
  transition:
    background-color 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    transform 0.12s ease !important;
}
.is-clickable:hover,
a:hover,
.btn:hover,
.room-link:hover,
.masthead-link:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--room-edge, #7c3aed) 35%, #111),
    0 0 18px color-mix(in srgb, var(--room-edge, #7c3aed) 22%, transparent) !important;
  background: color-mix(in srgb, var(--room-edge, #7c3aed) 7%, #fff) !important;
}
.room-link:hover {
  transform: translateX(2px);
}
.btn:hover, .btn-ghost:hover {
  --room-edge: #7c3aed;
  border-color: #111 !important;
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px #111, 0 0 20px color-mix(in srgb, #7c3aed 35%, transparent) !important;
  background: #111 !important;
  color: #fff !important;
}
.masthead-link:hover {
  --room-edge: #0891b2;
}

/* glyph strip icons keep spectrum */
.glyph-row .g b {
  font-size: 16px !important;
}

/* denser section frames */
[data-screen-label] > div[style*="border-top"],
.rooms-index__intro,
.motion-archive__inner {
  border-top-width: 2px !important;
  border-top-color: #111 !important;
}


/* C🜁it air mark */
.air, .wordmark-element {
  font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", "Apple Symbols", sans-serif !important;
  font-weight: 400 !important;
  background: var(--prism) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  text-shadow: none !important;
  margin: 0 0.02em;
}
h1 .air {
  font-size: 0.92em;
  vertical-align: 0.02em;
}


/* aesthetic symbol scatter (not a key) — corner seals only */
.cold-open,
.rooms-index,
.motion-archive {
  position: relative;
}
.cold-open::after {
  content: "☿  ·  ☽  ·  ♄";
  position: absolute;
  right: 8px;
  top: 88px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(17,17,17,0.22);
  pointer-events: none;
}
.rooms-index::after {
  content: "△  ▲  ☽  ♪  ☰";
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.45em;
  color: transparent;
  background: var(--prism);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
}




/* ========== SIDE FIELDS: fill edge → column (no dead bands) ========== */
:root {
  --read-col: min(680px, 92vw);
}

/* page frame is a full-width 3-col grid when wide enough */
.site-frame {
  display: grid !important;
  grid-template-columns: minmax(80px, 1fr) minmax(0, 760px) minmax(80px, 1fr) !important;
  grid-template-rows: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  column-gap: 0 !important;
  align-items: start !important;
  position: relative !important;
}

/* chrome spans full width on its own row conceptually — take out of grid flow */
.site-chrome {
  grid-column: 1 / -1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 300 !important;
  width: 100% !important;
}

/* main reading column = center track; force all content sections into center */
.site-frame > header.cait-masthead,
.site-frame > .site-chrome {
  grid-column: 1 / -1;
}
/* rails occupy left/right tracks and stretch full height of content */
.site-rail {
  position: relative !important; /* not fixed — fill the grid cell */
  box-sizing: border-box !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  min-height: 70vh !important;
  height: 100% !important;
  max-width: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 1 !important;
  padding: 32px 16px !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
}
.site-rail--left {
  grid-column: 1 !important;
  grid-row: 2 / -1 !important;
  border-right: 1px solid rgba(17, 17, 17, 0.1) !important;
}
.site-rail--right {
  grid-column: 3 !important;
  grid-row: 2 / -1 !important;
  border-left: 1px solid rgba(17, 17, 17, 0.1) !important;
}

/* every section / content after chrome goes in center column */
.site-frame > section,
.site-frame > div:not(.site-chrome):not(.site-rail) {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: var(--read-col) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-self: stretch !important;
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
}
/* cold-open and others have inline max-width:680 + margin auto — kill side auto margins */
.site-frame > section[style],
.site-frame .cold-open,
.site-frame .rooms-index,
.site-frame .motion-archive {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* ambient: fill the WHOLE side cell with sparse field, not a tiny widget */
.site-rail .rail-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(17,17,17,0.14) 8%,
    transparent 25%,
    rgba(17,17,17,0.1) 50%,
    transparent 75%,
    rgba(17,17,17,0.14) 92%,
    transparent 100%
  ) !important;
}
.site-rail--right .rail-spine {
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, #7c3aed 22%, transparent) 20%,
    transparent 45%,
    rgba(17,17,17,0.12) 55%,
    transparent 80%,
    color-mix(in srgb, #d97706 20%, transparent) 95%,
    transparent 100%
  ) !important;
}

.site-rail .rail-dots {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0.45 !important;
  background-image:
    radial-gradient(1px 1px at 12% 8%, #111 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 14%, #111 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 22%, #7c3aed 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 34%, #111 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 40%, #0891b2 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 52%, #111 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 58%, #e11d48 45%, transparent 51%),
    radial-gradient(1px 1px at 18% 68%, #111 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 76%, #d97706 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 88%, #111 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 94%, #059669 50%, transparent 51%) !important;
  background-size: 100% 140% !important;
  background-repeat: no-repeat !important;
}

/* scale geo with side field width */
.site-rail .rail-geo--ring {
  width: min(72px, 40%) !important;
  height: min(72px, 40%) !important;
  top: 16% !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}
.site-rail--right .rail-geo--ring {
  animation-name: rail-spin-center !important;
}
@keyframes rail-spin-center {
  to { transform: translateX(-50%) rotate(360deg); }
}
.site-rail .rail-geo--cross { top: 44% !important; left: 50% !important; transform: translateX(-50%) !important; }
.site-rail .rail-geo--diamond { bottom: 18% !important; left: 50% !important; transform: translateX(-50%) rotate(45deg) !important; }
.site-rail .rail-geo--sq { top: 38% !important; left: 50% !important; transform: translateX(-50%) !important; right: auto !important; }
.site-rail .rail-geo--tri { bottom: 24% !important; left: 50% !important; transform: translateX(-50%) !important; right: auto !important; }

.site-rail .rail-mark {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}
.site-rail--right .rail-mark {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}

/* when too narrow, drop sides — single column */
@media (max-width: 900px) {
  .site-frame {
    grid-template-columns: 1fr !important;
  }
  .site-rail { display: none !important; }
  .site-frame > section,
  .site-frame > div:not(.site-chrome):not(.site-rail) {
    grid-column: 1 !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* final authority: sides fill 1fr tracks edge-to-column */
.site-frame > .site-rail {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  align-self: stretch !important;
}
.site-frame > .site-rail--left { grid-column: 1 !important; grid-row: 1 / -1 !important; }
.site-frame > .site-rail--right { grid-column: 3 !important; grid-row: 1 / -1 !important; }
.site-frame {
  display: grid !important;
  grid-template-columns: minmax(80px, 1fr) minmax(0, 760px) minmax(80px, 1fr) !important;
}
