/* Conference-room flow: one question, one visual, one checkpoint. */
.context-stage {
  padding-top: 28px;
  padding-bottom: 80px;
}

.context-copy {
  display: grid;
  grid-template-columns: .42fr 1.58fr;
  gap: 16px 40px;
  align-items: start;
  margin: 34px 0 26px;
}

.context-copy h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(2.9rem, 6vw, 6rem);
  line-height: .94;
  letter-spacing: -.06em;
}

.context-copy > p:last-child {
  grid-column: 2;
  max-width: 740px;
  margin: 0;
  color: #c7cad0;
  font-size: 1.12rem;
}

.episode-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #11171d, #090c10 70%);
  box-shadow: 0 28px 90px #0006;
}

.episode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: #090c10;
}

.episode-tabs button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 1px 10px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.episode-tabs button:last-child {
  border-right: 0;
}

.episode-tabs button > span {
  grid-row: 1 / span 2;
  color: #68717c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}

.episode-tabs button b,
.episode-tabs button small {
  display: block;
}

.episode-tabs button b {
  color: var(--ink);
}

.episode-tabs button small {
  font-size: .72rem;
}

.episode-tabs button[aria-selected="true"] {
  box-shadow: inset 0 -3px var(--amber);
  background: #ffb4440b;
}

.episode-tabs button[aria-selected="true"] > span,
.episode-tabs button[aria-selected="true"] b {
  color: var(--amber);
}

.lesson-episode {
  padding: 30px;
}

.lesson-episode[hidden] {
  display: none !important;
}

#episode1 {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 28px;
  align-items: center;
}

.episode-copy h2 {
  margin: 7px 0 13px;
  font-size: clamp(1.8rem, 3.3vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.episode-copy > p:not(.episode-number, .episode-answer, .checkpoint) {
  color: var(--muted);
}

.episode-number {
  margin: 0;
  color: var(--cyan);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .15em;
}

.episode-answer {
  margin: 0;
  color: var(--amber);
  font-size: 1.25rem;
  font-weight: 900;
}

.term-card {
  margin: 14px 0 0;
  padding: 15px 16px;
  border: 1px solid #7ee7e12b;
  border-radius: 9px;
  background: #7ee7e109;
}

.term-card dt {
  color: var(--cyan);
  font-weight: 900;
}

.term-card dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.checkpoint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #d6d9dd;
  font-size: .82rem;
}

.checkpoint span {
  color: var(--amber);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.episode-next {
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: #ffb4440b;
  color: var(--amber);
  font-weight: 800;
  cursor: pointer;
}

.episode-next:hover {
  background: var(--amber);
  color: #15120b;
}

.episode-one-visual {
  display: grid;
  gap: 12px;
}

.episode-film {
  box-shadow: none;
}

.coverage-board {
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #080b0f;
}

.coverage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.coverage-head span,
.coverage-head b {
  display: block;
}

.coverage-head span {
  color: var(--cyan);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.coverage-head b {
  margin-top: 2px;
}

.coverage-head small {
  color: var(--muted);
  font-size: .68rem;
}

.coverage-grid {
  display: grid;
  grid-template-columns: minmax(78px, 1.3fr) repeat(4, 1fr);
  gap: 5px;
  align-items: stretch;
}

.coverage-grid > b,
.coverage-grid > strong {
  display: grid;
  place-items: center;
  min-height: 27px;
  color: #8f969f;
  font-size: .64rem;
}

.coverage-grid > strong {
  place-items: center start;
}

.coverage-grid > i {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 5px;
  font-size: .6rem;
  font-style: normal;
  text-transform: uppercase;
}

.coverage-grid > i.seen {
  background: #8be28b20;
  color: var(--green);
}

.coverage-grid > i.rare {
  background: #ffb44420;
  color: var(--amber);
  animation: coveragePulse 2.4s ease-in-out infinite;
}

.coverage-grid > i.gap {
  border: 1px dashed #ff6d6845;
  background: repeating-linear-gradient(135deg, #ff6d6807 0 5px, #ff6d6813 5px 7px);
  color: #d77975;
}

.coverage-legend {
  display: flex;
  gap: 15px;
  margin-top: 11px;
  color: var(--muted);
  font-size: .65rem;
}

.coverage-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.coverage-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.coverage-legend i.seen { background: var(--green); }
.coverage-legend i.rare { background: var(--amber); }
.coverage-legend i.gap { background: var(--danger); }

@keyframes coveragePulse {
  50% { box-shadow: inset 0 0 0 1px #ffb44470, 0 0 16px #ffb44416; }
}

.wide-copy {
  max-width: 850px;
  margin-bottom: 22px;
}

.wide-copy > p:last-child {
  max-width: 790px;
  margin-bottom: 0;
}

.wide-copy > p:last-child b {
  color: var(--ink);
}

.why-cosmos-line {
  margin: 13px 0 0;
  padding-left: 13px;
  border-left: 3px solid #76b900;
  color: #b8bec6 !important;
  font-size: .9rem;
}

.why-cosmos-line b {
  color: #9cdf42;
}

.transfer-studio {
  display: grid;
  grid-template-columns: .9fr 132px 1.2fr;
  gap: 13px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #07090c;
}

.transfer-studio figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #303741;
  border-radius: 9px;
  background: #0e1318;
}

.transfer-studio video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020304;
  object-fit: cover;
}

.transfer-studio figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  font-size: .7rem;
}

.transfer-studio figcaption > span {
  color: var(--cyan);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.transfer-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.transfer-inputs figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.transfer-inputs figcaption {
  display: block;
}

.transfer-inputs figcaption b {
  display: block;
}

.cosmos-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid #76b90070;
  border-radius: 10px;
  background: radial-gradient(circle, #76b90022, #0c1308 70%);
  text-align: center;
}

.cosmos-core small {
  color: #9ba390;
  font-size: .53rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.cosmos-core b {
  margin: 8px 0;
  color: #8bd324;
  font-size: 1.15rem;
  line-height: 1.05;
}

.cosmos-core span {
  color: #c3c9bd;
  font-size: .65rem;
}

.cosmos-core i {
  position: absolute;
  left: -30%;
  top: 0;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #c8ff7c22, transparent);
  transform: skewX(-18deg);
  animation: cosmosScan 3.4s ease-in-out infinite;
}

@keyframes cosmosScan {
  55%, 100% { left: 115%; }
}

.transfer-output {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.transfer-output video {
  flex: 1;
}

.control-switchboard {
  display: grid;
  grid-template-columns: 1.1fr 1fr 180px;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0a0d11;
}

.control-copy > span,
.control-copy > b {
  display: block;
}

.control-copy > span {
  color: var(--cyan);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .11em;
}

.control-copy > b {
  margin-top: 3px;
}

.control-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .74rem;
}

.control-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.control-pills > span {
  padding: 6px 9px;
  border: 1px solid #343b44;
  border-radius: 999px;
  color: #aeb4bc;
  font-size: .66rem;
}

.control-pills > span.used {
  border-color: var(--amber);
  background: #ffb44410;
  color: var(--amber);
}

.control-pills small {
  margin-left: 4px;
  color: var(--ink);
}

.depth-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #3d4650;
  border-radius: 8px;
  background: #07090c;
}

.depth-preview {
  position: relative;
  height: 82px;
  overflow: hidden;
  background: linear-gradient(#111727 0 38%, #30364e 39%, #f2df9a 100%);
}

.depth-preview .depth-building {
  position: absolute;
  bottom: 36%;
  width: 30%;
  height: 45%;
  background: linear-gradient(#20283b, #777890);
  clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 100%);
}

.depth-preview .depth-building.left { left: 0; }
.depth-preview .depth-building.right { right: 0; transform: scaleX(-1); }

.depth-preview .depth-road {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -10%;
  height: 62%;
  background: linear-gradient(#696b7e, #fff3b5);
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
}

.depth-preview .depth-car {
  position: absolute;
  left: 46%;
  bottom: 25%;
  width: 10%;
  height: 16%;
  border-radius: 3px 3px 1px 1px;
  background: #dad3a5;
  box-shadow: 0 0 10px #fff5be88;
}

.depth-preview > span,
.depth-preview > b {
  position: absolute;
  z-index: 2;
  font-size: .48rem;
  letter-spacing: .08em;
}

.depth-preview > span { top: 5px; left: 7px; color: #77839d; }
.depth-preview > b { right: 7px; bottom: 5px; color: #2d291b; }

.depth-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  font-size: .57rem;
}

.depth-card figcaption span {
  color: var(--muted);
}

.intro-weather-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
}

.intro-weather-tabs > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.intro-weather-tabs button {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0e12;
  color: var(--ink);
  cursor: pointer;
}

.intro-weather-tabs button[aria-pressed="true"] {
  border-color: var(--cyan);
  background: #7ee7e112;
  color: var(--cyan);
}

.intro-weather-tabs small {
  margin-left: auto;
  color: var(--muted);
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 14px 0;
}

.concept-grid .term-card {
  margin: 0;
}

.data-loop-card {
  margin-top: 18px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(120deg, #111820, #0b0f13);
}

.loop-copy {
  display: grid;
  grid-template-columns: .55fr 1.05fr 1fr;
  gap: 22px;
  align-items: start;
}

.loop-copy h3,
.loop-copy > p:last-child {
  margin: 0;
}

.loop-copy h3 {
  font-size: 1.25rem;
}

.loop-copy > p:last-child {
  color: var(--muted);
  font-size: .85rem;
}

.iteration-loop {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.iteration-loop > div {
  padding: 13px;
  border: 1px solid #363e47;
  border-radius: 8px;
  background: #080b0f;
}

.iteration-loop span,
.iteration-loop b,
.iteration-loop small {
  display: block;
}

.iteration-loop span {
  color: var(--amber);
  font-size: .63rem;
}

.iteration-loop small {
  color: var(--muted);
}

.iteration-loop > i {
  color: var(--amber);
  font-style: normal;
  animation: arrowGlow 2s ease-in-out infinite;
}

.iteration-loop > i:nth-of-type(2) { animation-delay: .3s; }
.iteration-loop > i:nth-of-type(3) { animation-delay: .6s; }

@keyframes arrowGlow {
  50% { color: var(--cyan); text-shadow: 0 0 12px #7ee7e177; }
}

.validation-note {
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #9299a2;
  font-size: .74rem;
}

.validation-note b {
  color: #cfd3d8;
}

.model-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #76b9003d;
  border-radius: 9px;
  background: #76b90009;
  font-size: .77rem;
}

.model-note > span {
  color: #8bd324;
  font-weight: 900;
  letter-spacing: .1em;
}

.model-note p {
  margin: 0;
  color: var(--muted);
}

.model-note a {
  color: #a9e956;
  text-decoration: none;
}

.candidate-reel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #07090c;
}

.candidate-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.candidate-mini-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #303741;
  border-radius: 9px;
  background: #0d1116;
}

.candidate-mini-grid figure.candidate-feature {
  border-color: var(--amber);
  box-shadow: 0 0 24px #ffb44418;
}

.candidate-mini-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.candidate-mini-grid figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  font-size: .72rem;
}

.candidate-mini-grid figcaption span {
  color: var(--muted);
}

.judge-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1.6fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.judge-diagram > div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c1014;
}

.judge-diagram > div > span,
.judge-diagram > div > b {
  display: block;
}

.judge-diagram > div > span {
  color: var(--cyan);
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.judge-diagram > div > b {
  margin-top: 4px;
  font-size: .83rem;
}

.judge-diagram > i {
  color: var(--amber);
  font-style: normal;
}

.rubric-bars {
  display: block;
}

.rubric-bars > span,
.rubric-bars > b {
  display: block;
}

.rubric-bars > div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 9px;
  align-items: center;
  margin-top: 4px;
}

.rubric-bars em {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #30363e;
}

.rubric-bars em u {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  text-decoration: none;
}

.rubric-bars small {
  color: var(--muted);
  font-size: .61rem;
}

.conceptual-code {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #06080b;
}

.conceptual-code > span {
  color: #50a8ff;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.conceptual-code code {
  color: #cbd1d8;
  font-size: .78rem;
  line-height: 1.7;
}

.conceptual-code code b {
  color: var(--cyan);
}

.story-bridge {
  margin-top: 14px;
  padding: 24px;
  border-left: 4px solid var(--amber);
  border-radius: 0 12px 12px 0;
  background: #ffb4440b;
}

.story-bridge h2 {
  margin: 5px 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: -.035em;
}

.story-bridge > p:last-child {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
}

.hero {
  padding-top: 28px;
}

.hero-copy {
  margin: 26px 0 20px;
}

.hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 5.7rem);
}

.lede {
  margin-top: 12px;
}

.cold-open-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cold-open-grid .film-frame {
  box-shadow: 0 18px 55px #0007;
}

.hook-card {
  width: 100%;
  margin-top: 12px;
  padding: 16px 20px;
}

.hook-twist {
  margin-top: 12px;
  padding: 18px 22px;
  border: 1px solid var(--amber);
  border-radius: 12px;
  background: #ffb4440c;
}

.hook-twist h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin: 4px 0;
}

.hook-twist p:last-child {
  color: var(--muted);
  margin: 4px 0 0;
}

.mini-code {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #ffffff1f;
  border-radius: 9px;
  background: #07090c;
  color: #d8dde4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem;
}

.mini-code span {
  color: var(--cyan);
}

.learning-ticket {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.learning-ticket span {
  padding: 10px 12px;
  border-radius: 7px;
  background: #ffffff08;
  color: var(--muted);
  font-size: .82rem;
}

.learning-ticket b {
  color: var(--ink);
}

.scroll-cue {
  margin-top: 18px;
}

.judge-stage {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.judge-controls {
  padding: 26px;
  border-right: 1px solid var(--line);
}

.judge-controls h3 {
  margin: 6px 0;
  font-size: 1.6rem;
}

.judge-instruction,
.rubric-caveat {
  color: var(--muted);
}

.judge-instruction {
  margin: 0 0 18px;
}

.judge-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.judge-presets button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #090c10;
  color: var(--ink);
  cursor: pointer;
}

.judge-presets button:hover,
.judge-presets button.active {
  border-color: var(--amber);
  color: var(--amber);
}

.judge-sliders {
  display: grid;
  gap: 18px;
}

.judge-sliders label > span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  align-items: center;
}

.judge-sliders label b,
.judge-sliders label small {
  display: block;
}

.judge-sliders label small {
  grid-column: 1;
  color: var(--muted);
}

.judge-sliders output {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 44px;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: right;
}

.judge-sliders input[type="range"] {
  width: 100%;
  margin: 11px 0 0;
  accent-color: var(--amber);
  cursor: pointer;
}

.rubric-caveat {
  margin: 23px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .75rem;
}

.judge-result {
  padding: 26px;
  background: radial-gradient(circle at 100% 0,#213139 0,transparent 42%),#0b0e12;
}

.judge-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}

.judge-result-head > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

.judge-result-head > p:last-child b {
  color: var(--cyan);
  font-size: 1.35rem;
}

.judge-result video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #343a42;
  border-radius: 9px;
  background: #050608;
  object-fit: cover;
}

.judge-verdict {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 0;
}

.judge-verdict .big-take {
  font-size: 5rem;
}

.judge-verdict h3 {
  margin: 0;
  font-size: 1.8rem;
}

.judge-verdict p {
  margin: 4px 0 0;
  color: var(--muted);
}

.judge-leaderboard {
  display: grid;
  gap: 8px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 20px 70px 1fr 42px;
  gap: 9px;
  align-items: center;
  font-size: .75rem;
}

.leaderboard-row > span {
  color: var(--amber);
}

.leaderboard-row > i {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #30363e;
}

.leaderboard-row > i > em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--amber),var(--cyan));
}

.leaderboard-row > strong {
  color: var(--cyan);
  text-align: right;
}

.production-details {
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--panel);
}

.production-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 24px;
  list-style: none;
}

.production-details > summary::-webkit-details-marker {
  display: none;
}

.production-details > summary b {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  letter-spacing: -.04em;
}

.production-details > summary > span:last-child {
  color: var(--amber);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.production-body {
  padding: 0 24px 24px;
}

.production-lede {
  color: var(--muted);
  margin: 0 0 20px;
}

.stack-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.tech-badge {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0d11;
}

.tech-badge small {
  color: var(--muted);
}

.tech-badge.nvidia b {
  color: #76b900;
}

.tech-badge.ray b {
  color: #50a8ff;
}

.stack-plus {
  color: var(--muted);
}

.code-card {
  margin: 0 0 20px;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #07090c;
  color: #d6dae0;
  font-size: .82rem;
  line-height: 1.65;
}

.code-accent {
  color: #50a8ff;
}

.settings-details {
  margin-top: 14px !important;
  padding: 15px 18px !important;
}

/* Lean opening: three paced visual beats. */
.lean-context {
  padding-bottom: 70px;
}

.lead-copy {
  margin: 32px 0 20px;
}

.lead-copy .kicker {
  margin-bottom: 9px;
}

.lead-copy h1 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: .88;
  letter-spacing: -.068em;
}

.lead-copy h1 em {
  color: var(--amber);
  font-style: normal;
}

.lead-copy > p:not(.kicker, .scope-note) {
  max-width: 760px;
  margin: 20px 0 0;
  color: #c7cad0;
  font-size: 1.12rem;
  line-height: 1.45;
}

.lead-copy > p:last-child {
  max-width: 720px;
  margin: 20px 0 0;
  color: #c7cad0;
  font-size: 1.12rem;
}

.context-primer {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 0 0 24px;
}

.context-primer > div {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, #11171d, #0a0e12);
  box-shadow: inset 0 1px #ffffff08;
  text-align: left;
}

.context-primer > div:nth-of-type(2) {
  border-color: #7ee7e14d;
}

.context-primer > div:nth-of-type(3) {
  border-color: #ffb4444d;
}

.context-primer span {
  display: block;
  margin-bottom: 7px;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.context-primer b {
  display: block;
  color: #f5f6f7;
  font-size: 1.02rem;
}

.context-primer p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.42;
}

.context-primer > i {
  align-self: center;
  color: var(--cyan);
  font-style: normal;
  font-size: 1.3rem;
}

.scope-note.context-scope-note {
  margin: 16px 0 44px;
  padding-top: 4px;
  padding-bottom: 6px;
}

.lean-episodes {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #11171d, #090c10 72%);
  box-shadow: 0 28px 90px #0006;
}

.beat-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: #080b0f;
}

.beat-tabs button {
  position: relative;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #b5bac1;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.beat-tabs button:last-child {
  border-right: 0;
}

.beat-tabs button span {
  margin-right: 9px;
  color: #69717b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.beat-tabs button[aria-selected="true"] {
  background: #ffb4440b;
  color: var(--amber);
  box-shadow: inset 0 -3px var(--amber);
}

.beat-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  animation: beatProgress 9s linear forwards;
}

.lean-episodes.user-controlled .beat-tabs button[aria-selected="true"]::after {
  animation: none;
  transform: scaleX(1);
}

.beat-tabs button[aria-selected="true"] span {
  color: var(--amber);
}

.story-beat {
  min-height: 390px;
  padding: 26px;
}

.story-beat[hidden] {
  display: none !important;
}

#episode1.story-beat {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  grid-template-areas: "copy media" "action media";
  gap: 18px 28px;
  align-items: center;
}

#episode2.story-beat {
  display: grid;
  grid-template-columns: .68fr 1.32fr;
  grid-template-areas: "copy transfer" "switch transfer" "loop loop" "caveat action";
  gap: 14px 26px;
  align-items: center;
}

#episode3.story-beat {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  grid-template-areas: "copy media" "flow media" "action media";
  gap: 14px 28px;
  align-items: center;
}

.beat-copy {
  grid-area: copy;
}

.story-beat .episode-number {
  font-size: .75rem;
}

.beat-copy h2 {
  margin: 7px 0 12px;
  font-size: clamp(1.9rem, 3.4vw, 3.4rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.beat-copy > p:last-of-type {
  margin: 0;
  color: var(--muted);
}

.idea-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.idea-chips span {
  padding: 6px 9px;
  border: 1px solid #7ee7e133;
  border-radius: 999px;
  background: #7ee7e108;
  color: var(--cyan);
  font-size: .72rem;
}

.beat-media {
  grid-area: media;
  margin: 0;
  overflow: hidden;
  border: 1px solid #343b44;
  border-radius: 11px;
  background: #040507;
  box-shadow: 0 22px 60px #0007;
}

.beat-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020304;
  object-fit: cover;
}

.montage-loop video {
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.beat-media figcaption,
.lean-transfer figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: #0d1115;
  color: var(--muted);
  font-size: .75rem;
}

.beat-media figcaption b,
.lean-transfer figcaption b {
  color: var(--ink);
}

.beat-next {
  grid-area: action;
  justify-self: start;
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: #ffb4440b;
  color: var(--amber);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.beat-next:hover {
  background: var(--amber);
  color: #15120b;
}

.lean-transfer {
  grid-area: transfer;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 9px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #06080b;
}

.lean-transfer figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  overflow: hidden;
  border: 1px solid #313842;
  border-radius: 8px;
  background: #0c1014;
}

.lean-transfer video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.transfer-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #76b90070;
  border-radius: 8px;
  background: radial-gradient(circle, #76b90022, #0b1207 72%);
  text-align: center;
}

.transfer-node small {
  color: #a2aa98;
  font-size: .62rem;
}

.transfer-node b {
  margin: 7px 0;
  color: #91d62f;
  line-height: 1.05;
}

.transfer-node span {
  color: #c7cdc0;
  font-size: .68rem;
}

.transfer-node i {
  position: absolute;
  left: -35%;
  top: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #c8ff7c22, transparent);
  transform: skewX(-18deg);
  animation: cosmosScan 3.8s ease-in-out infinite;
}

.weather-switch {
  grid-area: switch;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.weather-switch > span {
  width: 100%;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.weather-switch button {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #080b0f;
  color: var(--ink);
  cursor: pointer;
}

.weather-switch button[aria-pressed="true"] {
  border-color: var(--cyan);
  color: var(--cyan);
}

.quick-loop {
  grid-area: loop;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a0d11;
}

.quick-loop span {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
}

.quick-loop b {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.quick-loop i,
.judge-line > i {
  color: var(--amber);
  font-style: normal;
}

.beat-caveat {
  grid-area: caveat;
  margin: 0;
  color: #858c95;
  font-size: .74rem;
}

#episode2 .beat-next {
  justify-self: end;
}

.judge-reel video {
  aspect-ratio: 16 / 9;
}

.judge-line {
  grid-area: flow;
  display: grid;
  grid-template-columns: 1fr auto 1.3fr auto .8fr;
  gap: 7px;
  align-items: center;
}

.judge-line > span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090c10;
}

.judge-line small,
.judge-line b {
  display: block;
}

.judge-line small {
  color: var(--cyan);
  font-size: .61rem;
  letter-spacing: .08em;
}

.judge-line b {
  margin-top: 2px;
  font-size: .72rem;
}

/* Animated opening diagrams. These behave like GIFs while keeping text crisp. */
#episode1.story-beat,
#episode3.story-beat {
  grid-template-columns: .68fr 1.32fr;
  grid-template-areas: "copy media" "action media";
  gap: 18px 28px;
}

#episode2.story-beat {
  grid-template-columns: .68fr 1.32fr;
  grid-template-areas: "copy media" "meta media" "action media";
  gap: 14px 28px;
}

.beat-meta {
  grid-area: meta;
}

.motion-board {
  grid-area: media;
  margin: 0;
  overflow: hidden;
  border: 1px solid #39434c;
  border-radius: 13px;
  background: #050709;
  box-shadow: 0 24px 70px #0008, 0 0 45px #7ee7e108;
}

.motion-board-head,
.motion-board > figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 13px;
  background: #0d1115;
  font-size: .76rem;
}

.motion-board-head {
  border-bottom: 1px solid #2d343c;
  color: #9ba2aa;
  letter-spacing: .08em;
}

.motion-board-head b {
  color: var(--ink);
}

.motion-board > figcaption {
  border-top: 1px solid #2d343c;
  color: var(--muted);
}

.motion-board > figcaption b {
  flex: 0 0 auto;
  color: var(--amber);
  letter-spacing: .07em;
}

.coverage-motion-canvas,
.transfer-motion-canvas,
.judge-motion-canvas {
  position: relative;
  min-height: 315px;
  padding: 22px;
  background:
    linear-gradient(#ffffff06 1px, transparent 1px),
    linear-gradient(90deg, #ffffff06 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, #1c2831 0, #080b0f 64%);
  background-size: 28px 28px, 28px 28px, auto;
}

.coverage-motion-canvas {
  display: grid;
  grid-template-columns: minmax(145px, .92fr) 68px minmax(220px, 1.25fr);
  grid-template-rows: 1fr auto;
  gap: 16px;
  align-items: center;
}

.motion-video-node,
.controlled-source,
.motion-output,
.candidate-motion-node,
.kept-motion-node {
  position: relative;
  overflow: hidden;
  border: 1px solid #3b444e;
  border-radius: 9px;
  background: #030405;
}

.motion-video-node,
.controlled-source,
.motion-output,
.candidate-motion-node,
.kept-motion-node {
  animation: diagramNode 8s ease-in-out infinite;
}

.motion-video-node video,
.controlled-source video,
.motion-output video,
.candidate-motion-node video,
.kept-motion-node video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.motion-video-node > span,
.controlled-source > span,
.motion-output > span,
.candidate-motion-node > span,
.kept-motion-node > span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  padding: 4px 7px;
  border: 1px solid #ffffff2c;
  border-radius: 4px;
  background: #050709dc;
  color: var(--ink);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.signal-arrow {
  position: relative;
  height: 34px;
}

.signal-arrow::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 8px;
  top: 16px;
  height: 1px;
  background: #68727d;
}

.signal-arrow::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--amber);
  border-right: 2px solid var(--amber);
  transform: rotate(45deg);
}

.signal-arrow > i {
  position: absolute;
  z-index: 2;
  left: 1px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px #ffb444aa;
  animation: signalTravel 2.6s ease-in-out infinite;
}

.signal-arrow > small {
  position: absolute;
  left: 50%;
  bottom: 21px;
  color: #9299a1;
  font-size: .7rem;
  transform: translateX(-50%);
  white-space: nowrap;
}

.condition-rack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid #343d46;
  border-radius: 10px;
  background: #0a0e12d9;
}

.condition-rack > small {
  grid-column: 1 / -1;
  color: #a1a8b0;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.condition {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid #39414a;
  border-radius: 7px;
  background: #080b0f;
  font-size: .76rem;
}

.condition i {
  color: var(--muted);
  font-style: normal;
}

.condition.captured {
  border-color: #8be28b66;
  color: var(--green);
}

.condition.sparse {
  color: var(--amber);
  animation: conditionNeed 8s ease-in-out infinite;
}

.condition.missing {
  border-style: dashed;
  color: var(--danger);
  animation: missingNeed 8s ease-in-out infinite;
}

.condition.missing.late {
  animation-delay: .45s;
}

.gap-stamp {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #ff6d685c;
  border-radius: 8px;
  background: #ff6d680d;
  animation: gapReveal 8s ease-in-out infinite;
}

.gap-stamp small {
  color: var(--danger);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.gap-stamp b {
  font-size: .82rem;
}

.transfer-motion-canvas,
.judge-motion-canvas {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 52px minmax(112px, .72fr) 52px minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
}

.judge-motion-canvas {
  grid-template-columns: minmax(170px, 1.2fr) 28px minmax(150px, .9fr) 28px minmax(170px, 1fr);
  grid-template-rows: 1fr auto;
  gap: 14px 8px;
}

.controlled-source {
  aspect-ratio: 16 / 9;
}

.controlled-source video {
  position: absolute;
  inset: 0;
  height: 100%;
}

.controlled-source .edge-scan {
  z-index: 2;
  opacity: 0;
  mix-blend-mode: screen;
  animation: edgeReveal 8s ease-in-out infinite;
}

.cosmos-motion-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid #76b90085;
  border-radius: 10px;
  background: radial-gradient(circle, #76b90029, #0b1207 72%);
  text-align: center;
  animation: cosmosNode 8s ease-in-out infinite;
}

.cosmos-motion-node small {
  color: #a2aa98;
  font-size: .66rem;
  font-weight: 800;
}

.cosmos-motion-node b {
  margin: 8px 0;
  color: #91d62f;
  font-size: 1.03rem;
  line-height: 1.04;
}

.cosmos-motion-node span {
  color: #d1d7cb;
  font-size: .72rem;
}

.cosmos-motion-node > i {
  position: absolute;
  left: -40%;
  top: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #d4ff9c30, transparent);
  transform: skewX(-18deg);
  animation: cosmosDiagramScan 4s ease-in-out infinite;
}

.motion-output > span b {
  color: var(--cyan);
}

.beat-meta .weather-switch {
  margin-bottom: 10px;
}

.beat-meta .beat-caveat {
  margin-top: 0;
}

.candidate-motion-node,
.kept-motion-node {
  animation-duration: 9s;
}

.candidate-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  aspect-ratio: 16 / 9;
}

.candidate-thumbs video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.judge-motion-node {
  min-width: 0;
  padding: 16px;
  border: 1px solid #4b5660;
  border-radius: 10px;
  background: #0b0f13e8;
}

.judge-motion-node > small,
.judge-motion-node > b {
  display: block;
  text-align: center;
}

.judge-motion-node > small {
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.judge-motion-node > b {
  margin: 3px 0 11px;
  font-size: .82rem;
  line-height: 1.3;
}

.judge-motion-node > span {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 7px;
  align-items: center;
  margin-top: 7px;
  color: #b5bbc2;
  font-size: .7rem;
}

.judge-motion-node > span > i {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber) 0 var(--score), #313841 var(--score));
  transform-origin: left;
  animation: rubricRead 9s ease-in-out infinite;
}

.judge-motion-node > span:nth-of-type(2) > i {
  animation-delay: .2s;
}

.judge-motion-node > span:nth-of-type(3) > i {
  animation-delay: .4s;
}

.kept-motion-node {
  border-color: #ffb44488;
  animation-name: winnerSelect;
}

.kept-motion-node > span {
  color: var(--amber);
}

.selection-secret {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 150px;
  padding: 14px 12px 12px;
  background: radial-gradient(circle, #ffb44416, #080a0d 68%);
}

.secret-frame {
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  width: min(82px, 78%);
  height: 48px;
  border: 1px solid #ffb44480;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, #ffb4440d 0 8px, transparent 8px 15px);
}

.secret-frame b {
  color: var(--amber);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.selection-secret > small {
  display: grid;
  align-self: stretch;
  place-items: center;
  min-height: 2.5em;
  color: #9ca3ab;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.25;
  text-align: center;
}

.selection-secret > span {
  position: static;
  align-self: end;
  justify-self: center;
  white-space: nowrap;
}

.reject-flags {
  position: static;
  grid-column: 1 / -1;
  grid-row: 2;
  align-items: center;
  justify-content: center;
  justify-self: center;
  flex-wrap: wrap;
  display: flex;
  gap: 8px;
  margin-top: 2px;
  padding: 8px 12px;
  border: 1px solid #ff6d6828;
  border-radius: 8px;
  background: #10090bd9;
  animation: rejectReveal 9s ease-in-out infinite;
}

.reject-flags small {
  color: #a9b0b8;
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.reject-flags span {
  padding: 5px 8px;
  border: 1px solid #ff6d685c;
  border-radius: 5px;
  background: #150a0be8;
  color: #ff918d;
  font-size: .68rem;
  font-weight: 800;
}

@keyframes signalTravel {
  0% { left: 1px; opacity: 0; }
  15% { opacity: 1; }
  82% { opacity: 1; }
  100% { left: calc(100% - 10px); opacity: 0; }
}

@keyframes beatProgress {
  to { transform: scaleX(1); }
}

@keyframes diagramNode {
  0%, 100% { border-color: #3b444e; box-shadow: none; }
  14%, 30% { border-color: #7ee7e18c; box-shadow: 0 0 20px #7ee7e116; }
}

@keyframes conditionNeed {
  0%, 25%, 100% { border-color: #39414a; background: #080b0f; }
  38%, 70% { border-color: #ffb44491; background: #ffb44413; box-shadow: 0 0 18px #ffb44415; }
}

@keyframes missingNeed {
  0%, 32%, 100% { opacity: .5; }
  46%, 78% { opacity: 1; border-color: #ff6d6891; background: #ff6d6810; }
}

@keyframes gapReveal {
  0%, 52% { opacity: .25; transform: translateY(7px); }
  65%, 92% { opacity: 1; transform: translateY(0); }
  100% { opacity: .25; transform: translateY(7px); }
}

@keyframes edgeReveal {
  0%, 16%, 72%, 100% { opacity: 0; clip-path: inset(0 100% 0 0); }
  30%, 52% { opacity: .82; clip-path: inset(0 0 0 0); }
}

@keyframes cosmosNode {
  0%, 23%, 100% { box-shadow: none; }
  37%, 68% { border-color: #a1e643; box-shadow: 0 0 28px #76b9002d; }
}

@keyframes cosmosDiagramScan {
  58%, 100% { left: 118%; }
}

@keyframes rubricRead {
  0%, 30% { transform: scaleX(.05); opacity: .35; }
  56%, 92% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(.05); opacity: .35; }
}

@keyframes winnerSelect {
  0%, 55%, 100% { border-color: #3b444e; box-shadow: none; transform: scale(.985); }
  68%, 92% { border-color: var(--amber); box-shadow: 0 0 30px #ffb4442e; transform: scale(1); }
}

@keyframes rejectReveal {
  0%, 48%, 100% { opacity: 0; transform: translateY(5px); }
  60%, 92% { opacity: 1; transform: translateY(0); }
}

.source-compare {
  grid-template-columns: repeat(3, 1fr);
}

.depth-explainer .depth-preview {
  height: auto;
  aspect-ratio: 16 / 9;
}

.control-disclosure {
  margin: 9px 2px 20px;
  color: var(--muted);
  font-size: .75rem;
}

.ecosystem-note {
  margin: 11px 2px 0;
  color: #7f8790;
  font-size: .75rem;
  text-align: right;
}

.ecosystem-note a {
  color: #a0ca68;
}

.closing-montage {
  max-width: 1440px;
  margin: 0 auto;
  padding: 90px 24px 42px;
}

.montage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto 18px;
}

.montage-heading h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -.045em;
  text-align: right;
}

.closing-montage video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid #39414a;
  border-radius: 15px;
  background: #020304;
  box-shadow: 0 35px 120px #000b, 0 0 55px #7ee7e10d;
  object-fit: contain;
}

@media (max-width: 1080px) {
  #episode2.story-beat {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "meta" "action";
  }

  #episode3.story-beat {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "action";
  }

  #episode2 .beat-next {
    justify-self: start;
  }
}

@media (max-width: 800px) {
  .context-copy {
    grid-template-columns: 1fr;
  }

  .context-copy h1 {
    font-size: 3rem;
  }

  .context-copy > p:last-child {
    grid-column: 1;
  }

  .episode-shell {
    scroll-margin-top: 82px;
  }

  .episode-tabs {
    display: flex;
    overflow-x: auto;
  }

  .episode-tabs button {
    flex: 0 0 220px;
  }

  .lesson-episode {
    padding: 20px;
  }

  #episode1 {
    grid-template-columns: 1fr;
  }

  .episode-copy h2 {
    font-size: 2.2rem;
  }

  .transfer-studio {
    grid-template-columns: 1fr;
  }

  .cosmos-core {
    min-height: 115px;
  }

  .control-switchboard {
    grid-template-columns: 1fr;
  }

  .depth-card {
    max-width: 280px;
  }

  .intro-weather-tabs {
    flex-wrap: wrap;
  }

  .intro-weather-tabs > span,
  .intro-weather-tabs small {
    width: 100%;
    margin: 4px 0 0;
  }

  .concept-grid,
  .candidate-mini-grid,
  .loop-copy {
    grid-template-columns: 1fr;
  }

  .iteration-loop,
  .judge-diagram {
    grid-template-columns: 1fr;
  }

  .iteration-loop > i,
  .judge-diagram > i {
    transform: rotate(90deg);
    text-align: center;
  }

  .model-note,
  .conceptual-code {
    grid-template-columns: 1fr;
  }

  .montage-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .montage-heading h2 {
    text-align: left;
  }

  .cold-open-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    margin-top: 20px;
  }

  .hero h1 {
    font-size: 2.85rem;
  }

  .binary-choice {
    flex-wrap: wrap;
  }

  .learning-ticket {
    grid-template-columns: 1fr;
  }

  .judge-stage {
    grid-template-columns: 1fr;
  }

  .judge-controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .judge-verdict {
    grid-template-columns: 72px 1fr;
  }

  .judge-verdict .big-take {
    font-size: 4rem;
  }

  .stack-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .stack-plus {
    display: none;
  }

  .production-details > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-body {
    padding: 0 16px 16px;
  }
}

@media (max-width: 800px) {
  .lead-copy h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .context-primer {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .context-primer > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .beat-tabs {
    display: flex;
    overflow-x: auto;
  }

  .beat-tabs button {
    flex: 1 0 145px;
    padding: 12px 14px;
  }

  .story-beat {
    min-height: 0;
    padding: 19px;
  }

  #episode1.story-beat {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "action";
  }

  #episode2.story-beat {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "meta" "action";
  }

  #episode3.story-beat {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "action";
  }

  .motion-board-head,
  .motion-board > figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .coverage-motion-canvas,
  .transfer-motion-canvas,
  .judge-motion-canvas {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 15px;
  }

  .signal-arrow {
    width: 44px;
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .signal-arrow > small {
    display: none;
  }

  .condition-rack {
    width: 100%;
  }

  .gap-stamp {
    grid-column: 1;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .cosmos-motion-node {
    min-height: 112px;
  }

  .reject-flags {
    grid-column: 1;
    grid-row: auto;
    width: min(440px, 100%);
    flex-direction: column;
  }

  .lean-transfer {
    grid-template-columns: 1fr;
  }

  .transfer-node {
    min-height: 105px;
  }

  .weather-switch {
    margin-top: 2px;
  }

  .quick-loop,
  .judge-line {
    grid-template-columns: 1fr;
  }

  .quick-loop i,
  .judge-line > i {
    transform: rotate(90deg);
    text-align: center;
  }

  #episode2 .beat-next {
    justify-self: start;
  }

  .source-compare {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .controlled-source .edge-scan {
    clip-path: inset(0 0 0 62%);
    opacity: .6;
  }

  .gap-stamp,
  .condition,
  .cosmos-motion-node,
  .judge-motion-node > span > i,
  .kept-motion-node,
  .reject-flags {
    opacity: 1;
    transform: none;
  }
}
