.modes-experience {
  --mx-line: rgba(177, 231, 110, .25);
  --mx-line-strong: rgba(177, 231, 110, .52);
  --mx-rail-scroll-offset: 62px;
  color: var(--paper);
  background: var(--ink);
  overflow: clip;
}
.modes-experience h1,
.modes-experience h2,
.modes-experience h3 { text-wrap: balance; }
.modes-experience a:focus-visible,
.modes-experience button:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }

.mx-hero {
  min-height: calc(100dvh - 94px);
  display: grid;
  grid-template-columns: minmax(390px, .8fr) minmax(650px, 1.45fr);
  border-inline: 1px solid var(--mx-line);
  border-bottom: 1px solid var(--mx-line);
}
.mx-hero-copy {
  min-width: 0;
  padding: clamp(72px, 7.4vw, 132px) clamp(32px, 4.8vw, 80px) 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--mx-line);
}
.mx-hero h1 {
  max-width: 780px;
  margin: 20px 0 0;
  font-size: clamp(60px, 4.8vw, 96px);
  font-weight: 850;
  line-height: .82;
  letter-spacing: -.075em;
  text-transform: uppercase;
}
.mx-hero h1 span { display: block; color: var(--paper); }
.mx-hero h1 span:nth-child(2) { color: var(--lime); }
.mx-hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 32px 0 28px;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.58;
}
.mx-hero-stage {
  position: relative;
  min-width: 0;
  min-height: 760px;
  overflow: hidden;
  background:
    linear-gradient(rgba(177,231,110,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(177,231,110,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}
.mx-hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 26%, rgba(4, 15, 10, .32) 72%, rgba(4, 15, 10, .72) 100%);
}
.mx-hero-reference {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .2;
  filter: saturate(.8) contrast(1.05);
}
.mx-hero-card {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  border: 1px solid var(--mx-line-strong);
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 13, 8, .48), inset 0 0 0 1px rgba(255,255,255,.025);
  transition: transform .35s cubic-bezier(.22,.8,.22,1), border-color .25s ease, filter .25s ease;
}
.mx-hero-card:hover { z-index: 5; transform: translateY(-8px) scale(1.018); border-color: var(--lime); filter: brightness(1.14); }
.mx-hero-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) contrast(1.08); }
.mx-hero-card > span {
  position: absolute;
  inset: 0 0 auto;
  min-height: 42px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  background: linear-gradient(180deg, rgba(4,14,9,.96), rgba(4,14,9,.22));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.mx-hero-card > span i { width: 7px; height: 7px; border: 1px solid var(--lime); border-radius: 50%; }
.mx-hero-card > span b { margin-left: auto; }
.mx-hero-card-chat { top: 7%; left: 4%; width: 33%; height: 32%; }
.mx-hero-card-chat img { object-position: 46% center; }
.mx-hero-card-studio { top: 7%; right: 4%; width: 32%; height: 33%; }
.mx-hero-card-studio img { object-position: 22% center; }
.mx-hero-card-code { bottom: 7%; left: 4%; width: 28%; height: 40%; }
.mx-hero-card-code img { object-position: 18% center; }
.mx-hero-card-editor { bottom: 5%; left: 34%; width: 36%; height: 25%; }
.mx-hero-card-editor img { object-position: 50% 68%; }
.mx-hero-card-node { right: 4%; bottom: 7%; width: 26%; height: 39%; }
.mx-hero-card-node img { object-position: 32% center; }
.mx-hero-core {
  position: absolute;
  top: 30%;
  left: 50%;
  z-index: 4;
  width: min(36%, 390px);
  min-height: 250px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateX(-50%);
  color: var(--paper);
  border: 1px solid rgba(177,231,110,.72);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(19,48,34,.97), rgba(6,24,16,.98));
  box-shadow: 0 34px 90px rgba(0,0,0,.56), inset 0 0 55px rgba(177,231,110,.04);
}
.mx-core-mark { color: var(--lime); font-family: Georgia, serif; font-size: 72px; font-weight: 900; line-height: .75; letter-spacing: -.12em; }
.mx-hero-core strong { margin-top: 24px; color: var(--lime); font-size: 24px; text-transform: uppercase; }
.mx-hero-core small,
.mx-hero-core em { color: var(--muted); font-family: var(--mono); font-size: 8px; font-style: normal; text-transform: uppercase; }
.mx-hero-core > i { position: relative; height: 7px; margin: 22px 0 12px; overflow: hidden; background: rgba(177,231,110,.12); border-radius: 10px; }
.mx-hero-core > i b { position: absolute; inset: 0; width: 100%; background: var(--lime); box-shadow: 0 0 18px var(--lime); animation: mx-core-load 3.4s ease-in-out infinite; }

.mx-mode-rail {
  position: sticky;
  top: 0;
  z-index: 30;
  border-top: 1px solid var(--mx-line);
  border-bottom: 1px solid var(--mx-line);
  background: rgba(16, 47, 31, .96);
  backdrop-filter: blur(18px);
}
.mx-mode-rail > div { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); border-inline: 1px solid var(--mx-line); }
.mx-mode-rail a {
  min-height: 44px;
  padding: 8px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--paper);
  border-right: 1px solid var(--mx-line);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.25;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.mx-mode-rail a:last-child { border-right: 0; }
.mx-mode-rail a:hover { color: var(--ink); background: var(--lime); }
.mx-mode-rail-icon { width: 14px; height: 14px; flex: 0 0 14px; display: block; color: var(--lime); }
.mx-mode-rail-icon svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mx-mode-rail a:hover .mx-mode-rail-icon { color: var(--ink); }

.mx-continuity { padding-block: clamp(105px, 11vw, 180px); }
.mx-continuity > header {
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: 1.15fr .6fr;
  gap: clamp(50px, 8vw, 140px);
  align-items: end;
  border-bottom: 1px solid var(--mx-line);
}
.mx-continuity h2,
.mx-routes h2 {
  margin: 12px 0 0;
  font-size: clamp(58px, 7.2vw, 118px);
  font-weight: 850;
  line-height: .86;
  letter-spacing: -.07em;
  text-transform: uppercase;
}
.mx-continuity h2 span { color: var(--lime); }
.mx-continuity header > p { max-width: 560px; margin: 0; font-size: 18px; line-height: 1.6; }
.mx-continuity ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  border-bottom: 1px solid var(--mx-line);
}
.mx-continuity li { min-height: 230px; padding: 30px 24px; border-right: 1px solid var(--mx-line); }
.mx-continuity li:last-child { border-right: 0; }
.mx-continuity li > span { color: var(--lime); font-family: var(--mono); font-size: 10px; }
.mx-continuity h3 { margin: 62px 0 9px; font-size: 28px; text-transform: uppercase; }
.mx-continuity li p { max-width: 220px; margin: 0; color: var(--muted); line-height: 1.5; }

.mx-mode-story {
  min-height: 900px;
  padding: clamp(95px, 10vw, 160px) clamp(24px, 4vw, 68px);
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(54px, 7vw, 118px);
  align-items: center;
  scroll-margin-top: var(--mx-rail-scroll-offset);
}
.mx-mode-story.is-reverse { grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); }
.mx-mode-story.is-reverse .mx-mode-copy { grid-column: 2; grid-row: 1; }
.mx-mode-story.is-reverse .mx-mode-media,
.mx-mode-story.is-reverse .mx-mode-media-column { grid-column: 1; grid-row: 1; }
.mx-mode-copy { --mx-mode-title-size: clamp(40px, 17cqw, 86px); min-width: 0; container-type: inline-size; }
.mx-mode-heading {
  max-width: 690px;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.mx-mode-heading strong {
  font-size: var(--mx-mode-title-size);
  font-weight: 850;
  line-height: .92;
  letter-spacing: -.065em;
  text-transform: uppercase;
}
.mx-mode-heading strong { min-width: 0; color: var(--lime); text-wrap: balance; overflow-wrap: anywhere; }
.mx-mode-icon {
  width: 52px;
  height: 52px;
  margin-top: .06em;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border-radius: 50%;
  transform: translateY(8px);
}
.mx-mode-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mx-mode-description { max-width: 570px; margin: 28px 0; color: var(--paper); font-size: 17px; line-height: 1.6; }
.mx-prompt { position: relative; z-index: 11; width: max-content; max-width: 100%; margin: 0 0 28px; }
.mx-prompt[hidden] { display: block; visibility: hidden; pointer-events: none; }
.mx-prompt[hidden] .mx-prompt-preview { visibility: hidden; }
.mx-prompt > button,
.mx-prompt-preview > span {
  padding: 0;
  color: var(--lime);
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mx-prompt > button { display: block; cursor: help; }
.mx-prompt-preview {
  position: absolute;
  top: var(--prompt-top, -28px);
  left: -28px;
  width: min(705px, calc(100vw - 64px));
  max-height: min(640px, calc(100dvh - 100px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 28px 26px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  border-left: 3px solid var(--lime);
  background: var(--panel);
  background: color-mix(in srgb, var(--ink) 94%, var(--lime));
  transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.mx-prompt-preview p { margin: 18px 0 0; color: var(--paper); font-size: 17px; line-height: 1.6; }
.mx-prompt-preview .mx-prompt-note { padding-top: 14px; border-top: 1px solid var(--mx-line); font-size: 14px; }
.mx-mode-story.is-reverse .mx-prompt-preview { left: auto; right: -28px; }
.mx-prompt:is(:hover, :focus-within) .mx-prompt-preview {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.mx-feature-switcher { max-width: 650px; border-top: 1px solid var(--mx-line); }
.mx-feature-switcher button {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 17px 42px 17px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px 12px;
  color: var(--muted);
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--mx-line);
  background: transparent;
  cursor: pointer;
  transition: color .25s ease, padding-left .25s ease, background-color .25s ease;
}
.mx-feature-switcher button:hover,
.mx-feature-switcher button.is-active { padding-left: 12px; color: var(--paper); background: rgba(177,231,110,.045); }
/* Keep Deck text wrapping identical when a different feature becomes active. */
#deck .mx-feature-switcher button { padding-left: 12px; }
#node .mx-feature-switcher button { padding-left: 12px; }
#director .mx-feature-switcher button { padding-left: 12px; }
.mx-feature-switcher button > span { color: var(--lime); font-family: var(--mono); font-size: 9px; }
.mx-feature-switcher strong { font-size: 18px; line-height: 1.15; }
.mx-feature-switcher p { grid-column: 2; max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; animation: mx-copy-in .28s ease both; }
.mx-feature-switcher i { position: absolute; top: 18px; right: 8px; color: var(--lime); font-style: normal; }
.mx-inline-link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 32px;
  color: var(--lime);
  border-bottom: 1px solid var(--lime);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 850;
  line-height: 3;
  text-transform: uppercase;
  transition: gap .25s ease;
}
.mx-inline-link:hover { gap: 44px; }
#node-title {
  scroll-margin-top: var(--mx-rail-scroll-offset);
}

.mx-custom-story {
  min-height: 760px;
  padding: clamp(95px, 10vw, 160px) clamp(24px, 4vw, 68px);
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(54px, 7vw, 118px);
  align-items: center;
  scroll-margin-top: var(--mx-rail-scroll-offset);
}
.mx-custom-intro > p { max-width: 570px; margin: 28px 0 0; color: var(--paper); font-size: 17px; line-height: 1.6; }
.mx-custom-intro { min-width: 0; container-type: inline-size; }
.mx-custom-heading { display: flex; align-items: flex-start; gap: 20px; }
.mx-custom-heading h2 { margin: 0; min-width: 0; color: var(--lime); font-size: clamp(40px, 17cqw, 86px); font-weight: 850; line-height: .92; letter-spacing: -.065em; text-transform: uppercase; }
.mx-custom-app-icon { width: 52px; height: 52px; margin-top: .06em; flex: 0 0 52px; display: grid; place-items: center; color: var(--ink); background: var(--lime); border-radius: 50%; transform: translateY(8px); }
.mx-custom-app-icon svg,
.mx-custom-option-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mx-custom-app-icon .mx-kwib-workflow-icon,
.mx-custom-option-icon .mx-kwib-workflow-icon { fill: currentColor; stroke: none; }
.mx-custom-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--mx-line); }
.mx-custom-options article { min-height: 360px; padding: clamp(24px, 3vw, 42px); display: flex; align-items: flex-start; flex-direction: column; border-right: 1px solid var(--mx-line); }
.mx-custom-options article:last-child { border-right: 0; }
.mx-custom-option-icon { width: 62px; height: 62px; display: grid; place-items: center; color: var(--lime); border: 1px solid var(--lime); border-radius: 50%; background: rgba(177, 231, 110, .045); }
.mx-custom-options small { margin-top: 32px; color: var(--lime); font-family: var(--mono); font-size: 9px; }
.mx-custom-options h3 { margin: auto 0 14px; color: var(--paper); font-size: clamp(28px, 2.6vw, 42px); line-height: .94; letter-spacing: -.04em; text-transform: uppercase; }
.mx-custom-options p { max-width: 34ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.mx-mode-media-column { width: 100%; min-width: 0; }
.mx-mode-media {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 4px solid var(--lime);
  border-radius: 24px;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 40px 100px rgba(0, 9, 5, .42);
}
.mx-shot { position: relative; overflow: hidden; background: var(--ink); animation: mx-shot-enter .7s cubic-bezier(.2,.72,.2,1) both; }
/* The source image sets the frame height, so focus coordinates stay in image space. */
.mx-shot > img,
.mx-shot-reveal img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mx-shot > .mx-shot-base { height: auto; }
/* Keep Director's frame at the start screen's ratio across every feature. */
#director .mx-shot { aspect-ratio: 364 / 217; }
#director .mx-shot > .mx-shot-base { position: absolute; inset: 0; height: 100%; }
/* Keep every Node layer edge-to-edge in the same frame, including narrower captures. */
#node .mx-shot { aspect-ratio: 8 / 5; }
#node .mx-shot > .mx-shot-base { position: absolute; inset: 0; height: 100%; }
#node .mx-shot > img,
#node .mx-shot-reveal img { object-fit: fill; }
.mx-shot-video { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; display: block; object-fit: contain; background: var(--ink); }
.mx-shot-video[hidden], .mx-video-toggle[hidden] { display: none; }
#studio .mx-video-toggle { position: absolute; right: 16px; bottom: 16px; margin: 0; }
#code .mx-code-playback { height: 64px; padding-top: 16px; display: flex; justify-content: center; }
#code .mx-code-playback .mx-video-toggle { position: relative; inset: auto; margin: 0; }
.mx-video-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
  position: relative;
  z-index: 9;
  margin: 16px 16px 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(177, 231, 110, .48);
  border-radius: 50%;
  color: var(--lime);
  background: rgba(16, 47, 31, .88);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.mx-video-state-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; }
.mx-video-play-icon { display: none; }
.mx-video-toggle[aria-pressed="true"] .mx-video-pause-icon { display: none; }
.mx-video-toggle[aria-pressed="true"] .mx-video-play-icon { display: block; }
.mx-video-toggle:hover { border-color: var(--lime); color: var(--lime); background: rgba(16, 47, 31, .96); transform: scale(1.08); }
.mx-video-toggle:active { transform: scale(.96); }
/* Reserve the playback control's space so the centered frame does not move. */
#deck .mx-video-toggle[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.mx-shot.is-video-feature > .mx-shot-base,
.mx-shot.is-video-feature > .mx-shot-reveal { visibility: hidden; }
.mx-shot-base { opacity: .4; }
.mx-shot-reveal {
  position: absolute;
  inset: 0;
  clip-path: inset(var(--focus-top) var(--focus-right) var(--focus-bottom) var(--focus-left) round 10px);
  transition: clip-path .58s cubic-bezier(.22,.78,.22,1);
  animation: mx-panel-reveal .62s cubic-bezier(.22,.78,.22,1) both;
}
.mx-shot-reveal-secondary {
  display: none;
  clip-path: inset(var(--secondary-focus-top) var(--secondary-focus-right) var(--secondary-focus-bottom) var(--secondary-focus-left) round 10px);
}
.mx-shot.has-secondary-focus .mx-shot-reveal-secondary { display: block; }
.mx-mode-loader { position: absolute; inset: 0; display: grid; grid-template-columns: 23% 1fr 27%; gap: 10px; padding: 10px; background: var(--ink); }
.mx-mode-media.is-loaded > .mx-mode-loader { display: none; }
.mx-loader-side,
.mx-loader-center { border: 1px solid rgba(177,231,110,.18); border-radius: 15px; background: rgba(177,231,110,.025); }
.mx-loader-side { padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.mx-loader-side i { height: 14%; min-height: 35px; display: block; border-radius: 9px; background: linear-gradient(90deg, rgba(177,231,110,.035) 20%, rgba(177,231,110,.1) 42%, rgba(177,231,110,.035) 68%); background-size: 230% 100%; animation: mx-skeleton 1.4s ease infinite; }
.mx-loader-side-right i:first-child { height: 28%; }
.mx-loader-center { padding: 28px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.mx-loader-ring { width: 36px; height: 36px; margin-bottom: 20px; border: 1px solid rgba(177,231,110,.18); border-top-color: var(--lime); border-radius: 50%; animation: mx-spin .9s linear infinite; }
.mx-loader-center strong { font-size: clamp(22px, 2vw, 34px); }
.mx-loader-center > p { margin: 8px 0 26px; color: var(--muted); font-size: 12px; }
.mx-loader-center > div { width: min(100%, 510px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mx-loader-center > div span { min-height: 74px; padding: 12px; display: flex; align-items: flex-start; flex-direction: column; gap: 8px; text-align: left; border: 1px solid rgba(177,231,110,.16); border-radius: 10px; background: rgba(177,231,110,.035); }
.mx-loader-center b { font-size: 11px; }
.mx-loader-center small { color: var(--muted); font-size: 9px; }

.mx-routes {
  padding-block: clamp(110px, 12vw, 190px);
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(70px, 10vw, 170px);
  border-top: 1px solid var(--mx-line);
}
.mx-routes-copy > p:last-child { max-width: 460px; margin-top: 28px; color: var(--muted); font-size: 17px; }
.mx-route-list { border-top: 1px solid var(--mx-line); }
.mx-route-list article { min-height: 172px; padding: 30px 0; display: grid; grid-template-columns: 44px minmax(190px, .75fr) 1fr; gap: 18px; align-items: center; border-bottom: 1px solid var(--mx-line); }
.mx-route-list article > span { align-self: start; color: var(--lime); font-family: var(--mono); font-size: 9px; }
.mx-route-list h3 { margin: 0; font-size: 28px; line-height: .94; text-transform: uppercase; }
.mx-route-list p { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mx-route-list b { padding: 10px 12px; color: var(--paper); border: 1px solid var(--mx-line); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.mx-route-list i { color: var(--lime); font-style: normal; }
.mx-closing { min-height: 650px; border-top: 1px solid var(--mx-line); }

@keyframes mx-core-load { 0% { transform: scaleX(.12); transform-origin: left; } 45%, 75% { transform: scaleX(1); transform-origin: left; } 76% { transform-origin: right; } 100% { transform: scaleX(.12); transform-origin: right; } }
@keyframes mx-spin { to { transform: rotate(360deg); } }
@keyframes mx-skeleton { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes mx-shot-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes mx-panel-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes mx-copy-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .modes-experience { --mx-rail-scroll-offset: 150px; }
  .mx-hero { grid-template-columns: 1fr; }
  .mx-hero-copy { min-height: 710px; border-right: 0; border-bottom: 1px solid var(--mx-line); }
  .mx-hero-stage { min-height: 760px; }
  .mx-mode-rail { top: 0; }
  .mx-mode-rail > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mx-mode-rail a:nth-child(3n) { border-right: 0; }
  .mx-mode-rail a:nth-last-child(n + 4) { border-bottom: 1px solid var(--mx-line); }
  .mx-mode-story,
  .mx-mode-story.is-reverse { min-height: 0; grid-template-columns: 1fr; gap: 60px; }
  .mx-mode-story.is-reverse .mx-mode-copy,
  .mx-mode-story.is-reverse .mx-mode-media,
  .mx-mode-story.is-reverse .mx-mode-media-column { grid-column: 1; grid-row: auto; }
  .mx-mode-story.is-reverse .mx-mode-copy { grid-row: 1; }
  .mx-mode-description { max-width: 720px; }
  .mx-prompt,
  .mx-feature-switcher { max-width: 820px; }
  .mx-mode-story.is-reverse .mx-prompt-preview { left: -28px; right: auto; }
  .mx-mode-media { width: 100%; }
  .mx-custom-story { min-height: 0; grid-template-columns: 1fr; gap: 60px; }
  .mx-routes { grid-template-columns: 1fr; gap: 70px; }
}

@media (max-width: 760px) {
  .mx-hero { min-height: 0; }
  .mx-hero-copy { min-height: 640px; padding: 62px 20px 36px; }
  .mx-hero h1 { font-size: clamp(52px, 16vw, 72px); }
  .mx-hero-copy > p:not(.eyebrow) { margin-block: 26px; font-size: 16px; }
  .mx-hero-stage { min-height: 540px; }
  .mx-hero-card { border-radius: 11px; }
  .mx-hero-card > span { min-height: 28px; padding: 0 8px; font-size: 7px; }
  .mx-hero-card-chat { top: 5%; left: 3%; width: 42%; height: 28%; }
  .mx-hero-card-studio { top: 5%; right: 3%; width: 39%; height: 28%; }
  .mx-hero-card-code { bottom: 6%; left: 3%; width: 33%; height: 37%; }
  .mx-hero-card-editor { bottom: 4%; left: 36%; width: 36%; height: 22%; }
  .mx-hero-card-node { right: 3%; bottom: 6%; width: 25%; height: 37%; }
  .mx-hero-core { top: 29%; width: 46%; min-height: 190px; padding: 17px; border-radius: 14px; }
  .mx-core-mark { font-size: 46px; }
  .mx-hero-core strong { margin-top: 17px; font-size: 15px; }
  .mx-hero-core small,
  .mx-hero-core em { font-size: 5px; }
  .mx-hero-core > i { margin-block: 14px 8px; }
  .mx-mode-rail { top: 0; }
  .mx-mode-rail a { padding-inline: 8px; gap: 6px; font-size: 13px; }
  .mx-continuity { padding-block: 90px; }
  .mx-continuity > header { padding-bottom: 36px; grid-template-columns: 1fr; gap: 28px; }
  .mx-continuity h2,
  .mx-routes h2 { font-size: clamp(50px, 15vw, 68px); }
  .mx-continuity header > p { font-size: 16px; }
  .mx-continuity ol { grid-template-columns: 1fr; }
  .mx-continuity li { min-height: 0; padding: 20px 0; display: grid; grid-template-columns: 34px 92px 1fr; gap: 9px; align-items: center; border-right: 0; border-bottom: 1px solid var(--mx-line); }
  .mx-continuity li:last-child { border-bottom: 0; }
  .mx-continuity h3 { margin: 0; font-size: 20px; }
  .mx-continuity li p { font-size: 13px; }
  .mx-mode-story { padding: 82px 18px; gap: 42px; }
  .mx-mode-copy { --mx-mode-title-size: clamp(34px, 17cqw, 62px); }
  .mx-mode-heading { gap: 14px; }
  .mx-mode-icon { width: 44px; height: 44px; }
  .mx-mode-icon svg { width: 22px; height: 22px; }
  .mx-mode-description { margin-block: 22px; font-size: 15px; }
  .mx-prompt { margin-bottom: 22px; }
  .mx-prompt-preview { top: var(--prompt-top, -18px); left: -18px; width: min(705px, calc(100vw - 36px)); padding: 18px; }
  .mx-mode-story.is-reverse .mx-prompt-preview { left: -18px; }
  .mx-prompt-preview p { margin-top: 14px; font-size: 15px; }
  .mx-feature-switcher strong { font-size: 16px; }
  .mx-mode-media { border-radius: 15px; }
  .mx-mode-loader { grid-template-columns: 18% 1fr 18%; gap: 5px; padding: 5px; }
  .mx-loader-side { padding: 6px; gap: 5px; }
  .mx-loader-center { padding: 13px; }
  .mx-loader-center > div { grid-template-columns: 1fr; gap: 4px; }
  .mx-loader-center > div span { min-height: 44px; padding: 8px; }
  .mx-loader-center > div span:nth-child(n + 2) { display: none; }
  .mx-custom-story { padding: 82px 18px; gap: 42px; }
  .mx-custom-heading { gap: 14px; }
  .mx-custom-app-icon { width: 44px; height: 44px; flex-basis: 44px; }
  .mx-custom-app-icon svg { width: 22px; height: 22px; }
  .mx-custom-heading h2 { font-size: clamp(34px, 17cqw, 62px); }
  .mx-custom-intro > p { margin-top: 22px; font-size: 15px; }
  .mx-custom-options { grid-template-columns: 1fr; }
  .mx-custom-options article { min-height: 250px; border-right: 0; border-bottom: 1px solid var(--mx-line); }
  .mx-custom-options article:last-child { border-bottom: 0; }
  .mx-custom-options h3 { font-size: 30px; }
  .mx-routes { padding-block: 90px; gap: 48px; }
  .mx-route-list article { min-height: 0; grid-template-columns: 34px 1fr; gap: 12px; }
  .mx-route-list article p { grid-column: 2; }
  .mx-route-list h3 { font-size: 23px; }
  .mx-closing { min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-hero-core > i b,
  .mx-loader-ring,
  .mx-loader-side i { animation: none; }
  .mx-shot,
  .mx-shot-reveal,
  .mx-feature-switcher p { animation-duration: .01ms; }
  .mx-hero-card,
  .mx-shot-reveal { transition-duration: .01ms; }
}

/* Standalone adapter: keep the shared Kwib chrome and retain only the Modes background field. */
.modes-v2-page,
.modes-v2-page .site-header,
.modes-experience {
  background-color: var(--ink);
}

.modes-v2-page .site-header {
  position: relative;
  z-index: 40;
}

.modes-experience {
  background-image: none;
}

.modes-experience .grid-shell {
  width: min(1560px, calc(100% - 64px));
  margin-inline: auto;
}

.modes-experience .mx-hero-stage {
  background-color: var(--ink);
  background-image: none;
}

.modes-experience .mx-hero-stage::after {
  background: none;
}

/* Three-panel Modes hero. The rest of the page continues to use the shared site layout. */
.modes-experience > .mx-hero {
  min-height: 0;
  display: block;
  border: 0;
}

.modes-experience .mx-hero-stage {
  min-height: 760px;
  padding: 110px 32px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
}

.mx-opening-panels {
  width: min(100%, 1280px);
  height: min(650px, calc(100dvh - 190px));
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(120px, .62fr) minmax(420px, 1.5fr) minmax(120px, .62fr);
  gap: 14px;
  perspective: 1600px;
  perspective-origin: center;
  transform-style: preserve-3d;
}

.mx-opening-panel {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--lime);
  border-radius: 22px;
  background: transparent;
}

.mx-opening-panel--left {
  opacity: 0;
  transform: translateX(-112%) rotateY(45deg);
  transform-origin: right center;
  backface-visibility: hidden;
  animation: mx-opening-panel-left-enter 760ms cubic-bezier(.2, 0, 0, 1) both, mx-opening-panel-border-grow 900ms cubic-bezier(.2, 0, 0, 1) both;
}

.mx-opening-panel--middle {
  container-type: inline-size;
  opacity: 0;
  transform: scale(.75);
  transform-origin: center;
  animation: mx-opening-panel-middle-enter 640ms cubic-bezier(.2, 0, 0, 1) 90ms both, mx-opening-panel-border-grow 810ms cubic-bezier(.2, 0, 0, 1) 90ms both;
}

.mx-opening-panel--right {
  opacity: 0;
  transform: translateX(112%) rotateY(-45deg);
  transform-origin: left center;
  backface-visibility: hidden;
  animation: mx-opening-panel-right-enter 760ms cubic-bezier(.2, 0, 0, 1) both, mx-opening-panel-border-grow 900ms cubic-bezier(.2, 0, 0, 1) both;
}

.mx-opening-hero-copy {
  position: absolute;
  inset: 0;
  padding: clamp(34px, 4vw, 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.modes-experience .mx-hero h1 {
  width: 100%;
  max-width: 600px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--lime);
  font-size: clamp(24px, 10cqw, 80px);
  line-height: .84;
  letter-spacing: -.07em;
  text-transform: uppercase;
}

.modes-experience .mx-hero h1 > span {
  width: 100%;
  display: block;
  color: var(--lime);
  text-align: center;
  white-space: nowrap;
}

.modes-experience .mx-hero h1 > .mx-infinity-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .14em;
}

.mx-infinity-line b { font: inherit; }
.mx-infinity-icon { display: inline-block; color: var(--lime); font: inherit; font-style: normal; font-size: .92em; line-height: .7; letter-spacing: 0; transform: translateY(.025em); }
.mx-opening-hero-copy > p { width: 100%; max-width: 540px; margin: 30px 0 0; color: var(--lime); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; text-align: left; }
.mx-opening-hero-copy > p span { display: block; }
.mx-opening-mode-icons { width: 100%; max-width: 540px; margin-top: 24px; display: grid; grid-template-columns: repeat(8, 42px); gap: 10px; align-content: center; align-items: center; justify-content: center; }
.mx-opening-mode-icons a { width: 42px; height: 42px; display: grid; place-items: center; color: var(--lime); border: 1px solid var(--lime); border-radius: 50%; background: var(--ink); opacity: 0; transform: translateY(12px) scale(.72); animation: mx-opening-mode-icon-enter 420ms cubic-bezier(.2, 0, 0, 1) calc(760ms + var(--mode-icon-order) * 65ms) both; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.mx-opening-mode-icons a:hover { background: rgba(177, 231, 110, .08); }
.mx-opening-mode-icons svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@keyframes mx-opening-panel-left-enter { 0% { opacity: 0; transform: translateX(-112%) rotateY(45deg); } 52% { opacity: .72; transform: translateX(-18%) rotateY(14deg); } 100% { opacity: 1; transform: translateX(0) rotateY(0); } }
@keyframes mx-opening-panel-middle-enter { 0% { opacity: 0; transform: scale(.75); } 45% { opacity: .72; transform: scale(.93); } 100% { opacity: 1; transform: scale(1); } }
@keyframes mx-opening-panel-right-enter { 0% { opacity: 0; transform: translateX(112%) rotateY(-45deg); } 52% { opacity: .72; transform: translateX(18%) rotateY(-14deg); } 100% { opacity: 1; transform: translateX(0) rotateY(0); } }
@keyframes mx-opening-panel-border-grow { from { border-width: 2px; } to { border-width: 4px; } }
@keyframes mx-opening-mode-icon-enter { from { opacity: 0; transform: translateY(12px) scale(.72); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 760px) {
  .modes-experience .grid-shell {
    width: min(100% - 28px, 1560px);
  }
  .modes-experience .mx-mode-rail > .grid-shell {
    width: calc(100% - 28px);
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mx-mode-rail a { font-size: 13px; }

  .modes-experience .mx-hero-stage {
    min-height: 650px;
    padding: 32px 0 44px;
  }

  .mx-opening-panels {
    width: 100%;
    height: 590px;
    min-height: 590px;
    grid-template-columns: minmax(20px, .2fr) minmax(0, 1.7fr) minmax(20px, .2fr);
    gap: 6px;
  }

  .mx-opening-panel { border-radius: 14px; }

  .modes-experience .mx-hero h1 {
    font-size: clamp(22px, 10cqw, 34px);
  }

  .mx-opening-hero-copy { padding: 26px 14px; }
  .mx-opening-hero-copy > p { margin-top: 22px; font-size: 13px; line-height: 1.55; }
  .mx-opening-hero-copy > p span { white-space: normal; }
  .mx-opening-mode-icons { margin-top: 20px; grid-template-columns: repeat(4, 38px); gap: 8px; }
  .mx-opening-mode-icons a { width: 38px; height: 38px; }
  .mx-opening-mode-icons svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-opening-panel--left,
  .mx-opening-panel--middle,
  .mx-opening-panel--right,
  .mx-opening-mode-icons a {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
