:root {
  /* DESIGN TYPOGRAPHY TOKENS: IDs Serif* Serif** reflective notes Interactions framed consequences—hovering Grotesk* Grotesk** heavy weights blunt statements */
  --void: #111111;
  --cobalt: #2B3A8F;
  --chalk: #F4F1E8;
  --red: #E63946;
  --plywood: #C79A52;
  --violet: #4B1248;
  --acid: #D8FF1F;
  --split: 54%;
  --bend: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--chalk);
  font-family: "IBM Plex Serif", serif;
  overflow-x: hidden;
}

button, a { font: inherit; color: inherit; }
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: .18;
  background-image:
    radial-gradient(circle at 12% 21%, rgba(244,241,232,.22) 0 1px, transparent 1px),
    radial-gradient(circle at 74% 64%, rgba(216,255,31,.12) 0 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,57,70,.05), transparent 18%, rgba(43,58,143,.07));
  background-size: 7px 7px, 11px 11px, 100% 100%;
  mix-blend-mode: screen;
}

.corridor { width: 100%; }
.scene {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 4px solid var(--acid);
}
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--void) 0 var(--split), var(--cobalt) var(--split) 100%);
  z-index: -3;
}
.scene::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: calc(var(--split) - 18px + var(--bend));
  width: 36px;
  background: var(--acid);
  clip-path: polygon(40% 0, 100% 9%, 47% 19%, 83% 31%, 25% 43%, 71% 58%, 8% 72%, 56% 85%, 26% 100%, 0 100%, 31% 83%, 0 70%, 42% 55%, 0 41%, 51% 29%, 4% 17%, 34% 0);
  box-shadow: 0 0 28px rgba(216,255,31,.55), 0 0 0 7px rgba(17,17,17,.75);
  z-index: 4;
  transition: left .28s steps(2, end), transform .28s steps(2, end);
}

.doubt-rail {
  position: fixed;
  z-index: 70;
  left: 12px;
  top: 18px;
  bottom: 18px;
  width: 42px;
  border-left: 2px solid var(--acid);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  mix-blend-mode: difference;
}
.doubt-rail a, .rail-title {
  writing-mode: vertical-rl;
  text-decoration: none;
  background: var(--void);
  border: 1px solid var(--acid);
  padding: 8px 5px;
  transform: translateX(-10px);
}
.doubt-rail a.active { background: var(--acid); color: var(--void); }

.scene-half { position: absolute; inset: 0; padding: 8vh 8vw; }
.proof-half { clip-path: polygon(0 0, var(--split) 0, calc(var(--split) - 5vw) 100%, 0 100%); }
.confession-half { clip-path: polygon(calc(var(--split) - 2vw) 0, 100% 0, 100% 100%, calc(var(--split) - 8vw) 100%); display: flex; justify-content: flex-end; align-items: center; }
.branch-id {
  font-family: "IBM Plex Mono", monospace;
  color: var(--acid);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(11px, 1.3vw, 15px);
}
.site-title, .scene h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.08em;
  line-height: .74;
  margin: 0;
}
.site-title { font-size: clamp(76px, 16vw, 245px); max-width: 9ch; }
.cold-title { margin-top: 6vh; text-shadow: -6px 0 var(--red); }
.cold-title span { display: block; transform: translateX(8vw); }
.paper-note {
  width: min(520px, 42vw);
  min-height: 460px;
  color: var(--void);
  background: var(--chalk);
  padding: 38px;
  box-shadow: -18px 18px 0 var(--violet), 0 0 0 8px var(--red);
  transform: rotate(3deg) translateY(4vh);
}
.torn { clip-path: polygon(0 3%, 12% 0, 22% 4%, 36% 0, 50% 5%, 62% 1%, 76% 4%, 100% 0, 97% 100%, 82% 96%, 66% 100%, 51% 95%, 33% 100%, 19% 96%, 0 100%); }
.rough-title { font-size: clamp(38px, 7vw, 104px); color: var(--void); letter-spacing: -.07em; }
.paper-note p { font-size: clamp(18px, 2vw, 28px); line-height: 1.1; }
.redaction { display: block; height: 18px; background: var(--void); margin: 13px 0; transform-origin: left; }
.w45 { width: 45%; } .w52 { width: 52%; } .w63 { width: 63%; } .w80 { width: 80%; } .w90 { width: 90%; }
.pseudo-block {
  margin-top: 5vh;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(14px, 1.7vw, 23px);
  color: var(--chalk);
  display: grid;
  gap: 10px;
}
.crossed { color: var(--red); text-decoration: line-through 5px var(--acid); }
.hostile-options { position: absolute; left: 8vw; right: 7vw; bottom: 9vh; z-index: 10; display: flex; justify-content: space-between; gap: 24px; }
.hostile, .fork-button {
  border: 3px solid var(--acid);
  color: var(--acid);
  background: var(--void);
  padding: 16px 22px;
  font-family: "Archivo Black", sans-serif;
  text-transform: uppercase;
  letter-spacing: -.03em;
  font-size: clamp(18px, 3vw, 42px);
  cursor: pointer;
  box-shadow: 8px 8px 0 var(--red);
  transition: transform .18s steps(2, end), background .18s steps(2, end), color .18s steps(2, end), opacity .18s;
}
.hostile:hover, .fork-button:hover { transform: translate(-6px, -5px) rotate(-1deg); background: var(--acid); color: var(--void); }
.hostile-options:has(.hostile:hover) .hostile:not(:hover) { opacity: .28; }
.fault-line { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.stair-number { position: absolute; right: 5vw; top: 4vh; font-family: "Archivo Black"; font-size: 20vw; color: transparent; -webkit-text-stroke: 3px var(--plywood); opacity: .35; }

.evidence-scene::before { background: linear-gradient(108deg, var(--void) 0 43%, var(--chalk) 43% 66%, var(--cobalt) 66%); }
.diagonal-barricade { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 24px, var(--acid) 24px 40px, var(--void) 40px 56px); clip-path: polygon(0 0, 22% 0, 100% 82%, 100% 100%, 78% 100%, 0 18%); opacity: .65; }
.evidence-board { position: relative; z-index: 2; width: min(900px, 78vw); margin: 8vh 0 0 9vw; padding: 30px; background: rgba(17,17,17,.92); border: 5px solid var(--chalk); box-shadow: 18px 18px 0 var(--red); }
.scene h2 { font-size: clamp(54px, 10vw, 150px); }
.string-map { height: 34vh; position: relative; margin: 20px 0; background: var(--chalk); border: 3px solid var(--void); overflow: hidden; }
.string-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.branch-path { fill: none; stroke-width: 5; stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1.1s steps(7, end); }
.branch-path.primary { stroke: var(--red); } .branch-path.secondary { stroke: var(--cobalt); } .branch-path.contradiction { stroke: var(--violet); stroke-dasharray: 20 13; }
.scene.in-view .branch-path { stroke-dashoffset: 0; }
.pin { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--red); border: 4px solid var(--void); z-index: 3; }
.p1 { left: 6%; top: 17%; } .p2 { left: 31%; top: 38%; } .p3 { right: 18%; top: 22%; } .p4 { right: 6%; bottom: 18%; }
.evidence-tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; font-family: "IBM Plex Mono", monospace; color: var(--void); }
.evidence-tags article { background: var(--plywood); padding: 14px; min-height: 110px; transform: rotate(var(--r, -1deg)); }
.evidence-tags article:nth-child(2) { --r: 2deg; background: var(--acid); } .evidence-tags article:nth-child(3) { --r: -3deg; background: var(--chalk); }
.evidence-tags b { font-family: "Archivo Black"; font-size: 52px; float: left; margin-right: 10px; }
.confession-strip { position: absolute; right: 5vw; bottom: 9vh; width: min(420px, 36vw); background: var(--chalk); color: var(--void); padding: 24px; transform: rotate(-4deg); z-index: 3; font-size: 22px; }
.stamp { position: absolute; font-family: "Archivo Black"; border: 7px solid currentColor; padding: 10px 20px; color: var(--red); text-transform: uppercase; transform: rotate(-13deg); opacity: .86; z-index: 5; mix-blend-mode: hard-light; }
.stamp-evidence { right: 10vw; top: 12vh; font-size: clamp(36px, 7vw, 96px); }

.ledger-scene::before { background: linear-gradient(90deg, var(--plywood) 0 57%, var(--void) 57%); }
.ledger-left { padding: 10vh 8vw; color: var(--void); width: 62%; }
.ledger-left h2 { color: var(--void); text-shadow: 5px 5px 0 var(--acid); }
.cost-table { width: 100%; border-collapse: collapse; margin-top: 5vh; font-family: "IBM Plex Mono"; font-size: clamp(14px, 1.6vw, 22px); background: var(--chalk); box-shadow: 12px 12px 0 var(--violet); }
.cost-table th, .cost-table td { border: 3px solid var(--void); padding: 17px; text-align: left; }
.cost-table th { font-family: "Archivo Black"; text-transform: uppercase; }
.mark { color: var(--red); }
.ledger-right { position: absolute; right: 6vw; top: 13vh; bottom: 12vh; width: 30vw; display: grid; place-items: center; }
.decision-token { width: 210px; height: 210px; border-radius: 50%; background: var(--void); color: var(--acid); border: 12px solid var(--acid); display: grid; place-items: center; font-family: "Archivo Black"; font-size: 140px; box-shadow: -22px 22px 0 var(--red); transition: transform .35s steps(4, end); }
.decision-token.flipped { transform: rotateY(180deg) rotate(14deg); }
.receipt-stack { background: var(--chalk); color: var(--void); padding: 22px; width: 90%; font-family: "IBM Plex Mono"; transform: rotate(5deg); display: grid; gap: 8px; }
.fork-button { position: absolute; left: 9vw; bottom: 9vh; font-size: clamp(16px, 2vw, 28px); }
.stamp-cost { right: 20vw; bottom: 12vh; font-size: clamp(48px, 9vw, 130px); color: var(--violet); }

.exit-scene::before { background: linear-gradient(90deg, var(--violet) 0 38%, var(--void) 38% 100%); }
.false-door { position: absolute; left: 8vw; top: 10vh; width: 36vw; height: 74vh; border: 5px solid var(--acid); padding: 24px; background: rgba(75,18,72,.75); }
.door-silhouette { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 38%; height: 62%; background: var(--void); border: 4px solid var(--chalk); border-bottom: 0; }
.false-door h2 { position: relative; z-index: 1; color: var(--acid); }
.false-door p { position: absolute; bottom: 22px; left: 24px; right: 24px; font-size: 24px; }
.exit-code { position: absolute; right: 7vw; top: 14vh; width: 43vw; }
pre { font-family: "IBM Plex Mono"; font-size: clamp(18px, 2.5vw, 38px); white-space: pre-wrap; background: var(--chalk); color: var(--void); padding: 32px; border-left: 18px solid var(--red); box-shadow: 16px 16px 0 var(--cobalt); }
.hazard-tape { margin-top: 8vh; display: flex; gap: 12px; overflow: hidden; transform: rotate(-3deg); }
.hazard-tape span { flex: 1; background: var(--acid); color: var(--void); font-family: "Archivo Black"; font-size: 34px; padding: 14px; text-align: center; }
.stamp-exit { left: 22vw; top: 46vh; color: var(--red); font-size: clamp(34px, 7vw, 96px); }

.commit-scene::before { background: radial-gradient(circle at 50% 50%, var(--violet) 0 18%, transparent 18%), linear-gradient(90deg, var(--void) 0 50%, var(--cobalt) 50%); }
.commit-header { padding: 8vh 8vw 0; text-align: center; }
.commit-header h2 { text-shadow: 7px 0 var(--red), -7px 0 var(--acid); }
.commit-header p:last-child { font-size: clamp(20px, 2.4vw, 36px); margin: 10px 0; }
.lever-room { height: 58vh; display: flex; align-items: center; justify-content: center; gap: 8vw; }
.lever { width: 19vw; min-width: 170px; height: 42vh; background: var(--chalk); border: 6px solid var(--void); color: var(--void); position: relative; cursor: pointer; box-shadow: 14px 14px 0 var(--red); transition: transform .22s steps(2, end); }
.lever:hover { transform: translateY(18px) rotate(3deg); }
.lever span { position: absolute; left: 50%; top: 12%; width: 26px; height: 65%; transform: translateX(-50%) rotate(-13deg); background: var(--void); transform-origin: bottom; }
.lever:hover span, .lever.pulled span { transform: translateX(-50%) rotate(18deg); background: var(--red); }
.lever b { position: absolute; bottom: 22px; left: 0; right: 0; font-family: "Archivo Black"; font-size: 34px; }
.commit-wedge { width: 22vw; min-width: 220px; height: 24vh; display: grid; place-items: center; background: var(--void); color: var(--acid); border: 8px solid var(--acid); clip-path: polygon(50% 0, 100% 100%, 0 100%); font-family: "Space Grotesk"; font-size: clamp(28px, 5vw, 72px); text-transform: uppercase; }
.verdict { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%) rotate(-10deg) scale(.3); opacity: 0; font-family: "Archivo Black"; font-size: clamp(48px, 10vw, 150px); color: var(--red); border: 9px solid var(--red); padding: 12px 24px; transition: opacity .22s steps(2, end), transform .22s steps(2, end); pointer-events: none; z-index: 20; white-space: nowrap; }
.verdict.show { opacity: 1; transform: translate(-50%, -50%) rotate(-10deg) scale(1); }
.commit-hash { position: absolute; left: 8vw; bottom: 5vh; font-family: "IBM Plex Mono"; color: var(--acid); }

.doubt-particles { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.particle { position: absolute; font-family: "IBM Plex Mono"; color: var(--acid); opacity: .65; font-size: 18px; transform: translate3d(0,0,0); }
.third-flash { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--violet); color: var(--acid); font-family: "Archivo Black"; font-size: clamp(44px, 9vw, 140px); text-align: center; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.third-flash.show { animation: flashThird .38s steps(2, end); }
@keyframes flashThird { 0%, 100% { opacity: 0; } 18%, 58% { opacity: .94; } }
.redaction.sweep { animation: redactSweep .7s steps(5, end); }
@keyframes redactSweep { from { transform: scaleX(.08); } to { transform: scaleX(1); } }

@media (max-width: 760px) {
  .doubt-rail { display: none; }
  .scene-half { padding: 7vh 5vw; }
  .confession-half { align-items: flex-end; }
  .paper-note { width: 82vw; min-height: 300px; }
  .hostile-options, .evidence-tags, .lever-room { flex-direction: column; display: flex; }
  .evidence-tags { display: grid; grid-template-columns: 1fr; }
  .ledger-left, .exit-code, .false-door { width: 88vw; left: 6vw; right: auto; }
  .ledger-right { display: none; }
  .exit-code { top: 48vh; }
  .false-door { height: 38vh; }
}
