.robot-cover h1 { font-size: clamp(4.1rem, 10vw, 11rem); letter-spacing: -.09em; line-height: .99 }
.robot-cover h1 em { font-size: .83em }
.robot-cover .cutout { font-size: clamp(3rem, 7vw, 7rem) }
.robot-cover .button { margin-right: .35rem }
[data-robot-mode] .stage h1, .conclusion .end-title h1 { font-size: clamp(3rem, 5.3vw, 6rem); letter-spacing: -.055em; line-height: 1 }
.robot-work h2 { margin: 0 0 .7rem; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.055em; line-height: 1 }
.scenario { font-size: clamp(1.1rem, 2vw, 1.45rem); max-width: 34ch }
.board { position: relative; margin: 3.2rem 0 1.15rem }
.board ol { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid; background: white }
.board li { text-align: center; padding: .9rem 0; border-right: 1px solid; font-weight: 750 }
.board li:last-child { border: 0 }
.robot-marker { position: absolute; bottom: 100%; left: calc((var(--position, 0) + .5) * 100% / 7); transform: translateX(-50%); font-size: 2.4rem; line-height: 1.2; transition: left .35s ease }
.board[data-position="2"] { --position: 2 }
.board[data-position="4"] { --position: 4 }
.board[data-position="6"] { --position: 6 }
#guess fieldset { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 .75rem }
#guess label { cursor: pointer; padding: .35rem .2rem }
.robot-answer { background: #e7f8a6; padding: .85rem 1rem; border: 1px solid }
.robot-answer h3 { margin: 0 0 .3rem; font-size: 1.6rem }
#guess-feedback:empty { display: none }
.chapter-next { margin-top: 1rem }
@media (max-width: 760px) {
  [data-robot-mode] .stage-art { display: none }
  [data-robot-mode] .stage h1 { margin: .2rem 0 }
}
@media (prefers-reduced-motion: reduce) { .robot-marker { transition: none } }

/* Paper, ink and translucent shapes form the demo's own illustration. */
body:has(nav[aria-label="Demo pages"]) {
  --ink: #263a34;
  --paper: #faf8ef;
  --lime: #e2ed9b;
  color: var(--ink);
  background: var(--paper);
}
.masthead { border-color: #263a3440 }
.brand { font-family: monospace; letter-spacing: .1em }
.robot-cover { grid-template-columns: 1fr 1.1fr; padding: 0 clamp(1rem, 4vw, 4rem); gap: 2vw }
.robot-cover .cover-copy { padding-left: 0 }
.robot-cover h1, [data-robot-mode] .stage h1, .conclusion .end-title h1 {
  color: #263a34; font-family: Georgia, serif; font-weight: normal; letter-spacing: -.085em;
}
.robot-cover h1 { font-size: clamp(4.4rem, 12vw, 12rem); line-height: .72 }
.robot-cover h1 em { color: #3e6757; font-style: italic; font-size: 1em }
.robot-cover .intro { margin: 2.3rem 0 1.4rem }
.robot-cover .button { margin-bottom: .55rem }
.robot-cover .cover-art, .stage-art {
  background-color: #e7f2e5;
  background-image: radial-gradient(#44695738 .8px, transparent 1px), linear-gradient(145deg, #f6e1ed, transparent 70%);
  background-size: 6px 6px, 100% 100%;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #46645a77;
}
.robot-cover .cover-art { margin: 2rem 0; min-height: 440px }
.robot-cover .fragment { background: #f4dfab; bottom: 12%; z-index: 2 }
.paper.strip { z-index: 2; background: #fffdf2; font-size: .75rem; top: 13%; bottom: auto; transform: rotate(7deg) }
.orbit { position: absolute; inset: 12% -10% 10%; border: 1px solid #4d7562a0; border-radius: 48%; transform: rotate(-25deg); box-shadow: 0 0 0 11px #b191ba30, 0 0 0 13px #88689b43, 0 0 0 30px #51756122 }
.gel {
  position: absolute; inset: 12% 15% 17% 14%; transform: rotate(-19deg); border-radius: 62% 38% 48% 52% / 38% 42% 58% 62%;
  background: radial-gradient(ellipse at 34% 22%, #fffdf4c9, transparent 45%), radial-gradient(at 75% 80%, #a2ccbd, #eccfebaa 64%, #b29bd0bb);
  box-shadow: inset 2px 2px 14px #fff, inset -8px -5px 17px #8d75a580, 8px 13px 28px #5a657226;
  animation: gel-shape 8s ease-in-out infinite alternate;
}
@keyframes gel-shape {
  to { border-radius: 38% 62% 64% 36% / 56% 32% 68% 44%; transform: translate(5%, 4%) rotate(11deg) scale(1.04, .91) }
}
.is-revealed .gel { animation-duration: 3s }
.robot-cutout {
  position: absolute; top: 49%; left: 47%; width: 49%; aspect-ratio: 1.1; transform: translate(-50%, -50%) rotate(-13deg);
  display: grid; place-items: center; background: #fdf8e6; box-shadow: 5px 7px 0 #433d592b;
  clip-path: polygon(2% 3%, 100% 1%, 97% 96%, 0 100%);
}
.robot-drawing {
  display: block; position: relative; width: 1em; height: .76em; border: .045em solid #314d42; border-radius: 27%;
  background: radial-gradient(circle at 31% 44%, #314d42 0 .065em, transparent .07em), radial-gradient(circle at 70% 44%, #314d42 0 .065em, transparent .07em), repeating-linear-gradient(135deg, #bcd8c8 0 2px, #e7f0df 2px 5px);
  box-shadow: .07em .08em 0 #bd96bc;
}
.robot-drawing::before { content: ""; position: absolute; width: .045em; height: .21em; bottom: 100%; left: 48%; background: #314d42 }
.robot-drawing::after { content: ""; position: absolute; width: .21em; bottom: .14em; left: 38%; border-bottom: .035em solid #314d42 }
.robot-cutout .robot-drawing { font-size: clamp(2.3rem, 9vw, 8rem) }
.stage-art .robot-drawing { font-size: clamp(1.5rem, 5vw, 4.6rem) }
.robot-marker { padding: .35em .09em .12em }
[data-robot-mode] .stage, .conclusion .end-title { border-color: #263a3440; background: #e7f0e5 }
[data-robot-mode="reworked"] .stage { background: #f2e6f3 }
[data-robot-mode] .stage h1, .conclusion .end-title h1 { font-size: clamp(3.15rem, 7.1vw, 7.5rem); line-height: .87 }
.conclusion .end-title { background: #f4ecd3 }
.robot-work h2, .end-copy h2 { font-family: Georgia, serif; font-weight: 500 }
.board ol { background: #fbf2dc; border-color: #42594b; border-radius: 3px; overflow: hidden }
.board li:nth-child(odd) { background: #e6efdf }
.robot-answer { background: #e9efdc; border-color: #789381 }
.button { border-radius: 2px }
@media (max-width: 760px) {
  .robot-cover { grid-template-columns: 1fr }
  .robot-cover .cover-art { margin: .65rem 0 1.1rem; min-height: 255px }
  .robot-cover h1 { font-size: clamp(4.3rem, 13vw, 7rem) }
  .robot-cover .intro { margin-top: 1.8rem }
}
@media (prefers-reduced-motion: reduce) { .gel { animation: none } }
