/* Owner's October 17 visual brief. Consolidate after composition approval. */
:root {
  --body: "OldNewspaperTypes", Georgia, serif;
  --type-reading: "OldNewspaperTypes", Georgia, serif;
}
body { font-family: var(--type-narrative); font-size: 20px; isolation: isolate; }
button, .button, .text-link, .lab-step { font-family: var(--type-control); font-weight: 400; }
.eyebrow { font: 400 20px/1.3 var(--type-instrument); letter-spacing: .02em; text-transform: none; }
.metric, .math-reference strong, .lab-step span, .multiplier span, .balance-ledger strong, .hero .actions > a, .header-play { text-transform: none; }
.fine, .math-qualification, .trace-status, .trace-state, .stage-toolbar, .stage-status,
.phone-path-label, .phone-transition, .phone-branch-label, .phone-branch-destination, .math-stage,
.capture-gallery figcaption span, .mechanic-machine figcaption > p, .evidence-caption, .rtp-legend, .rtp-table, .rtp-table caption,
.payout-category div > span, .architecture-label, .architecture-top, .offer-label, .state-track {
  font-family: var(--type-control); font-weight: 400;
}
.fine, .math-qualification { font-size: 15px; line-height: 1.75; }
.stage-toolbar, .stage-status { font-size: 16px; letter-spacing: .01em; }
.section-head > p { font-family: var(--type-narrative); font-size: 20px; line-height: 1.65; }
.trace-intro h3, .engineering-overview h3, .flow-figure h3, .math-chapter h3,
.architecture h3, .architecture-top strong, .architecture-db strong, .trace-steps h4,
.engineering-reading .engineering-details summary, .engineering-essays > article > h3,
.math-chapter h4, .reveal-copy > strong, .stop-pipeline strong, .calibration-path strong,
.payout-category strong, .math-detail summary { font-family: var(--type-narrative); font-weight: 400; }
.trace-steps p, .engineering-reading .detail-body p, .engineering-essays p, .flow-figure figcaption > p,
.graph-text li, .phone-main-step, .phone-branch, .stop-pipeline p, .calibration-path p,
.adaptation-map p, .math-detail p, .event-boundaries p, .math-opening p, .math-reading p {
  font-size: 19px; line-height: 1.65;
}
.metric, .math-reference strong { font-family: var(--type-instrument); font-weight: 400; }
.payout-category b { font-family: var(--type-control); }
.outcome-board figcaption, .payout-row, .payout-chart > p, .balance-ledger span,
.data-journey article > span, .deployment-scene article > span, .deployment-public > span,
.workshop-nav, .trace-number, .step-number { font-family: var(--type-control); font-weight: 400; }
.outcome-board figcaption, .payout-row, .payout-chart > p, .balance-ledger span, .workshop-nav { font-size: 16px; }
.data-journey article > span, .deployment-scene article > span, .deployment-public > span { font-size: 14px; letter-spacing: .1em; }
.algorithm-graph text { font-family: var(--type-narrative); font-weight: 400; font-size: 20px; }
.algorithm-graph .graph-sub, .algorithm-graph .graph-edge-label { font-family: var(--type-control); font-size: 15px; }
#event-flow .graph-node text:not(.graph-sub) { font-size: 18px; }
#event-flow .graph-node .graph-decision + text { font-size: 16px; }
#event-flow .math-algorithm .graph-node text:not(.graph-sub) { font-size: 16px; }
.rtp-plot text { font-family: var(--type-control); }
.rtp-table { font-size: 18px; }
pre, code, .symbol, .hash, .math-formulas dd { font-family: Consolas, monospace; }

/* A translucent navigation surface, fading into the scene rather than ending at a line. */
.navigation-ready .header { background: linear-gradient(#15110edb, #15110ea6 70%, #15110e4d); box-shadow: none; }
.navigation-ready .header-scrolled { background: linear-gradient(#15110ef2, #15110edd 65%, #15110e85); box-shadow: none; }
.header::after { content: ""; position: absolute; inset: 100% 0 auto; height: 24px; pointer-events: none; background: linear-gradient(#15110e4d, transparent); }
.header-scrolled::after { background: linear-gradient(#15110e85, transparent); }
.header nav a, .mobile-nav a { display: inline-block; font: 400 20px/1.3 var(--type-narrative); transition: color .4s ease, transform .4s ease, text-shadow .4s ease; }
.header nav a:hover, .mobile-nav a:hover { color: #f4dba6; transform: scale(1.035); text-shadow: 0 0 18px #db9b4255; }
.header-play { margin-left: auto; flex-shrink: 0; font: 400 27px/1.2 var(--type-instrument); border: 0; animation: invitation-bloom 5s ease-in-out infinite alternate; }
.header-play span { font-family: var(--type-control); font-size: 17px; margin-left: 12px; }
.header-hidden .brand-reveal, .header-hidden .brand-letter, .header-hidden .header-play { animation-play-state: paused; }
.header .brand { position: relative; flex-shrink: 0; }
.brand-reveal { display: none; position: absolute; inset: 0; }
.navigation-ready .brand-reveal { display: block; animation: header-wordmark-bloom 2.5s ease-in-out 5.45s both; }
.navigation-ready .brand-base { opacity: 0; }
.brand-letter { position: absolute; inset: 0; opacity: 0; animation: brand-letter-arrival .8s cubic-bezier(.2,.7,.2,1) both; }
.brand-letter img { width: 100%; height: 100%; }
/* The G/O seam follows the interlocking artwork, rather than slicing G at 14%. */
.brand-letter:nth-child(1) { animation: brand-g-forge 2.4s ease-in-out both; transform-origin: 10% 50%; }
/* Cut the artwork before the wrapper's bloom, so the glow can fade beyond the G. */
.brand-letter:nth-child(1) img { clip-path: polygon(0 0, 21% 0, 21% 28%, 18.5% 42%, 18.5% 72%, 20% 85%, 20% 100%, 0 100%); }
.brand-letter:nth-child(2) { clip-path: polygon(21% 0, 31% 0, 31% 100%, 20% 100%, 20% 85%, 18.5% 72%, 18.5% 42%, 21% 28%); animation-delay: 3.60s; }
.brand-letter:nth-child(3) { clip-path: inset(0 57% 0 31%); animation-delay: 3.74s; }
.brand-letter:nth-child(4) { clip-path: inset(0 46.5% 0 43%); animation-delay: 3.88s; }
.brand-letter:nth-child(5) { clip-path: inset(0 40% 0 53.5%); animation-delay: 4.02s; }
.brand-letter:nth-child(6) { clip-path: inset(0 28% 0 60%); animation-delay: 4.16s; }
.brand-letter:nth-child(7) { clip-path: inset(0 16.5% 0 72%); animation-delay: 4.30s; }
.brand-letter:nth-child(8) { clip-path: inset(0 0 0 83.5%); animation-delay: 4.44s; }
@keyframes brand-g-forge { 0% { opacity: 0; transform: scale(.97); filter: drop-shadow(0 0 0 #e4bd7400); } 35% { opacity: .3; transform: scale(.98); filter: drop-shadow(0 0 3px #e4bd7430); } 70% { opacity: .85; transform: scale(.997); filter: drop-shadow(0 0 6px #e4bd7460); } 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 0 #e4bd7400); } }
@keyframes header-wordmark-bloom { 0%, 100% { filter: none; } 45% { filter: drop-shadow(0 0 6px #e4bd7450) drop-shadow(0 0 14px #ba722c28); } }
@keyframes brand-letter-arrival { from { opacity: 0; transform: translate3d(3px, 1px, 0); } to { opacity: 1; transform: none; } }
@keyframes invitation-bloom { from { color: #d7b476; text-shadow: 0 0 4px #a96a2410; } to { color: #f6dda7; text-shadow: 0 0 18px #e6a84970; } }

/* The same breathing character and supplied machine share one right-hand composition. */
.hero { overflow: clip; padding-bottom: 70px; }
.hero-content { padding-bottom: 85px; }
.hero .eyebrow { font: 400 16px/1.6 var(--type-control); letter-spacing: .04em; max-width: 450px; }
.hero h1 { width: min(100%, 450px); text-align: center; }
.hero .wordmark { position: relative; isolation: isolate; width: min(100%, 480px); }
.hero .wordmark::before { content: ""; position: absolute; inset: -24% -14%; z-index: 0; pointer-events: none; background: radial-gradient(ellipse closest-side, #ffae55a6, #db651c55 42%, transparent 100%); filter: blur(24px); animation: wordmark-fire 8s ease-in-out infinite; }
.hero .wordmark img { position: relative; z-index: 1; animation: wordmark-lustre 10s ease-in-out infinite alternate; }
@keyframes wordmark-fire { 0%, 100% { opacity: .2; transform: scale(.9); } 50% { opacity: .85; transform: scale(1.1); } }
.hero-copy { font-size: 22px; }
.hero .actions > a { font: 400 25px/1.25 var(--type-instrument); }
.hero .actions .primary { padding: 16px 30px; background: radial-gradient(ellipse at 45% 0, #9c6436, #5c3221 80%); box-shadow: inset 0 1px #e4bf7b7a, inset 0 -3px #27180e, 0 10px 28px #0005; }
.hero .actions .primary:hover { background: radial-gradient(ellipse at 45% 0, #b17b45, #6a3924 80%); }
.hero-visual { position: absolute; right: 0; bottom: 10%; width: 53%; max-width: 850px; }
.hero-visual .hero-goblin { position: absolute; display: block; right: 0; bottom: 58%; top: auto; width: 56%; opacity: .95; }
.hero-visual .hero-machine { position: relative; width: 100%; max-width: none; right: auto; bottom: auto; margin: 0; transform: rotate(-2deg); transform-origin: 65% 50%; }
.hero-machine img { mask-image: linear-gradient(90deg, transparent, #000 5%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 5%, #000 91%, transparent); mask-composite: intersect; }
.hero-machine figcaption { padding-inline: 30px; justify-content: flex-end; text-align: right; }
.hero-machine figcaption span { font-family: var(--type-control); font-size: 12px; }
.hero-scene { mask-image: linear-gradient(180deg, #000 65%, transparent 100%); }
.hero-scene::after { background: linear-gradient(90deg, #100d0de8 0%, #100d0db5 33%, #100d0d08 70%), linear-gradient(0deg, var(--soot), transparent 35%, #100d0d30 80%); }
@keyframes wordmark-lustre { from { filter: drop-shadow(0 5px 12px #0008); } to { filter: drop-shadow(0 5px 12px #0008) drop-shadow(0 0 14px #c98a3f55); } }

/* One persistent field avoids particle restarts as the reader crosses chapters. */
.site-backdrop { position: fixed; inset: -3%; pointer-events: none; z-index: -1; background: linear-gradient(#15110eeb, #15110ee8), url('presentation/forge-workshop.webp') center/cover; animation: forge-field-breath 20s ease-in-out infinite alternate; }
.global-embers { position: fixed; inset: 0; z-index: 15; }
.global-embers span { width: var(--ember-size); height: var(--ember-size); animation-name: continuous-ember; }
.global-embers span::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: #ffe5b0; box-shadow: 0 0 var(--ember-glow) #ffb255c0; animation: ember-glint var(--glint-duration) ease-in-out var(--ember-delay) infinite; }
@keyframes ember-glint { 0%, 24%, 65%, 100% { opacity: .12; transform: scale(.7); } 42% { opacity: var(--ember-brightness); transform: scale(1.3); } 79% { opacity: .35; transform: scale(.9); } }
.document-hidden .global-embers span::after, .is-playing .global-embers span::after, .motion-paused .global-embers span::after { animation-play-state: paused; }
@keyframes continuous-ember { 0% { opacity: 0; transform: translate3d(0, 0, 0); } 12% { opacity: var(--ember-brightness); } 75% { opacity: .3; } 100% { opacity: 0; transform: translate3d(35px, -110dvh, 0); } }
@keyframes forge-field-breath { from { transform: scale(1); opacity: .75; } to { transform: scale(1.035); opacity: 1; } }
.document-hidden .site-backdrop, .is-playing .site-backdrop { animation-play-state: paused; }
.embed-expanded .global-embers { visibility: hidden; }

/* Backgrounds fade independently of copy and controls. */
:root { --chapter-scene-height: clamp(540px, 100svh, 1100px); }
main { overflow-x: clip; }
.chapter-atmosphere { bottom: auto; height: var(--chapter-scene-height); overflow: visible; }
.chapter-scene { inset: 0 -48px auto; height: var(--chapter-scene-height); max-height: none; background-image: radial-gradient(ellipse closest-side at 50% 45%, #33251bb8 30%, #241b1370 68%, transparent 100%); background-size: cover; background-repeat: no-repeat; background-position: center; mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 68%, transparent); mask-composite: intersect; animation: forge-field-breath 18s ease-in-out infinite alternate; }
.scenic-section .chapter-scene { background-image: radial-gradient(ellipse closest-side at 50% 45%, #33251bb8 30%, #241b1370 68%, transparent 100%); }
.scenic-section .chapter-atmosphere .art-primary { right: 28px; top: 36px; max-width: calc(100vw - 64px); }
.scenic-section .chapter-atmosphere .art-secondary { left: 28px; bottom: 36px; max-width: calc(100vw - 64px); }
.scenic-section .chapter-atmosphere .art-tertiary { left: 28px; max-width: calc(100vw - 64px); }
.chapter-atmosphere .chapter-scene { animation-play-state: paused; }
.chapter-atmosphere.visual-in-view .chapter-scene { animation-play-state: running; }
.experience .art-primary { width: min(20vw, 250px); top: 0; right: -35px; opacity: .22; }
.experience .art-secondary { bottom: 45px; opacity: .2; }
.world-strip { background: none; isolation: isolate; }
.world-strip::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse closest-side, #302219bb 35%, transparent 100%); filter: blur(24px); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent); mask-composite: intersect; }
.world-strip::after { background: none; }
.closing { background: radial-gradient(ellipse, #302219c0, transparent 72%); border: 0; }
.closing::before { background: none; }
.world-strip > img { opacity: .32; }
.world-strip.paused-offscreen::before, .document-hidden .world-strip::before, .is-playing .world-strip::before { animation-play-state: paused; }
.mechanics { position: relative; isolation: isolate; background: radial-gradient(ellipse at 80% 45%, #673d2320, transparent 65%); }
.mechanics-props { position: absolute; inset: 0 0 auto; height: var(--chapter-scene-height); z-index: -1; pointer-events: none; }
.mechanics-props img { width: clamp(80px, 12vw, 150px); opacity: .3; animation-play-state: paused; }
.mechanics-props img.visual-in-view { animation-play-state: running; }
.mechanics-props .prop-crate { top: 27%; right: 32px; rotate: 12deg; opacity: .45; }
.prop-bomb { top: 37%; left: 40px; rotate: -17deg; animation-delay: -3s; }
.prop-blade { top: 65%; right: 40px; rotate: 23deg; animation-delay: -6s; }
.prop-wrench { top: 78%; left: 40px; rotate: -24deg; animation-delay: -8s; }
#mechanics-title > * { display: inline-block; white-space: nowrap; transform-origin: 50% 70%; }
@keyframes phrase-breathe { 0%, 100% { opacity: .84; transform: scale(.985); } 48% { opacity: 1; transform: scale(1.02); } }
.mechanic-machine > img { mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 5%, #000 93%, transparent); mask-composite: intersect; }
.art-tertiary { width: 190px; top: 57%; left: -35px; opacity: .2; animation-delay: -6s; }
.engineering .art-primary { opacity: .3; }
#cascade-title { font-family: var(--type-signature); }
.math-figure, .phone-main-step { background: radial-gradient(ellipse at 25% 35%, #49311b65, transparent 78%); }
.machine-reveal { background: radial-gradient(ellipse at 20% 20%, #5d3c242b, transparent 72%); }
.win-art-strip { max-width: 1280px; padding: 20px 48px 70px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; }
.win-art-strip img { width: 100%; mask-image: radial-gradient(ellipse at center, #000 48%, transparent 75%); }

/* A landscape handset: the real capture stays intact inside the glass. */
.phone-device { position: relative; width: 100%; padding: 11px; border-radius: 38px; border: 2px solid #7b7b78; background: #080909; box-shadow: inset 0 0 0 2px #282b2b, inset 0 0 0 4px #454847, 0 18px 38px #0008; }
.capture-gallery .phone-device img { display: block; width: 100%; aspect-ratio: 852 / 393; object-fit: contain; border-radius: 26px; filter: none; background: #000; }
.phone-device::before { pointer-events: none; content: ""; position: absolute; z-index: 1; left: 15px; top: 38%; width: 13px; height: 24%; border-radius: 12px; background: #080909; box-shadow: 1px 0 1px #4446; }
.phone-device::after { pointer-events: none; content: ""; position: absolute; bottom: 5px; left: 40%; width: 20%; height: 3px; border-radius: 3px; background: #d2d3ce88; }
.phone-hardware::before, .phone-hardware::after { content: ""; position: absolute; top: -4px; height: 3px; width: 8%; border-radius: 2px 2px 0 0; background: #777b78; }
.phone-hardware::before { left: 23%; }
.phone-hardware::after { right: 20%; width: 12%; }
@media (max-width: 420px) { .phone-device { padding: 8px; border-radius: 29px; } .capture-gallery .phone-device img { border-radius: 19px; } .phone-device::before { left: 11px; width: 9px; } .phone-device::after { bottom: 4px; height: 2px; } }

/* Native disclosures keep their semantics and use the game's own arrow controls. */
details:not(.machine-reveal) > summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; list-style: none; min-height: 52px; }
details:not(.machine-reveal) > summary::-webkit-details-marker { display: none; }
details:not(.machine-reveal) > summary > span[aria-hidden="true"] { display: none; }
details:not(.machine-reveal) > summary::after { content: ""; width: 38px; height: 38px; flex: 0 0 38px; background: url('presentation/control-down.webp') center/contain no-repeat; }
details:not(.machine-reveal)[open] > summary::after { background-image: url('presentation/control-up.webp'); }
details:not(.machine-reveal) > summary:hover::after { background-image: url('presentation/control-down-fire.webp'); }
details:not(.machine-reveal)[open] > summary:hover::after { background-image: url('presentation/control-up-fire.webp'); }

.reveal-pending { opacity: .01; transform: translate3d(0, 18px, 0); }
.arrived { animation-duration: 1.35s; }
.arrived.reveal-complete { animation: none; opacity: 1; transform: none; }
@media (min-width: 1101px) {
 .navigation-ready .header { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 32px; }
 .header .brand { justify-self: start; }
 .header nav { grid-column: 2; justify-content: center; gap: 24px; }
 .header nav a { font-size: 18px; }
 .header-play { grid-column: 3; justify-self: end; margin-left: 0; }
}
@media (max-width: 1100px) {
 .header-play { display: block; font-size: 25px; margin-left: auto; }
 .header .brand { margin-right: 0; }
 .mobile-nav a { display: block; font-size: 22px; }
 .hero-visual { width: 53%; }
 .hero .wordmark { width: min(100%, 385px); }
 .hero h1 { width: min(100%, 360px); }
 .hero .actions > a { font-size: 23px; }
}
@media (max-width: 760px) {
 .mechanics-props .prop-crate { top: 15%; }
 .hero { padding-bottom: 65px; }
 .hero-content { padding: 108px 24px 0; }
 .hero .wordmark { width: min(100%, 330px); }
 .hero h1 { width: min(100%, 310px); }
 .hero .wordmark { margin-inline: auto; }
 .hero h1 { margin-inline: auto; font-size: 39px; }
 .hero-copy { font-size: 21px; }
 .hero .eyebrow { max-width: 340px; font-size: 15px; }
 .hero-visual { position: relative; right: auto; bottom: auto; width: calc(100% - 16px); margin: 135px 0 0 auto; }
 .hero-visual .hero-goblin { width: 55%; bottom: 58%; }
 .hero-visual .hero-machine { width: 100%; margin: 0; }
 .hero-machine figcaption { font-size: 18px; padding-inline: 18px; }
 .hero-machine figcaption span { font-size: 11px; max-width: 160px; }
 .hero-scene { background-position: 72% top; }
 .hero-scene::after { background: linear-gradient(180deg, #100d0dc9, #100d0da0 55%, #100d0d35 80%, var(--soot)); }
 .win-art-strip { padding: 0 16px 35px; gap: 20px; grid-template-columns: 1fr; }
 .section-head > p { font-size: 20px; }
 .chapter-scene { inset-inline: -16px; background-size: cover; max-height: none; }
 .art-tertiary { width: 130px; left: -25px; }
 .world-strip > img { opacity: .3; }
 .rtp-table { font-size: 16px; }
 .stage-toolbar { font-size: 13px; }
}
@media (max-width: 420px) {
 .header .brand img { width: 115px; }
 .header-play { font-size: 24px; }
 .header-play .launch-label { display: inline-block; }
 .hero .actions { gap: 18px; }
 .hero .actions > a { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
 .brand-letter, #mechanics-title > * { opacity: 1; transform: none; filter: none; }
 .header-play { color: var(--gold); text-shadow: none; }
 .site-backdrop, .chapter-scene, .world-strip::before, .hero .wordmark img, .hero .wordmark::before, .brand-reveal, .hero h1, #mechanics-title > *, .mechanics-props img { animation: none !important; }
 .global-embers { display: none; }
 .reveal-pending { opacity: 1; transform: none; }
 .header nav a, .mobile-nav a { transition: none; }
 .header nav a:hover, .mobile-nav a:hover { transform: none; }
}

/* Entry screen's two uneven metallic glances: 5.7s/0.95s and 8.3s/0.7s. */
@property --metal-primary { syntax: '<percentage>'; inherits: false; initial-value: 140%; }
@property --metal-secondary { syntax: '<percentage>'; inherits: false; initial-value: 140%; }
@supports (background-clip: text) {
 .hero h1, #mechanics-title > * { color: transparent; background-image: linear-gradient(110deg, transparent 43%, #fff9e6 50%, transparent 57%), linear-gradient(110deg, transparent 44%, #f7dfaa90 50%, transparent 56%), linear-gradient(#e8d9ba, #d4bd89 46%, #a28b60 51%, #ede0be 75%); background-size: 250% 100%, 250% 100%, 100% 100%; background-position: var(--metal-primary) 0, var(--metal-secondary) 0, 0 0; background-clip: text; animation: metal-primary 5.7s linear infinite, metal-secondary 8.3s linear -3.1s infinite; }
}
@keyframes metal-primary { 0% { --metal-primary: 140%; } 16.67%, 100% { --metal-primary: -40%; } }
@keyframes metal-secondary { 0% { --metal-secondary: 140%; } 8.43%, 100% { --metal-secondary: -40%; } }
.hero:not(.visual-in-view) .wordmark img, .hero:not(.visual-in-view) .wordmark::before, .hero:not(.visual-in-view) h1, .document-hidden .hero .wordmark::before, .is-playing .hero .wordmark::before { animation-play-state: paused; }

#mechanics-title > * { animation: metal-primary 5.7s linear infinite, metal-secondary 8.3s linear -3.1s infinite, phrase-breathe 7s ease-in-out infinite; }
#mechanics-title > :nth-child(2) { animation-delay: -1.9s, -4.8s, -2.3s; }
#mechanics-title > :nth-child(3) { animation-delay: -3.8s, -6.5s, -4.6s; }
#mechanics-title:not(.visual-in-view) > * { animation-play-state: paused; }

.native-outcome-frame { display: block; width: 100%; height: auto; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 4%, #000 96%, transparent); mask-composite: intersect; }
.outcome-board:not(.capture-unavailable) > .symbol-grid { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.capture-unavailable .native-outcome-frame { display: none; }
.outcome-board:not([hidden]) .native-outcome-frame { animation: outcome-arrival .5s ease-out; }
@keyframes outcome-arrival { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.native-outcome-media { margin: 35px 0; }
.native-outcome-media video { display: block; width: min(100%, 900px); height: auto; margin: 24px auto; }
@media (prefers-reduced-motion: reduce) { .native-outcome-frame { animation: none !important; } }

.is-playing .native-outcome-frame, .document-hidden .native-outcome-frame { animation: none; opacity: 1; transform: none; }

/* A short ember follows the perimeter; the center stays transparent and clickable. */
@property --forge-orbit { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.forge-trail { position: relative; isolation: isolate; display: inline-flex; border-radius: 6px; }
.forge-trail > .button, a.forge-trail { clip-path: none; border-radius: 6px; transform: none; }
.header-play.forge-trail { padding: 10px 14px; }
@media (max-width: 380px) { .header-play.forge-trail { padding: 8px 4px; font-size: 20px; } }
.forge-trail::before, .forge-trail::after { content: ""; position: absolute; inset: -3px; padding: 2px; border-radius: 9px; pointer-events: none; background: conic-gradient(from var(--forge-orbit), transparent 0turn .86turn, #d44c0b .93turn, #ff982c .975turn, #ffe0a1 .99turn, transparent 1turn); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: forge-orbit 6.8s linear infinite; animation-play-state: paused; }
.forge-trail::before { inset: -6px; padding: 4px; border-radius: 12px; background: conic-gradient(from var(--forge-orbit), transparent 0turn .68turn, #b7400808 .76turn, #e45d1733 .86turn, #ff9e466e .95turn, #ffd09aa6 .99turn, transparent 1turn); filter: blur(6px); opacity: .85; }
.forge-trail.visual-in-view::before, .forge-trail.visual-in-view::after { animation-play-state: running; }
@keyframes forge-orbit { to { --forge-orbit: 360deg; } }
.header-hidden .forge-trail::before, .header-hidden .forge-trail::after,
.document-hidden .forge-trail::before, .document-hidden .forge-trail::after,
.is-playing .forge-trail::before, .is-playing .forge-trail::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .forge-trail::before, .forge-trail::after { animation: none; opacity: .6; } }

/* Fade paint, never text or interactive children, at all four panel edges. */
.scenic-section { background: none; }
.algorithm-graph { background: radial-gradient(ellipse closest-side, #37271dc7, transparent 100%); }
.engineering .section-head > p, .production-story .section-head > p,
.math-figure, .phone-main-step, .phone-branch, .graph-text li, .engineering-details details, .faq details,
.work .offers > article, .evidence .evidence-grid, .detail-body pre { position: relative; isolation: isolate; background: none; }
.engineering .section-head > p::before, .production-story .section-head > p::before,
.math-figure::before, .phone-main-step::before, .phone-branch::before, .graph-text li::before, .engineering-details details::before, .faq details::before,
.evidence .evidence-grid::before, .detail-body pre::before {
 content: ""; position: absolute; inset: -36px -44px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse closest-side, #3b281dbb 35%, #241a1280 72%, transparent 100%); filter: blur(10px); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent), linear-gradient(180deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-composite: intersect;
}

/* A shared invitation closes both offers; the creator signature stays separate from the game brand. */
.work-contact { margin-top: 28px; text-align: center; }
/* Footer spacing controls: see FOOTER_LAYOUT_GUIDE.md. */
footer {
 --footer-side-padding: 6%; --footer-row-padding: 28px; --footer-mobile-side-padding: 24px; --footer-mobile-row-gap: 16px; --footer-column-gap: clamp(12px, 2vw, 30px);
 --footer-identity-gap: clamp(8px, 1vw, 18px); --footer-actions-gap: clamp(8px, 1vw, 20px); --footer-contact-gap: 4px;
 --footer-mark-width: 18.3px; --footer-mark-height: 33.15px;
 --footer-status-opacity: .35; --footer-credit-opacity: .45; --footer-contact-opacity: .65;
 --footer-rotation-duration: 12s; --footer-kick-angle: -34deg;
 display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
 align-items: center; gap: var(--footer-column-gap); padding: var(--footer-row-padding) var(--footer-side-padding);
}
footer > .brand { grid-column: 1; }
.footer-identity { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) var(--footer-mark-width) minmax(0, 1fr); align-items: center; gap: var(--footer-identity-gap); min-width: 0; }
.footer-status { margin: 0; font-size: 10px; line-height: 1.45; color: var(--gold); opacity: var(--footer-status-opacity); text-align: right; }
.footer-copy { min-width: 0; text-align: left; }
.footer-copy p { margin: 0 0 3px; font-size: 10px; line-height: 1.45; color: var(--muted); opacity: var(--footer-credit-opacity); }
.mklw-signature { display: block; width: var(--footer-mark-width); height: var(--footer-mark-height); perspective: 100px; }
.mklw-mark { display: block; width: 100%; height: 100%; mask: url('presentation/mklw-mark.webp') center / contain no-repeat; background: linear-gradient(115deg, #a88959 20%, #dfc48e 42%, #fff5d8 48%, #dfc48e 55%, #a88959 80%); background-size: 250% 100%; backface-visibility: visible; animation: mklw-sheen 7s ease-in-out infinite alternate, mklw-turn var(--footer-rotation-duration) linear infinite; }
@keyframes mklw-sheen { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
@keyframes mklw-turn { 0%, 5% { transform: translateZ(0) rotateY(0); } 12% { transform: translateZ(-6px) rotateY(var(--footer-kick-angle)); } 19% { transform: translateZ(0) rotateY(90deg); } 26% { transform: translateZ(0) rotateY(180deg); } 33% { transform: translateZ(0) rotateY(270deg); } 40% { transform: translateZ(0) rotateY(370deg); } 45%, 100% { transform: translateZ(0) rotateY(360deg); } }
.footer-actions { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: var(--footer-actions-gap); min-width: 0; }
.footer-back { flex-shrink: 0; font-size: 10px; color: var(--gold); opacity: .7; white-space: nowrap; }
.footer-contacts { display: grid; grid-template-columns: repeat(4, 44px); justify-content: end; gap: var(--footer-contact-gap); }
.footer-contacts a { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid transparent; border-radius: 8px; color: var(--gold); transition: color .2s, background-color .2s, box-shadow .2s; }
.footer-contacts svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; opacity: var(--footer-contact-opacity); transition: opacity .2s; }
.footer-contacts a:is(:hover, :focus-visible) { color: #fff0ca; background: #d6a15e18; box-shadow: 0 0 20px #d6943b30; }
.footer-contacts a:is(:hover, :focus-visible) svg { opacity: 1; }
.footer-contacts a:focus-visible { outline: 2px solid #d7b476; outline-offset: 3px; }
@media (min-width: 901px) and (max-width: 1399px) { .footer-contacts { grid-template-columns: repeat(2, 44px); } }
@media (max-width: 900px) {
 footer { grid-template-columns: minmax(140px, 1fr) minmax(0, 1fr); gap: var(--footer-mobile-row-gap); padding-inline: var(--footer-mobile-side-padding); }
 footer > .brand { grid-column: 1; grid-row: 1; }
 .footer-identity { grid-column: 1 / -1; grid-row: 2; }
 .footer-actions { display: contents; }
 .footer-back { grid-column: 2; grid-row: 1; justify-self: end; }
 .footer-contacts { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) { .mklw-mark { animation: none; } .footer-contacts a, .footer-contacts svg { transition: none; } }
.capture-gallery { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 55px); align-items: center; }
.capture-gallery > figure:first-child { width: min(100%, 620px); margin-inline: auto; }
.capture-gallery > figure:last-child { width: min(100%, 600px); margin-inline: auto; }
@media (max-width: 760px) { .capture-gallery { grid-template-columns: 1fr; gap: 45px; } }
.win-art-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-inline: 24px; }
@media (max-width: 760px) { .win-art-strip { grid-template-columns: 1fr; gap: 24px; } }

:root { --launch-font-size: 27px; }
@media (max-width: 1100px) { :root { --launch-font-size: 25px; } }
@media (max-width: 380px) { :root { --launch-font-size: 20px; } }
:is(.header-play, #play-here, .standalone, .phone-stage-launch) { font: 400 var(--launch-font-size)/1.2 var(--type-instrument); }
.preview-slides { position: absolute; inset: 0; overflow: hidden; background: #100d0b; }
.preview-slides > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #100d0b; }
.preview-slides > img:not(:first-child) { opacity: 0; transform: translateX(100%); }
.preview-slides.slideshow-ready > img:not(:first-child) { animation: preview-pan 42s ease-in-out infinite backwards; animation-play-state: paused; }
.preview-slides.slideshow-ready > img:nth-child(2) { animation-delay: 5s; }
.preview-slides.slideshow-ready > img:nth-child(3) { animation-delay: 11s; }
.preview-slides.slideshow-ready > img:nth-child(4) { animation-delay: 17s; }
.preview-slides.slideshow-ready > img:nth-child(5) { animation-delay: 23s; }
.preview-slides.slideshow-ready > img:nth-child(6) { animation-delay: 29s; }
.preview-slides.slideshow-ready > img:nth-child(7) { animation-delay: 35s; }
.preview-slides.slideshow-ready.visual-in-view > img:not(:first-child) { animation-play-state: running; }
@keyframes preview-pan {
 0% { opacity: 1; transform: translateX(100%); }
 2%, 14.285% { opacity: 1; transform: translateX(0); }
 16.285% { opacity: 1; transform: translateX(-100%); }
 16.286%, 100% { opacity: 0; transform: translateX(-100%); }
}
.preview-slides.slides-paused > img, .document-hidden .preview-slides > img,
.is-playing .preview-slides > img, #game-poster[hidden] .preview-slides > img { animation-play-state: paused !important; }
.preview-pause { position: absolute; bottom: 16px; left: 18px; z-index: 3; padding: 8px 10px; min-height: 44px; border: 0; background: #100d0bbd; color: var(--gold); font: 400 14px/1.2 var(--type-control); }
@media (prefers-reduced-motion: reduce) { .preview-slides > img { animation: none !important; } }

/* Brass navigation marks replace the unrelated text-font arrows. */
.waymark { display: inline-block; position: relative; width: 18px; height: 18px; flex: 0 0 18px; margin-left: 10px; vertical-align: -.12em; color: #d7ad70; }
.waymark::before { content: ""; position: absolute; width: 8px; height: 8px; left: 3px; top: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); filter: drop-shadow(0 0 3px #e78a3528); transition: filter .4s, color .4s; }
.waymark-down::before { transform: rotate(45deg); }
.waymark-up::before { transform: rotate(225deg); }
.waymark-out::before { transform: rotate(-90deg); }
a:hover .waymark::before, button:hover .waymark::before, summary:hover .waymark::before { color: #ffe0a1; filter: drop-shadow(0 0 5px #ed813b88); }
.header-play .launch-label { font: inherit; margin: 0; }
.launch-label { display: inline-block; color: #f3dfbb; font: inherit; }
#play-here { background: linear-gradient(90deg, #4a241b, #92502c 48%, #4a241b); box-shadow: inset 0 1px 0 #dfaa6d3b, inset 0 -8px 24px #2a120d55; padding: 24px 38px; }
#play-here .launch-label { font-size: clamp(30px, 2.6vw, 38px); }
@supports (background-clip: text) {
 .launch-label { color: transparent; background-image: linear-gradient(110deg, transparent 43%, #fff9e6 50%, transparent 57%), linear-gradient(110deg, transparent 44%, #f7dfaa90 50%, transparent 56%), linear-gradient(#f3dfbb, #c9ad77 48%, #9d784c 51%, #f1deba 78%); background-size: 250% 100%, 250% 100%, 100% 100%; background-position: var(--metal-primary) 0, var(--metal-secondary) 0, 0 0; background-clip: text; animation: metal-primary 5.7s linear infinite, metal-secondary 8.3s linear -3.1s infinite; animation-play-state: paused; }
 .forge-trail.visual-in-view .launch-label { animation-play-state: running; }
 .motion-paused .launch-label, .document-hidden .launch-label, .is-playing .launch-label, .header-hidden .header-play .launch-label { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .launch-label { animation: none !important; } .waymark::before { transition: none; } }
/* The illustration stays outside the disclosure and never resizes on a click. */
.machine-cover { display: flow-root; margin-block: 45px 70px; }
.machine-cover > img { position: relative; z-index: 1; float: left; width: calc(54.5% - 22px); height: auto; display: block; margin: 0 45px 25px 0; cursor: default; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent); mask-composite: intersect; }
.machine-cover .machine-reveal { margin: 0; min-width: 0; }
.machine-cover .machine-reveal > summary, .machine-cover .machine-reveal[open] > summary { display: block; margin-left: calc(54.5% + 23px); padding: 24px 0; min-height: 350px; }
.machine-cover .machine-reveal .reveal-copy { display: grid; grid-template-columns: 1fr; gap: 20px; }
.machine-cover .machine-reveal[open] .reveal-copy > strong { font-size: 34px; }
.machine-cover .machine-reveal[open] .reveal-action { grid-column: 1; grid-row: auto; }
.machine-cover .machine-workshop { clear: both; padding-top: 30px; }
.engineering-route { position: relative; display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 16px; max-width: 1550px; margin-inline: auto; padding-inline: 18px; }
.engineering-chapters { min-width: 0; }
.engineering-route .section { width: 100%; }
.engineering-route .workshop-nav { position: sticky; top: 125px; align-self: start; z-index: 8; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 10px; margin-top: 110px; font-size: 14px; background: none; }
.workshop-nav a { padding: 5px 10px; transition: color .3s, text-shadow .3s; }
.workshop-nav a[aria-current="location"] { color: #ffe0a1; text-shadow: 0 0 15px #e0803566; box-shadow: inset 2px 0 #c79153; }
.embed-expanded .engineering-route { visibility: hidden; }
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 55px; margin-block: 40px; }
.stack-grid h3 { font: 400 26px/1.4 var(--type-narrative); color: var(--ivory); margin-bottom: 14px; }
.stack-grid p { font-size: 19px; line-height: 1.65; }
.evidence-methods .evidence-kind { display: block; font: 400 16px/1.5 var(--type-control); color: var(--gold); margin-bottom: 20px; }
.evidence-methods h3 { font: 400 28px/1.4 var(--type-narrative); }
.evidence-methods p { font-size: 19px; }
.performance-context { margin-block: 32px; padding: 20px; }
.performance-context p { font-size: 19px; line-height: 1.7; max-width: 80ch; }
.creator-statement { max-width: 84ch; font-size: 24px; line-height: 1.65; margin-block: 35px 55px; }
/* Soft paint edges in every direction; content and click targets stay opaque. */
.machine-reveal, .deployment-scene, .access-story, .record-map, .journal-node, .stack-grid article, .performance-context, .engineering-essays > article, .states, .math-reading, .math-opening, .workshop-nav { position: relative; isolation: isolate; background: none; }
.machine-reveal::before, .deployment-scene::before, .access-story::before, .record-map::before, .journal-node::before, .performance-context::before, .engineering-essays > article::before, .states::before, .math-reading::before, .math-opening::before, .stack-grid article::before, .workshop-nav::before { content: ""; position: absolute; inset: -36px -44px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse closest-side, #38271dc4 35%, #241a1270 72%, transparent 100%); filter: blur(12px); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent), linear-gradient(180deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-composite: intersect; }
.engineering-route .machine-reveal::before { display: none; }
.preview-slides { mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent), linear-gradient(180deg, transparent, #000 4%, #000 96%, transparent); mask-composite: intersect; }
.engineering-route .chapter-scene { filter: blur(12px); }
.engineering-route > .engineering-shell > .engineering-chapters > .section > .chapter-atmosphere { height: var(--engineering-art-height, 100%); }
.engineering-route .chapter-art.art-extra { width: clamp(150px, 20vw, 280px); max-width: calc(100vw - 70px); opacity: .18; }
.engineering-route .art-extra-0 { left: 25px; top: 38%; --prop-tilt: -13deg; animation-delay: -2s; }
.engineering-route .art-extra-1 { right: 25px; top: 64%; --prop-tilt: 18deg; animation-delay: -5s; }
.engineering-route .art-extra-2 { left: 35px; top: 84%; --prop-tilt: -8deg; animation-delay: -7s; }
.engineering-route .chapter-art.art-extra { animation-name: engineering-prop; animation-play-state: paused; }
.engineering-route .chapter-atmosphere.visual-in-view .art-extra { animation-play-state: running; }
@keyframes engineering-prop { from { transform: translateY(6px) rotate(var(--prop-tilt)) scale(.98); opacity: .13; } to { transform: translateY(-12px) rotate(calc(var(--prop-tilt) + 3deg)) scale(1.02); opacity: .23; } }
.document-hidden .art-extra, .is-playing .art-extra, .motion-paused .art-extra { animation-play-state: paused !important; }
@media (max-width: 1200px) {
 .engineering-route { display: block; padding-inline: 0; }
 .engineering-route .workshop-nav { top: 0; margin: 0; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; justify-content: start; padding: 12px 20px; gap: 12px; }
 .workshop-nav a { white-space: nowrap; flex-shrink: 0; }
 .workshop-nav a[aria-current="location"] { box-shadow: inset 0 -2px #c79153; }
}
@media (max-width: 760px) { .machine-cover > img { float: none; width: 100%; margin: 0 0 18px; } .machine-cover .machine-reveal > summary, .machine-cover .machine-reveal[open] > summary { margin-left: 0; min-height: 0; } .stack-grid { grid-template-columns: 1fr; gap: 28px; } .creator-statement { font-size: 21px; } .engineering-route .chapter-art.art-extra { width: 150px; opacity: .12; } }
@media (prefers-reduced-motion: reduce) { .art-extra { animation: none !important; } }

@media (max-width: 1200px) {
 .engineering-route .workshop-nav { top: 90px; transition: top .35s ease; }
 body:has(.header-hidden) .engineering-route .workshop-nav { top: 8px; }
 .engineering-route .workshop-nav::before { inset: 0; background: radial-gradient(ellipse, #15110ef2, transparent 75%); }
}
@media (prefers-reduced-motion: reduce) { .engineering-route .workshop-nav { transition: none; } }

/* The preview is an atmospheric backdrop; controls stay above the darkened paint. */
.preview-slides::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 47%, #0d08052b 8%, #0d08057a 42%, #0d0805ed 85%), linear-gradient(90deg, #090605e8, transparent 38%, transparent 62%, #090605e8); }
#play-here { --preview-label-size: clamp(30px, 2.6vw, 38px); padding: calc(18px - var(--preview-label-size) * .15) 20px; background: radial-gradient(ellipse at 50% 42%, #915333, #68351f 58%, #321912 100%); }
#play-here .launch-label { font-size: var(--preview-label-size); }
.poster-action { isolation: isolate; }
.invitation-glow { position: absolute; width: 420px; height: 240px; top: 50%; left: 50%; translate: -50% -50%; z-index: -1; pointer-events: none; background: radial-gradient(ellipse, #ffba6bcc, #e76d3170 38%, #c54e1526 60%, transparent 75%); filter: blur(28px); animation: preview-invitation-glow 5.8s ease-in-out infinite alternate; animation-play-state: paused; }
.poster-launch.visual-in-view .invitation-glow { animation-play-state: running; }
@keyframes preview-invitation-glow { from { opacity: .55; scale: .92; } to { opacity: 1; scale: 1.08; } }
.document-hidden .invitation-glow, .is-playing .invitation-glow, .motion-paused .invitation-glow { animation-play-state: paused; }
.engineering-shell { display: contents; }
.engineering-reading-mode { margin: 15px 5px 0; padding: 10px 6px; min-height: 44px; border: 0; background: transparent; color: var(--gold); text-decoration: underline; text-underline-offset: 5px; font: 400 13px/1.5 var(--type-control); }
.engineering-horizontal { display: block; }
.engineering-horizontal .engineering-shell { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 16px; position: sticky; top: 90px; height: calc(100svh - 105px); }
.engineering-horizontal .workshop-nav { position: relative; top: 0 !important; margin: 0; max-height: 100%; overflow-y: auto; }
.engineering-horizontal .engineering-chapters { display: flex; height: 100%; overflow: hidden; }
.engineering-horizontal .engineering-chapters > .section { flex: 0 0 100%; min-width: 0; max-width: none; height: 100%; overflow: hidden; padding-top: 32px; padding-bottom: 48px; }
.engineering-horizontal .engineering-chapters > .section > .chapter-atmosphere { height: var(--engineering-art-height, var(--engineering-content-height, 100%)); }
@media (max-width: 1200px) {
 .engineering-horizontal .engineering-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 4px; }
 .engineering-horizontal .workshop-nav { max-height: 82px; align-items: center; }
 .engineering-reading-mode { margin: 0; flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .invitation-glow { animation: none; opacity: .65; } }

/* Keep native scrolling available without exposing tracks beside the chapter index. */
.engineering-route .workshop-nav, .engineering-chapters, .engineering-chapters > .section { scrollbar-width: none; }
.engineering-route .workshop-nav::-webkit-scrollbar, .engineering-chapters::-webkit-scrollbar, .engineering-chapters > .section::-webkit-scrollbar { display: none; }
.payline-rule { max-width: 76ch; margin: 28px auto 40px; font-size: 20px; line-height: 1.65; }
.work.scenic-section .chapter-atmosphere .art-secondary { bottom: auto; top: 43%; }
.work.scenic-section .chapter-atmosphere .art-tertiary { top: auto; left: auto; right: 28px; bottom: -100px; width: min(22vw, 290px); opacity: .3; animation-delay: -7s; }

/* Keep the index wash inside the text's own footprint, with transparent paint edges. */
.engineering-horizontal .engineering-shell { isolation: isolate; }
.engineering-horizontal .engineering-shell::before { display: none; }
.engineering-horizontal .workshop-nav::before { display: block; inset: 0; background: radial-gradient(ellipse closest-side, #2c20185c 35%, transparent 100%); filter: blur(10px); }
.faq.scenic-section .chapter-atmosphere .art-secondary { width: clamp(125px, 12vw, 180px); left: calc(50% - clamp(62px, 6vw, 90px)); bottom: -18px; --prop-tilt: -16deg; animation-name: engineering-prop; animation-duration: 22s; opacity: .22; }
.math-chapter.scenic-section .chapter-atmosphere .art-secondary { left: 28px; top: clamp(420px, calc(100svh - 270px), 800px); bottom: auto; width: min(22vw, 250px); opacity: .25; }
.production-story.scenic-section .chapter-atmosphere .art-secondary { left: auto; right: 32px; bottom: 52px; width: clamp(130px, 14vw, 190px); opacity: .27; }
@media (max-width: 1200px) {
 .engineering-horizontal .engineering-shell::before { inset: -20px -24px auto; width: auto; height: 120px; mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent), linear-gradient(180deg, transparent, #000 24px, #000 65%, transparent); }
}
@media (max-width: 760px) {
 .math-chapter.scenic-section .chapter-atmosphere .art-secondary { width: 145px; }
 .math-chapter .chapter-art.art-extra { opacity: .12; }
}
@media (prefers-reduced-motion: reduce) { .faq .chapter-art { animation: none !important; } }

/* Metric artwork belongs to its figure, so long chapters cannot leave it behind. */
.math-chapter .metric-atmosphere { inset: 0; height: 100%; overflow: visible; }
.math-chapter .metric-atmosphere .art-extra { left: auto; right: 0; top: 20px; width: clamp(130px, 18vw, 245px); opacity: .2; --prop-tilt: 10deg; }
.math-chapter .metric-atmosphere .math-art-1 { right: auto; left: 0; top: auto; bottom: 18px; --prop-tilt: -12deg; }
.math-chapter .metric-atmosphere .math-art-3 { top: auto; bottom: 18px; --prop-tilt: -16deg; }
@media (max-width: 760px) { .math-chapter .metric-atmosphere .art-extra { width: 130px; opacity: .14; } }

/* Soften the pinned reading viewport's entry/exit without fading text or pointer targets. */
.engineering-horizontal .engineering-chapters { mask-image: linear-gradient(180deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.engineering.scenic-section .chapter-atmosphere .art-secondary { left: auto; right: 32px; top: 43%; bottom: auto; width: clamp(140px, 17vw, 220px); }
.engineering .chapter-atmosphere .art-extra-2 { left: 28px; right: auto; top: 82%; width: clamp(140px, 18vw, 230px); }
.math-opening .rng-note { grid-column: 1 / -1; font-size: 18px; }

/* Native controls illustrate responsibilities; these are not live game buttons. */
.event-control-art { display: block; position: relative; width: 112px; height: 112px; margin: 0 auto 24px; pointer-events: none; }
.event-control-art > img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 9px 12px #0008); }
.event-control-art .control-crank { position: absolute; left: 50%; top: 50%; width: 57%; height: auto; transform: translate(-50%, -50%) rotate(-15deg); }
@media (max-width: 760px) { .event-boundaries { grid-template-columns: 1fr; gap: 36px; } }
/* Shared invitation treatment, including the hero action. */
.hero .actions .hero-play-orbit > .primary { font: 400 32.5px/1.25 var(--type-instrument); text-transform: none; background: radial-gradient(ellipse at center, #a4693b, #704329 65%, #382318 100%); box-shadow: inset 0 0 24px #1b100b88; }
@media (max-width: 1100px) { .hero .actions .hero-play-orbit > .primary { font-size: 29.9px; } }
.engineering-route { overflow-anchor: none; }
.engineering-route pre { scrollbar-width: none; }
.engineering-route pre::-webkit-scrollbar { display: none; }
.event-control-art { height: 180px; }
.control-auto > img:first-child { position: absolute; bottom: 0; height: 110px; }
.event-control-art .control-auto-popup { position: absolute; top: 0; left: 10%; width: 80%; height: 102px; }
.production-story .entry-visitor { left: 8%; right: auto; top: 65%; width: clamp(145px, 17vw, 222px); opacity: .22; }
.evidence .entry-visitor { left: 4%; right: auto; top: 62%; width: clamp(145px, 17vw, 222px); opacity: .23; }
@media (max-width: 600px) { .invitation-glow { width: 310px; height: 190px; } }

/* Transparent paint endpoints and a viewport mask survive chapter clipping. */
.engineering-horizontal .engineering-chapters {
 mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent), linear-gradient(180deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
 mask-composite: intersect;
}
.mechanics { background: none; }
.mechanics::before { content: ""; position: absolute; inset: -40px -4%; z-index: -1; pointer-events: none; background: radial-gradient(ellipse closest-side, #4a2f1c35 25%, transparent 100%); filter: blur(24px); }
.work > .chapter-atmosphere { height: 100%; }
/* Every decorative sprite scales; limits protect the text on narrow screens. */
.scenic-section .chapter-atmosphere .chapter-art { width: clamp(100px, 24vw, 460px); max-width: 80%; height: auto; }
.scenic-section .chapter-atmosphere .art-secondary { width: clamp(80px, 17vw, 310px); }
.scenic-section .chapter-atmosphere .art-tertiary { width: clamp(75px, 15vw, 290px); }
.engineering-route .chapter-atmosphere .chapter-art.art-extra { width: clamp(85px, 18vw, 280px); }
.scenic-section .chapter-atmosphere .entry-visitor { width: clamp(85px, 16vw, 230px); }
.work.scenic-section .chapter-atmosphere .art-primary { width: clamp(150px, 28vw, 640px); }
.experience.scenic-section .chapter-atmosphere .art-primary, .faq.scenic-section .chapter-atmosphere .art-primary { width: clamp(90px, 18vw, 300px); }
.faq.scenic-section .chapter-atmosphere .art-secondary { width: clamp(85px, 12vw, 220px); left: 50%; translate: -50% 0; }
.mechanics-props img { width: clamp(65px, 9vw, 160px); max-width: 30%; height: auto; }
.world-strip > img { width: clamp(130px, 25vw, 500px); height: auto; }
.chapter-light { width: min(60vw, 600px); height: min(65vw, 650px); }
@media (max-width: 760px) {
 .engineering-horizontal .engineering-chapters { mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent), linear-gradient(180deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
}

@media (min-width: 761px) { .engineering-horizontal .engineering-chapters > .section { padding-inline: 56px; } }

.world-strip::before, .chapter-scene { inset-inline: 0; }
/* Preserve the established art hierarchy while removing fixed-size behavior. */
.engineering.scenic-section .chapter-atmosphere .art-secondary { width: clamp(80px, 17vw, 220px); }
.production-story.scenic-section .chapter-atmosphere .art-secondary { width: clamp(75px, 14vw, 190px); }
.math-chapter.scenic-section .chapter-atmosphere .art-secondary { width: clamp(80px, 18vw, 250px); }
:is(.data-story,.production-story,.event-flow).scenic-section .chapter-atmosphere .art-primary { width: clamp(100px, 24vw, 300px); }
.evidence.scenic-section .chapter-atmosphere .art-primary { width: clamp(90px, 20vw, 250px); }
.experience.scenic-section .chapter-atmosphere .art-primary { width: clamp(90px, 18vw, 250px); }
.faq.scenic-section .chapter-atmosphere .art-primary { width: clamp(90px, 18vw, 240px); }

@media (max-width: 1100px) {
 .navigation-ready .header .brand { flex: 0 0 auto; }
 .header-play.forge-trail { min-height: 44px; align-items: center; padding: 8px 10px; }
 .header-play .launch-label { display: inline-block; font-size: clamp(18px, 4.9vw, 25px); color: #f3dfbb; background: none; animation: none; }
}
@media (pointer: coarse) {
 /* Keep native touch momentum; avoid repainting full-screen light fields during a swipe. */
 .site-backdrop, .chapter-scene, .chapter-light { animation: none !important; }
 .global-embers > span:nth-child(n+15) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
 .navigation-ready .header .brand-base { animation: none; clip-path: none; }
}

/* Warm smoked glass: the forge remains visible behind a compact reading surface. */
@media (max-width: 1100px) {
 .navigation-ready .mobile-nav {
  top: calc(var(--navigation-height) + 8px); left: auto; right: 12px;
  width: min(440px, calc(100% - 24px)); padding: 12px 20px;
  border: 0; border-radius: 16px;
  background: linear-gradient(145deg, #302319b8, #15110e99);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  box-shadow: inset 0 1px #e4c38b26, inset 0 -1px #e4c38b0d, 0 18px 40px #0005;
 }
 .mobile-nav:not([hidden]) { animation: mobile-menu-arrival .22s ease-out both; }
 .navigation-ready .mobile-nav a {
  position: relative; display: flex; align-items: center; min-height: 56px;
  padding: 12px 30px 12px 4px; font-size: 22px; line-height: 1.25;
  color: #eddfc3; text-shadow: 0 1px 8px #100b0766;
  transition: color .2s ease, background-color .2s ease;
 }
 .mobile-nav a + a { border-top: 1px solid #d5b37a14; }
 .mobile-nav a::after {
  content: ""; position: absolute; right: 6px; width: 7px; height: 7px;
  border-top: 1px solid #d7ad70; border-right: 1px solid #d7ad70;
  transform: rotate(45deg); opacity: .7;
 }
 .mobile-nav a:hover, .mobile-nav a:focus-visible { color: #fff1d0; background: #bc864f0d; transform: none; }
 .navigation-ready .menu-toggle { position: relative; font-size: 0; border-radius: 50%; }
 .menu-toggle::before, .menu-toggle::after {
  content: ""; position: absolute; left: 12px; width: 20px; height: 1.5px;
  background: #e4d0a8; transition: transform .2s ease, top .2s ease;
 }
 .menu-toggle::before { top: 18px; }
 .menu-toggle::after { top: 25px; }
 .menu-toggle[aria-expanded="true"] { background: #c1955e17; }
 .menu-toggle[aria-expanded="true"]::before { top: 21px; transform: rotate(45deg); }
 .menu-toggle[aria-expanded="true"]::after { top: 21px; transform: rotate(-45deg); }
}
@keyframes mobile-menu-arrival { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
 .mobile-nav:not([hidden]) { animation: none; }
 .menu-toggle::before, .menu-toggle::after { transition: none; }
}

/* Touch readers put tabs at the top, lowering them only for the returning main header. */
@media (pointer: coarse) {
 .engineering-route { display: block; padding-inline: 0; --engineering-header-inset: 0px; }
 .navigation-ready:not(:has(.header-hidden)) .engineering-route { --engineering-header-inset: var(--navigation-height); }
 .engineering-route .workshop-nav {
  top: var(--engineering-header-inset) !important; margin: 0; flex-direction: row; flex-wrap: nowrap;
  min-height: 48px; max-height: 48px; gap: 8px; align-items: center;
  padding: 2px max(12px, env(safe-area-inset-right)) 2px max(12px, env(safe-area-inset-left));
  overflow-x: auto; overflow-y: hidden; transition: top .28s ease;
 }
 .engineering-route .workshop-nav a { min-height: 44px; display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; font-size: 14px; }
 .engineering-route .workshop-nav a[aria-current="location"] { box-shadow: inset 0 -2px #c79153; }
 .engineering-horizontal .engineering-shell { top: 0; height: 100svh; grid-template-columns: minmax(0,1fr); grid-template-rows: calc(48px + var(--engineering-header-inset)) minmax(0,1fr); gap: 0; transition: grid-template-rows .28s ease; }
 .engineering-horizontal .workshop-nav { top: 0 !important; align-self: end; }
 .engineering-route .engineering-chapters > .section { padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
 .engineering-horizontal .engineering-chapters > .section { padding-top: 12px; padding-bottom: 20px; }
 .engineering-horizontal .engineering-chapters { mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent), linear-gradient(180deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
 .engineering-reading-mode { margin: 0; flex: 0 0 auto; }
 .engineering-route :is(.reveal-pending, .arrived) { animation: none; opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
 .engineering-horizontal .engineering-shell, .engineering-route .workshop-nav { transition: none; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
 .engineering-horizontal .engineering-shell { height: 100dvh; }
}
.evidence.scenic-section .chapter-atmosphere .art-secondary { left: 50%; translate: -50% 0; }

/* Wider screens keep the reading canvas and its artwork in proportion. */
@media (min-width: 1800px) {
 .section { max-width: min(92vw, 1920px); }
 .work { padding-inline: clamp(48px, 4vw, 100px); }
 .engineering-route { max-width: min(94vw, 2200px); }
 body { font-size: clamp(20px, .9vw, 26px); }
 .section h2 { font-size: clamp(48px, 2.6vw, 76px); }
 .section h3 { font-size: clamp(28px, 1.25vw, 36px); }
 .section-head > p, .engineering-reading .detail-body p, .engineering-essays > article > p,
 .event-boundaries p, .math-opening p, .math-reading p, .offers p, .payline-rule {
  font-size: clamp(20px, .9vw, 26px);
 }
 .world-strip { padding-inline: max(7%, calc((100vw - 1720px) / 2)); }
 .world-strip > div { max-width: 760px; }
 .world-strip h2 { font-size: clamp(48px, 2.6vw, 76px); }
 .world-strip p:not(.eyebrow) { font-size: clamp(20px, .9vw, 26px); max-width: 32ch; }
 .world-strip > img { width: clamp(450px, 23vw, 720px); }
 .capture-gallery > figure:first-child, .capture-gallery > figure:last-child { width: 100%; }
 .win-art-strip { max-width: min(92vw, 1920px); }
 .scenic-section .chapter-atmosphere .chapter-art.art-primary { width: clamp(280px, 18vw, 620px); }
 .scenic-section .chapter-atmosphere .chapter-art.art-secondary { width: clamp(190px, 11vw, 380px); }
 .scenic-section .chapter-atmosphere .chapter-art.art-tertiary { width: clamp(170px, 10vw, 340px); }
 .engineering-route .chapter-atmosphere .chapter-art.art-extra { width: clamp(190px, 11vw, 360px); }
 .work.scenic-section .chapter-atmosphere .art-primary { width: clamp(480px, 25vw, 820px); }
 .work.scenic-section .chapter-atmosphere .art-secondary { left: 0; }
 .work.scenic-section .chapter-atmosphere .art-tertiary { right: 0; }
}
