/* МНЕМОС: a quiet archive terminal. The scene image is intentionally unchanged. */
:root { --text: #deded5; --muted: #a3aaa6; --dim: #929992; --ice: #b7c9c8; --amber: #c5aa78; --line: #353b36; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { overflow-x: clip; }
#overlay { max-width: 1440px; padding: 0 64px 28px; }
.site-header { height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 15px; color: var(--text); text-decoration: none; font: 700 24px 'Courier New', monospace; letter-spacing: .12em; }
.wordmark svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.3; }
.terminal-label { color: #a3aaa6; font: 12px 'Courier New', monospace; }
.terminal-label > span:last-child { margin-left: 18px; color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 28px; }
.language-switch { display: flex; gap: 2px; }
.language-switch button { min-width: 44px; min-height: 48px; padding: 8px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: none; color: var(--muted); font: 12px 'Courier New', monospace; }
.language-switch button[aria-pressed='true'] { border-bottom-color: var(--amber); color: var(--text); }
.language-switch button:hover { color: var(--text); background: #111710; }
.landing-hero { position: relative; isolation: isolate; min-height: 570px; display: flex; align-items: center; }
.landing-hero::after { content: ''; position: absolute; z-index: 0; inset: 0; pointer-events: none; opacity: .04; background: repeating-linear-gradient(transparent 0 3px, #a2aca2 3px 4px); }
.landing-art { position: absolute; z-index: -1; inset: 0 -64px 0 19%; margin: 0; pointer-events: none; }
.landing-art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; mask-image: linear-gradient(to right, transparent, #000 25%), linear-gradient(to bottom, transparent, #000 16%, #000 80%, transparent); mask-composite: intersect; }
.landing-art figcaption { position: absolute; right: 64px; bottom: 22px; font: 10px 'Courier New', monospace; color: #8d9995; }
.landing-copy { position: relative; z-index: 1; width: min(100%, 670px); padding: 42px 0 48px; }
.protocol-label { display: flex; align-items: center; gap: 12px; width: fit-content; margin: 0 0 28px; color: var(--amber); font: 12px 'Courier New', monospace; text-transform: uppercase; letter-spacing: .04em; }
.protocol-signal { width: 7px; height: 7px; flex: 0 0 7px; background: currentColor; }
.protocol-number { border-left: 1px solid #64583f; padding-left: 12px; }
.landing-copy h1 { display: inline-block; font-family: 'Arial Black', 'Arial', sans-serif; font-size: clamp(64px, 8vw, 112px); font-weight: 900; letter-spacing: -.065em; line-height: 1; margin: 0 0 24px -5px; color: #deded5; }
.landing-description { max-width: 395px; margin: 0; color: #b7bcb4; font: 18px/1.5 'Courier New', monospace; }
.device-gate { margin-top: 44px; max-width: 430px; }
.gate-heading h2 { font: 14px 'Courier New', monospace; font-weight: 700; letter-spacing: 0; }
#gate-description { margin: 10px 0 20px; font-size: 13px; line-height: 1.65; color: #a3aaa6; }
.gate-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.copy-button, .quest-continue { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 0 20px; border: 1px solid #deded5; border-radius: 0; background: #deded5; color: #131813; font: 700 13px 'Courier New', monospace; text-decoration: none; }
.copy-button:hover, .quest-continue:hover { background: #f7f6e9; border-color: #f7f6e9; }
.copy-button:active, .quest-continue:active { background: var(--amber); }
.copy-button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.no-install { font: 11px 'Courier New', monospace; color: #a3aaa6; }
.gate-feedback { margin: 12px 0 0; font-size: 12px; color: var(--ice); line-height: 1.6; }
.gate-feedback:empty { display: none; }
#manual-copy { margin-top: 12px; font-size: 12px; color: var(--muted); }
#manual-copy label { display: block; margin-bottom: 6px; }
#manual-copy input { width: 100%; min-height: 44px; padding: 8px; background: #0d110d; color: var(--text); border: 1px solid var(--line); border-radius: 0; }
#manual-copy p { margin: 6px 0; }
#page-address:focus-visible, .credits summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
.quest-continue { margin-top: 38px; min-height: 52px; font-size: 14px; }
.quest-continue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.protocol-note { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0; padding: 22px 0; font: 12px/1.7 'Courier New', monospace; color: #a3aaa6; }
.landing-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 23px; color: #929992; font: 10px/1.7 'Courier New', monospace; }
.credits { max-width: 390px; text-align: right; }
.credits summary { cursor: pointer; text-decoration: underline; text-decoration-color: #565e55; text-underline-offset: 4px; }
.credits p { line-height: 1.7; }
.credits a { color: var(--muted); }
#quest-setup { max-width: 1040px; margin: 36px auto 0; padding-bottom: 15px; }
#quest-setup .mode-heading { margin-bottom: 20px; }
#quest-setup h2 { font: 700 18px 'Courier New', monospace; }
#quest-setup .preferences { gap: 28px; }
#quest-setup .preferences label { font-size: 12px; }
#quest-setup .preferences select { border-color: #434b43; border-radius: 0; font-size: 13px; }
#quest-setup .mode-button { padding: 20px 24px; border-color: #727c70; border-radius: 0; background: #080b08; }
#quest-setup .mode-button:not(:disabled):hover { background: #131913; border-color: var(--text); }
#quest-setup .mode-button strong { font: 700 17px 'Courier New', monospace; margin-bottom: 7px; }
#quest-setup .mode-button small { font-size: 12px; }
#quest-setup .mode-button svg { stroke: var(--text); }
#quest-setup .mode-button svg circle { fill: var(--text); }
#quest-setup .first-use { margin-top: 22px; }
#runtime-status { max-width: 1040px; margin: 12px auto 0; font-size: 12px; }
/* The launch screen needs no API prose. */
#overlay:not(.xr) #capabilities { display: none; }
html[data-device='quest'] .landing-hero { min-height: 440px; }
@media (min-width: 1550px) { .landing-hero { min-height: 650px; } }
@media (max-width: 1000px) {
  #overlay { padding: 0 35px 24px; }
  .landing-art { right: -35px; left: 10%; }
  .landing-art img { mask-image: linear-gradient(to right, transparent, #000 48%), linear-gradient(to bottom, transparent, #000 16%, #000 78%, transparent); }
  .landing-art figcaption { right: 35px; }
  .landing-description { max-width: 350px; }
}
@media (max-width: 620px) {
  #overlay { padding: 0 24px 22px; }
  .site-header { height: 82px; gap: 12px; }
  .wordmark { font-size: 19px; gap: 9px; letter-spacing: .07em; }
  .wordmark svg { width: 26px; height: 26px; }
  .terminal-label { display: none; }
  .header-tools { gap: 0; }
  .landing-hero { display: block; min-height: 0; padding-top: 238px; }
  .landing-art { inset: 0 -24px auto; height: 285px; }
  .landing-art img { object-position: 76% center; mask-image: linear-gradient(to bottom, #000 60%, transparent); }
  .landing-art figcaption { right: 24px; bottom: 60px; font-size: 9px; }
  .landing-copy { padding: 0 0 34px; }
  .protocol-label { margin-bottom: 17px; font-size: 10px; gap: 9px; }
  .protocol-number { padding-left: 9px; }
  .landing-copy h1 { font-size: clamp(47px, 12.5vw, 74px); margin: 0 0 17px -2px; letter-spacing: -.065em; }
  .landing-description { font-size: 14px; max-width: 330px; }
  .device-gate { margin-top: 30px; }
  .gate-heading h2 { font-size: 13px; }
  #gate-description { font-size: 12px; margin-bottom: 17px; }
  .gate-actions { gap: 15px; }
  .copy-button { font-size: 12px; padding: 0 13px; gap: 10px; }
  .no-install { font-size: 10px; }
  .quest-continue { font-size: 12px; width: 100%; padding: 0 12px; }
  .protocol-note { font-size: 11px; padding: 20px 0; }
  .landing-footer { font-size: 9px; align-items: start; gap: 12px; }
  .landing-footer > span { max-width: 200px; }
  .credits { max-width: 120px; }
  #quest-setup { margin-top: 28px; }
  #quest-setup .preferences { gap: 16px; }
  #quest-setup .mode-button { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.platform-note { margin: 23px 0 0; color: #a3aaa6; font: 12px/1.7 'Courier New', monospace; }
/* The closed field record reuses the room from the launch page, without
   repeating the XR glitch or moving the document underneath the visitor. */
#overlay[data-debrief='complete'] > :is(.landing-hero, .protocol-note, .status-area) { display: none; }
.ending-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 430px;
  margin: 22px 0 0;
  padding: 44px 40px 36px;
  border: 1px solid #39413c;
  background: #050807;
}
.ending-art { position: absolute; z-index: -2; inset: 0 0 0 auto; height: 100%; width: 78%; object-fit: cover; object-position: 79% center; opacity: .7; }
.ending-banner::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #050807 27%, #050807ed 43%, #05080736 78%), linear-gradient(0deg, #050807, transparent 40%); }
.ending-record { display: flex; align-items: center; gap: 12px; margin: 0 0 36px; font: 12px/1.5 'Courier New', monospace; color: #c5aa78; }
.ending-record svg { width: 44px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.ending-banner h2 { max-width: 680px; margin: 0 0 22px; color: #deded5; font: 900 clamp(40px, 5.7vw, 76px)/1.02 'Arial Black', Arial, sans-serif; letter-spacing: -.055em; text-wrap: balance; }
/* The heading receives reading focus; interactive links keep visible outlines. */
#ending-title:focus { outline: none; }
.ending-message { max-width: 360px; margin: 0 0 30px; font: 14px/1.7 'Courier New', monospace; color: #a3aaa6; }
.ending-socials { display: flex; flex-wrap: wrap; gap: 12px; }
.ending-socials a { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 18px; border: 1px solid #747d70; color: #deded5; background: #050807d9; font: 700 14px/1.4 'Courier New', monospace; text-decoration: none; }
.ending-socials a:first-child { color: #111610; background: #deded5; border-color: #deded5; }
.ending-socials a:hover { border-color: #c5aa78; background: #242a22; color: #deded5; }
.ending-socials svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ending-socials small { display: block; font-size: 11px; font-weight: 400; }
.ending-restart { display: block; min-height: 48px; margin: 18px 0 0; padding: 10px 0; border: 0; border-radius: 0; color: #a3aaa6; background: transparent; font: 12px/1.5 'Courier New', monospace; text-align: left; text-decoration: underline; text-underline-offset: 4px; }
.ending-restart:hover { color: #deded5; }
.ending-socials a:focus-visible, .ending-restart:focus-visible { outline: 2px solid #c5aa78; outline-offset: 5px; }
#start-heading { scroll-margin-top: 30px; }
@media (max-width: 620px) {
  .ending-banner { min-height: 0; margin-top: 12px; padding: 120px 22px 22px; }
  .ending-art { inset: 0 0 auto; width: 100%; height: 300px; object-position: 79% center; opacity: .65; }
  .ending-banner::before { background: linear-gradient(0deg, #050807 43%, #05080780 71%, #05080730); }
  .ending-record { margin-bottom: 22px; font-size: 11px; gap: 8px; }
  .ending-record svg { width: 32px; }
  .ending-banner h2 { font-size: clamp(37px, 9vw, 53px); margin-bottom: 18px; }
  .ending-message { font-size: 12px; margin-bottom: 22px; }
  .ending-socials { gap: 10px; }
  .ending-socials a { flex: 1 1 140px; padding: 11px 14px; }
  .ending-restart { margin-top: 14px; }
}
