:root {
  --void: #050505;
  --void-soft: #11100e;
  --ink: #0c0c0b;
  --paper: #f4efe5;
  --paper-soft: rgba(244, 239, 229, 0.72);
  --muted: rgba(244, 239, 229, 0.52);
  --line: rgba(244, 239, 229, 0.16);
  --line-strong: rgba(244, 239, 229, 0.34);
  --signal: #7df4d1;
  --signal-deep: #183d34;
  --amber: #f0c769;
  --red: #e7604f;
  --blue: #78a8ff;
  --panel: rgba(18, 18, 16, 0.72);
  --panel-solid: #151513;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--paper);
}


* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--void);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--void);
  color: var(--paper);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%, transparent 76%, rgba(255, 255, 255, 0.025)),
    linear-gradient(115deg, #030303 0%, #0b0b0a 46%, #17140f 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 17px);
  mix-blend-mode: overlay;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.gate-shell {
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.96) 45%, rgba(18, 17, 15, 0.92) 100%);
}

.gate-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 56px;
  padding: 56px 64px 92px;
  isolation: isolate;
}

.gate-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  z-index: -1;
  border: 1px solid rgba(244, 239, 229, 0.08);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.62);
}

.gate-copy {
  max-width: 820px;
  align-self: center;
}

.eyebrow,
.system-line,
.detail-kicker {
  margin: 0;
  color: var(--signal);
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

.gate-copy h1 {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--paper);
  font-size: 5.6rem;
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
}

.gate-line {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--paper-soft);
  font-size: 1.35rem;
  line-height: 1.38;
  text-wrap: balance;
}

.login-form {
  width: min(100%, 520px);
  margin-top: 38px;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 239, 229, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

input {
  min-width: 0;
  min-height: 50px;
  border: 1px solid rgba(244, 239, 229, 0.1);
  border-radius: 6px;
  outline: none;
  background: rgba(244, 239, 229, 0.9);
  color: var(--ink);
  padding: 0 16px;
  font-size: 0.98rem;
  font-weight: 720;
}

input::placeholder {
  color: rgba(12, 12, 11, 0.5);
}

input:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(125, 244, 209, 0.18);
}

.login-form button,
.prompt-form button {
  min-height: 50px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 18px;
  font-weight: 820;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.login-form button:hover,
.prompt-form button:hover,
.suggestion-row button:hover,
.entry-proof button:hover,
.supporting-case:hover,
.top-actions a:hover,
.top-actions button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--amber);
  font-size: 0.88rem;
  line-height: 1.35;
}

.gate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 20px;
}

.gate-links a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid rgba(125, 244, 209, 0.44);
}

.gate-links a:hover {
  color: var(--paper);
  border-color: var(--signal);
}

.gate-twin {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  isolation: isolate;
}

.gate-twin::before,
.twin-plate::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 58px;
  height: 1px;
  background: var(--line-strong);
  box-shadow: 0 18px 70px rgba(244, 239, 229, 0.22);
}

.gate-twin img {
  position: relative;
  z-index: 1;
  width: min(470px, 42vw);
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  filter: contrast(1.05) saturate(0.98) drop-shadow(0 42px 80px rgba(0, 0, 0, 0.82));
  mix-blend-mode: screen;
}

.gate-twin::after {
  content: "Digital twin";
  position: absolute;
  right: 8px;
  bottom: 84px;
  z-index: 2;
  color: rgba(244, 239, 229, 0.5);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
  writing-mode: vertical-rl;
}

.brand-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 4;
  overflow: hidden;
  border-top: 1px solid rgba(244, 239, 229, 0.06);
  border-bottom: 1px solid rgba(244, 239, 229, 0.06);
  background: rgba(5, 5, 5, 0.35);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.brand-track {
  display: flex;
  width: max-content;
  gap: 18px;
  padding: 14px 18px;
  animation: brandMove 34s linear infinite;
}

.brand-chip {
  width: 112px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 239, 229, 0.08);
  border-radius: 6px;
  background: rgba(244, 239, 229, 0.05);
  color: rgba(244, 239, 229, 0.64);
  overflow: hidden;
}

.brand-chip img {
  max-width: 78px;
  max-height: 20px;
  object-fit: contain;
  filter: grayscale(1) brightness(2.4) contrast(0.88);
  opacity: 0.74;
}

.brand-chip strong {
  display: none;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.brand-chip:not(:has(img)) strong,
.brand-chip img[src=""] + strong {
  display: block;
}

.app-shell {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 10, 9, 0.88), rgba(5, 5, 5, 1)),
    var(--void);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(125, 244, 209, 0.05) 45%, transparent 88%),
    linear-gradient(180deg, rgba(244, 239, 229, 0.05), transparent 34%, rgba(231, 96, 79, 0.05) 100%);
}

.topbar {
  position: relative;
  z-index: 10;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px 0;
}

.brand-mark {
  display: grid;
  gap: 3px;
}

.brand-mark span,
.top-actions a,
.top-actions button {
  color: var(--paper-soft);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-mark strong {
  color: var(--paper);
  font-size: 0.94rem;
  line-height: 1;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions a,
.top-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(244, 239, 229, 0.05);
  color: var(--paper);
  padding: 0 12px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.top-actions button {
  color: var(--muted);
}

.void-stage {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(230px, 0.76fr) minmax(320px, 1fr) minmax(330px, 1.08fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "twin conversation evidence"
    "twin detail evidence"
    "suggestions suggestions evidence";
  gap: 18px;
  padding: 22px 24px 24px;
}

.twin-zone {
  grid-area: twin;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid rgba(244, 239, 229, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(244, 239, 229, 0.045), transparent 24%),
    rgba(12, 12, 11, 0.42);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.twin-plate {
  position: relative;
  width: 100%;
  min-height: 540px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}

.twin-plate img {
  position: relative;
  z-index: 1;
  width: min(340px, 96%);
  max-width: 96%;
  height: auto;
  border-radius: 8px;
  filter: contrast(1.04) saturate(0.96) drop-shadow(0 28px 54px rgba(0, 0, 0, 0.72));
  mix-blend-mode: screen;
  transform-origin: 50% 100%;
  transition: transform 420ms ease, filter 420ms ease, opacity 420ms ease;
}

.twin-plate span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
}

.conversation-zone {
  grid-area: conversation;
  align-self: end;
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 12, 11, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.conversation-zone h1 {
  max-width: 760px;
  margin: 0;
  color: var(--paper);
  font-size: 3.9rem;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.conversation-zone p:not(.system-line) {
  max-width: 760px;
  margin: 0;
  color: var(--paper-soft);
  font-size: 1.05rem;
  line-height: 1.52;
}

.prompt-form {
  margin: 4px 0 0;
}

.prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.evidence-zone {
  grid-area: evidence;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
}

.case-card,
.detail-panel,
.entry-proof,
.empty-proof {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.case-card {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
  overflow: hidden;
}

.case-media {
  min-height: 240px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(244, 239, 229, 0.06), rgba(125, 244, 209, 0.05)),
    #0d0d0c;
  overflow: hidden;
}

.case-media img,
.case-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.case-media video {
  background: #000;
}

.case-media.is-abstract {
  align-content: end;
  justify-items: start;
  padding: 22px;
}

.case-media.is-abstract span,
.case-media.is-abstract small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

.case-media.is-abstract strong {
  max-width: 360px;
  margin-top: 10px;
  color: var(--paper);
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: 0;
}

.case-copy {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.case-copy span,
.supporting-case span,
.next-line span {
  color: var(--signal);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.case-copy h2 {
  margin: 0;
  color: var(--paper);
  font-size: 2.45rem;
  line-height: 1;
  letter-spacing: 0;
}

.case-copy p {
  margin: 0;
  color: var(--paper-soft);
  font-size: 0.98rem;
  line-height: 1.48;
}

.supporting-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.supporting-case {
  min-height: 112px;
  display: grid;
  align-content: end;
  gap: 8px;
  text-align: left;
  border: 1px solid rgba(244, 239, 229, 0.12);
  border-radius: 8px;
  background: rgba(244, 239, 229, 0.06);
  color: var(--paper);
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.supporting-case strong {
  color: var(--paper);
  font-size: 1rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.detail-zone {
  grid-area: detail;
  min-height: 0;
}

.detail-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.detail-panel h2 {
  max-width: 850px;
  margin: 0;
  color: var(--paper);
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.detail-panel p {
  max-width: 880px;
  margin: 0;
  color: var(--paper-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}

.detail-role {
  color: rgba(244, 239, 229, 0.62) !important;
}

.proof-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proof-grid span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(244, 239, 229, 0.12);
  border-radius: 6px;
  background: rgba(244, 239, 229, 0.055);
  color: rgba(244, 239, 229, 0.78);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 680;
}

.next-line {
  display: grid;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(244, 239, 229, 0.1);
}

.next-line strong {
  color: var(--paper);
  font-size: 0.92rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.suggestion-row {
  grid-area: suggestions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.suggestion-row button,
.entry-proof button {
  border: 1px solid rgba(244, 239, 229, 0.13);
  border-radius: 8px;
  background: rgba(244, 239, 229, 0.06);
  color: var(--paper);
  font-weight: 760;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.suggestion-row button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--paper-soft);
  font-size: 0.88rem;
}

.entry-proof {
  min-height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.entry-proof button {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 176px;
  text-align: left;
  padding: 18px;
}

.entry-proof button span {
  width: fit-content;
  border: 1px solid rgba(125, 244, 209, 0.32);
  border-radius: 6px;
  color: var(--signal);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
}

.entry-proof button strong {
  max-width: 260px;
  color: var(--paper);
  font-size: 1.2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.empty-proof {
  display: grid;
  align-content: end;
  gap: 14px;
  min-height: 380px;
  padding: 22px;
}

.empty-proof span {
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.empty-proof p {
  max-width: 420px;
  margin: 0;
  color: var(--paper-soft);
  font-size: 1.2rem;
  line-height: 1.36;
}

.app-shell[data-layout="encounter"] .void-stage {
  min-height: calc(100svh - 72px);
  display: block;
  padding: 0;
  perspective: 1200px;
  overflow: hidden;
  isolation: isolate;
}

.app-shell[data-layout="encounter"] .topbar {
  display: none;
}

.app-shell[data-layout="encounter"] .brand-mark {
  opacity: 0.38;
}

.app-shell[data-layout="encounter"] .top-actions a,
.app-shell[data-layout="encounter"] .top-actions button {
  border-color: rgba(244, 239, 229, 0.1);
  background: rgba(6, 6, 6, 0.28);
  color: rgba(244, 239, 229, 0.62);
}

.app-shell[data-layout="encounter"] .void-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 47%;
  z-index: -2;
  width: min(84vw, 1120px);
  height: min(64vw, 760px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(244, 239, 229, 0.1) 0 1px, transparent 2px 100%),
    radial-gradient(circle, rgba(125, 244, 209, 0.1), transparent 58%),
    radial-gradient(circle, rgba(244, 239, 229, 0.035), transparent 72%);
  box-shadow:
    inset 0 0 90px rgba(244, 239, 229, 0.04),
    0 0 160px rgba(125, 244, 209, 0.08);
}

.app-shell[data-layout="encounter"] .void-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26%;
  z-index: -1;
  width: 120vw;
  height: 58vh;
  transform: translateX(-50%) rotateX(72deg);
  transform-origin: 50% 100%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at center, transparent 0 31%, rgba(125, 244, 209, 0.28) 31.3% 31.7%, transparent 32% 100%),
    radial-gradient(ellipse at center, transparent 0 48%, rgba(244, 239, 229, 0.14) 48.2% 48.6%, transparent 49% 100%),
    linear-gradient(90deg, transparent 0 49.5%, rgba(244, 239, 229, 0.11) 49.6% 50.4%, transparent 50.5% 100%),
    repeating-linear-gradient(90deg, rgba(244, 239, 229, 0.075) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(244, 239, 229, 0.08) 0 1px, transparent 1px 74px);
  opacity: 0.38;
  mask-image: radial-gradient(ellipse at center, black 0 42%, transparent 76%);
}

.app-shell[data-layout="encounter"] .twin-zone {
  position: absolute;
  inset: 0;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
}

.app-shell[data-layout="encounter"] .twin-zone::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7vh;
  width: min(38vw, 520px);
  height: min(9vw, 120px);
  transform: translateX(-50%);
  border: 1px solid rgba(125, 244, 209, 0.2);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(125, 244, 209, 0.08), transparent 62%);
  filter: blur(0.2px);
}

.app-shell[data-layout="encounter"] .twin-plate {
  min-height: calc(100svh - 72px);
  align-items: flex-end;
  padding: 0 0 10vh;
}

.app-shell[data-layout="encounter"] .twin-plate::before {
  left: 50%;
  right: auto;
  bottom: 10.6vh;
  width: min(44vw, 620px);
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(244, 239, 229, 0.54), transparent);
  box-shadow: 0 0 42px rgba(125, 244, 209, 0.12);
}

.app-shell[data-layout="encounter"] .twin-plate img {
  width: min(31vw, 430px);
  max-width: 430px;
  border-radius: 14px;
  transform: translateY(2vh) translateZ(60px);
  filter:
    contrast(1.08)
    saturate(0.98)
    drop-shadow(0 60px 90px rgba(0, 0, 0, 0.88))
    drop-shadow(0 0 24px rgba(125, 244, 209, 0.12));
}

.app-shell[data-layout="encounter"] .twin-plate span {
  display: none;
}

.app-shell[data-layout="encounter"] .conversation-zone {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5.8vh, 64px);
  z-index: 5;
  width: min(680px, calc(100vw - 44px));
  transform: translateX(-50%) translateZ(140px);
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell[data-layout="encounter"] .system-line,
.app-shell[data-layout="encounter"] #stageTitle,
.app-shell[data-layout="encounter"] #stageReply {
  display: none;
}

.app-shell[data-layout="encounter"] .prompt-form {
  margin: 0;
}

.app-shell[data-layout="encounter"] .prompt-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(244, 239, 229, 0.14);
  border-radius: 8px;
  background: rgba(6, 6, 6, 0.56);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(125, 244, 209, 0.08);
  backdrop-filter: blur(18px);
}

.app-shell[data-layout="encounter"] .prompt-row input {
  min-height: 54px;
  border: 1px solid rgba(244, 239, 229, 0.14);
  background: rgba(244, 239, 229, 0.9);
}

.app-shell[data-layout="encounter"] .prompt-row button {
  min-height: 54px;
}

.app-shell[data-layout="encounter"] .evidence-zone,
.app-shell[data-layout="encounter"] .detail-zone {
  display: none;
}

.app-shell[data-layout="encounter"] .suggestion-row {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(24px, 5.8vh, 64px) + 78px);
  z-index: 6;
  width: min(680px, calc(100vw - 44px));
  transform: translateX(-50%) translateZ(150px);
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.app-shell[data-layout="encounter"] .suggestion-row button {
  min-height: 34px;
  border-radius: 999px;
  border-color: rgba(244, 239, 229, 0.14);
  background: rgba(244, 239, 229, 0.055);
  color: rgba(244, 239, 229, 0.78);
  padding: 0 12px;
  font-size: 0.8rem;
  backdrop-filter: blur(16px);
}

.app-shell[data-layout="cinema"] .void-stage {
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.82fr);
  grid-template-areas:
    "evidence conversation"
    "evidence detail"
    "suggestions detail";
}

.app-shell[data-layout="cinema"] .twin-zone {
  position: absolute;
  right: 34px;
  bottom: 28px;
  width: 124px;
  min-height: 228px;
  opacity: 0.42;
  pointer-events: none;
}

.app-shell[data-layout="cinema"] .twin-plate {
  min-height: 228px;
  padding: 10px;
}

.app-shell[data-layout="cinema"] .twin-plate img {
  width: 88px;
}

.app-shell[data-layout="cinema"] .twin-plate span {
  display: none;
}

.app-shell[data-layout="cinema"] .case-card {
  grid-template-rows: minmax(360px, 1fr) auto;
}

.app-shell[data-layout="cinema"] .case-media {
  min-height: 420px;
}

.app-shell[data-layout="systems"] .void-stage,
.app-shell[data-layout="leadership"] .void-stage {
  grid-template-columns: minmax(330px, 0.92fr) minmax(260px, 0.7fr) minmax(360px, 1.02fr);
  grid-template-areas:
    "conversation twin evidence"
    "detail twin evidence"
    "suggestions suggestions evidence";
}

.app-shell[data-layout="gallery"] .void-stage {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.35fr);
  grid-template-areas:
    "twin conversation"
    "detail evidence"
    "suggestions evidence";
}

.app-shell[data-layout="briefing"] .void-stage {
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr) minmax(320px, 0.92fr);
  grid-template-areas:
    "conversation detail evidence"
    "twin detail evidence"
    "suggestions suggestions evidence";
}

.app-shell[data-route="awards"] {
  --signal: var(--amber);
}

.app-shell[data-route="ai"],
.app-shell[data-route="inhouse"],
.app-shell[data-route="not-another-portfolio"] {
  --signal: var(--blue);
}

.app-shell[data-route="impact"],
.app-shell[data-route="complex"] {
  --signal: #7df4d1;
}

.app-shell.is-thinking .twin-plate img {
  transform: translateY(-4px) scale(1.012);
  filter: contrast(1.08) saturate(0.96) drop-shadow(0 34px 62px rgba(125, 244, 209, 0.18));
}

.app-shell.is-thinking .conversation-zone,
.app-shell.is-thinking .case-card,
.app-shell.is-thinking .detail-panel {
  border-color: rgba(125, 244, 209, 0.28);
}

.app-shell.is-listening .prompt-row input {
  box-shadow: 0 0 0 3px rgba(125, 244, 209, 0.16);
}

@keyframes brandMove {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1180px) {
  .gate-stage {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 32px;
    padding: 44px 36px 86px;
  }

  .gate-copy h1 {
    font-size: 4.35rem;
  }

  .void-stage,
  .app-shell[data-layout="encounter"] .void-stage,
  .app-shell[data-layout="systems"] .void-stage,
  .app-shell[data-layout="leadership"] .void-stage,
  .app-shell[data-layout="gallery"] .void-stage,
  .app-shell[data-layout="briefing"] .void-stage {
    grid-template-columns: minmax(230px, 0.56fr) minmax(0, 1fr);
    grid-template-areas:
      "twin conversation"
      "detail detail"
      "evidence evidence"
      "suggestions suggestions";
  }

  .app-shell[data-layout="cinema"] .void-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "conversation"
      "evidence"
      "detail"
      "suggestions";
  }

  .app-shell[data-layout="cinema"] .twin-zone {
    display: none;
  }

  .conversation-zone h1 {
    font-size: 3.1rem;
  }

  .twin-plate {
    min-height: 420px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .gate-stage {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
    padding: 28px 18px 92px;
  }

  .gate-stage::before {
    inset: 12px;
  }

  .gate-copy {
    order: 2;
  }

  .gate-copy h1 {
    font-size: 3.3rem;
  }

  .gate-line {
    font-size: 1.08rem;
  }

  .gate-twin {
    order: 1;
    min-height: 420px;
    align-items: end;
  }

  .gate-twin img {
    width: min(270px, 82vw);
  }

  .brand-rail {
    bottom: 10px;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    padding: 16px 14px 0;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions a,
  .top-actions button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.7rem;
  }

  .void-stage,
  .app-shell[data-layout="encounter"] .void-stage,
  .app-shell[data-layout="systems"] .void-stage,
  .app-shell[data-layout="leadership"] .void-stage,
  .app-shell[data-layout="gallery"] .void-stage,
  .app-shell[data-layout="briefing"] .void-stage,
  .app-shell[data-layout="cinema"] .void-stage {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "twin"
      "conversation"
      "evidence"
      "detail"
      "suggestions";
    gap: 12px;
    padding: 16px 14px 22px;
  }

  .twin-zone,
  .app-shell[data-layout="encounter"] .twin-zone {
    min-height: 300px;
  }

  .twin-plate {
    min-height: 300px;
    padding: 12px;
  }

  .twin-plate img {
    width: min(220px, 88vw);
  }

  .conversation-zone {
    padding: 18px;
  }

  .conversation-zone h1 {
    font-size: 2.25rem;
  }

  .conversation-zone p:not(.system-line) {
    font-size: 0.98rem;
  }

  .prompt-row {
    grid-template-columns: 1fr;
  }

  .entry-proof,
  .supporting-cases {
    grid-template-columns: 1fr;
  }

  .entry-proof button {
    min-height: 130px;
  }

  .case-copy h2 {
    font-size: 1.8rem;
  }

  .case-media,
  .app-shell[data-layout="cinema"] .case-media {
    min-height: 250px;
  }

  .detail-panel h2 {
    font-size: 1.35rem;
  }

  .suggestion-row {
    flex-direction: column;
  }

  .suggestion-row button {
    width: 100%;
    text-align: left;
  }
}


@media (max-width: 440px) {
  .gate-copy h1 {
    font-size: 2.7rem;
  }

  .conversation-zone h1 {
    font-size: 1.9rem;
  }

  .brand-mark strong {
    font-size: 0.8rem;
  }

  .brand-mark span {
    font-size: 0.68rem;
  }
}

.app-shell[data-layout="encounter"] .void-stage {
  display: block;
  min-height: 100svh;
  padding: 0;
}

.app-shell[data-layout="encounter"] .conversation-zone {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 5.6vh, 64px);
  width: min(680px, calc(100vw - 44px));
  transform: translateX(-50%) translateZ(140px);
  padding: 0;
}

.app-shell[data-layout="encounter"] .prompt-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.app-shell[data-layout="encounter"] .suggestion-row {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(22px, 5.6vh, 64px) + 78px);
  width: min(680px, calc(100vw - 44px));
  transform: translateX(-50%) translateZ(150px);
  flex-direction: row;
  justify-content: center;
}

.app-shell[data-layout="encounter"] .suggestion-row button {
  width: auto;
  text-align: center;
}

.app-shell[data-layout="encounter"] .twin-zone {
  position: absolute;
  inset: 0;
  min-height: auto;
}

.app-shell[data-layout="encounter"] .twin-plate {
  min-height: 100svh;
  padding: 0 0 10vh;
}

.app-shell[data-layout="encounter"] .evidence-zone,
.app-shell[data-layout="encounter"] .detail-zone {
  display: none;
}

@media (max-width: 820px) {
  .app-shell[data-layout="encounter"] .twin-plate img {
    width: min(330px, 82vw);
  }

  .app-shell[data-layout="encounter"] .suggestion-row {
    bottom: calc(clamp(22px, 5.6vh, 64px) + 86px);
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    mask-image: linear-gradient(90deg, black 0 88%, transparent);
  }

  .app-shell[data-layout="encounter"] .suggestion-row button {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* The portfolio is one spatial conversation, not a dashboard. */
.gate-shell,
.app-shell {
  --twin-shift-x: 0px;
  --twin-shift-y: 0px;
  --twin-rotate-y: 0deg;
  --floor-shift-x: 0px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.045), transparent 34%),
    #030303;
}

.gate-stage {
  min-height: 100svh;
  display: block;
  padding: 0;
  perspective: 1100px;
  overflow: hidden;
}

.gate-stage::before,
.app-shell[data-layout="encounter"] .void-stage::before,
.app-shell.has-scene .void-stage::before {
  content: "";
  position: absolute;
  inset: -10% 0 0;
  z-index: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(255, 255, 255, 0.025) 49.8%, rgba(125, 244, 209, 0.05) 50%, rgba(255, 255, 255, 0.025) 50.2%, transparent 78%),
    radial-gradient(ellipse at 50% 42%, rgba(125, 244, 209, 0.07), transparent 36%),
    radial-gradient(ellipse at 50% 44%, rgba(255, 255, 255, 0.04), transparent 54%);
  box-shadow: none;
  pointer-events: none;
}

.gate-stage::after,
.app-shell[data-layout="encounter"] .void-stage::after,
.app-shell.has-scene .void-stage::after {
  content: "";
  position: absolute;
  left: -15vw;
  right: -15vw;
  bottom: -38vh;
  z-index: 1;
  height: 75vh;
  transform: translateX(var(--floor-shift-x)) rotateX(68deg);
  transform-origin: 50% 100%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at center, transparent 0 23%, rgba(125, 244, 209, 0.28) 23.2% 23.45%, transparent 23.7% 100%),
    radial-gradient(ellipse at center, transparent 0 39%, rgba(244, 239, 229, 0.15) 39.15% 39.35%, transparent 39.6% 100%),
    radial-gradient(ellipse at center, transparent 0 56%, rgba(244, 239, 229, 0.08) 56.15% 56.35%, transparent 56.6% 100%),
    repeating-linear-gradient(90deg, rgba(244, 239, 229, 0.075) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(244, 239, 229, 0.075) 0 1px, transparent 1px 76px);
  opacity: 0.38;
  mask-image: radial-gradient(ellipse at center, black 0 45%, transparent 76%);
  transition: transform 600ms ease;
  pointer-events: none;
}

.gate-copy {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 5vh, 54px);
  z-index: 6;
  width: min(560px, calc(100vw - 40px));
  max-width: none;
  transform: translateX(-50%);
  text-align: center;
}

.gate-identity {
  position: absolute;
  left: 22px;
  top: 18px;
  z-index: 7;
  display: grid;
  gap: 5px;
  text-align: left;
}

.gate-id {
  margin: 0;
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 760;
}

.gate-id span {
  color: var(--signal);
  padding: 0 4px;
}

.gate-identity .eyebrow {
  color: var(--muted);
  font-size: 0.68rem;
}

.login-form {
  width: min(100%, 460px);
  margin: 14px auto 0;
}

.password-row {
  border-color: rgba(244, 239, 229, 0.12);
  background: rgba(5, 5, 5, 0.62);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.58);
}

.gate-links {
  justify-content: center;
  margin-top: 12px;
}

.gate-links a {
  font-size: 0.7rem;
}

.gate-twin {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  align-items: flex-end;
  padding-bottom: 23vh;
  background: radial-gradient(ellipse 34% 68% at 50% 45%, #000 0 72%, transparent 100%);
  pointer-events: none;
}

.gate-twin::before {
  left: 50%;
  right: auto;
  bottom: 15vh;
  width: min(40vw, 560px);
  height: min(8vw, 105px);
  transform: translateX(-50%);
  border: 1px solid rgba(125, 244, 209, 0.24);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(125, 244, 209, 0.1), rgba(5, 5, 5, 0.88) 62%);
  box-shadow:
    inset 0 4px 22px rgba(244, 239, 229, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.72),
    0 0 40px rgba(125, 244, 209, 0.12);
}

.gate-twin::after {
  display: none;
}

.gate-twin img {
  width: min(36vw, 500px);
  max-width: 500px;
  max-height: 72svh;
  border-radius: 0;
  object-fit: contain;
  filter:
    contrast(1.07)
    saturate(0.97)
    drop-shadow(0 64px 90px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 30px rgba(125, 244, 209, 0.1));
  mix-blend-mode: normal;
  transform: translate3d(var(--twin-shift-x), calc(var(--twin-shift-y) + 3vh), 70px) rotateY(var(--twin-rotate-y));
  transform-origin: 50% 85%;
  transition: transform 600ms ease;
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  height: 58px;
  padding: 14px 16px 0;
  pointer-events: none;
}

.brand-mark {
  display: none;
}

.top-actions {
  margin-left: auto;
  pointer-events: auto;
}

.top-actions a,
.top-actions button {
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  color: rgba(244, 239, 229, 0.45);
  font-size: 0.68rem;
}

.app-shell[data-layout="encounter"] .void-stage,
.app-shell.has-scene .void-stage {
  min-height: 100svh;
  display: block;
  padding: 0;
  perspective: 1100px;
  overflow: hidden;
  isolation: isolate;
}

.app-shell.has-scene .void-stage {
  perspective: none;
}

.app-shell[data-layout="encounter"] .twin-zone,
.app-shell.has-scene .twin-zone {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse 34% 68% at 50% 45%, #000 0 72%, transparent 100%);
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 500ms ease;
}

.app-shell[data-layout="encounter"] .twin-plate,
.app-shell.has-scene .twin-plate {
  min-height: 100svh;
  padding: 0 0 13vh;
}

.app-shell[data-layout="encounter"] .twin-plate::before,
.app-shell.has-scene .twin-plate::before {
  display: none;
}

.app-shell[data-layout="encounter"] .twin-zone::before,
.app-shell.has-scene .twin-zone::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 10.5vh;
  z-index: 0;
  width: min(40vw, 560px);
  height: min(8vw, 105px);
  transform: translateX(-50%);
  border: 1px solid rgba(125, 244, 209, 0.24);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(125, 244, 209, 0.1), rgba(5, 5, 5, 0.88) 62%);
  box-shadow:
    inset 0 4px 22px rgba(244, 239, 229, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.72),
    0 0 40px rgba(125, 244, 209, 0.12);
}

.app-shell[data-layout="encounter"] .twin-plate img,
.app-shell.has-scene .twin-plate img {
  width: min(40vw, 560px);
  max-width: 560px;
  max-height: 82svh;
  border-radius: 0;
  object-fit: contain;
  mix-blend-mode: normal;
  transform: translate3d(var(--twin-shift-x), calc(var(--twin-shift-y) + 3vh), 70px) rotateY(var(--twin-rotate-y));
  filter:
    contrast(1.07)
    saturate(0.97)
    drop-shadow(0 64px 90px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 30px rgba(125, 244, 209, 0.1));
  transition: transform 600ms ease, filter 420ms ease, opacity 500ms ease;
}

.app-shell[data-layout="encounter"] .twin-plate span,
.app-shell.has-scene .twin-plate span {
  display: none;
}

.app-shell[data-layout="encounter"] .conversation-zone {
  bottom: clamp(22px, 4.2vh, 48px);
}

.app-shell[data-layout="encounter"] .suggestion-row {
  bottom: calc(clamp(22px, 4.2vh, 48px) + 78px);
}

.app-shell[data-layout="encounter"] .prompt-row,
.app-shell.has-scene .prompt-row {
  padding: 6px;
  border: 1px solid rgba(244, 239, 229, 0.13);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.66);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(20px);
}

.app-shell[data-layout="encounter"] .suggestion-row button,
.app-shell.has-scene .suggestion-row button {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(244, 239, 229, 0.64);
  padding: 0 8px;
  font-size: 0.76rem;
  font-weight: 660;
}

.app-shell[data-layout="encounter"] .suggestion-row button:hover,
.app-shell.has-scene .suggestion-row button:hover {
  color: var(--paper);
  transform: none;
}

.app-shell.has-scene .twin-zone {
  position: fixed;
  grid-area: auto;
  align-self: auto;
  transform: none;
  opacity: 0.82;
}

.app-shell.has-scene .twin-plate {
  justify-content: flex-end;
  padding-right: clamp(56px, 10vw, 150px);
}

.app-shell.has-scene .twin-plate img {
  width: min(30vw, 420px);
  max-width: 420px;
  max-height: 72svh;
}

.app-shell.has-scene .twin-zone::before {
  left: 78%;
  width: min(30vw, 420px);
  height: min(6vw, 86px);
}

.app-shell.has-scene .conversation-zone {
  position: fixed;
  grid-area: auto;
  align-self: auto;
  right: auto;
  bottom: auto;
  left: clamp(24px, 6vw, 100px);
  top: clamp(58px, 10vh, 100px);
  z-index: 7;
  width: min(600px, 44vw);
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.has-scene .system-line {
  color: var(--signal);
  font-size: 0.66rem;
}

.app-shell.has-scene #stageTitle {
  display: none;
}

.app-shell.has-scene #stageReply {
  max-width: 600px;
  color: var(--paper);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.32;
  text-wrap: balance;
}

.app-shell.has-scene .prompt-form {
  position: fixed;
  left: 50%;
  bottom: clamp(22px, 4.2vh, 48px);
  z-index: 12;
  width: min(680px, calc(100vw - 44px));
  margin: 0;
  transform: translateX(-50%);
}

.app-shell.has-scene .suggestion-row {
  position: fixed;
  left: 50%;
  bottom: calc(clamp(22px, 4.2vh, 48px) + 76px);
  z-index: 12;
  width: min(680px, calc(100vw - 44px));
  transform: translateX(-50%);
  justify-content: center;
  gap: 4px;
}

.app-shell.has-scene .evidence-zone {
  position: fixed;
  grid-area: auto;
  align-self: auto;
  left: clamp(24px, 6vw, 100px);
  top: clamp(370px, 48vh, 430px);
  bottom: auto;
  z-index: 6;
  width: min(470px, 38vw);
  min-height: 0;
  display: block;
}

.app-shell.has-scene .detail-zone,
.supporting-cases {
  display: none;
}

.proof-reveal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1fr);
  align-items: end;
  gap: 16px;
  cursor: pointer;
  animation: proofArrive 480ms ease both;
}

.proof-reveal.is-text-only {
  max-width: 330px;
  grid-template-columns: 1fr;
  border-left: 1px solid rgba(125, 244, 209, 0.32);
  padding-left: 14px;
}

.proof-reveal .case-media {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(244, 239, 229, 0.12);
  border-radius: 4px;
  background: #080808;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.52);
}

.proof-reveal .case-media.is-abstract {
  align-content: end;
  padding: 14px;
}

.proof-reveal .case-media.is-abstract strong {
  font-size: 1.1rem;
}

.proof-reveal-copy {
  display: grid;
  gap: 7px;
  padding-bottom: 2px;
}

.proof-reveal-copy span {
  color: var(--signal);
  font-size: 0.64rem;
  font-weight: 780;
  text-transform: uppercase;
}

.proof-reveal-copy h2 {
  margin: 0;
  color: var(--paper);
  font-size: 1.15rem;
  line-height: 1.05;
}

.proof-reveal-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.app-shell.is-thinking .twin-plate img {
  transform: translate3d(var(--twin-shift-x), calc(var(--twin-shift-y) + 2.6vh), 80px) rotateY(var(--twin-rotate-y));
}

@keyframes proofArrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .gate-copy {
    bottom: 18px;
  }

  .gate-twin {
    padding-bottom: 22vh;
  }

  .gate-twin::before {
    bottom: 19.6vh;
    width: 86vw;
    height: 18vw;
  }

  .gate-twin img {
    width: min(76vw, 390px);
    max-width: 390px;
    max-height: 68svh;
  }

  .gate-stage::after,
  .app-shell[data-layout="encounter"] .void-stage::after,
  .app-shell.has-scene .void-stage::after {
    left: -45vw;
    right: -45vw;
    bottom: -34vh;
    height: 66vh;
  }

  .app-shell[data-layout="encounter"] .twin-plate {
    padding-bottom: 20vh;
  }

  .app-shell[data-layout="encounter"] .twin-plate::before {
    display: none;
  }

  .app-shell[data-layout="encounter"] .twin-zone::before,
  .app-shell.has-scene .twin-zone::before {
    bottom: 17.8vh;
    width: 86vw;
    height: 18vw;
  }

  .app-shell[data-layout="encounter"] .twin-plate img {
    width: min(76vw, 390px);
    max-width: 390px;
    max-height: 70svh;
  }

  .app-shell[data-layout="encounter"] .suggestion-row,
  .app-shell.has-scene .suggestion-row {
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
    mask-image: linear-gradient(90deg, black 0 88%, transparent);
  }

  .app-shell[data-layout="encounter"] .suggestion-row button,
  .app-shell.has-scene .suggestion-row button {
    width: auto;
    white-space: nowrap;
    text-align: center;
  }

  .app-shell.has-scene .twin-zone {
    transform: none;
    opacity: 0.26;
  }

  .app-shell.has-scene .twin-plate {
    justify-content: flex-end;
    padding: 0 4vw 28vh 0;
  }

  .app-shell.has-scene .twin-plate img {
    width: min(70vw, 350px);
    max-width: 390px;
  }

  .app-shell.has-scene .twin-zone::before {
    left: 72%;
  }

  .app-shell.has-scene .conversation-zone {
    left: 18px;
    top: 58px;
    width: calc(100vw - 36px);
  }

  .app-shell.has-scene #stageReply {
    max-width: 90%;
    font-size: 1.22rem;
  }

  .app-shell.has-scene .evidence-zone {
    left: 18px;
    top: auto;
    bottom: 184px;
    width: min(390px, calc(100vw - 36px));
  }

  .proof-reveal {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
  }

  .proof-reveal-copy p {
    display: none;
  }

  .prompt-row,
  .app-shell[data-layout="encounter"] .prompt-row,
  .app-shell.has-scene .prompt-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .prompt-row button {
    padding: 0 14px;
  }

  .app-shell[data-layout="encounter"] .conversation-zone {
    bottom: 10px;
    width: calc(100vw - 20px);
    transform: translateX(-50%);
  }

  .app-shell[data-layout="encounter"] .suggestion-row {
    bottom: 88px;
    width: calc(100vw - 20px);
    transform: translateX(-50%);
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .app-shell.has-scene .conversation-zone {
    top: 54px;
  }

  .app-shell.has-scene .evidence-zone {
    bottom: 154px;
  }

  .app-shell.has-scene #stageReply {
    font-size: 1.2rem;
  }
}

/* Silver spatial world and scene choreography. */
:root {
  --void: #c7c9cc;
  --void-soft: #d9dbde;
  --ink: #15181b;
  --paper: #15181b;
  --paper-soft: rgba(21, 24, 27, 0.72);
  --muted: rgba(21, 24, 27, 0.5);
  --line: rgba(21, 24, 27, 0.16);
  --line-strong: rgba(21, 24, 27, 0.32);
  --signal: #245d78;
  --signal-deep: #c5e3ea;
  --panel: rgba(245, 246, 247, 0.72);
  --panel-solid: #edf0f2;
  --shadow: 0 28px 90px rgba(39, 44, 49, 0.2);
}

html,
body {
  background: var(--void);
  color: var(--paper);
}

body::before {
  background:
    radial-gradient(ellipse at 50% 32%, rgba(255, 255, 255, 0.58), transparent 40%),
    linear-gradient(120deg, #969da3 0%, #d7dadd 48%, #9ca3a9 100%);
}

body::after {
  opacity: 0.07;
  mix-blend-mode: multiply;
}

.gate-shell,
.app-shell {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.62), transparent 36%),
    linear-gradient(125deg, #979ea4 0%, #d7dade 48%, #9fa6ac 100%);
}

.app-shell::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 30%, rgba(255, 255, 255, 0.1) 70%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 36%, rgba(53, 64, 70, 0.08) 100%);
}

.gate-stage::before,
.app-shell[data-layout="encounter"] .void-stage::before,
.app-shell.has-scene .void-stage::before {
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(255, 255, 255, 0.35) 49.7%, rgba(36, 93, 120, 0.12) 50%, rgba(255, 255, 255, 0.35) 50.3%, transparent 78%),
    radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.7), transparent 38%),
    radial-gradient(ellipse at 50% 44%, rgba(60, 70, 76, 0.1), transparent 62%);
}

.gate-stage::after,
.app-shell[data-layout="encounter"] .void-stage::after,
.app-shell.has-scene .void-stage::after {
  background:
    radial-gradient(ellipse at center, transparent 0 23%, rgba(36, 93, 120, 0.35) 23.2% 23.45%, transparent 23.7% 100%),
    radial-gradient(ellipse at center, transparent 0 39%, rgba(45, 51, 55, 0.22) 39.15% 39.35%, transparent 39.6% 100%),
    radial-gradient(ellipse at center, transparent 0 56%, rgba(45, 51, 55, 0.12) 56.15% 56.35%, transparent 56.6% 100%),
    repeating-linear-gradient(90deg, rgba(45, 51, 55, 0.12) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(45, 51, 55, 0.12) 0 1px, transparent 1px 76px);
  opacity: 0.46;
}

.gate-twin,
.app-shell[data-layout="encounter"] .twin-zone,
.app-shell.has-scene .twin-zone {
  background: radial-gradient(ellipse 35% 70% at 50% 45%, rgba(255, 255, 255, 0.58), transparent 76%);
}

.gate-twin::before,
.app-shell[data-layout="encounter"] .twin-zone::before,
.app-shell.has-scene .twin-zone::before {
  border-color: rgba(36, 93, 120, 0.32);
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.54), rgba(92, 101, 108, 0.18) 62%, transparent 72%);
  box-shadow:
    inset 0 4px 22px rgba(255, 255, 255, 0.34),
    0 24px 70px rgba(50, 58, 63, 0.2),
    0 0 40px rgba(36, 93, 120, 0.12);
}

.gate-twin img,
.app-shell[data-layout="encounter"] .twin-plate img,
.app-shell.has-scene .twin-plate img {
  filter:
    contrast(1.03)
    saturate(0.95)
    drop-shadow(0 52px 70px rgba(45, 51, 55, 0.28))
    drop-shadow(0 0 24px rgba(255, 255, 255, 0.3));
}

.twin-plate img.is-changing {
  opacity: 0;
  transform: translate3d(var(--twin-shift-x), calc(var(--twin-shift-y) + 4vh), 50px) scale(0.985) rotateY(var(--twin-rotate-y));
}

.gate-id,
.top-actions a,
.top-actions button,
.app-shell.has-scene #stageReply {
  color: var(--paper);
}

.top-actions a,
.top-actions button {
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.55);
}

.password-row,
.app-shell[data-layout="encounter"] .prompt-row,
.app-shell.has-scene .prompt-row {
  border-color: rgba(21, 24, 27, 0.16);
  background: rgba(238, 240, 242, 0.7);
  box-shadow:
    0 24px 70px rgba(39, 44, 49, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input {
  border-color: rgba(21, 24, 27, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.login-form button,
.prompt-form button {
  background: #202428;
  color: #f5f6f7;
}

.app-shell[data-layout="encounter"] .suggestion-row button,
.app-shell.has-scene .suggestion-row button {
  color: rgba(21, 24, 27, 0.64);
}

.app-shell[data-layout="encounter"] .suggestion-row button:hover,
.app-shell.has-scene .suggestion-row button:hover {
  color: #111416;
}

.app-shell.has-scene .conversation-zone,
.app-shell.has-scene .evidence-zone,
.app-shell.has-scene .twin-plate,
.app-shell.has-scene .twin-zone::before {
  transition:
    left 760ms cubic-bezier(0.2, 0.75, 0.2, 1),
    right 760ms cubic-bezier(0.2, 0.75, 0.2, 1),
    width 760ms cubic-bezier(0.2, 0.75, 0.2, 1),
    padding 760ms cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 420ms ease,
    transform 760ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.app-shell.has-scene .twin-plate {
  justify-content: flex-end;
  padding: 0 clamp(42px, 7vw, 110px) 7vh 0;
}

.app-shell.has-scene .twin-zone {
  width: auto;
  min-height: 0;
  right: 0;
  bottom: 0;
}

.app-shell.has-scene .twin-plate img {
  width: min(24vw, 340px);
  max-width: 340px;
  max-height: 62svh;
}

.app-shell.has-scene .twin-zone::before {
  left: 84%;
  bottom: 5.6vh;
  width: min(25vw, 360px);
  height: min(5vw, 72px);
}

.app-shell.has-scene .conversation-zone {
  left: clamp(28px, 5vw, 84px);
  right: auto;
  top: clamp(54px, 7vh, 76px);
  width: min(650px, 48vw);
}

.app-shell.has-scene .evidence-zone {
  left: clamp(28px, 5vw, 84px);
  right: auto;
  top: clamp(300px, 37vh, 350px);
  width: min(500px, 39vw);
}

.app-shell[data-scene-side="right"].has-scene .conversation-zone {
  left: auto;
  right: clamp(28px, 5vw, 84px);
}

.app-shell[data-scene-side="right"].has-scene .evidence-zone {
  left: auto;
  right: clamp(28px, 5vw, 84px);
}

.app-shell[data-scene-side="right"].has-scene .twin-plate {
  justify-content: flex-start;
  padding: 0 0 7vh clamp(42px, 7vw, 110px);
}

.app-shell[data-scene-side="right"].has-scene .twin-zone::before {
  left: 16%;
}

.proof-reveal {
  cursor: default;
}

.proof-reveal .case-media {
  border-color: rgba(21, 24, 27, 0.14);
  background: #1d2023;
  box-shadow: 0 24px 70px rgba(39, 44, 49, 0.24);
}

.proof-reveal-copy span {
  color: var(--signal);
}

.proof-reveal-copy h2 {
  color: var(--paper);
}

.proof-reveal-copy p {
  color: var(--paper-soft);
}

.app-shell.has-cinematic-proof .conversation-zone {
  width: min(720px, 53vw);
}

.app-shell.has-cinematic-proof .evidence-zone {
  top: clamp(325px, 37vh, 345px);
  width: min(760px, 54vw);
  z-index: 8;
}

.app-shell.has-cinematic-proof .twin-plate img {
  width: min(20vw, 280px);
  max-width: 280px;
  max-height: 53svh;
}

.app-shell.has-cinematic-proof .twin-zone::before {
  width: min(21vw, 300px);
}

.proof-reveal.is-cinematic {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.proof-reveal.is-cinematic .case-media {
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
}

.proof-reveal.is-cinematic video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.case-media.has-video {
  position: relative;
}

.case-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  background: rgba(22, 25, 28, 0.78);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.case-play:hover {
  transform: translate(-50%, -50%) scale(1.05);
  background: rgba(22, 25, 28, 0.92);
}

.case-play span {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #fff;
}

.case-media.has-video.is-playing .case-play {
  pointer-events: none;
  opacity: 0;
}

.proof-reveal.is-cinematic .proof-reveal-copy {
  display: none;
}

@media (max-width: 820px) {
  .gate-twin,
  .app-shell[data-layout="encounter"] .twin-zone,
  .app-shell.has-scene .twin-zone {
    background: radial-gradient(ellipse 78% 66% at 50% 45%, rgba(255, 255, 255, 0.52), transparent 80%);
  }

  .app-shell.has-scene .conversation-zone,
  .app-shell[data-scene-side="right"].has-scene .conversation-zone {
    left: 18px;
    right: auto;
    top: 54px;
    width: calc(100vw - 36px);
  }

  .app-shell.has-scene .twin-plate,
  .app-shell[data-scene-side="right"].has-scene .twin-plate {
    justify-content: flex-end;
    padding: 0 2vw 25vh 0;
  }

  .app-shell.has-scene .twin-plate img,
  .app-shell.has-cinematic-proof .twin-plate img {
    width: min(46vw, 210px);
    max-width: 210px;
    max-height: 48svh;
  }

  .app-shell.has-scene .twin-zone {
    display: flex;
    opacity: 0.38;
  }

  .app-shell.has-scene .twin-zone::before,
  .app-shell[data-scene-side="right"].has-scene .twin-zone::before {
    left: 76%;
    bottom: 23vh;
    width: 48vw;
    height: 11vw;
  }

  .app-shell.has-scene .evidence-zone,
  .app-shell[data-scene-side="right"].has-scene .evidence-zone {
    left: 18px;
    right: auto;
    top: auto;
    bottom: 178px;
    width: calc(100vw - 36px);
  }

  .app-shell.has-cinematic-proof .evidence-zone,
  .app-shell[data-scene-side="right"].has-cinematic-proof .evidence-zone {
    top: auto;
    bottom: 176px;
    width: calc(100vw - 36px);
  }

  .app-shell.has-cinematic-proof .twin-zone {
    opacity: 0.72;
  }

  .app-shell.has-cinematic-proof .twin-plate,
  .app-shell[data-scene-side="right"].has-cinematic-proof .twin-plate {
    padding: 0 1vw 49vh 0;
  }

  .app-shell.has-cinematic-proof .twin-plate img {
    width: min(38vw, 160px);
    max-width: 160px;
    max-height: 32svh;
  }

  .app-shell.has-cinematic-proof .twin-zone::before,
  .app-shell[data-scene-side="right"].has-cinematic-proof .twin-zone::before {
    left: 77%;
    bottom: 47vh;
    width: 38vw;
    height: 9vw;
  }

  .proof-reveal.is-cinematic .proof-reveal-copy {
    display: none;
  }

  .proof-reveal.is-cinematic .case-media {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .proof-reveal.is-cinematic {
    min-width: 0;
  }
}

/* Graphite spatial world and content-first case-study stage. */
:root {
  --void: #202429;
  --void-soft: #373d43;
  --ink: #f4f4f1;
  --paper: #f4f4f1;
  --paper-soft: rgba(244, 244, 241, 0.74);
  --muted: rgba(244, 244, 241, 0.5);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.28);
  --signal: #a9d9e5;
  --signal-deep: #d8f0f5;
  --panel: rgba(21, 24, 27, 0.78);
  --panel-solid: #1b1f23;
  --shadow: 0 32px 100px rgba(0, 0, 0, 0.46);
}

html,
body {
  background: var(--void);
  color: var(--paper);
}

body::before {
  background:
    radial-gradient(ellipse at 50% 33%, rgba(188, 199, 207, 0.28), transparent 38%),
    linear-gradient(120deg, #111417 0%, #343a40 48%, #13171a 100%);
}

.gate-shell,
.app-shell {
  background:
    radial-gradient(ellipse at 50% 34%, rgba(186, 198, 207, 0.3), transparent 38%),
    linear-gradient(125deg, #121619 0%, #343a40 48%, #14181b 100%);
}

.app-shell::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 29%, rgba(255, 255, 255, 0.045) 70%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 38%, rgba(0, 0, 0, 0.22) 100%);
}

.gate-stage::before,
.app-shell[data-layout="encounter"] .void-stage::before,
.app-shell.has-scene .void-stage::before {
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(220, 232, 238, 0.08) 49.75%, rgba(169, 217, 229, 0.18) 50%, rgba(220, 232, 238, 0.08) 50.25%, transparent 78%),
    radial-gradient(ellipse at 50% 40%, rgba(190, 202, 210, 0.23), transparent 38%),
    radial-gradient(ellipse at 50% 44%, rgba(0, 0, 0, 0.2), transparent 66%);
}

.gate-stage::after,
.app-shell[data-layout="encounter"] .void-stage::after,
.app-shell.has-scene .void-stage::after {
  background:
    radial-gradient(ellipse at center, transparent 0 23%, rgba(169, 217, 229, 0.22) 23.2% 23.42%, transparent 23.68% 100%),
    radial-gradient(ellipse at center, transparent 0 39%, rgba(220, 232, 238, 0.13) 39.15% 39.35%, transparent 39.6% 100%),
    radial-gradient(ellipse at center, transparent 0 56%, rgba(220, 232, 238, 0.08) 56.15% 56.35%, transparent 56.6% 100%),
    repeating-linear-gradient(90deg, rgba(220, 232, 238, 0.07) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(220, 232, 238, 0.07) 0 1px, transparent 1px 76px);
  opacity: 0.52;
}

.gate-twin,
.app-shell[data-layout="encounter"] .twin-zone,
.app-shell.has-scene .twin-zone {
  background: radial-gradient(ellipse 36% 70% at 50% 44%, rgba(173, 187, 196, 0.24), transparent 76%);
}

.gate-twin::before,
.app-shell[data-layout="encounter"] .twin-zone::before,
.app-shell.has-scene .twin-zone::before {
  border-color: rgba(169, 217, 229, 0.26);
  background: radial-gradient(ellipse at center, rgba(180, 196, 205, 0.2), rgba(9, 12, 14, 0.56) 64%, transparent 74%);
  box-shadow:
    inset 0 4px 22px rgba(220, 232, 238, 0.12),
    0 28px 80px rgba(0, 0, 0, 0.45),
    0 0 44px rgba(169, 217, 229, 0.08);
}

.gate-twin img,
.app-shell[data-layout="encounter"] .twin-plate img,
.app-shell.has-scene .twin-plate img {
  filter: drop-shadow(0 38px 52px rgba(0, 0, 0, 0.42));
}

.gate-id,
.top-actions a,
.top-actions button,
.app-shell.has-scene #stageReply {
  color: var(--paper);
}

.top-actions a,
.top-actions button {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.68);
}

.password-row,
.app-shell[data-layout="encounter"] .prompt-row,
.app-shell.has-scene .prompt-row {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(18, 21, 24, 0.76);
  box-shadow:
    0 24px 76px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

input {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(238, 241, 242, 0.92);
  color: #171a1d;
}

.login-form button,
.prompt-form button {
  background: #e7e9e9;
  color: #16191c;
}

.app-shell[data-layout="encounter"] .suggestion-row button,
.app-shell.has-scene .suggestion-row button {
  color: rgba(244, 244, 241, 0.6);
}

.app-shell[data-layout="encounter"] .suggestion-row button:hover,
.app-shell.has-scene .suggestion-row button:hover {
  color: #fff;
}

/* Proof owns the room. Werner and the conversation support it. */
.app-shell.has-scene .conversation-zone,
.app-shell[data-scene-side="right"].has-scene .conversation-zone {
  top: clamp(58px, 6.5vh, 72px);
  bottom: auto;
  width: min(68vw, 1040px);
  max-height: 116px;
  gap: 7px;
  overflow: hidden;
}

.app-shell.has-scene .conversation-zone {
  left: clamp(24px, 4vw, 64px);
  right: auto;
}

.app-shell[data-scene-side="right"].has-scene .conversation-zone {
  left: auto;
  right: clamp(24px, 4vw, 64px);
}

.app-shell.has-scene #stageReply {
  max-width: min(68vw, 1040px);
  font-size: clamp(1.05rem, 1.55vw, 1.42rem);
  line-height: 1.3;
  text-wrap: pretty;
}

.app-shell.has-scene .evidence-zone,
.app-shell[data-scene-side="right"].has-scene .evidence-zone {
  top: clamp(184px, 21vh, 210px);
  bottom: 148px;
  width: min(70vw, 1120px);
  height: auto;
  min-height: 300px;
  display: block;
}

.app-shell.has-scene .evidence-zone {
  left: clamp(24px, 4vw, 64px);
  right: auto;
}

.app-shell[data-scene-side="right"].has-scene .evidence-zone {
  left: auto;
  right: clamp(24px, 4vw, 64px);
}

.app-shell.has-scene .proof-reveal {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.app-shell.has-visual-proof .proof-reveal .case-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.18);
  background: #0f1214;
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.app-shell.has-visual-proof .proof-reveal video,
.app-shell.has-visual-proof .proof-reveal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f1214;
}

.app-shell.has-visual-proof .proof-reveal-copy {
  display: none;
}

.app-shell.has-text-proof .proof-reveal {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.app-shell.has-text-proof .proof-reveal.is-text-only {
  max-width: none;
  padding-left: 0;
  border-left: 0;
}

.app-shell.has-text-proof .proof-reveal .case-media {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  padding: clamp(24px, 4vw, 60px);
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 70% 20%, rgba(169, 217, 229, 0.13), transparent 34%),
    linear-gradient(90deg, transparent 0 68%, rgba(255, 255, 255, 0.035) 68% 68.1%, transparent 68.1%),
    linear-gradient(145deg, rgba(41, 47, 52, 0.94), rgba(13, 16, 18, 0.96));
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.46);
}

.app-shell.has-text-proof .proof-reveal .case-media.is-abstract strong {
  max-width: 9ch;
  margin-top: 12px;
  font-size: clamp(3.4rem, 7.2vw, 8.2rem);
  line-height: 0.88;
}

.app-shell.has-text-proof .proof-reveal .case-media.is-abstract span,
.app-shell.has-text-proof .proof-reveal .case-media.is-abstract small {
  font-size: 0.72rem;
  letter-spacing: 0;
}

.app-shell.has-text-proof .proof-reveal .case-media.is-abstract small {
  margin-top: 18px;
}

.app-shell.has-text-proof .proof-reveal-copy {
  position: absolute;
  right: clamp(22px, 3vw, 46px);
  bottom: clamp(22px, 3vw, 46px);
  width: min(28%, 310px);
  align-self: auto;
  gap: 12px;
  padding: 18px 0 4px 18px;
  border-left: 1px solid rgba(169, 217, 229, 0.34);
}

.app-shell.has-text-proof .proof-reveal-copy h2 {
  display: none;
}

.app-shell.has-text-proof .proof-reveal-copy p {
  color: var(--paper-soft);
  font-size: clamp(0.82rem, 0.95vw, 1rem);
  line-height: 1.5;
}

.app-shell.has-scene .twin-zone {
  opacity: 1;
  z-index: 5;
}

.app-shell.has-scene .twin-plate,
.app-shell[data-scene-side="right"].has-scene .twin-plate {
  padding-bottom: 13vh;
}

.app-shell.has-scene .twin-plate {
  justify-content: flex-end;
  padding-right: clamp(30px, 5vw, 76px);
  padding-left: 0;
}

.app-shell[data-scene-side="right"].has-scene .twin-plate {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: clamp(30px, 5vw, 76px);
}

.app-shell.has-scene .twin-plate img,
.app-shell.has-cinematic-proof .twin-plate img {
  width: min(17vw, 235px);
  max-width: 235px;
  max-height: 48svh;
}

.app-shell.has-scene .twin-zone::before {
  left: 88%;
  bottom: 11.5vh;
  width: min(18vw, 250px);
  height: min(4vw, 58px);
}

.app-shell[data-scene-side="right"].has-scene .twin-zone::before {
  left: 12%;
}

.app-shell.has-scene .prompt-form {
  bottom: 20px;
  width: min(620px, calc(100vw - 44px));
}

.app-shell.has-scene .suggestion-row {
  bottom: 86px;
  width: min(760px, calc(100vw - 44px));
  gap: 10px;
}

.app-shell.has-scene .suggestion-row button {
  color: rgba(244, 244, 241, 0.64);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.proof-reveal.is-cinematic .case-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
}

.proof-reveal.is-cinematic video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-shell.has-cinematic-proof .evidence-zone,
.app-shell[data-scene-side="right"].has-cinematic-proof .evidence-zone {
  top: clamp(164px, 18vh, 182px);
  bottom: auto;
  width: min(76vw, calc((100svh - 270px) * 16 / 9), 1240px);
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.app-shell.has-cinematic-proof .proof-reveal {
  height: auto;
  aspect-ratio: 16 / 9;
}

@media (max-width: 820px) {
  .app-shell.has-scene .conversation-zone,
  .app-shell[data-scene-side="right"].has-scene .conversation-zone {
    left: 16px;
    right: auto;
    top: 48px;
    width: calc(100vw - 32px);
    max-height: 154px;
  }

  .app-shell.has-scene #stageReply {
    max-width: 100%;
    font-size: 1.05rem;
    line-height: 1.28;
  }

  .app-shell.has-scene .evidence-zone,
  .app-shell[data-scene-side="right"].has-scene .evidence-zone,
  .app-shell.has-cinematic-proof .evidence-zone,
  .app-shell[data-scene-side="right"].has-cinematic-proof .evidence-zone {
    left: 16px;
    right: auto;
    top: 220px;
    bottom: 154px;
    width: calc(100vw - 32px);
    min-height: 220px;
  }

  .app-shell.has-cinematic-proof .evidence-zone,
  .app-shell[data-scene-side="right"].has-cinematic-proof .evidence-zone {
    top: 220px;
    bottom: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .app-shell.has-text-proof .proof-reveal {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell.has-text-proof .proof-reveal-copy {
    display: none;
  }

  .app-shell.has-text-proof .proof-reveal .case-media.is-abstract strong {
    font-size: clamp(2.2rem, 13vw, 4.6rem);
  }

  .app-shell.has-scene .twin-zone {
    display: none;
  }

  .app-shell.has-scene .prompt-form {
    bottom: 12px;
    width: calc(100vw - 20px);
  }

  .app-shell.has-scene .suggestion-row {
    bottom: 78px;
    width: calc(100vw - 20px);
  }
}

/* The answer belongs to the presenter; the proof occupies the opposite side. */
.app-shell[data-layout="encounter"] .prompt-form {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4.2vh, 48px);
  z-index: 12;
  width: min(680px, calc(100vw - 44px));
  margin: 0;
  transform: translateX(-50%);
}

@media (min-width: 821px) {
  .app-shell.has-scene .conversation-zone,
  .app-shell[data-scene-side="right"].has-scene .conversation-zone {
    top: clamp(64px, 8vh, 86px);
    bottom: auto;
    width: min(28vw, 440px);
    max-height: none;
    display: grid;
    gap: 8px;
    padding: clamp(16px, 1.7vw, 24px);
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(14, 17, 20, 0.82);
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px);
  }

  .app-shell.has-scene .conversation-zone {
    left: auto;
    right: clamp(26px, 4vw, 72px);
  }

  .app-shell[data-scene-side="right"].has-scene .conversation-zone {
    left: clamp(26px, 4vw, 72px);
    right: auto;
  }

  .app-shell.has-scene .conversation-zone::after {
    content: "";
    position: absolute;
    right: 70px;
    bottom: -9px;
    width: 17px;
    height: 17px;
    transform: rotate(45deg);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(14, 17, 20, 0.94);
  }

  .app-shell[data-scene-side="right"].has-scene .conversation-zone::after {
    left: 70px;
    right: auto;
  }

  .app-shell.has-scene .system-line {
    color: var(--signal);
    font-size: 0.63rem;
  }

  .app-shell.has-scene #stageReply {
    max-width: none;
    font-size: clamp(1rem, 1.12vw, 1.18rem);
    line-height: 1.42;
    text-wrap: pretty;
  }

  .app-shell.has-scene .evidence-zone,
  .app-shell[data-scene-side="right"].has-scene .evidence-zone {
    top: clamp(64px, 8vh, 86px);
    bottom: 142px;
    width: min(64vw, 1180px);
  }

  .app-shell.has-cinematic-proof .evidence-zone,
  .app-shell[data-scene-side="right"].has-cinematic-proof .evidence-zone {
    top: clamp(64px, 8vh, 86px);
    width: min(64vw, calc((100svh - 220px) * 16 / 9), 1240px);
  }

  .app-shell.has-scene .twin-plate img,
  .app-shell.has-cinematic-proof .twin-plate img {
    width: min(14vw, 190px);
    max-width: 190px;
    max-height: 40svh;
  }

  .app-shell.has-scene .twin-zone::before {
    width: min(15vw, 210px);
    height: min(3.4vw, 48px);
  }

  .app-shell.has-scene .suggestion-row {
    top: clamp(292px, 35vh, 340px);
    bottom: auto;
    width: min(28vw, 440px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    transform: none;
  }

  .app-shell.has-scene .suggestion-row {
    left: auto;
    right: clamp(26px, 4vw, 72px);
  }

  .app-shell[data-scene-side="right"].has-scene .suggestion-row {
    left: clamp(26px, 4vw, 72px);
    right: auto;
  }

  .app-shell.has-scene .suggestion-row button {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 5px;
    background: rgba(13, 16, 18, 0.62);
    color: rgba(244, 244, 241, 0.72);
    text-align: left;
    text-shadow: none;
    backdrop-filter: blur(14px);
  }

  .app-shell.has-scene .suggestion-row button:hover {
    border-color: rgba(169, 217, 229, 0.35);
    background: rgba(28, 34, 38, 0.82);
    color: #fff;
  }
}

@media (max-width: 820px) {
  .app-shell.has-scene .conversation-zone,
  .app-shell[data-scene-side="right"].has-scene .conversation-zone {
    max-height: none;
    padding: 12px 14px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: rgba(14, 17, 20, 0.76);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
  }

  .app-shell.has-scene #stageReply {
    font-size: 0.94rem;
    line-height: 1.32;
  }

  .app-shell.has-scene .evidence-zone,
  .app-shell[data-scene-side="right"].has-scene .evidence-zone,
  .app-shell.has-cinematic-proof .evidence-zone,
  .app-shell[data-scene-side="right"].has-cinematic-proof .evidence-zone {
    top: 250px;
  }
}

/* Replies arrive like Werner speaking, not like a page update. */
.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  animation: wordIn 300ms ease forwards;
}

@keyframes wordIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-shell.is-speaking .twin-plate img {
  filter:
    drop-shadow(0 38px 52px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 28px rgba(169, 217, 229, 0.22));
}

/* The chip row's translateZ projected it down into the prompt bar at desktop
   heights; the chips read better at true scale anyway. */
.app-shell[data-layout="encounter"] .suggestion-row {
  transform: translateX(-50%);
}

/* The greeting sits above the role chips and disappears once a scene exists. */
.encounter-hint {
  display: none;
}

.app-shell[data-layout="encounter"] .encounter-hint {
  display: block;
  position: absolute;
  left: 50%;
  bottom: calc(clamp(22px, 4.2vh, 48px) + 142px);
  z-index: 6;
  width: min(680px, calc(100vw - 44px));
  margin: 0;
  transform: translateX(-50%);
  color: rgba(244, 244, 241, 0.66);
  font-size: 0.88rem;
  text-align: center;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* The presenter's disc breathes so the room never feels frozen. */
.app-shell[data-layout="encounter"] .twin-zone::before,
.app-shell.has-scene .twin-zone::before,
.gate-twin::before {
  animation: discBreath 5.2s ease-in-out infinite;
}

.app-shell.is-thinking .twin-zone::before {
  animation-duration: 1.7s;
}

@keyframes discBreath {
  0%, 100% {
    opacity: 0.82;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.045);
  }
}

/* Werner stays in the room on mobile, small and to the side of the proof. */
@media (max-width: 820px) {
  .app-shell.has-scene .twin-zone {
    display: flex;
    opacity: 0.94;
    z-index: 4;
  }

  .app-shell.has-scene .twin-plate,
  .app-shell[data-scene-side="right"].has-scene .twin-plate {
    justify-content: flex-end;
    padding: 0 10px 152px 0;
  }

  .app-shell.has-scene .twin-plate img,
  .app-shell.has-cinematic-proof .twin-plate img {
    width: min(25vw, 104px);
    max-width: 104px;
    max-height: 24svh;
  }

  .app-shell.has-scene .twin-zone::before,
  .app-shell[data-scene-side="right"].has-scene .twin-zone::before {
    display: none;
  }

  .app-shell[data-layout="encounter"] .encounter-hint {
    bottom: 142px;
    width: calc(100vw - 28px);
    font-size: 0.82rem;
  }
}

/* After enough proof, the room offers the handshake. */
.suggestion-row .contact-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(169, 217, 229, 0.42);
  border-radius: 5px;
  background: rgba(169, 217, 229, 0.1);
  color: var(--signal);
  font-size: 0.8rem;
  font-weight: 740;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.suggestion-row .contact-chip:hover {
  border-color: rgba(169, 217, 229, 0.8);
  background: rgba(169, 217, 229, 0.18);
  color: #fff;
}

@media (min-width: 821px) {
  .app-shell.has-scene .suggestion-row .contact-chip {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    backdrop-filter: blur(14px);
  }
}

/* ==========================================================================
   DE-BOX LAYER — the room is a void with a presenter, not a dashboard of cards.
   The reply reads as a floating caption, the options as a quiet list, and the
   proof floats on the dark instead of sitting inside hard frames.
   ========================================================================== */

/* The reply: no card, no border, no tail — just light text on a feathered scrim. */
.app-shell.has-scene .conversation-zone,
.app-shell[data-scene-side="right"].has-scene .conversation-zone {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  overflow: visible;
}

.app-shell.has-scene .conversation-zone::after,
.app-shell.has-scene .conversation-zone::before {
  display: none;
}

@media (min-width: 821px) {
  .app-shell.has-scene .conversation-zone,
  .app-shell[data-scene-side="right"].has-scene .conversation-zone {
    width: min(30vw, 460px);
    gap: 10px;
  }

  /* The cinema film is wide; keep the reply in the clear right gutter so the
     film never paints over the first words of each line. */
  .app-shell.has-cinematic-proof .conversation-zone,
  .app-shell[data-scene-side="right"].has-cinematic-proof .conversation-zone {
    left: auto;
    right: clamp(20px, 2.4vw, 44px);
    width: min(26vw, 380px);
  }

  .app-shell.has-scene #stageReply {
    font-size: clamp(1.12rem, 1.4vw, 1.46rem);
    line-height: 1.4;
  }
}

/* No scrim shape — legibility comes from a soft text halo so the caption reads
   anywhere on the stage, even over the centre spotlight, without a visible box. */
.app-shell.has-scene #stageReply {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 30px rgba(0, 0, 0, 0.65);
}

.app-shell.has-scene .system-line {
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 1px 16px rgba(0, 0, 0, 0.7);
}

/* The suggestions: a quiet list of openings with a small tick, not buttons. */
.app-shell.has-scene .suggestion-row button {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 5px 0 5px 18px;
  color: rgba(244, 244, 241, 0.64);
  text-align: left;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
  transition: color 180ms ease;
}

.app-shell.has-scene .suggestion-row button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 9px;
  height: 1px;
  background: var(--signal);
  opacity: 0.6;
  transform: translateY(-50%);
  transition: width 200ms ease, opacity 200ms ease;
}

.app-shell.has-scene .suggestion-row button:hover {
  background: transparent;
  border-color: transparent;
  color: #fff;
  transform: none;
}

.app-shell.has-scene .suggestion-row button:hover::before {
  width: 16px;
  opacity: 1;
}

/* The proof: a soft floating frame, not a hard-edged panel. */
.app-shell.has-visual-proof .proof-reveal .case-media {
  border: 0;
  border-radius: 10px;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.05);
}

/* Text-led proof floats on the void: the headline is the hero, no panel around it. */
.app-shell.has-text-proof .proof-reveal .case-media {
  border: 0;
  box-shadow: none;
  background:
    radial-gradient(120% 90% at 22% 18%, rgba(169, 217, 229, 0.12), transparent 46%),
    radial-gradient(140% 120% at 30% 50%, rgba(6, 8, 10, 0.46), transparent 70%);
}

.app-shell.has-text-proof .proof-reveal .case-media.is-abstract strong {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}

/* Soften the input bar so it reads as a quiet field, not a heavy box. */
.app-shell.has-scene .prompt-row,
.app-shell[data-layout="encounter"] .prompt-row {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Werner gets a slow, living idle: a breath the eye barely registers.
   Uses the independent `translate` property so it composes with the
   `transform`-based parallax and pose-swap instead of overwriting them. */
.app-shell.has-scene .twin-plate img,
.app-shell[data-layout="encounter"] .twin-plate img,
.gate-twin img {
  animation: twinBreath 6.5s ease-in-out infinite;
}

@keyframes twinBreath {
  0%, 100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -0.7%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell.has-scene .twin-plate img,
  .app-shell[data-layout="encounter"] .twin-zone::before,
  .app-shell.has-scene .twin-zone::before,
  .gate-twin::before {
    animation: none;
  }
}

/* Final authority for the desktop scene composition. #app-scoped selectors
   outrank every legacy class rule regardless of source order. Three zones that
   never collide: proof (large), the reply (right gutter), Werner (bottom-right
   corner), and the suggestions as a quiet bottom-centre row. */
@media (min-width: 821px) {
  #app.has-cinematic-proof .conversation-zone,
  #app[data-scene-side="right"].has-cinematic-proof .conversation-zone {
    left: auto;
    right: clamp(20px, 2.4vw, 44px);
    width: min(27vw, 400px);
  }

  /* Suggestions + contact chip sit centred along the bottom, never stacked down
     the right column over Werner. */
  #app.has-scene .suggestion-row,
  #app[data-scene-side="right"].has-scene .suggestion-row,
  #app.has-cinematic-proof .suggestion-row,
  #app[data-scene-side="right"].has-cinematic-proof .suggestion-row {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 92px;
    width: min(660px, calc(100vw - 520px));
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 18px;
  }

  #app.has-scene .suggestion-row button,
  #app.has-scene .suggestion-row .contact-chip {
    width: auto;
  }

  /* Keep Werner small and tucked in the corner so the proof and words own the room. */
  #app.has-scene .twin-plate img,
  #app.has-cinematic-proof .twin-plate img {
    width: min(12vw, 168px);
    max-height: 36svh;
  }
}
