:root {
  --ink: #050c0b;
  --ink-2: #0a1513;
  --paper: #f4f0e7;
  --muted: #91a09a;
  --line: rgba(234, 244, 239, 0.16);
  --line-strong: rgba(234, 244, 239, 0.3);
  --mint: #a8efd3;
  --signal: #ff5438;
  --signal-soft: rgba(255, 84, 56, 0.18);
  --blue: #93cfff;
  --topbar: 84px;
  --navbar: 94px;
  --sans: Inter, "Aptos", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Permitir copiar la información jurídica/legible del dossier (nombres de
   leyes, plazos, documentación), manteniendo la experiencia sin selección. */
.claim-dossier,
.evidence-card,
.alert-card,
.response-card,
.method-note,
.chapter-summary,
.claim-sources,
.claim-deadline,
.claim-disclaimer {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body {
  overscroll-behavior: none;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button,
[data-go] {
  cursor: pointer;
}

::selection {
  background: rgba(36, 229, 163, 0.35);
  color: var(--paper);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.experience {
  position: relative;
  width: 100%;
  height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 45%, rgba(26, 79, 66, 0.21), transparent 35%),
    linear-gradient(115deg, #07110f 0%, var(--ink) 58%, #06100e 100%);
}

.experience::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0.34;
  pointer-events: none;
  background: radial-gradient(circle at 72% 50%, rgba(64, 190, 148, 0.2), transparent 32%);
  mix-blend-mode: screen;
  transition:
    opacity 700ms ease,
    background 700ms ease;
}

.experience[data-scene="1"]::before {
  opacity: 0.4;
  background: radial-gradient(circle at 70% 48%, rgba(92, 178, 145, 0.24), transparent 31%);
}

.experience[data-scene="2"]::before {
  opacity: 0.58;
  background:
    radial-gradient(circle at 69% 47%, rgba(255, 55, 28, 0.3), transparent 25%),
    radial-gradient(circle at 80% 58%, rgba(255, 125, 61, 0.12), transparent 38%);
}

.experience[data-scene="3"]::before {
  opacity: 0.43;
  background:
    radial-gradient(circle at 70% 44%, rgba(121, 218, 255, 0.18), transparent 26%),
    radial-gradient(circle at 78% 56%, rgba(168, 239, 211, 0.22), transparent 38%);
}

.experience[data-scene="4"]::before {
  opacity: 0.58;
  background:
    radial-gradient(circle at 71% 42%, rgba(147, 207, 255, 0.22), transparent 24%),
    radial-gradient(circle at 82% 62%, rgba(168, 239, 211, 0.24), transparent 36%),
    linear-gradient(120deg, rgba(255, 84, 56, 0.08), transparent 48%);
}

.stage-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 900ms ease,
    filter 500ms ease,
    transform 1200ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.is-ready .stage-canvas {
  opacity: 1;
  transform: scale(1);
}

.is-analysis .stage-canvas {
  filter: contrast(1.12) saturate(0.78);
}

.fx-grid,
.fx-scan,
.fx-noise,
.fx-vignette,
.cursor-aura {
  position: absolute;
  pointer-events: none;
}

.fx-grid {
  z-index: 1;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(168, 239, 211, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 239, 211, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent 26%, #000 56%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 26%, #000 56%, #000 100%);
  transition: opacity 300ms ease;
}

.is-analysis .fx-grid {
  opacity: 0.34;
  background-size: 32px 32px;
}

.fx-scan {
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 61%;
  width: 1px;
  opacity: 0.42;
  background: linear-gradient(transparent, var(--mint) 25%, var(--mint) 75%, transparent);
  box-shadow: 0 0 24px rgba(168, 239, 211, 0.34);
  animation: scan-horizontal 8s ease-in-out infinite;
}

[data-scene="2"] .fx-scan {
  background: linear-gradient(transparent, var(--signal) 25%, var(--signal) 75%, transparent);
  box-shadow: 0 0 28px rgba(255, 84, 56, 0.5);
}

[data-scene="2"] .status-pulse {
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(255, 84, 56, 0.5);
}

.fx-noise {
  z-index: 7;
  inset: -50%;
  opacity: 0.033;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise 0.23s steps(2) infinite;
}

.fx-vignette {
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 11, 0.98) 0%, rgba(5, 12, 11, 0.88) 28%, transparent 62%),
    radial-gradient(circle at 70% 50%, transparent 0%, rgba(2, 8, 7, 0.08) 48%, rgba(2, 8, 7, 0.7) 100%);
}

.cursor-aura {
  z-index: 2;
  top: 0;
  left: 0;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(168, 239, 211, 0.07), transparent 68%);
  transform: translate(-50%, -50%);
  transition: opacity 250ms ease;
}

.experience:hover .cursor-aura {
  opacity: 1;
}

.scene-word {
  position: absolute;
  z-index: 2;
  right: -0.035em;
  bottom: calc(var(--navbar) + 0.02em);
  color: transparent;
  font-size: clamp(120px, 18vw, 340px);
  font-weight: 920;
  letter-spacing: -0.085em;
  line-height: 0.75;
  opacity: 0.17;
  pointer-events: none;
  -webkit-text-stroke: 1px rgba(168, 239, 211, 0.42);
  transform: translateX(8%);
  transition:
    opacity 500ms ease,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-text-stroke-color 500ms ease;
  white-space: nowrap;
}

[data-scene="2"] .scene-word {
  opacity: 0.22;
  -webkit-text-stroke-color: rgba(255, 84, 56, 0.52);
}

[data-scene="4"] .scene-word {
  opacity: 0.2;
  -webkit-text-stroke-color: rgba(147, 207, 255, 0.56);
}

.scene-word.is-changing {
  opacity: 0;
  transform: translateX(15%);
}

.scene-wipe {
  position: absolute;
  z-index: 80;
  inset: var(--topbar) 0 var(--navbar);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--ink);
  background:
    linear-gradient(110deg, transparent 0 8%, rgba(255, 255, 255, 0.22) 8% 8.2%, transparent 8.2% 100%),
    var(--mint);
  pointer-events: none;
  transform: translateX(-102%);
}

.scene-wipe::before,
.scene-wipe::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(5, 12, 11, 0.3);
}

.scene-wipe::before {
  left: 9%;
}

.scene-wipe::after {
  right: 9%;
}

.scene-wipe span {
  font-family: var(--serif);
  font-size: clamp(60px, 8vw, 130px);
  line-height: 1;
}

.scene-wipe strong {
  font-size: clamp(16px, 1.7vw, 28px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-wipe.is-active {
  animation: scene-wipe 820ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

.scene-wipe.is-risk {
  color: var(--paper);
  background:
    linear-gradient(110deg, transparent 0 8%, rgba(255, 255, 255, 0.2) 8% 8.2%, transparent 8.2% 100%),
    var(--signal);
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(22px, 3.6vw, 66px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 12, 11, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  text-decoration: none;
}

.brand-code {
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: var(--ink);
  background: var(--mint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.brand-room {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.brand-rule {
  width: 1px;
  height: 28px;
  margin: 0 5px;
  background: var(--line-strong);
}

.brand-name {
  color: #a2afa9;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
}

.experience-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  color: #899891;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.experience-status strong {
  margin-left: 10px;
  color: var(--paper);
  font-size: 12px;
}

.experience-status strong i {
  color: var(--mint);
  font-style: normal;
}

.status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: live-pulse 2s ease-out infinite;
}

.top-actions {
  min-width: 280px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.interface-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: #a9b5b0;
  background: rgba(5, 12, 11, 0.52);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.07em;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.interface-button:hover {
  color: var(--paper);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.interface-button[aria-pressed="true"] {
  color: var(--mint);
  border-color: rgba(168, 239, 211, 0.48);
  background: rgba(168, 239, 211, 0.08);
}

.interface-button-light {
  color: #030b08;
  border-color: #24e5a3;
  background: #24e5a3;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(36, 229, 163, 0.28);
}

.interface-button-light:hover {
  color: #030b08;
  border-color: #55f3be;
  background: #55f3be;
  box-shadow: 0 4px 14px rgba(36, 229, 163, 0.45);
  transform: translateY(-1px);
}

.button-dot {
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.interface-button[aria-pressed="true"] .button-dot {
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.chapter-viewport {
  position: absolute;
  z-index: 10;
  top: var(--topbar);
  right: 0;
  bottom: var(--navbar);
  left: 0;
}

.chapter {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(440px, 0.82fr) minmax(380px, 1.18fr);
  align-items: center;
  padding: clamp(14px, 2.5vh, 48px) clamp(20px, 4.5vw, 90px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(54px);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 620ms;
}

.chapter.from-left {
  transform: translateX(-54px);
}

.chapter.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}

.chapter-copy {
  position: relative;
  z-index: 3;
  width: min(100%, 720px);
}

.chapter-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 clamp(18px, 3vh, 34px);
  color: #a9b7b1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 280ms ease 20ms,
    transform 350ms ease 20ms;
}

.chapter-kicker span {
  color: var(--mint);
}

.chapter-kicker span::after {
  content: "";
  width: 26px;
  height: 1px;
  display: inline-block;
  margin-left: 13px;
  vertical-align: middle;
  background: currentColor;
}

.chapter-kicker-risk span {
  color: var(--signal);
}

.is-active .chapter-kicker {
  opacity: 1;
  transform: translateY(0);
}

.hero-title {
  margin: 0;
  font-size: clamp(54px, 6.7vw, 112px);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.78;
}

.hero-subject {
  display: block;
  max-width: 34ch;
  margin-bottom: 16px;
  color: var(--mint);
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.title-line {
  display: block;
  overflow: hidden;
  padding: 0 0 0.13em;
}

.title-line i {
  display: block;
  font-style: normal;
  transform: translateY(115%);
  transition: transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.title-line:nth-child(2) i {
  transition-delay: 50ms;
}

.title-line:nth-child(3) i {
  transition-delay: 100ms;
}

.is-active .title-line i {
  transform: translateY(0);
}

.title-line-accent {
  margin-top: 0.1em;
  color: var(--signal);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.055em;
}

.chapter h2 {
  margin: 0;
  font-size: clamp(52px, 5.5vw, 91px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.92;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 320ms ease 40ms,
    transform 400ms cubic-bezier(0.16, 1, 0.3, 1) 40ms;
}

.chapter h2 em {
  color: var(--mint);
  font-family: var(--serif);
  font-weight: 400;
}

[data-chapter="2"] h2 em {
  color: var(--signal);
}

.is-active h2 {
  opacity: 1;
  transform: translateY(0);
}

.chapter-summary {
  max-width: 590px;
  margin: clamp(19px, 3vh, 33px) 0 0;
  color: #d6e4de;
  font-size: clamp(14px, 1.18vw, 18px);
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 320ms ease 70ms,
    transform 400ms ease 70ms;
}

.is-active .chapter-summary {
  opacity: 1;
  transform: translateY(0);
}

.chapter-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: clamp(22px, 4vh, 44px);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 320ms ease 100ms,
    transform 400ms ease 100ms;
}

.is-active .chapter-actions {
  opacity: 1;
  transform: translateY(0);
}

.primary-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 0 21px;
  color: var(--paper);
  background: var(--signal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-action:hover {
  color: var(--ink);
  background: var(--mint);
  box-shadow: 0 15px 45px rgba(168, 239, 211, 0.12);
  transform: translateY(-2px);
}

.primary-action span {
  font-size: 16px;
  font-weight: 400;
}

.primary-action-final {
  color: var(--ink);
  background: var(--mint);
}

.text-action {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-strong);
  color: #a5b2ac;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.text-action:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.chapter-index {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 42%;
  color: transparent;
  font-size: clamp(230px, 32vw, 560px);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  -webkit-text-stroke: 1px rgba(168, 239, 211, 0.13);
  transform: translate(-50%, -46%) scale(0.88);
  transition:
    opacity 700ms ease,
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-index-risk {
  -webkit-text-stroke-color: rgba(255, 84, 56, 0.16);
}

.is-active .chapter-index {
  opacity: 1;
  transform: translate(-50%, -46%) scale(1);
}

.chapter-aside {
  position: absolute;
  z-index: 12;
  right: clamp(30px, 5vw, 90px);
  bottom: clamp(34px, 6vh, 72px);
  width: min(340px, 28vw);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 550ms ease 520ms,
    transform 650ms ease 520ms;
}

.is-active .chapter-aside {
  opacity: 1;
  transform: translateY(0);
}

.chapter-aside-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(640px, 47vw);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chapter-aside-cover > div {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  background: rgba(5, 12, 11, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.chapter-aside-cover > div:last-child {
  border-right: 0;
}

.chapter-aside-cover span,
.evidence-label,
.alert-code {
  color: #6f8179;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chapter-aside-cover strong {
  color: #c0cbc6;
  font-size: 12px;
}

.action-chain {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: clamp(20px, 3.4vh, 38px) 0;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 500ms ease 390ms,
    transform 600ms ease 390ms;
}

.is-active .action-chain {
  opacity: 1;
  transform: translateY(0);
}

.action-chain span {
  min-width: 75px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: #c4cec9;
  background: rgba(5, 12, 11, 0.48);
  font-size: 12px;
  font-weight: 750;
}

.action-chain span i {
  color: var(--mint);
  font-size: 10px;
  font-style: normal;
}

.action-chain b {
  color: #566761;
  font-size: 14px;
  font-weight: 400;
}

[data-chapter="1"] .primary-action {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 500ms ease 500ms,
    transform 600ms ease 500ms,
    color 180ms ease,
    background-color 180ms ease;
}

[data-chapter="1"].is-active .primary-action {
  opacity: 1;
  transform: translateY(0);
}

.evidence-card,
.alert-card,
.response-card {
  position: absolute;
  z-index: 12;
  right: clamp(18px, 3.2vw, 48px);
  width: min(280px, 24vw);
  border: 1px solid var(--line-strong);
  opacity: 0;
  background: rgba(6, 14, 13, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  top: 50%;
  padding: clamp(16px, 2.2vh, 24px) clamp(16px, 1.8vw, 22px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  transform: translateY(calc(-50% + 16px));
  transition:
    opacity 240ms ease,
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.is-active .evidence-card,
.is-active .alert-card,
.is-active .response-card {
  opacity: 1;
  transform: translateY(-50%);
}

.alert-card {
  border-color: rgba(255, 84, 56, 0.6);
  background:
    linear-gradient(135deg, rgba(255, 84, 56, 0.14), transparent 45%),
    rgba(6, 14, 13, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 1px rgba(255, 84, 56, 0.5);
}

[data-chapter="2"].chapter {
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
  padding-block: clamp(6px, 1.2vh, 24px);
}

[data-chapter="2"] .chapter-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

[data-chapter="2"] h2 {
  font-size: clamp(28px, 3.2vw, 52px);
  line-height: 0.96;
  flex-shrink: 0;
}

[data-chapter="2"] .chapter-summary,
[data-chapter="2"] .risk-signals {
  flex-shrink: 0;
}

[data-chapter="2"] .chapter-summary {
  margin-top: clamp(8px, 1.4vh, 16px);
  max-width: 460px;
  font-size: clamp(12px, 0.9vw, 14px);
  line-height: 1.48;
}

[data-chapter="2"] .risk-signals {
  margin-top: clamp(10px, 1.8vh, 16px);
  gap: 6px;
}

[data-chapter="2"] .risk-signal {
  min-height: 38px;
  padding: 0 9px;
  font-size: 10px;
}

.evidence-card > strong {
  display: block;
  margin: 18px 0 36px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
}

.evidence-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.evidence-meter span,
.evidence-meter em {
  color: #899a93;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.evidence-meter em {
  color: var(--signal);
}

.evidence-meter > i {
  grid-column: 1 / -1;
  height: 4px;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.evidence-meter > i b {
  width: 44%;
  height: 100%;
  display: block;
  background: var(--signal);
  animation: meter-variable 3.5s ease-in-out infinite alternate;
}

.evidence-card p,
.alert-card > p {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #81918a;
  font-size: 12px;
  line-height: 1.65;
}

.risk-signals {
  display: flex;
  gap: 8px;
  margin-top: clamp(22px, 4vh, 42px);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 500ms ease 390ms,
    transform 600ms ease 390ms;
}

.is-active .risk-signals {
  opacity: 1;
  transform: translateY(0);
}

.risk-signal {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: #8c9b95;
  background: rgba(5, 12, 11, 0.46);
  font-size: 11px;
  font-weight: 720;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.risk-signal:hover,
.risk-signal.is-selected {
  color: var(--paper);
  border-color: rgba(255, 84, 56, 0.55);
  background: var(--signal-soft);
}

.risk-signal i {
  color: var(--signal);
  font-size: 10px;
  font-style: normal;
}

.alert-code {
  color: var(--signal);
}

.alert-card blockquote {
  margin: 18px 0;
  padding: 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
}

.alert-card q {
  color: var(--signal);
}

.alert-line {
  height: 10px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.alert-line::before,
.alert-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 84, 56, 0.24);
}

.alert-line span {
  width: 24px;
  height: 10px;
  display: block;
  margin: 0 5px;
  background:
    linear-gradient(135deg, transparent 0 35%, var(--signal) 36% 44%, transparent 45% 55%, var(--signal) 56% 64%, transparent 65%);
}

.response-card > span {
  color: var(--mint);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.response-card ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.response-card li {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.response-card li i {
  grid-row: 1 / -1;
  color: var(--mint);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.response-card li strong {
  font-size: 16px;
}

.response-card li small {
  color: #74857e;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-index-claim {
  -webkit-text-stroke-color: rgba(147, 207, 255, 0.19);
}

.chapter-kicker-claim span,
[data-chapter="4"] h2 em {
  color: var(--blue);
}

.chapter-claim {
  align-items: stretch;
}

.claim-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: min(100%, 690px);
  padding: clamp(8px, 1.6vh, 24px) 0;
  box-sizing: border-box;
}

.claim-top-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.claim-bottom-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: auto;
}

[data-chapter="4"] h2 {
  font-size: clamp(38px, 4.4vw, 70px);
}

[data-chapter="4"] .chapter-summary {
  max-width: 650px;
  margin-top: clamp(12px, 1.8vh, 20px);
  color: #f2f7f5;
  font-size: clamp(14.5px, 1.15vw, 17px);
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.fall-sim-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(16px, 2.4vh, 28px);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 300ms ease 80ms,
    transform 380ms ease 80ms;
}

.is-active .fall-sim-actions {
  opacity: 1;
  transform: translateY(0);
}

.fall-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.fall-action-play {
  background: linear-gradient(135deg, rgba(147, 207, 255, 0.22), rgba(147, 207, 255, 0.08));
  border: 1px solid rgba(147, 207, 255, 0.55);
  color: #c9e7ff;
  box-shadow: 0 4px 18px rgba(147, 207, 255, 0.15);
}

.fall-action-play:hover {
  background: rgba(147, 207, 255, 0.34);
  border-color: #93cfff;
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(147, 207, 255, 0.35);
  transform: translateY(-1px);
}

.fall-action-play .fall-play-icon {
  font-size: 12px;
  color: #93cfff;
}

.fall-action-reset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #a2b4ad;
  padding: 10px 15px;
}

.fall-action-reset:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.fall-phase-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 3px;
  background: rgba(147, 207, 255, 0.08);
  color: #93cfff;
  border: 1px solid rgba(147, 207, 255, 0.28);
  transition: all 0.3s ease;
}

.fall-phase-tag.is-impact {
  background: rgba(255, 59, 48, 0.22);
  color: #ff846f;
  border-color: #ff5438;
  box-shadow: 0 0 12px rgba(255, 84, 56, 0.35);
  animation: badge-alert 0.8s infinite alternate ease-in-out;
}

.claim-actions {
  gap: 18px;
  margin-top: 0;
}

.primary-action-claim {
  border: 1px solid rgba(147, 207, 255, 0.7);
  color: #06100e;
  background: var(--blue);
  text-decoration: none;
  box-shadow: 0 12px 36px rgba(52, 143, 214, 0.14);
}

.primary-action-claim:hover {
  color: #06100e;
  background: #c9e7ff;
  box-shadow: 0 16px 48px rgba(82, 173, 242, 0.22);
}

.claim-actions .text-action {
  color: #d8eae2;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(147, 207, 255, 0.45);
  font-weight: 600;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.claim-actions .text-action:hover {
  color: #ffffff;
  text-decoration-color: #93cfff;
}

.claim-deadline {
  max-width: 650px;
  margin: clamp(10px, 1.5vh, 16px) 0 0;
  color: #e6f0eb;
  font-size: clamp(12px, 0.95vw, 13.5px);
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 300ms ease 100ms,
    transform 380ms ease 100ms;
}

.is-active .claim-deadline {
  opacity: 1;
  transform: translateY(0);
}

.claim-deadline strong {
  color: var(--blue);
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.claim-dossier {
  position: absolute;
  z-index: 13;
  top: 50%;
  right: clamp(18px, 3.2vw, 54px);
  width: min(370px, 29vw);
  overflow: hidden;
  padding: clamp(17px, 2.2vh, 24px);
  border: 1px solid rgba(147, 207, 255, 0.42);
  opacity: 0;
  background:
    linear-gradient(145deg, rgba(147, 207, 255, 0.1), transparent 34%),
    rgba(4, 11, 10, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48), inset 0 0 70px rgba(147, 207, 255, 0.025);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  transform: translateY(calc(-50% + 22px)) rotateY(-3deg);
  transition:
    opacity 320ms ease 100ms,
    transform 450ms cubic-bezier(0.16, 1, 0.3, 1) 100ms;
}

.is-active .claim-dossier {
  opacity: 1;
  transform: translateY(-50%) rotateY(0);
}

.claim-dossier::before,
.claim-dossier::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.claim-dossier::before {
  top: 7px;
  left: 7px;
  border-top: 1px solid var(--blue);
  border-left: 1px solid var(--blue);
}

.claim-dossier::after {
  right: 7px;
  bottom: 7px;
  border-right: 1px solid var(--mint);
  border-bottom: 1px solid var(--mint);
}

.dossier-scan {
  position: absolute;
  z-index: 0;
  right: 0;
  left: 0;
  height: 1px;
  opacity: 0.7;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  box-shadow: 0 0 16px rgba(147, 207, 255, 0.45);
  animation: dossier-scan 5.5s ease-in-out infinite;
}

.claim-dossier > *:not(.dossier-scan) {
  position: relative;
  z-index: 1;
}

.claim-dossier header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.claim-dossier header span,
.document-trace > span {
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.claim-dossier header strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 400;
  line-height: 0.9;
  text-align: right;
}

.claim-dossier ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.claim-dossier li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.claim-dossier li > i {
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 10px;
  font-style: normal;
}

.claim-dossier li span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.claim-dossier li strong {
  color: #dfe8e4;
  font-size: 12px;
}

.claim-dossier li small {
  color: #7d8e87;
  font-size: 10px;
  line-height: 1.35;
}

.document-trace {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 2px solid rgba(168, 239, 211, 0.45);
  background: rgba(168, 239, 211, 0.035);
}

.document-trace p {
  margin: 0;
  color: #7c8e87;
  font-size: 10px;
  line-height: 1.45;
}

.document-trace b {
  color: var(--mint);
  font-family: Consolas, monospace;
  font-weight: 700;
}

.claim-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.claim-sources a {
  padding: 6px 8px;
  border: 1px solid var(--line);
  color: #9fb0a9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.claim-sources a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.claim-disclaimer {
  margin: 10px 0 0;
  color: #65766f;
  font-size: 10px;
  line-height: 1.45;
}

.scene-hud {
  position: absolute;
  z-index: 4;
  top: calc(var(--topbar) + 7vh);
  right: 4vw;
  bottom: calc(var(--navbar) + 6vh);
  left: 52%;
  pointer-events: none;
}

.hud-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  opacity: 0.52;
}

.hud-corner-tl {
  top: 0;
  left: 0;
  border-top: 1px solid var(--mint);
  border-left: 1px solid var(--mint);
}

.hud-corner-tr {
  top: 0;
  right: 0;
  border-top: 1px solid var(--mint);
  border-right: 1px solid var(--mint);
}

.hud-corner-bl {
  bottom: 0;
  left: 0;
  border-bottom: 1px solid var(--mint);
  border-left: 1px solid var(--mint);
}

.hud-corner-br {
  right: 0;
  bottom: 0;
  border-right: 1px solid var(--mint);
  border-bottom: 1px solid var(--mint);
}

.coordinate {
  position: absolute;
  color: rgba(168, 239, 211, 0.5);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.coordinate-x {
  top: -3px;
  left: 40px;
}

.coordinate-y {
  top: 40px;
  right: -17px;
  writing-mode: vertical-rl;
}

.target-reticle {
  position: absolute;
  top: 48%;
  left: 52%;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(168, 239, 211, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.target-reticle::before,
.target-reticle::after {
  content: "";
  position: absolute;
  background: rgba(168, 239, 211, 0.35);
}

.target-reticle::before {
  top: 50%;
  right: -14px;
  left: -14px;
  height: 1px;
}

.target-reticle::after {
  top: -14px;
  bottom: -14px;
  left: 50%;
  width: 1px;
}

.target-reticle span {
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(168, 239, 211, 0.35);
  border-radius: 50%;
  animation: reticle-spin 12s linear infinite;
}

.target-reticle i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  transform: translate(-50%, -50%);
}

.reticle-orbit {
  position: absolute;
  top: 48%;
  left: 52%;
  width: 154px;
  height: 154px;
  overflow: visible;
  opacity: 0.48;
  transform: translate(-50%, -50%);
  animation: orbit-spin 24s linear infinite;
}

.reticle-orbit path {
  fill: none;
}

.reticle-orbit text {
  fill: var(--mint);
  font-family: Consolas, monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.telemetry {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  width: 250px;
  display: grid;
  gap: 1px;
  background: rgba(168, 239, 211, 0.12);
  border: 1px solid rgba(168, 239, 211, 0.18);
  z-index: 5;
}

.telemetry > div {
  min-height: 33px;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: rgba(5, 12, 11, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.telemetry span {
  color: #70837a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.telemetry strong {
  color: var(--paper);
  font-size: 11px;
  font-weight: 760;
}

[data-scene="2"] .telemetry strong {
  color: #ff846f;
}

[data-scene="4"] .telemetry strong {
  color: var(--blue);
}

.signal-trace {
  position: absolute;
  right: 22px;
  bottom: 70px;
  width: 260px;
  opacity: 0.66;
}

.signal-trace span {
  display: block;
  margin-bottom: 7px;
  color: #71837b;
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.signal-trace svg {
  width: 100%;
  height: 42px;
  overflow: visible;
}

.signal-trace polyline {
  fill: none;
  stroke: var(--mint);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: trace-draw 4.5s ease-in-out infinite;
}

[data-scene="2"] .signal-trace polyline {
  stroke: var(--signal);
}

[data-scene="4"] .signal-trace polyline {
  stroke: var(--blue);
}

.scene-caption {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.scene-caption span {
  color: var(--mint);
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.scene-caption strong {
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* Sound Wave Icon */
.sound-wave-icon {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}

.sound-wave-icon i {
  display: inline-block;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 1px;
  transition: height 0.2s ease;
}

.interface-button[aria-pressed="true"] .sound-wave-icon i {
  animation: sound-bars 1.2s ease-in-out infinite alternate;
}

.interface-button[aria-pressed="true"] .sound-wave-icon i:nth-child(1) {
  animation-delay: 0s;
  height: 8px;
}

.interface-button[aria-pressed="true"] .sound-wave-icon i:nth-child(2) {
  animation-delay: 0.25s;
  height: 13px;
}

.interface-button[aria-pressed="true"] .sound-wave-icon i:nth-child(3) {
  animation-delay: 0.45s;
  height: 7px;
}

@keyframes sound-bars {
  0% { height: 3px; }
  50% { height: 13px; }
  100% { height: 5px; }
}

/* Orbit Mode States */
.experience.is-orbit-active {
  cursor: grab;
}

.experience.is-orbit-active:active {
  cursor: grabbing;
}

/* 3D Interactive Hotspots Layer */
.hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}

.hotspot-pin {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, left, top;
}

.hotspot-pin.is-visible {
  opacity: 1;
}

.hotspot-core {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  border: 1.5px solid #050c0b;
  flex-shrink: 0;
}

#hotspot-bottleneck .hotspot-core {
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
}

.hotspot-pulse {
  position: absolute;
  top: 50%;
  left: 4.5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--mint);
  transform: translate(-50%, -50%);
  animation: hotspot-pulse 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

#hotspot-bottleneck .hotspot-pulse {
  border-color: var(--signal);
}

@keyframes hotspot-pulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

/* Minimalist compact pill badge by default */
.hotspot-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px 8px;
  background: rgba(5, 12, 11, 0.82);
  border: 1px solid rgba(168, 239, 211, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#hotspot-bottleneck .hotspot-tag {
  border-color: rgba(255, 84, 56, 0.55);
}

.hotspot-tag b {
  font-size: 10px;
  font-weight: 800;
  color: var(--paper);
  letter-spacing: 0.04em;
  font-family: var(--sans);
}

#hotspot-bottleneck .hotspot-tag b {
  color: #ff846f;
}

.hotspot-tag small {
  display: none; /* Hidden by default to keep the 3D scene clean and uncluttered */
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: Consolas, monospace;
  margin-top: 2px;
}

/* On hover or focus, smoothly expand the details */
.hotspot-pin:hover .hotspot-tag,
.hotspot-pin:focus-visible .hotspot-tag,
.hotspot-pin.is-selected .hotspot-tag {
  background: rgba(5, 12, 11, 0.94);
  border-color: var(--mint);
  padding: 6px 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
}

.hotspot-pin:hover .hotspot-tag small,
.hotspot-pin:focus-visible .hotspot-tag small,
.hotspot-pin.is-selected .hotspot-tag small {
  display: block;
}

/* Real-time Parametric Clearance Simulator Widget in Chapter 2 */
.clearance-simulator {
  flex: 0 0 auto;
  margin-top: clamp(12px, 2vh, 18px);
  width: 100%;
  max-width: 440px;
  background: rgba(5, 12, 11, 0.86);
  border: 1px solid rgba(168, 239, 211, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 14px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease;
}

.clearance-simulator:hover {
  border-color: rgba(168, 239, 211, 0.45);
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sim-header-left,
.sim-header-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sim-collapse-btn {
  background: none;
  border: 1px solid rgba(168, 239, 211, 0.22);
  color: #a2b4ad;
  border-radius: 2px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.sim-collapse-btn:hover {
  background: rgba(168, 239, 211, 0.18);
  color: var(--mint);
  border-color: var(--mint);
}

.clearance-simulator.is-collapsed {
  padding: 7px 11px;
}

.clearance-simulator.is-collapsed .sim-header {
  margin-bottom: 0;
}

.clearance-simulator.is-collapsed .sim-display,
.clearance-simulator.is-collapsed .sim-controls {
  display: none;
}

.sim-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 6px var(--mint);
  display: inline-block;
  margin-right: 5px;
}

.sim-title {
  color: #a2b4ad;
  font-weight: 800;
  font-family: Consolas, monospace;
}

.sim-status {
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  border-radius: 2px;
  background: rgba(255, 84, 56, 0.22);
  color: #ff846f;
  border: 1px solid rgba(255, 84, 56, 0.45);
  transition: all 0.25s ease;
  font-family: Consolas, monospace;
}

.sim-status.is-warning {
  background: rgba(255, 185, 56, 0.2);
  color: #ffc85a;
  border-color: rgba(255, 185, 56, 0.45);
}

.sim-status.is-ok {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.45);
}

.sim-display {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.sim-value {
  font-family: Consolas, monospace;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  color: #ff846f;
  transition: color 0.25s ease;
}

.sim-value.is-warning {
  color: #ffc85a;
}

.sim-value.is-ok {
  color: var(--mint);
}

.sim-unit {
  font-size: 13px;
  font-weight: 700;
  color: #899a93;
}

.sim-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  outline: none;
  margin: 6px 0 9px;
  cursor: pointer;
}

.sim-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ff846f;
  cursor: ew-resize;
  box-shadow: 0 0 10px rgba(255, 84, 56, 0.6);
  border: 2px solid var(--paper);
  transition: transform 0.15s ease, background-color 0.25s ease;
}

.sim-controls input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.sim-ticks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.sim-tick {
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 4px;
  font-size: 10px;
  color: #a2b4ad;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Consolas, monospace;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clearance-simulator .sim-play-row {
  margin: 10px 0 0;
  opacity: 1;
  transform: none;
}

.sim-tick i {
  font-style: normal;
  color: #6d8077;
  font-size: 7.5px;
}

.sim-tick:hover {
  background: rgba(168, 239, 211, 0.12);
  border-color: rgba(168, 239, 211, 0.35);
  color: var(--paper);
}

.sim-tick.is-active {
  background: rgba(168, 239, 211, 0.22);
  border-color: var(--mint);
  color: var(--mint);
  font-weight: 700;
}

@media (max-height: 860px) {
  [data-chapter="2"] h2 { font-size: clamp(24px, 4.2vh, 38px); }
  [data-chapter="2"] .chapter-summary { margin-top: 6px; }
  [data-chapter="2"] .risk-signals { margin-top: 8px; }
  [data-chapter="2"] .risk-signal { min-height: 32px; }
  [data-chapter="2"] .clearance-simulator { margin-top: 8px; padding: 8px 12px; }
  .sim-header { margin-bottom: 6px; }
  .sim-value { font-size: 22px; }
  .sim-display { margin-bottom: 4px; }
  .sim-controls input[type="range"] { margin: 2px 0 6px; }
  .clearance-simulator .sim-play-row { margin-top: 8px; }
  .scene-play-row .fall-action-btn { min-height: 36px; padding: 8px 14px; }
}



.experience-nav {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--navbar);
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(500px, 1fr) minmax(130px, 0.55fr);
  align-items: center;
  padding: 0 clamp(22px, 3.6vw, 66px);
  border-top: 1px solid var(--line);
  background: rgba(5, 12, 11, 0.75);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #64746e;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.mouse-icon {
  width: 20px;
  height: 29px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  border: 1px solid #52635c;
  border-radius: 12px;
}

.mouse-icon i {
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: var(--mint);
  animation: mouse-wheel 1.8s ease-in-out infinite;
}

.chapter-nav {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.chapter-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  color: #677871;
  background: transparent;
  font-size: 11px;
  font-weight: 760;
  text-align: left;
  transition:
    color 220ms ease,
    background-color 220ms ease;
}

.chapter-nav-item::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-nav-item:hover {
  color: #afbbb6;
}

.chapter-nav-item.is-active {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.025);
}

.chapter-nav-item.is-active::before {
  transform: scaleX(1);
}

.chapter-nav-item i {
  color: var(--mint);
  font-size: 10px;
  font-style: normal;
}

.nav-arrows {
  display: flex;
  justify-content: flex-end;
}

.nav-arrows button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  color: #a0aea8;
  background: transparent;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.nav-arrows button + button {
  margin-left: -1px;
}

.nav-arrows button:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--mint);
  background: var(--mint);
}

.nav-arrows button:disabled {
  opacity: 0.24;
  cursor: default;
}

.method-note {
  position: fixed;
  z-index: 25;
  right: clamp(22px, 3.6vw, 66px);
  bottom: calc(var(--navbar) + 14px);
  width: min(370px, calc(100vw - 44px));
}

.method-note > button {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 0;
  color: #66766f;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.method-note > button span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--mint);
  transition: transform 200ms ease;
}

.method-note > button[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.method-note > div {
  position: absolute;
  right: 0;
  bottom: 38px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  background: rgba(7, 17, 15, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
}

.method-note > button[aria-expanded="true"] + div {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.method-note p {
  margin: 0;
  padding: 16px 0;
  color: #899991;
  font-size: 11px;
  line-height: 1.65;
}

.orientation-note {
  display: none;
}

.demo-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: #030706;
}

.demo-dialog::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.demo-dialog[open] {
  display: grid;
  grid-template-rows: 62px 1fr;
  animation: dialog-enter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.demo-dialog-bar > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.demo-dialog-bar strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-dialog-bar small {
  padding-left: 11px;
  border-left: 1px solid var(--line);
  color: #677770;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.1);
}

.dialog-actions a,
.dialog-actions button {
  color: #a9b5b0;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.dialog-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
}

.dialog-actions button span {
  margin-left: 8px;
  font-size: 14px;
}

.demo-frame-wrap {
  position: relative;
  min-height: 0;
}

.demo-frame-wrap iframe {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  opacity: 0;
  transition: opacity 280ms ease;
}

.demo-frame-wrap iframe.is-loaded {
  opacity: 1;
}

.frame-loader {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: #75857e;
  background: #030706;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.frame-loader[hidden] {
  display: none;
}

.frame-loader span {
  width: 42px;
  height: 42px;
  border: 1px solid #34453f;
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

.frame-loader p {
  margin: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

@keyframes scan-horizontal {
  0%, 100% { transform: translateX(-9vw); opacity: 0; }
  12%, 88% { opacity: 0.45; }
  50% { transform: translateX(31vw); opacity: 0.7; }
}

@keyframes scene-wipe {
  0% { transform: translateX(-102%); }
  46% { transform: translateX(0); }
  54% { transform: translateX(0); }
  100% { transform: translateX(102%); }
}

@keyframes noise {
  0% { transform: translate(0, 0); }
  25% { transform: translate(3%, -2%); }
  50% { transform: translate(-2%, 3%); }
  75% { transform: translate(2%, 4%); }
  100% { transform: translate(-3%, -3%); }
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@keyframes meter-variable {
  from { width: 28%; }
  to { width: 68%; }
}

@keyframes reticle-spin {
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes trace-draw {
  0% { stroke-dashoffset: 340; opacity: 0; }
  18% { opacity: 1; }
  65% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -340; opacity: 0; }
}

@keyframes mouse-wheel {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(7px); opacity: 1; }
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes dossier-scan {
  0%, 100% { top: 9%; opacity: 0; }
  14%, 86% { opacity: 0.72; }
  50% { top: 91%; opacity: 0.5; }
}

@keyframes dialog-enter {
  from { opacity: 0; clip-path: inset(50% 50% 50% 50%); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@media (max-width: 1180px) {
  .topbar {
    padding-inline: 28px;
  }

  .brand {
    min-width: 230px;
  }

  .experience-status {
    display: none;
  }

  .top-actions {
    min-width: 0;
    margin-left: auto;
  }

  .chapter {
    grid-template-columns: minmax(440px, 0.9fr) 1fr;
    padding-inline: 52px;
  }

  .chapter-aside-cover {
    width: min(560px, 48vw);
  }

  .evidence-card,
  .alert-card,
  .response-card,
  .claim-dossier {
    right: 45px;
  }

  .claim-dossier {
    width: min(340px, 30vw);
  }

  .scene-hud {
    left: 50%;
  }

  .experience-nav {
    grid-template-columns: 160px 1fr 112px;
    padding-inline: 28px;
  }

  .nav-hint span:last-child {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --topbar: 68px;
    --navbar: 82px;
  }

  .topbar {
    padding-inline: 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand-rule,
  .brand-name,
  #toggle-analysis {
    display: none;
  }

  .interface-button-light {
    min-height: 34px;
  }

  .fx-vignette {
    background:
      linear-gradient(90deg, rgba(5, 12, 11, 0.98), rgba(5, 12, 11, 0.72)),
      radial-gradient(circle at 75% 45%, transparent, rgba(5, 12, 11, 0.9));
  }

  .stage-canvas {
    opacity: 0.35;
  }

  .is-ready .stage-canvas {
    opacity: 0.35;
  }

  .scene-hud {
    top: calc(var(--topbar) + 4vh);
    right: 18px;
    bottom: calc(var(--navbar) + 4vh);
    left: 44%;
    opacity: 0.32;
  }

  .chapter {
    display: flex;
    align-items: center;
    padding: 26px 26px 38px;
  }

  .chapter-copy {
    width: min(100%, 670px);
  }

  .hero-title {
    font-size: clamp(54px, 12vw, 84px);
  }

  .chapter h2 {
    font-size: clamp(47px, 10vw, 73px);
  }

  .chapter-aside,
  .evidence-card,
  .alert-card,
  .response-card,
  .claim-dossier {
    display: none;
  }

  .claim-copy {
    width: min(100%, 710px);
  }

  [data-chapter="4"] .chapter-summary,
  .claim-paths,
  .claim-deadline {
    max-width: 680px;
  }

  .chapter-index {
    left: 70%;
  }

  .experience-nav {
    grid-template-columns: 1fr auto;
    padding-inline: 18px;
  }

  .nav-hint {
    display: none;
  }

  .chapter-nav {
    min-width: 0;
  }

  .chapter-nav-item {
    justify-content: center;
    padding: 0 13px;
  }

  .chapter-nav-item span {
    display: none;
  }

  .nav-arrows {
    margin-left: 12px;
  }

  .method-note {
    right: 18px;
    bottom: calc(var(--navbar) + 8px);
  }
}

@media (max-width: 560px) {
  .brand-room {
    display: none;
  }

  .topbar {
    padding-inline: 12px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .interface-button {
    padding: 0 9px;
    min-height: 34px;
    font-size: 11px;
  }

  .top-actions .interface-button-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 11px;
    min-height: 34px;
    font-size: 11.5px;
    font-weight: 800;
    color: #030b08;
    background: #24e5a3;
    border: 1px solid #24e5a3;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(36, 229, 163, 0.35);
  }

  .top-actions .interface-button-light .btn-text {
    display: inline;
  }

  .top-actions .interface-button-light .btn-icon {
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
  }

  .chapter {
    padding: 22px 18px 30px;
  }

  .chapter-kicker {
    max-width: 340px;
    font-size: 10px;
  }

  .chapter-kicker span::after {
    display: none;
  }

  .hero-title {
    font-size: clamp(48px, 16vw, 69px);
  }

  .chapter h2 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .chapter-summary {
    max-width: 450px;
    font-size: 15px;
  }

  .chapter-summary br {
    display: none;
  }

  [data-chapter="4"] h2 {
    font-size: clamp(39px, 12vw, 58px);
  }

  [data-chapter="4"] .chapter-summary {
    font-size: 13px;
  }

  .claim-paths {
    margin-top: 12px;
  }

  .claim-paths > div {
    min-height: 74px;
    padding: 10px;
  }

  .claim-paths strong {
    font-size: 11px;
  }

  .claim-paths small {
    display: none;
  }

  .claim-actions {
    gap: 11px;
    margin-top: 14px;
  }

  .claim-deadline {
    margin-top: 8px;
    font-size: 9px;
  }

  .chapter-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .primary-action {
    width: 100%;
  }

  .action-chain {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .action-chain b {
    display: none;
  }

  .action-chain span {
    min-height: 44px;
  }

  .risk-signals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .risk-signal {
    min-height: 52px;
    justify-content: center;
    padding: 7px;
  }

  .risk-signal span {
    display: none;
  }

  .chapter-nav-item {
    padding-inline: 10px;
  }

  .nav-arrows button {
    width: 42px;
    height: 42px;
  }

  .method-note > button {
    font-size: 0;
  }

  .method-note > button::before {
    content: "Info";
    font-size: 10px;
  }

  .demo-dialog-bar small,
  .dialog-actions a {
    display: none;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-inline: 8px;
  }

  #sound-label,
  #orbit-label {
    display: none;
  }

  #toggle-sound,
  #toggle-orbit {
    padding: 0 8px;
  }
}

@media (max-height: 820px) {
  :root {
    --topbar: 66px;
    --navbar: 72px;
  }

  .hero-title {
    font-size: clamp(48px, 6.1vw, 86px);
  }

  .chapter h2 {
    font-size: clamp(45px, 5vw, 73px);
  }

  .chapter-kicker {
    margin-bottom: 16px;
  }

  .chapter-summary {
    margin-top: 16px;
    font-size: 15px;
  }

  .chapter-actions,
  .risk-signals {
    margin-top: 20px;
  }

  .action-chain {
    margin-block: 18px;
  }

  .primary-action {
    min-height: 44px;
  }

  .evidence-card,
  .alert-card,
  .response-card,
  .claim-dossier {
    padding: 20px;
  }

  .chapter-claim {
    align-items: stretch;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  [data-chapter="4"] h2 {
    font-size: clamp(26px, 3.2vw, 42px);
    line-height: 1.08;
  }

  [data-chapter="4"] .chapter-kicker {
    margin-bottom: 6px;
  }

  [data-chapter="4"] .chapter-summary {
    margin-top: 6px;
    color: #f2f7f5;
    font-size: 13.5px;
    line-height: 1.5;
    max-width: 580px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  }

  .fall-sim-actions {
    margin-top: 10px;
    gap: 8px;
  }

  .fall-action-btn {
    padding: 7px 13px;
    font-size: 11.5px;
  }

  .fall-phase-tag {
    padding: 4px 8px;
    font-size: 10px;
  }

  .claim-actions {
    margin-top: 0;
    gap: 12px;
  }

  .claim-actions .primary-action {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 11px;
  }

  .claim-actions .text-action {
    color: #d8eae2;
    font-size: 11.5px;
  }

  .claim-deadline {
    margin-top: 6px;
    color: #e6f0eb;
    font-size: 12px;
    line-height: 1.45;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  }

  .claim-dossier {
    top: auto;
    bottom: clamp(12px, 2vh, 22px);
    width: min(340px, 28vw);
    padding: 13px 15px;
    transform: none;
  }

  .is-active .claim-dossier {
    transform: none;
  }

  .claim-dossier li {
    padding-block: 6px;
  }

  .document-trace {
    margin-top: 7px;
    padding-block: 6px;
  }

  .claim-disclaimer {
    display: none;
  }

  .evidence-card > strong {
    margin: 20px 0 32px;
    font-size: 24px;
  }

  .alert-card blockquote {
    margin: 23px 0;
    font-size: 23px;
  }

  .response-card li {
    padding: 12px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .chapter.is-active,
  .chapter.is-active *,
  .is-ready .stage-canvas {
    opacity: 1;
    transform: none;
  }
}

/* ===== Accesibilidad visual (focus / active) — añadido en mejora profesional ===== */
.sim-controls input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--blue), 0 0 12px rgba(255, 84, 56, 0.7);
}
.sim-controls input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--blue), 0 0 12px rgba(255, 84, 56, 0.7);
}
.sim-tick:focus-visible,
.primary-action:focus-visible,
.text-action:focus-visible,
.nav-arrows button:focus-visible,
.dialog-actions a:focus-visible,
.dialog-actions button:focus-visible,
.method-note > button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.primary-action:hover { transform: translateY(-2px); }
.primary-action:active { transform: translateY(1px) scale(0.99); }
.nav-arrows button:active { transform: scale(0.93); }
.dialog-actions a:hover,
.dialog-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.method-note > button:hover { background: rgba(255, 255, 255, 0.06); }
.button-dot-accent {
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.scene-play-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 400ms ease 280ms,
    transform 500ms ease 280ms;
}
.is-active .scene-play-row {
  opacity: 1;
  transform: none;
}
.scene-play-row .fall-action-btn {
  min-height: 40px;
}
.routine-play {
  margin: 0;
}

.action-chain span.is-current {
  color: var(--accent, #a8efd3);
  border-color: currentColor;
  background: rgba(168, 239, 211, 0.10);
}

.routine-play:focus-visible,
.fall-action-btn:focus-visible { outline: 2px solid #a8efd3; outline-offset: 3px; }

/* Mobile: a dedicated model panel and a scrollable, complete chapter. */
@media (max-width: 1024px) {
  :root {
    --topbar: calc(116px + env(safe-area-inset-top, 0px));
    --navbar: calc(68px + env(safe-area-inset-bottom, 0px));
    --model-height: clamp(150px, 30svh, 280px);
  }

  .experience { height: 100svh; height: 100dvh; }
  .topbar {
    height: var(--topbar);
    display: block;
    padding: calc(6px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px));
    background: var(--ink);
  }
  .brand { min-width: 0; min-height: 32px; }
  .brand-room { display: inline; }
  .brand-rule, .brand-name, .experience-status { display: none; }
  .top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px;
    margin: 4px 0 0;
    min-width: 0;
  }
  .top-actions .interface-button,
  .top-actions .interface-button-light {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  #toggle-analysis { display: inline-flex; }
  #sound-label, #orbit-label { display: inline; }
  .top-actions .button-dot { display: none; }

  .stage-canvas, .is-ready .stage-canvas {
    inset: var(--topbar) 0 auto;
    width: 100%;
    height: var(--model-height);
    opacity: 1;
    transform: none;
    transition: none;
  }
  .is-orbit-active .stage-canvas { touch-action: none; }
  .chapter-viewport {
    top: calc(var(--topbar) + var(--model-height));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y pinch-zoom;
    background: var(--ink);
    border-top: 1px solid var(--line);
    scrollbar-gutter: stable;
  }
  .chapter, .chapter-claim {
    position: relative;
    inset: auto;
    display: none;
    min-width: 0;
    padding: 22px max(18px, env(safe-area-inset-right, 0px)) 32px max(18px, env(safe-area-inset-left, 0px));
    transform: none;
    transition: none;
    overflow-wrap: anywhere;
  }
  .chapter.is-active { display: block; }
  .chapter-copy, .claim-copy {
    width: 100%;
    height: auto;
    padding: 0;
  }
  .chapter.is-active *, .chapter.is-active .claim-dossier {
    transform: none;
    transition: none;
  }
  .hero-title { font-size: clamp(42px, 10vw, 68px); line-height: 0.95; }
  .chapter h2, [data-chapter="4"] h2 { font-size: clamp(30px, 7vw, 48px); line-height: 1.08; }
  .chapter h2 br { display: none; }
  .chapter-kicker { flex-wrap: wrap; gap: 8px; font-size: 11px; margin-bottom: 16px; }
  .chapter-summary, [data-chapter="4"] .chapter-summary { font-size: 15px; line-height: 1.6; margin-top: 18px; }
  .chapter-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .project-social { margin-top: 18px; }
  .claim-bottom-group { margin-top: 24px; align-items: stretch; }
  .primary-action, .claim-actions .primary-action { white-space: normal; min-height: 44px; font-size: 13px; padding: 12px; }
  .text-action, .claim-actions .text-action { font-size: 13px; min-height: 44px; line-height: 1.5; }
  .chapter-aside, .evidence-card, .alert-card, .response-card, .claim-dossier {
    display: block;
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 24px;
    padding: 18px;
    opacity: 1;
    transform: none;
  }
  .chapter-aside-cover { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
  .chapter-aside-cover > div { padding: 10px; }
  .claim-disclaimer { display: block; }
  .claim-deadline, .claim-disclaimer, .claim-dossier li small, .document-trace p { font-size: 12px; line-height: 1.6; }
  .claim-sources a, .fall-action-btn, .sim-tick, .scene-play-row .fall-action-btn { min-height: 44px; }
  .fall-phase-tag { font-size: 11px; line-height: 1.5; }
  [data-chapter="2"].chapter {
    overflow: visible;
    height: auto;
    min-height: 0;
    padding-block: 22px;
  }
  [data-chapter="2"] .chapter-copy {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  [data-chapter="2"] h2 { order: 0; }
  [data-chapter="2"] .chapter-summary { order: 1; }
  [data-chapter="2"] .clearance-simulator { order: 2; }
  [data-chapter="2"] .risk-signals { order: 3; }
  .clearance-simulator { position: relative; inset: auto; width: 100%; max-width: none; margin-top: 16px; padding: 14px; }
  .scene-play-row .fall-action-btn { min-height: 44px; padding: 10px 18px; }
  .sim-value { font-size: 28px; }
  .sim-header { margin-bottom: 8px; }
  .sim-display { margin-bottom: 8px; }
  .sim-ticks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sim-tick { flex: none; font-size: 11px; white-space: normal; }
  .sim-tick i { display: block; font-size: 10px; }
  .sim-controls input[type="range"] { height: 28px; touch-action: pan-x; }
  .clearance-simulator .sim-play-row { margin-top: 12px; }
  .risk-signals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .risk-signal { flex-direction: column; gap: 6px; padding: 8px; min-height: 60px; }
  .risk-signal span { display: inline; font-size: 11px; }
  .experience-nav {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 max(6px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-left, 0px));
    background: var(--ink);
  }
  .chapter-nav { min-width: 0; }
  .chapter-nav-item { min-width: 0; padding: 8px 2px; flex-direction: column; justify-content: center; gap: 5px; }
  .chapter-nav-item span { display: block; font-size: 10px; letter-spacing: 0; }
  .nav-hint, .nav-arrows { display: none; }
  .method-note { top: calc(2px + env(safe-area-inset-top, 0px)); right: 12px; bottom: auto; width: min(340px, calc(100vw - 24px)); pointer-events: none; }
  .method-note > button, .method-note > div { pointer-events: auto; }
  .method-note > button { min-height: 36px; }
  .method-note > div { top: 40px; bottom: auto; max-height: 60dvh; overflow-y: auto; }
  .demo-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; }
  .demo-dialog[open] { grid-template-rows: auto minmax(0, 1fr); }
  .demo-dialog-bar { height: auto; min-height: 64px; gap: 8px; padding: 12px; }
  .demo-dialog-bar strong { font-size: 12px; }
  .dialog-actions button { min-height: 44px; }

  /* Remove decorative compositing over the model and reading panel. */
  .fx-grid, .fx-scan, .fx-noise, .fx-vignette, .cursor-aura,
  .scene-word, .scene-wipe, .scene-hud, .hotspots-layer, .chapter-index,
  .orientation-note, .dossier-scan, .experience::before { display: none; }
  .experience *, .method-note > div { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .experience *, .experience *::before, .experience *::after { animation: none; }
}

@media (max-width: 1024px) and (orientation: landscape) {
  :root { --topbar: calc(80px + env(safe-area-inset-top, 0px)); --navbar: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .stage-canvas, .is-ready .stage-canvas { width: 42%; height: calc(100% - var(--topbar) - var(--navbar)); }
  .chapter-viewport { top: var(--topbar); left: 42%; border-left: 1px solid var(--line); }
  .chapter { padding: 12px 16px 16px; }
  [data-chapter="2"] h2 { font-size: clamp(20px, 4.6vh, 28px); order: 0; }
  [data-chapter="2"] .clearance-simulator { order: 1; margin-top: 8px; padding: 8px 10px; }
  [data-chapter="2"] .chapter-summary { order: 2; margin-top: 10px; }
  [data-chapter="2"] .risk-signals { order: 3; margin-top: 8px; }
  [data-chapter="2"] .risk-signal { min-height: 36px; }
  .sim-value { font-size: 22px; }
  .sim-header { margin-bottom: 4px; }
  .sim-display { margin-bottom: 4px; }
  .sim-controls input[type="range"] { height: 22px; margin: 2px 0 6px; }
  .sim-tick { min-height: 32px; padding: 4px; }
  .scene-play-row .fall-action-btn { min-height: 36px; padding: 6px 12px; }
  .clearance-simulator .sim-play-row { margin-top: 8px; }
}

@media (max-width: 700px) and (orientation: landscape) {
  :root { --topbar: calc(116px + env(safe-area-inset-top, 0px)); }
}

.project-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  margin-top: clamp(16px, 2.4vh, 26px);
  padding: 0;
  color: #8fa29b;
  background: none;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-decoration: none;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(12px);
  transition:
    color 180ms ease,
    opacity 320ms ease 160ms,
    transform 400ms ease 160ms;
}

.is-active .project-social {
  opacity: 1;
  transform: translateY(0);
}

.project-social svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.project-social-handle {
  color: var(--mint);
  font-weight: 750;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.project-social:hover {
  color: var(--paper);
}

.project-social:hover .project-social-handle {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-social:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}
