:root {
  --design-font-check: "IBM Plex Sans** Sans* San for crisp explanations";
  --morning-paper: #F7F1E4;
  --graphite-ink: #20242A;
  --clear-sky-blue: #7DB7E8;
  --reasoning-amber: #F2B84B;
  --correction-coral: #E96D5A;
  --sage-gray-green: #9FB8A5;
  --vellum-white: #FFFDF6;
  --progress: 0;
  --scene-progress: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--graphite-ink);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    linear-gradient(90deg, rgba(125, 183, 232, .18) 1px, transparent 1px) 0 0 / 88px 88px,
    linear-gradient(0deg, rgba(32, 36, 42, .055) 1px, transparent 1px) 0 0 / 100% 34px,
    var(--morning-paper);
  overflow-x: hidden;
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .42;
  background-image:
    radial-gradient(circle at 13% 21%, rgba(32, 36, 42, .08) 0 1px, transparent 1.7px),
    radial-gradient(circle at 74% 44%, rgba(159, 184, 165, .18) 0 1px, transparent 1.8px),
    radial-gradient(circle at 41% 83%, rgba(233, 109, 90, .10) 0 1px, transparent 2px);
  background-size: 37px 41px, 53px 59px, 71px 67px;
  mix-blend-mode: multiply;
}

.sun-line {
  position: fixed;
  left: calc(5vw + (90vw * var(--progress)));
  top: 0;
  width: 3px;
  height: 100vh;
  z-index: 8;
  background: linear-gradient(to bottom, transparent, var(--reasoning-amber) 18%, rgba(242, 184, 75, .68) 72%, transparent);
  box-shadow: 0 0 24px rgba(242, 184, 75, .42);
  transition: left .12s linear;
  pointer-events: none;
}

.sun-line span {
  position: absolute;
  top: 26px;
  left: 10px;
  font: 600 11px/1 "IBM Plex Mono", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--graphite-ink);
  background: rgba(255, 253, 246, .66);
  padding: 8px 10px;
  border: 1px solid rgba(32, 36, 42, .18);
}

.day-index {
  position: fixed;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  z-index: 9;
  display: grid;
  gap: 18px;
  font: 500 12px/1 "IBM Plex Mono", monospace;
}

.day-index a {
  color: var(--graphite-ink);
  text-decoration: none;
  padding-left: 18px;
  position: relative;
  opacity: .56;
  transition: opacity .25s ease, transform .25s ease;
}

.day-index a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid var(--graphite-ink);
  background: var(--vellum-white);
  transform: translateY(-50%) rotate(45deg);
}

.day-index a.active { opacity: 1; transform: translateX(4px); }
.day-index a.active::before { background: var(--reasoning-amber); }

.proof-table { position: relative; z-index: 2; }

.scene {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(112px, 14vw) 1fr;
  position: relative;
  isolation: isolate;
  padding-right: clamp(18px, 4vw, 64px);
}

.scene::before {
  content: "";
  position: absolute;
  inset: -10% -10%;
  z-index: -1;
  background: linear-gradient(112deg, transparent 0 28%, rgba(255, 253, 246, .46) 28.3% 39%, transparent 39.4% 100%);
  transform: translateX(calc((var(--scene-progress) - .5) * 52px));
}

.margin-rail {
  border-right: 1px solid rgba(32, 36, 42, .22);
  padding: 42px 20px 0 22px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-direction: column;
  min-height: 100vh;
  background: rgba(255, 253, 246, .21);
}

.time-stamp, .premise-no, .glyph, .today-strip, .claim-label, .table-label, .dial-label, .decision-ledger span {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.time-stamp { font-size: 14px; font-weight: 600; }
.premise-no { color: var(--correction-coral); font-size: 12px; }
.glyph { writing-mode: vertical-rl; font-size: 11px; opacity: .62; margin-top: auto; margin-bottom: 54px; }

.scene-field {
  min-height: 100vh;
  position: relative;
  padding: clamp(54px, 8vw, 108px) clamp(20px, 5vw, 80px);
}

.today-strip {
  position: absolute;
  top: 34px;
  left: clamp(20px, 5vw, 80px);
  display: inline-block;
  padding: 9px 16px;
  background: var(--reasoning-amber);
  color: var(--graphite-ink);
  box-shadow: 10px 10px 0 rgba(32, 36, 42, .08);
  font-size: 11px;
}

.today-strip.blue { background: var(--clear-sky-blue); }
.today-strip.amber { background: var(--reasoning-amber); }
.today-strip.sage { background: var(--sage-gray-green); }
.today-strip.coral { background: var(--correction-coral); color: var(--vellum-white); }

.calendar-stack { position: absolute; top: 82px; right: 8vw; width: 320px; height: 220px; }
.sheet {
  position: absolute;
  width: 230px;
  height: 148px;
  padding: 22px;
  background: rgba(255, 253, 246, .56);
  border: 1px solid rgba(32, 36, 42, .18);
  backdrop-filter: blur(3px);
  font: 500 18px/1 "Newsreader", serif;
  box-shadow: 0 18px 40px rgba(32, 36, 42, .08);
}
.sheet::after { content: ""; position: absolute; right: 0; top: 0; border-width: 0 34px 34px 0; border-style: solid; border-color: transparent var(--morning-paper) transparent transparent; }
.sheet-one { transform: rotate(-6deg); left: 0; top: 12px; }
.sheet-two { transform: rotate(7deg); left: 62px; top: 42px; color: var(--correction-coral); }
.sheet-three { transform: rotate(-2deg); left: 28px; top: 92px; color: var(--sage-gray-green); }

.domain-title {
  margin: 12vh 0 0;
  max-width: 980px;
  font: 600 clamp(74px, 13vw, 184px)/.78 "Newsreader", serif;
  letter-spacing: -.075em;
  position: relative;
  z-index: 2;
}
.domain-title span { color: var(--correction-coral); }

.title-annotations {
  display: flex;
  gap: 14px;
  margin: 24px 0 0 8px;
  flex-wrap: wrap;
}
.title-annotations span {
  opacity: 0;
  transform: translateY(12px) rotate(-2deg);
  padding: 8px 12px;
  background: rgba(255, 253, 246, .72);
  border: 1px solid rgba(32, 36, 42, .2);
  font: 500 12px/1 "IBM Plex Mono", monospace;
  transition: opacity .45s ease, transform .45s ease;
}
.title-annotations.visible span { opacity: 1; transform: translateY(0) rotate(-2deg); }
.title-annotations.visible span:nth-child(2) { transition-delay: .12s; }
.title-annotations.visible span:nth-child(3) { transition-delay: .24s; }
.title-annotations.visible span:nth-child(4) { transition-delay: .36s; }

.opening-thought {
  max-width: 720px;
  margin: 42px 0;
  font: 400 clamp(24px, 3vw, 42px)/1.08 "Newsreader", serif;
}

.premise-table {
  width: min(760px, 100%);
  padding: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid rgba(32, 36, 42, .2);
  background: rgba(255, 253, 246, .55);
  box-shadow: inset 0 0 0 8px rgba(247, 241, 228, .38);
}
.table-label { width: 100%; margin: 0 0 4px; font-size: 11px; }
.premise-chip {
  border: 1px solid rgba(32, 36, 42, .26);
  background: rgba(255, 253, 246, .8);
  color: var(--graphite-ink);
  padding: 13px 16px;
  font: 500 14px/1.2 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.premise-chip.active, .premise-chip:hover { transform: translate(-2px, -5px) rotate(-1deg); background: var(--reasoning-amber); box-shadow: 6px 8px 0 rgba(32, 36, 42, .12); }

.because-svg { position: absolute; pointer-events: none; overflow: visible; }
.because-svg path { fill: none; stroke: var(--graphite-ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .76; }
.because-svg circle { fill: var(--reasoning-amber); stroke: var(--graphite-ink); stroke-width: 1.5; }
.hero-thread { right: 5vw; bottom: 5vh; width: min(58vw, 820px); height: 260px; }
.thread-drawn path { animation: drawThread 1.8s ease forwards; }
@keyframes drawThread { to { stroke-dashoffset: 0; } }

.split-field { display: grid; grid-template-columns: minmax(320px, 1.1fr) minmax(280px, .9fr); gap: clamp(24px, 6vw, 84px); align-items: center; }
.claim-board {
  position: relative;
  padding: clamp(30px, 5vw, 70px);
  background: rgba(255, 253, 246, .68);
  border: 1px solid rgba(32, 36, 42, .22);
  box-shadow: 18px 22px 0 rgba(125, 183, 232, .24);
}
.claim-label { color: var(--correction-coral); font-size: 12px; }
.revising-claim { font: 600 clamp(46px, 7vw, 94px)/.88 "Newsreader", serif; letter-spacing: -.045em; margin: 18px 0; }
.revising-claim span { background-image: linear-gradient(var(--correction-coral), var(--correction-coral)); background-size: calc(var(--scene-progress) * 100%) 7px; background-position: 0 54%; background-repeat: no-repeat; }
.revision-lines p { margin: 8px 0; padding-left: 16px; border-left: 3px solid var(--clear-sky-blue); font-size: clamp(18px, 2vw, 24px); }
.amber-marker { display: inline-block; margin-top: 22px; background: rgba(242, 184, 75, .46); padding: 5px 8px; }

.premise-dial { display: grid; place-items: center; }
.dial-face {
  position: relative;
  width: min(46vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--graphite-ink);
  background: radial-gradient(circle, rgba(255, 253, 246, .72), rgba(125, 183, 232, .22));
  box-shadow: inset 0 0 0 22px rgba(255, 253, 246, .48), 0 20px 60px rgba(32, 36, 42, .08);
}
.dial-face strong { position: absolute; inset: 45% 0 auto; text-align: center; font: 500 24px/1 "Newsreader", serif; }
.dial-label { position: absolute; font-size: 11px; }
.dial-label.top { top: 26px; left: 50%; transform: translateX(-50%); }
.dial-label.left { left: 25px; top: 54%; }
.dial-label.right { right: 25px; top: 54%; }
.dial-hand { position: absolute; left: 50%; top: 50%; width: 2px; height: 42%; transform-origin: 50% 0; background: var(--graphite-ink); }
.hand-observed { transform: rotate(calc(-42deg + var(--progress) * 210deg)); background: var(--clear-sky-blue); }
.hand-assumed { height: 35%; transform: rotate(calc(86deg + var(--progress) * 130deg)); background: var(--correction-coral); }
.hand-unknown { height: 28%; transform: rotate(calc(180deg + var(--progress) * 100deg)); background: var(--sage-gray-green); }
.counter-window {
  position: absolute;
  right: 7vw;
  bottom: 9vh;
  width: min(330px, 32vw);
  padding: 22px;
  background: rgba(255, 253, 246, .78);
  border: 1px solid rgba(32, 36, 42, .2);
  transform: translateX(calc((1 - var(--scene-progress)) * 60px));
  opacity: calc(.25 + var(--scene-progress) * .75);
}
.counter-window b { display: block; font: 600 12px/1.2 "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }

.noon-scene { background: linear-gradient(180deg, transparent, rgba(242, 184, 75, .08)); }
.balance-field h2, .consequence-field h2, .ledger-field h2 { max-width: 900px; margin: 8vh 0 42px; font: 500 clamp(44px, 7vw, 102px)/.94 "Newsreader", serif; letter-spacing: -.045em; }
.scale-instrument { height: 360px; position: relative; display: grid; place-items: center; }
.scale-beam { position: relative; width: min(760px, 78vw); height: 5px; background: var(--graphite-ink); transform: rotate(calc(-6deg + var(--scene-progress) * 10deg)); transition: transform .2s linear; }
.scale-beam::before { content: ";"; position: absolute; left: 50%; top: -56px; transform: translateX(-50%); font: 700 112px/1 "Newsreader", serif; color: var(--reasoning-amber); }
.pan { position: absolute; top: 42px; width: 210px; min-height: 124px; display: grid; place-items: center; text-align: center; border: 1px solid rgba(32, 36, 42, .28); background: rgba(255, 253, 246, .72); }
.pan::before { content: ""; position: absolute; top: -44px; width: 1px; height: 44px; background: var(--graphite-ink); }
.pan-left { left: 0; }
.pan-right { right: 0; }
.pan span { font: 500 11px/1.2 "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .12em; }
.pan strong { font: 600 40px/1 "Newsreader", serif; }
.scale-post { width: 2px; height: 170px; background: var(--graphite-ink); transform: translateY(-54px); }
.evidence-tiles { display: flex; gap: 14px; flex-wrap: wrap; max-width: 820px; }
.evidence-tiles span { padding: 16px 18px; background: rgba(125, 183, 232, .35); border: 1px solid rgba(32, 36, 42, .18); }
.scale-thread { left: 18vw; bottom: 12vh; width: 70vw; height: 320px; }
.scale-thread .second { stroke: var(--sage-gray-green); }

.afternoon-scene { background: linear-gradient(180deg, rgba(159, 184, 165, .09), transparent); }
.branch-map { position: relative; min-height: 470px; }
.branch-node {
  position: absolute;
  padding: 18px 22px;
  background: rgba(255, 253, 246, .74);
  border: 1px solid rgba(32, 36, 42, .22);
  box-shadow: 8px 10px 0 rgba(159, 184, 165, .28);
  font: 500 clamp(18px, 2.2vw, 28px)/1.05 "Newsreader", serif;
}
.root { left: 2%; top: 10%; background: var(--sage-gray-green); }
.branch-a { left: 43%; top: 36%; }
.branch-b { right: 6%; top: 16%; background: rgba(125, 183, 232, .32); }
.branch-c { right: 1%; bottom: 8%; background: rgba(242, 184, 75, .28); }
.branch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.doubt-dust { position: absolute; inset: 0; pointer-events: none; }
.dust {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(32, 36, 42, .34);
  transform: translate(var(--dx), var(--dy));
  opacity: calc(.78 - var(--scene-progress) * .65);
  transition: transform 1.2s ease, opacity 1.2s ease;
}

.dusk-scene { background: linear-gradient(180deg, rgba(125, 183, 232, .08), rgba(233, 109, 90, .13)); }
.decision-ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 1120px;
  border: 1px solid rgba(32, 36, 42, .22);
  background: rgba(32, 36, 42, .22);
  box-shadow: 0 0 70px rgba(242, 184, 75, .22);
}
.decision-ledger div { min-height: 260px; padding: 28px; background: rgba(255, 253, 246, .76); }
.decision-ledger span { font-size: 12px; color: var(--correction-coral); }
.decision-ledger p { font: 400 clamp(22px, 2.6vw, 34px)/1.1 "Newsreader", serif; }
.closing-seal {
  display: inline-block;
  margin-top: 40px;
  padding: 18px 28px;
  border-radius: 50%;
  background: var(--reasoning-amber);
  border: 1px solid var(--graphite-ink);
  transform: rotate(-5deg);
  font: 600 24px/1 "Newsreader", serif;
  box-shadow: 12px 14px 0 rgba(32, 36, 42, .12);
}

@media (max-width: 860px) {
  .day-index { display: none; }
  .scene { grid-template-columns: 58px 1fr; padding-right: 0; }
  .margin-rail { padding: 22px 10px; }
  .glyph { display: none; }
  .scene-field { padding: 76px 18px 42px; }
  .split-field { display: block; }
  .calendar-stack { opacity: .35; right: -80px; }
  .domain-title { font-size: 19vw; }
  .counter-window { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 20px; }
  .dial-face { width: min(78vw, 360px); margin: 36px auto; }
  .decision-ledger { grid-template-columns: 1fr; }
  .branch-node { position: relative; inset: auto; display: inline-block; margin: 12px; }
  .branch-lines { display: none; }
}
