/* Odd Beds - the scroll story. The room is the one focal point; words sit on the calm side of the frame. */
.x-page main{max-width:none;margin:0;padding:0}
.x-page .top{position:fixed;left:0;right:0;top:0;background:rgba(244,239,230,.86);border-bottom:1.5px solid rgba(27,31,36,.8)}
.x{position:relative}
.x-stage{position:sticky;top:0;height:100vh;height:100lvh;width:100%;overflow:hidden;background:#d8cfc2;z-index:0}
.plate{position:absolute;inset:0;opacity:0}
.plate.on{opacity:1}
.plate img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:100% 50%;display:block}
.x-gl{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .7s ease;display:block}
.x-stage.live .x-gl{opacity:1}
.ink{position:absolute;inset:0;pointer-events:none}
.ink-flat{position:absolute;left:0;top:0;overflow:visible}
.x-veil{position:absolute;inset:0;background:#f4efe6;opacity:0;pointer-events:none;z-index:2}
/* the calm side of the frame: a wash of paper behind the words */
.x-stage::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(244,239,230,.97) 0,rgba(244,239,230,.92) 29%,rgba(244,239,230,0) 44%)}
/* the drawn layer */
.over{fill:rgba(232,87,42,.62)}
.gap{fill:rgba(232,87,42,.42)}
.store-edge{fill:none;stroke:#E8572A;stroke-width:2;stroke-dasharray:7 5}
.ghost .side{fill:rgba(240,236,228,.96);stroke:rgba(27,31,36,.28);stroke-width:1}
.ghost-top{fill:#fffdf9;stroke:#1B1F24;stroke-width:1.5}
.tape{filter:drop-shadow(0 0 1.5px rgba(255,253,249,.95)) drop-shadow(0 1px 2px rgba(0,0,0,.25))}
.tape .band{stroke:#2B4C7E;stroke-width:3.5;stroke-linecap:round}
.tape .tick{stroke:#2B4C7E;stroke-width:3;stroke-linecap:round}
.pill rect{fill:#1B1F24}
.pill text{fill:#FFFDF9;font:600 13px/1 var(--mono);letter-spacing:-.01em}
/* the beats */
.beat{position:relative;min-height:135vh;display:flex;align-items:flex-start;pointer-events:none;z-index:1}
/* the words hold still while the room moves: each panel pins for its beat and leaves with it */
.panel{position:sticky;top:max(5.5rem,calc(50vh - 15rem))}
.b-problem{margin-top:-100vh;margin-top:-100lvh;min-height:120vh;min-height:120lvh}
.beat.last{min-height:120vh}
.panel{pointer-events:auto;width:min(28vw,28rem);margin-left:clamp(1.25rem,4.5vw,4.5rem);padding:1.25rem 0;}
.b-problem .panel{width:min(31vw,32rem)}
.panel h1{font-size:clamp(2.6rem,4.6vw,5.4rem);line-height:.96;letter-spacing:-.045em;margin:0 0 1.2rem}
.panel h2{font-size:clamp(2rem,3.4vw,3.6rem);line-height:1;letter-spacing:-.035em;margin:0 0 1rem}
.panel p{font-size:clamp(1.02rem,1.15vw,1.2rem);line-height:1.5;color:var(--ink-2);margin:0 0 1rem;max-width:30rem}
.panel .lede{font-size:clamp(1.08rem,1.3vw,1.3rem);color:var(--ink)}
.legend{display:flex;gap:1.2rem;flex-wrap:wrap;font-size:.92rem!important;color:var(--ink)!important}
.legend span{display:inline-flex;align-items:center;gap:.45rem}
.sw{display:inline-block;width:1.1rem;height:.8rem;border-radius:3px}
.sw.over{background:rgba(232,87,42,.85)}.sw.gap{background:rgba(232,87,42,.42);outline:1.5px dashed #E8572A;outline-offset:-1.5px}
.rooms{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin-top:1.2rem}
.room{font:inherit;text-align:left;display:flex;flex-direction:column;gap:.35rem;padding:.35rem .35rem .55rem;border:1.5px solid rgba(27,31,36,.35);border-radius:10px;background:rgba(255,253,249,.85);cursor:pointer;color:var(--ink);transition:border-color .2s,transform .2s}
.room img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:6px;display:block;background:#d8cfc2}
.room span{font-weight:650;font-size:.95rem;padding:0 .2rem}
.room:hover{transform:translateY(-2px)}
.room.on{border-color:#1B1F24;box-shadow:0 0 0 1.5px #1B1F24}
.room.other{justify-content:center;min-height:3rem;grid-column:1/-1}
.steps{list-style:none;counter-reset:s;margin:0 0 1rem;padding:0}
.steps li{counter-increment:s;position:relative;padding:.55rem 0 .55rem 2.6rem;font-size:1.06rem;color:var(--ink-2);border-top:1px solid rgba(27,31,36,.15);transition:color .3s}
.steps li::before{content:counter(s);position:absolute;left:0;top:.5rem;width:1.8rem;height:1.8rem;border-radius:50%;border:1.5px solid rgba(27,31,36,.35);display:grid;place-items:center;font:600 .85rem/1 var(--mono);transition:background .3s,color .3s,border-color .3s}
.steps li.on{color:var(--ink)}.steps li.on::before{background:#2B4C7E;border-color:#2B4C7E;color:#fff}
.more{font-weight:650;text-decoration:none;border-bottom:2px solid var(--accent)}
.shape-form{display:grid;grid-template-columns:1fr 1fr;gap:.7rem .8rem;margin-top:1rem}
.shape-form .f{display:flex;flex-direction:column;gap:.25rem;font-size:.82rem;font-weight:650;position:relative}
.shape-form .kind,.shape-form .corners{grid-column:1/-1}
.shape-form input[type=number],.shape-form select{font:600 1.15rem/1 var(--mono);color:var(--ink);width:100%}
.shape-form select{padding:.6rem .7rem;border:1.5px solid var(--ink);border-radius:10px;background:#fffdf9}
.shape-form select{font-family:var(--sans);font-size:1rem}
.shape-form .step{display:flex;align-items:stretch;border:1.5px solid var(--ink);border-radius:10px;background:#fffdf9;overflow:hidden}
.shape-form .step input[type=number]{border:0;border-radius:0;background:none;text-align:center;padding:.55rem .1rem;min-width:0;flex:1}
.shape-form .step em{align-self:center;font:500 .8rem/1 var(--mono);color:var(--ink-2);font-style:normal;padding-right:.35rem}
.shape-form .step button{font:600 1.35rem/1 var(--sans);width:2.6rem;border:0;background:#efe8dc;color:var(--ink);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.shape-form .step button:active{background:var(--ink);color:var(--paper)}
.shape-form fieldset{border:0;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:.3rem 1rem}
.shape-form legend{font-size:.82rem;font-weight:650;margin-bottom:.3rem;padding:0}
.shape-form fieldset label{font-weight:500;font-size:.95rem;display:inline-flex;gap:.35rem;align-items:center}
.toggle{display:inline-flex;border:1.5px solid var(--ink);border-radius:999px;padding:3px;margin:.2rem 0 1rem;background:#fffdf9}
.toggle button{font:inherit;font-weight:650;font-size:.95rem;border:0;background:none;padding:.5rem 1rem;border-radius:999px;cursor:pointer;color:var(--ink)}
.toggle button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
.versus{color:var(--ink)!important;min-height:4.5em}
.workshop{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.workshop img{width:100%;border-radius:8px}
.b-made .panel{color:var(--ink)}
.sheet{margin:0 0 1rem;background:#fbf9f5;border:1.5px solid rgba(27,31,36,.3);border-radius:10px;padding:.6rem;max-width:22rem}
.sheet svg{display:block;width:100%;height:auto;max-height:34vh}
.sheet figcaption{font:500 .8rem/1.3 var(--mono);color:var(--ink-2);padding:.4rem .2rem 0}
.send-row{display:flex;flex-direction:column;gap:.9rem}
.send-row .disclosure{margin:0;padding:.8rem 1rem;border-left:3px solid var(--accent);background:rgba(255,253,249,.9);border-radius:0 8px 8px 0}
.send-row .disclosure h3{font-size:.85rem;margin:0 0 .3rem;letter-spacing:.01em}
.send-row .disclosure p{font-size:.85rem;margin:0;color:var(--ink-2)}
.go{display:inline-block;align-self:flex-start;background:var(--ink);color:var(--paper);text-decoration:none;font-weight:700;font-size:1.05rem;padding:.95rem 1.3rem;border-radius:10px;transition:transform .15s,box-shadow .15s}
.go:hover{transform:translate(-2px,-2px);box-shadow:5px 5px 0 var(--accent)}
.guides{position:relative;z-index:2;background:var(--paper);padding:clamp(3rem,7vw,6rem) clamp(1.25rem,4.5vw,4.5rem) 2rem;border-top:2px solid var(--ink)}
.guides h2{font-size:clamp(2rem,3.4vw,3.6rem);letter-spacing:-.035em;margin:0 0 2rem}
.guides .cards{max-width:80rem}
.guides .card h3{font-size:1.1rem;margin:0 0 .3rem;letter-spacing:-.01em}
.x-page .sources{position:relative;z-index:2;background:var(--paper);padding:0 clamp(1.25rem,4.5vw,4.5rem) 2rem;margin:0}
.x-page .foot{position:relative;z-index:2;background:var(--paper)}
/* phones and tall screens: the room on top, the words below it */
@media (max-aspect-ratio:1/1){
  .plate img{object-position:50% 0}
  .x-stage::after{background:linear-gradient(0deg,rgba(244,239,230,.97) 0,rgba(244,239,230,.9) 34%,rgba(244,239,230,0) 46%)}
  .beat{align-items:flex-end;min-height:130vh}
  .b-problem{min-height:110vh;min-height:110lvh}
  .panel,.b-problem .panel{position:sticky;top:auto;bottom:0}
  .panel,.b-problem .panel{width:auto;margin:0 .6rem .6rem;padding:1.1rem 1rem calc(1rem + env(safe-area-inset-bottom));background:rgba(244,239,230,.95);border-radius:18px;box-shadow:0 -6px 30px rgba(27,31,36,.12)}
  .b-problem .panel{margin-bottom:calc(6vh + env(safe-area-inset-bottom))}
  .panel p{font-size:1rem}
  .shape-form{gap:.5rem .6rem}
  .shape-form input[type=number],.shape-form select{font-size:1.05rem;padding:.5rem 2.2rem .5rem .6rem}
  .shape-form fieldset{gap:.2rem .7rem}
  .shape-form fieldset label{font-size:.88rem}
  .x-page .menu{display:none}
  .panel h1{font-size:clamp(2.3rem,10.5vw,3.6rem)}
  .panel h2{font-size:clamp(1.8rem,8.5vw,2.8rem)}
  .rooms{grid-template-columns:1fr 1fr 1fr;gap:.4rem}
  .room span{font-size:.8rem}
  .room.other{grid-column:auto;min-height:0}
  .sheet{max-width:13rem}
  .sheet svg{max-height:22vh}
}
@media (max-width:760px) and (min-aspect-ratio:1/1){.panel{width:44vw}}
@media (prefers-reduced-motion:reduce){.plate,.x-gl,.panel{transition:none}}
.live-btn{font:inherit;font-weight:650;font-size:.92rem;margin-top:.8rem;padding:.55rem .9rem;border:1.5px solid var(--ink);border-radius:999px;background:#fffdf9;color:var(--ink);cursor:pointer}
.live-btn[hidden]{display:none}
.shape-form input[type=number]{-moz-appearance:textfield;appearance:textfield}
.shape-form input[type=number]::-webkit-inner-spin-button,.shape-form input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.dots{display:none}
/* ---- a phone: its own layout. The room is pinned in the top half; the words scroll below it and never cover it. ---- */
@media (max-width:700px){
  .x-page .top{position:relative}
  .x-stage{height:56vh;height:56svh;z-index:3;box-shadow:0 1px 0 rgba(27,31,36,.2)}
  .x-stage::after{display:none}
  .plate img{object-position:50% 50%}
  .beat,.b-problem,.beat.last{display:block;min-height:70vh;min-height:70svh;margin-top:0;z-index:1}
  .b-problem{margin-top:0}
  .beat.last{min-height:100svh}
  .panel,.b-problem .panel{position:static;width:auto;margin:0;padding:1.15rem 1.15rem 1.5rem;background:none;box-shadow:none;border-radius:0;opacity:1;transform:none}
  .panel h1{font-size:2.2rem;line-height:1;margin-bottom:.8rem}
  .panel h2{font-size:1.75rem;margin-bottom:.6rem}
  .panel p{font-size:1rem;margin-bottom:.8rem}
  .dots{display:flex;gap:.35rem;list-style:none;margin:0 0 .9rem;padding:0}
  .dots li{width:.45rem;height:.45rem;border-radius:50%;background:rgba(27,31,36,.18)}
  .dots li.on{width:1.4rem;border-radius:99px;background:var(--ink)}
  .rooms{grid-template-columns:repeat(3,1fr);gap:.45rem}
  .room span{font-size:.8rem}
  .room.other{grid-column:auto;min-height:0}
  .steps li{font-size:.98rem;padding:.45rem 0 .45rem 2.4rem}
  .shape-form{grid-template-columns:1fr 1fr;gap:.6rem .6rem}
  .shape-form .step button{width:2.4rem}
  .shape-form .step input[type=number]{font-size:1.05rem}
  .sheet{max-width:12rem}
  .sheet svg{max-height:26svh}
  .live-btn{width:100%}
}
/* ---- the deep layer: narrator, intro, breathing card, statement, strip, dark workshop, wordmark ---- */
.x-in{position:absolute;inset:0;transform-origin:50% 50%;will-change:transform}
.x-stage{will-change:clip-path}
.x-narr{position:fixed;inset:0;pointer-events:none;z-index:6;opacity:0;transition:opacity .25s}
.x-narr.on{opacity:1}
.hook{position:absolute;left:0;top:0;display:flex;align-items:center;gap:.45rem;will-change:transform}
.hook-mark{display:block;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:7px 7px 7px 2px;background:linear-gradient(135deg,#f6c445,#e8a317);box-shadow:0 2px 8px rgba(0,0,0,.28),inset 0 0 0 1.5px rgba(27,31,36,.55);position:relative}
.hook-mark::after{content:"";position:absolute;left:-5px;bottom:-5px;width:9px;height:9px;border-left:3px solid #2a2d31;border-bottom:3px solid #2a2d31;border-radius:0 0 0 3px}
.hook-pill{font:600 12.5px/1 var(--sans);color:#fffdf9;background:#1b1f24;padding:.45rem .7rem;border-radius:999px;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.22);margin-top:-11px}
.hook-pill.empty{display:none}
.hook-pill.pop{animation:pop .32s cubic-bezier(.2,.9,.3,1.3)}
@keyframes pop{from{transform:scale(.7);opacity:0}to{transform:none;opacity:1}}
h1.typing .ch{opacity:0}
h1.typing .ch.on{opacity:1}
/* the header becomes a floating pill once the page moves (wide screens) */
.x-page .top{transition:top .35s ease,left .35s ease,right .35s ease,border-radius .35s ease,box-shadow .35s ease,background .35s ease}
@media (min-width:701px){
  .x-page.scrolled .top{top:12px;left:max(1rem,calc(50% - 38rem));right:max(1rem,calc(50% - 38rem));border-radius:999px;border:1px solid rgba(27,31,36,.14);box-shadow:0 10px 30px rgba(27,31,36,.12);background:rgba(251,249,245,.88);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
}
/* the statement: big words that fill with the scroll */
.statement{position:relative;z-index:2;background:var(--paper);padding:clamp(5rem,14vh,10rem) clamp(1.25rem,6vw,7rem)}
.statement p{margin:0 auto;max-width:72rem;font-size:clamp(2.3rem,6.4vw,6.6rem);line-height:1;letter-spacing:-.045em;font-weight:800}
.statement .w{color:rgba(27,31,36,.14);transition:color .18s linear}
.statement .w.lit{color:var(--ink)}
/* the strip: the beds we cover, sliding */
.strip{position:relative;z-index:2;background:var(--ink);color:var(--paper);overflow:hidden;display:flex;padding:1.1rem 0;white-space:nowrap}
.strip ul{display:flex;gap:3rem;margin:0;padding:0 1.5rem;list-style:none;font-weight:700;font-size:clamp(1.1rem,2vw,1.6rem);letter-spacing:-.01em;animation:slide 32s linear infinite;flex:none}
.strip li::before{content:"✕";color:var(--accent);margin-right:1.2rem;font-size:.7em;vertical-align:.18em}
@keyframes slide{to{transform:translateX(-100%)}}
/* the workshop beat is the one dark, quiet theatre on a wide screen */
.x-veil{background:radial-gradient(120% 90% at 70% 60%,#22324a 0,#14171c 62%)}
.b-made .panel h2,.b-made .panel p{transition:color .2s}
.dark-scene .b-made .panel h2,.dark-scene .b-made .panel p{color:#fffdf9}
/* guides: cards rise in and their drawings draw themselves */
.guides .card{opacity:0;transform:translateY(22px);transition:opacity .45s ease,transform .55s cubic-bezier(.2,.7,.2,1)}
.guides .card.seen{opacity:1;transform:none}
.guides .card .mattress,.guides .card polygon,.guides .card rect.size{stroke-dasharray:2400;stroke-dashoffset:2400}
.guides .card.seen .mattress,.guides .card.seen polygon,.guides .card.seen rect.size{stroke-dashoffset:0;transition:stroke-dashoffset 1.3s cubic-bezier(.4,.1,.2,1) .15s}
@media (max-width:700px){
  .x-narr .hook-pill{font-size:11.5px}
  .b-made{background:#14171c}
  .b-made .panel,.b-made .panel h2,.b-made .panel p{color:#fffdf9}
  .statement p{font-size:clamp(2.1rem,11vw,3.2rem)}
}
@media (prefers-reduced-motion:reduce){.strip ul{animation:none}.guides .card{opacity:1;transform:none}.x-narr{display:none}}
.hook.left{flex-direction:row-reverse}
.hook.left .hook-pill{margin-right:.1rem}
.x-gl{transition:none}
@media (max-width:700px){.x-stage{border-radius:0 0 22px 22px}}
/* ---- the live parts under the words (a plan, ticks, readouts, bars, a route) ---- */
.mod{margin:1.1rem 0 0;padding:.9rem;border-radius:16px;background:#fffdf9;border:1px solid rgba(27,31,36,.1);box-shadow:0 10px 30px -18px rgba(27,31,36,.35);opacity:0;transform:translateY(14px);transition:opacity .4s ease,transform .5s cubic-bezier(.2,.7,.2,1)}
.mod.seen{opacity:1;transform:none}
.plan{display:grid;grid-template-columns:minmax(0,1fr);gap:.6rem}
.plan-svg{width:100%;height:clamp(9rem,22vh,13rem);display:block;background:linear-gradient(rgba(27,31,36,.05) 1px,transparent 1px) 0 0/100% 18px,linear-gradient(90deg,rgba(27,31,36,.05) 1px,transparent 1px) 0 0/18px 100%;border-radius:10px}
.plan-svg polygon{vector-effect:non-scaling-stroke}
.p-bed{fill:rgba(194,151,94,.22);stroke:#8a6a3c;stroke-width:1.5}
.p-store{fill:none;stroke:#E8572A;stroke-width:2;stroke-dasharray:6 4}
.p-made{fill:#fffdf9;stroke:#1B1F24;stroke-width:2}
.p-over{fill:rgba(232,87,42,.75)}
.chips{display:flex;flex-wrap:wrap;gap:.4rem}
.chip{display:inline-flex;align-items:center;font:600 .82rem/1 var(--sans);padding:.45rem .7rem;border-radius:999px;background:#1B1F24;color:#fffdf9;font-variant-numeric:tabular-nums}
.chip:empty,.chip[hidden]{display:none}
.chip[data-k="foot"],.chip[data-k="near"]{background:rgba(232,87,42,.12);color:#b23c17}
.fitmod{display:grid;grid-template-columns:minmax(0,1fr);gap:.7rem}
.ticks{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.ticks li{display:flex;align-items:center;gap:.6rem;font-weight:600;font-size:.95rem;color:rgba(27,31,36,.45);transition:color .25s}
.ticks li i{width:1.35rem;height:1.35rem;border-radius:50%;border:1.5px solid rgba(27,31,36,.25);display:grid;place-items:center;flex:none;transition:background .25s,border-color .25s}
.ticks li.on{color:var(--ink)}
.ticks li.on i{background:#2f8f5b;border-color:#2f8f5b}
.ticks li.on i::after{content:"";width:.38rem;height:.66rem;border:solid #fff;border-width:0 2px 2px 0;transform:translate(0,-1px) rotate(45deg)}
.ticks li b{margin-left:auto;font:600 .85rem/1 var(--mono);color:var(--ink-2)}
.steps li{display:flex;align-items:center;gap:.5rem}
.steps li .val{margin-left:auto;font:700 .9rem/1 var(--mono);color:#2B4C7E;font-variant-numeric:tabular-nums;white-space:nowrap}
.race{display:grid;gap:.75rem;margin-bottom:.9rem}
.race .row{display:grid;grid-template-columns:7.5rem minmax(0,1fr) auto;align-items:center;gap:.6rem}
.race .nm{font-weight:650;font-size:.85rem;line-height:1.15}
.race .bar{height:.75rem;border-radius:99px;background:rgba(27,31,36,.08);display:flex;overflow:hidden}
.race .bar .o{background:#E8572A;width:0;transition:width .12s linear}
.race .bar .g{background:repeating-linear-gradient(45deg,rgba(232,87,42,.55) 0 4px,rgba(232,87,42,.25) 4px 8px);width:0;transition:width .12s linear}
.race .num{font:700 .82rem/1 var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
.race .row[data-k="made"] .num::after{content:" ✓";color:#2f8f5b}
.route{list-style:none;padding:1rem .9rem;display:grid;gap:1rem;background:rgba(255,253,249,.06);border-color:rgba(255,253,249,.18);position:relative}
.route li{display:flex;align-items:center;gap:.8rem;font-weight:650;opacity:.25;transition:opacity .4s}
.route li i{width:.9rem;height:.9rem;border-radius:50%;background:#f6c445;box-shadow:0 0 0 5px rgba(246,196,69,.18);flex:none}
.route::before{content:"";position:absolute;left:calc(.9rem + .43rem);top:1.4rem;bottom:1.4rem;width:2px;background:rgba(246,196,69,.55);transform-origin:top;transform:scaleY(0);transition:transform 1.4s cubic-bezier(.4,.1,.2,1) .2s}
.route.seen::before{transform:scaleY(1)}
.route.seen li{opacity:1}
.route.seen li:nth-child(2){transition-delay:.6s}.route.seen li:nth-child(3){transition-delay:1.2s}
.b-made .route li{color:inherit}
@media (min-width:701px){
  .b-made .route{color:var(--ink)}
  .dark-scene .b-made .route{color:#fffdf9}
  .plan-svg{height:clamp(8rem,19vh,11rem)}
  .mod{padding:.75rem}
}
@media (max-width:700px){
  .beat,.b-problem{min-height:auto;padding-bottom:3.5rem}
  .beat.last{min-height:auto;padding-bottom:4rem}
  .b-made .route{color:#fffdf9}
}
@media (prefers-reduced-motion:reduce){.mod{opacity:1;transform:none}}
/* ==== the room as the world: tints, the dimmed room behind the rest of the page, education parts ==== */
.x-tint{position:absolute;inset:0;pointer-events:none;mix-blend-mode:multiply;opacity:0;z-index:1}
.x-glow{position:fixed;inset:-40px;z-index:-1;background-size:cover;background-position:50% 30%;filter:blur(22px) brightness(.36) saturate(1.1);opacity:0;pointer-events:none}
.x-page.after-story{background-color:#14171c}
.after-story .statement,.after-story .guides,.after-story .x-page .sources{background:transparent}
.x-page .statement,.x-page .guides,.x-page .sources,.x-page .foot{transition:background-color .4s,color .4s}
.after-story .statement{background:transparent}
.after-story .statement .w{color:rgba(255,253,249,.16)}
.after-story .statement .w.lit{color:#fffdf9}
.after-story .strip{background:rgba(255,253,249,.08)}
.after-story .guides{background:transparent;border-top-color:rgba(255,253,249,.2)}
.after-story .guides h2{color:#fffdf9}
.after-story .sources{background:transparent;color:rgba(255,253,249,.75)}
.after-story .sources a{color:#fffdf9}
.after-story .foot{background:rgba(14,16,20,.55);color:rgba(255,253,249,.8);border-top-color:rgba(255,253,249,.2)}
.after-story .foot a{color:#fffdf9}
.after-story .foot .disclosure{background:rgba(255,253,249,.06);color:rgba(255,253,249,.82)}
.after-story .foot .disclosure p{color:rgba(255,253,249,.72)}
.after-story .foot::after{color:rgba(255,253,249,.07)}
/* what makes it odd, before you order */
.facts,.asks{list-style:none;padding:.4rem .9rem;margin:1rem 0 0;display:grid;gap:0}
.facts li,.asks li{display:flex;gap:.7rem;align-items:flex-start;padding:.7rem 0;border-top:1px solid rgba(27,31,36,.1);font-size:.97rem;line-height:1.45;opacity:.2;transform:translateY(6px);transition:opacity .45s ease,transform .45s ease}
.facts li:first-child,.asks li:first-child{border-top:0}
.facts li i,.asks li i{flex:none;width:.55rem;height:.55rem;border-radius:50%;background:#E8572A;margin-top:.5rem}
.asks li i{background:#f6c445;width:1.2rem;height:1.2rem;margin-top:.1rem;border-radius:6px;box-shadow:inset 0 0 0 1.5px rgba(27,31,36,.4)}
.mod.seen li{opacity:1;transform:none}
.mod.seen li:nth-child(2){transition-delay:.18s}.mod.seen li:nth-child(3){transition-delay:.36s}.mod.seen li:nth-child(4){transition-delay:.54s}.mod.seen li:nth-child(5){transition-delay:.72s}
.facts[hidden]{display:none}
.facts p{margin:.5rem 0}
.dark-scene .b-made .asks{background:rgba(255,253,249,.06);border-color:rgba(255,253,249,.16);color:#fffdf9}
.dark-scene .b-made .asks li{border-top-color:rgba(255,253,249,.14)}
.keep{display:flex;flex-wrap:wrap;gap:.6rem}
.keep .go{border:0;cursor:pointer;font:inherit;font-weight:700}
.ghost{font:inherit;font-weight:650;padding:.9rem 1.1rem;border-radius:10px;border:1.5px solid var(--ink);background:transparent;color:var(--ink);cursor:pointer}
.go-quiet{font-size:.9rem;color:var(--ink-2);text-decoration:none;border-bottom:1px solid rgba(27,31,36,.25);align-self:flex-start;padding-bottom:.1rem}
.go-quiet:hover{color:var(--ink);border-color:var(--accent)}
/* ==== a phone: the room fills the screen; the words ride in dark glass under the bed ==== */
@media (max-width:700px){
  .x-stage{height:100vh;height:100lvh;box-shadow:none;border-radius:0}
  .x-stage::after{display:block;background:linear-gradient(0deg,rgba(12,14,18,.94) 0,rgba(12,14,18,.78) 30%,rgba(12,14,18,.25) 44%,rgba(12,14,18,0) 52%)}
  .x-page .top{position:absolute;left:0;right:0;top:0;background:linear-gradient(rgba(12,14,18,.55),rgba(12,14,18,0));border-bottom:0;color:#fffdf9}
  .x-page .top .brand,.x-page .top .lang{color:#fffdf9;border-color:rgba(255,253,249,.6)}
  .b-problem{margin-top:-100vh;margin-top:-100lvh}
  .beat,.b-problem,.beat.last{display:flex;align-items:flex-end;min-height:118vh;min-height:118lvh;padding-bottom:0}
  .b-problem{min-height:100vh;min-height:100lvh}
  .panel,.b-problem .panel{position:sticky;top:auto;bottom:0;margin:0 .5rem .5rem;padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom));border-radius:20px;background:rgba(16,18,22,.82);color:#fffdf9;box-shadow:0 -10px 40px rgba(0,0,0,.25);width:auto}
  .panel h1,.panel h2{color:#fffdf9}
  .panel h1{font-size:2rem}
  .panel h2{font-size:1.6rem}
  .panel p,.panel .lede,.versus,.legend{color:rgba(255,253,249,.82)!important}
  .panel a{color:#fffdf9}
  .dots li{background:rgba(255,253,249,.25)}
  .dots li.on{background:#fffdf9}
  .mod{background:rgba(255,253,249,.07);border-color:rgba(255,253,249,.14);box-shadow:none;color:#fffdf9}
  .plan-svg{height:clamp(7rem,17vh,9.5rem);background:linear-gradient(rgba(255,253,249,.06) 1px,transparent 1px) 0 0/100% 16px,linear-gradient(90deg,rgba(255,253,249,.06) 1px,transparent 1px) 0 0/16px 100%}
  .p-made{fill:rgba(255,253,249,.92);stroke:#fffdf9}
  .p-bed{fill:rgba(194,151,94,.35);stroke:#e0b77a}
  .chip{background:#fffdf9;color:#1B1F24}
  .chip[data-k="foot"],.chip[data-k="near"]{background:rgba(232,87,42,.25);color:#ffb08f}
  .ticks li{color:rgba(255,253,249,.45)}
  .ticks li.on{color:#fffdf9}
  .ticks li b{color:rgba(255,253,249,.7)}
  .steps li{color:rgba(255,253,249,.7);border-top-color:rgba(255,253,249,.12)}
  .steps li.on{color:#fffdf9}
  .steps li .val{color:#9ec0ff}
  .facts li,.asks li{border-top-color:rgba(255,253,249,.12)}
  .race .bar{background:rgba(255,253,249,.12)}
  .room{background:rgba(255,253,249,.08);border-color:rgba(255,253,249,.2);color:#fffdf9}
  .room.on{border-color:#fffdf9;box-shadow:0 0 0 1.5px #fffdf9}
  .shape-form .f,.shape-form legend{color:#fffdf9}
  .shape-form .step{background:rgba(255,253,249,.08);border-color:rgba(255,253,249,.4)}
  .shape-form .step input[type=number]{color:#fffdf9}
  .shape-form .step em{color:rgba(255,253,249,.6)}
  .shape-form .step button{background:rgba(255,253,249,.12);color:#fffdf9}
  .shape-form select{background:rgba(255,253,249,.08);color:#fffdf9;border-color:rgba(255,253,249,.4)}
  .plan-live{display:none}
  .toggle{background:rgba(255,253,249,.08);border-color:rgba(255,253,249,.4)}
  .toggle button{color:#fffdf9}
  .toggle button[aria-pressed=true]{background:#fffdf9;color:#1B1F24}
  .ghost{color:#fffdf9;border-color:rgba(255,253,249,.6)}
  .go{background:#fffdf9;color:#1B1F24}
  .go-quiet{color:rgba(255,253,249,.7);border-color:rgba(255,253,249,.3)}
  .sheet{background:#fbf9f5}
  .b-made{background:none}
  .live-btn{background:rgba(255,253,249,.1);color:#fffdf9;border-color:rgba(255,253,249,.5)}
  .statement p{color:#fffdf9}
}
@media (max-width:700px){.x-stage{z-index:0}.beat{z-index:1}}
/* phone: one card at a time - each beat is one screen, its card at the bottom, scrolling with the page (not pinned,
   pinned cards stacked at every hand-over); compact so the bed keeps the top half */
@media (max-width:700px){
  .beat,.b-problem,.beat.last{min-height:100vh;min-height:100lvh}
  .beat{min-height:112vh;min-height:112lvh}
  .panel,.b-problem .panel{position:relative;bottom:auto;max-height:none}
  .b-problem .panel{margin-bottom:.5rem}
  .panel h1{font-size:1.8rem;margin-bottom:.5rem}
  .panel h2{font-size:1.45rem;margin-bottom:.4rem}
  .panel p{font-size:.93rem;margin-bottom:.5rem;line-height:1.42}
  .b-problem .legend{display:none}
  .plan-svg{height:clamp(5.5rem,12vh,7rem)}
  .mod{margin-top:.6rem;padding:.6rem}
  .plan{gap:.4rem}
  .facts li,.asks li{padding:.5rem 0;font-size:.9rem}
  .steps li{padding:.32rem 0 .32rem 2.2rem;font-size:.9rem}
  .dots{margin-bottom:.6rem}
}
/* acts */
.plate.preview{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:100% 50%;opacity:0;pointer-events:none}
@media (max-aspect-ratio:1/1){.plate.preview{object-position:50% 0}}
.room.preview{border-color:#f6c445!important;box-shadow:0 0 0 2px #f6c445!important}
.facts li.act-on,.asks li.act-on{opacity:1}
.facts li.act-on span,.asks li.act-on span{color:inherit;font-weight:650}
.facts li.act-on i{background:#f6c445;box-shadow:0 0 0 5px rgba(246,196,69,.25)}
.asks li.act-on i{background:#f6c445;box-shadow:0 0 0 4px rgba(246,196,69,.3)}
.mod.seen .facts li:not(.act-on),.mod.seen.facts li:not(.act-on),.mod.seen.asks li:not(.act-on){opacity:.55}
.chip.out{opacity:0;transform:translateY(4px) scale(.96);transition:opacity .3s,transform .3s;margin-top:.5rem}
.chip.out.on{opacity:1;transform:none}
.chip.ok{background:#2f8f5b;color:#fff}
.chip.hot{box-shadow:0 0 0 2px #f6c445}
#x-sheet.drawn svg polygon{stroke-dasharray:3000;stroke-dashoffset:3000;animation:drawsheet 2.2s cubic-bezier(.4,.1,.2,1) forwards}
@keyframes drawsheet{to{stroke-dashoffset:0}}
.guides .card.trace .mattress,.guides .card.trace polygon,.guides .card.trace rect.size{animation:retrace 1.4s cubic-bezier(.4,.1,.2,1)}
@keyframes retrace{0%{stroke-dashoffset:2400}100%{stroke-dashoffset:0}}
.guides .card.trace{box-shadow:6px 6px 0 var(--accent)}
.pin circle{fill:#1B1F24;stroke:#fffdf9;stroke-width:2}
.pin .pin-n{fill:#fffdf9;font:700 11px/1 var(--sans)}
.pin.hot circle{fill:#f6c445;stroke:#1B1F24}
.pin.hot .pin-n{fill:#1B1F24}
.pin.ok circle{fill:#2f8f5b}
.pin-pill{fill:#E8572A}
.pin.ok .pin-pill{fill:#2f8f5b}
.pin-t{fill:#fff;font:700 11.5px/1 var(--mono)}
.track{display:none;gap:4px;margin:0 0 .7rem}
.track.on{display:flex}
.track i{flex:1;height:3px;border-radius:2px;background:rgba(27,31,36,.14);overflow:hidden}
.track i b{display:block;height:100%;width:100%;transform:scaleX(0);transform-origin:0 50%;background:var(--ink)}
@media (max-width:700px){.track i{background:rgba(255,253,249,.2)}.track i b{background:#f6c445}}
.dark-scene .track i{background:rgba(255,253,249,.2)}.dark-scene .track i b{background:#f6c445}
.x-stage.pulse .diff{animation:orangepulse 1.25s ease-in-out infinite}
@keyframes orangepulse{0%,100%{opacity:1}50%{opacity:.68}}
@media (prefers-reduced-motion:reduce){.x-stage.pulse .diff{animation:none}}
/* phone: the guides are one swipeable row that advances on its own (stops once touched) */
@media (max-width:700px){
  .guides{padding:3rem 0 2rem}
  .guides h2{padding:0 1.15rem;margin-bottom:1.2rem}
  .guides .cards{display:flex;gap:.8rem;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 1.15rem 1rem;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin:0}
  .guides .cards::-webkit-scrollbar{display:none}
  .guides .card{flex:0 0 78%;scroll-snap-align:center;opacity:1;transform:none}
  .guides .card .fig{height:10rem}
  .gdots{display:flex;gap:.35rem;justify-content:center;margin-top:.4rem}
  .gdots i{width:.4rem;height:.4rem;border-radius:50%;background:rgba(255,253,249,.3)}
  .gdots i.on{width:1.2rem;border-radius:99px;background:#fffdf9}
}
/* ==== phone, final model: one card area fixed at the bottom; beats are scroll space; the room is never covered
   by a moving card ==== */
@media (max-width:700px){
  .beat,.b-problem,.beat.last{display:block;min-height:0;height:96vh;height:96lvh;padding:0}
  .b-shape{height:120vh;height:120lvh}
  .b-problem{margin-top:-100vh;margin-top:-100lvh;height:110vh;height:110lvh}
  .beat.last{height:100vh;height:100lvh}
  .panel,.b-problem .panel{position:fixed;left:.5rem;right:.5rem;bottom:calc(.5rem + env(safe-area-inset-bottom));top:auto;margin:0;
    max-height:min(54vh,30rem);overflow:hidden;opacity:0;visibility:hidden;will-change:opacity,transform;z-index:5}
  .b-shape .panel{max-height:min(60vh,34rem)}
  .panel .mod{margin-top:.5rem}
  .b-problem .panel{opacity:1;visibility:visible}
  /* the shape card, compact: corners as four small toggles in one row, the live-room button as a quiet link */
  .shape-form{grid-template-columns:1fr 1fr;gap:.4rem .5rem;margin-top:.5rem}
  .shape-form .f > span{font-size:.72rem}
  .shape-form .step input[type=number]{padding:.38rem .1rem;font-size:1rem}
  .shape-form .step button{width:2.2rem;font-size:1.15rem}
  .shape-form select{padding:.42rem .6rem;font-size:.92rem}
  .shape-form .kind{grid-column:1/-1}
  .shape-form fieldset{display:flex;flex-wrap:nowrap;gap:.3rem}
  .shape-form fieldset legend{display:none}
  .shape-form fieldset label{flex:1;justify-content:center;font-size:.72rem;padding:.35rem .2rem;border:1px solid rgba(255,253,249,.3);border-radius:8px;gap:.2rem}
  .shape-form fieldset input{width:.8rem;height:.8rem;margin:0}
  .b-shape .panel > p{display:none}
  .live-btn{margin-top:.5rem;padding:.35rem .6rem;font-size:.8rem;width:auto;background:none;border-color:rgba(255,253,249,.35)}
  /* the dark "before you order" scene keeps the room visible, so what the hook points at can be seen */
  .x-veil{background:#0f1216}
  .b-made .asks li{padding:.42rem 0;font-size:.86rem}
  .b-know .facts li{font-size:.86rem;padding:.42rem 0}
  .b-send .sheet{max-width:9.5rem}
  .b-send .sheet svg{max-height:15vh}
  .after-story .statement{padding-top:5rem}
}

.shape-form .corners{grid-column:1/-1}
.shape-form .corners .lbl{display:block;font-size:.82rem;font-weight:650;margin-bottom:.3rem}
.shape-form .cgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.3rem}
.shape-form .cgrid label{display:flex;align-items:center;gap:.3rem;font-weight:500;font-size:.85rem}
@media (max-width:700px){
  .beat.last{height:135vh;height:135lvh}
  .panel,.b-problem .panel{max-height:min(64vh,34rem)}
  .b-problem .plan-svg,.b-fit .plan-svg{display:none}          /* the room above shows the same thing */
  .b-problem .mod.plan,.b-fit .fitmod{padding:.5rem .6rem}
  .b-problem .lede{font-size:.9rem!important}
  .shape-form .corners .lbl{display:none}
  .shape-form .cgrid label{justify-content:center;font-size:.7rem;padding:.32rem .15rem;border:1px solid rgba(255,253,249,.3);border-radius:8px;gap:.2rem;color:#fffdf9}
  .shape-form .cgrid input{width:.75rem;height:.75rem;margin:0}
  .b-send .panel > p{font-size:.86rem}
  .b-send .sheet{float:right;width:6.2rem;margin:0 0 .3rem .6rem;padding:.3rem}
  .b-send .sheet figcaption{display:none}
  .b-send .sheet svg{max-height:11vh}
  .b-send .send-row{clear:both;gap:.5rem}
  .b-send .keep{gap:.4rem}
  .b-send .keep .go,.b-send .ghost{padding:.65rem .8rem;font-size:.88rem}
  .b-send .go-quiet{font-size:.78rem}
}
@media (max-width:700px){.b-fit .fitmod .plan,.b-problem .mod.plan .plan-svg{display:none}.b-fit .fitmod{gap:.4rem}}
/* "before you order": a dark scene that keeps the room in view (no grey wash) */
.x-veil{background:#0b0e12}
.x-stage::after{transition:opacity .25s}
.dark-scene .x-stage::after{background:linear-gradient(90deg,rgba(11,14,18,.95) 0,rgba(11,14,18,.86) 30%,rgba(11,14,18,0) 46%)}
@media (max-width:700px){.dark-scene .x-stage::after{background:linear-gradient(0deg,rgba(11,14,18,.95) 0,rgba(11,14,18,.8) 32%,rgba(11,14,18,0) 50%)}}
.dark-scene .b-made .asks{background:rgba(255,253,249,.05);border-color:rgba(255,253,249,.14)}
.track{display:flex;visibility:hidden;height:3px}
.track.on{visibility:visible}
/* nothing inside a pinned card may change size while it is read */
.facts li.act-on span,.asks li.act-on span{font-weight:inherit}
.facts li span,.asks li span{transition:color .25s,opacity .25s}
.facts li.act-on span,.asks li.act-on span{color:#f6c445}
@media (min-width:701px){.facts li.act-on span,.asks li.act-on span{color:var(--ink)}.dark-scene .asks li.act-on span{color:#f6c445}}
.steps li .val{min-width:6.6em;text-align:right;flex:none}
.chip{white-space:nowrap}
.chips .chip[data-k="corners"]{min-width:11.5em;justify-content:center}
.chips .chip[data-k="foot"]{min-width:7.5em;justify-content:center}
.chip.out:empty{display:inline-flex;visibility:hidden;min-height:1.75em;min-width:4em}
[data-room-var][hidden]{display:none}
.card .yours{display:none;font:700 .72rem/1 var(--sans);letter-spacing:.04em;text-transform:uppercase;color:var(--accent);margin:0 0 .35rem}
.card.mine .yours{display:block}
.card.mine{box-shadow:6px 6px 0 var(--accent)}
