@font-face{font-family:Manrope;src:url('../../shared/fonts/manrope-variable.ttf') format('truetype');font-weight:200 800;font-display:swap}
html:has(#activity-root),body:has(#activity-root){width:100%;height:100%;overflow:hidden}#activity-root{width:100%;height:100dvh;min-height:100%;}::selection{background:#7FC4F2;color:#0E3068}button,input{caret-color:#0E3068}a{text-underline-offset:4px}
*{box-sizing:border-box}body{margin:0;background:#D9EEF8;color:#0E3068;font-family:Manrope,sans-serif}.ff{width:100%;max-width:1120px;margin:auto;display:flex;flex-direction:column;gap:12px;color:#0E3068;font-size:18px}.ff button,.ff select,.ff input{font:inherit;color:inherit}.ff button{min-width:48px;min-height:48px;border:2px solid #0E3068;border-radius:8px;background:#F8FCFF;padding:8px 14px;cursor:pointer}.ff button:hover{background:#D9EEF8}.ff button[aria-pressed=true],.ff .chosen{background:#7FC4F2;border-width:3px}.ff button:disabled{opacity:.55;cursor:default}.ff button:focus-visible,.ff input:focus-visible,.ff [tabindex]:focus-visible{outline:4px solid #0E3068;outline-offset:3px}.ff-head{display:grid;grid-template-columns:64px 1fr 64px;gap:12px;align-items:center}.ff-character{height:74px;width:64px;display:grid;place-items:center}.ff-character svg{height:100%;width:100%;overflow:visible}.ff h2{font-size:clamp(22px,2.5vw,32px);line-height:1.12;margin:2px 0 6px}.ff .phase{font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.ff-instruction{display:flex;gap:12px;align-items:center}.ff-instruction p{margin:0;line-height:1.4;flex:1}.ff-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.ff-tool-icon{display:inline-block;width:19px;height:19px;margin-right:7px;vertical-align:middle;border:2px solid #0E3068;background:#7FC4F2}.ff-tool-icon.tape{height:7px;background:#E8453C}.ff-work{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,210px);gap:16px;align-items:center}.ff-scroll{overflow:auto;max-height:385px;max-width:100%;padding:4px;overscroll-behavior:contain;scrollbar-color:#0E3068 #D9EEF8;border-radius:8px;background:#F8FCFF}.ff-scroll:focus-visible{outline:3px solid #0E3068}.ff-stage{position:relative;margin:auto;--unit:56px;touch-action:pan-x pan-y;user-select:none}.ff-cell,.ff-edge{position:absolute!important;min-width:0!important;min-height:0!important;padding:0!important;border-radius:2px!important}.ff-cell{width:48px;height:48px;background:#F8FCFF!important;border:1px solid #8b8b7a!important}.ff-cell.filled{background:#7FC4F2!important;border:2px solid #0E3068!important;box-shadow:inset 0 0 0 3px #D9EEF8}.ff-cell::after{content:'';display:block;margin:8px;border-top:1px solid #0e306833}.ff-edge{width:48px;height:48px;background:transparent!important;border:0!important;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.ff-edge::after{content:'';position:absolute;background:#b5b7af;border:1px solid #0E3068;left:0;top:21px;width:48px;height:6px}.ff-edge.vertical::after{top:0;left:21px;height:48px;width:6px}.ff-edge.marked::after{background:#E8453C;border:2px solid #0E3068;height:10px;top:19px}.ff-edge.vertical.marked::after{height:48px;width:10px;top:0;left:19px}.ff-edge[disabled]{opacity:1}.ff-edge:focus-visible{clip-path:none;background:#D9EEF8!important;outline-offset:0!important}.ff-stage[data-tool=tape] .ff-cell{pointer-events:none}.ff-stage[data-tool=tile] .ff-edge{pointer-events:none}.ff-stage[data-tool=erase] .ff-edge:not(.marked){pointer-events:none}.ff-stage[data-tool=erase] .ff-cell:not(.filled){pointer-events:none}.ff-stage[data-tool=tape] .ff-edge:hover::after{background:#7FC4F2}.ff-readout{border-left:3px solid #0E3068;padding-left:16px;line-height:1.5}.ff-readout strong{display:block;font-size:28px}.ff-readout small{display:block;font-size:14px}.ff-note{font-size:15px;margin:0;line-height:1.45}.ff-feedback{background:#D9EEF8;border-left:5px solid #0E3068;padding:10px 12px;min-height:44px;display:flex;align-items:center;gap:8px}.ff-feedback p{margin:0;flex:1}.ff-feedback.confirmed{background:#D9EEF8}.ff-next{margin-left:auto}.ff-table{width:100%;border-collapse:collapse;background:#F8FCFF;font-size:18px}.ff-table th,.ff-table td{border:2px solid #0E3068;text-align:center;padding:8px}.ff-table th{font-size:14px}.ff-table button{min-width:62px}.ff-table .slot.active{outline:3px solid #2A7DE1;outline-offset:-5px}.ff-numbers{display:flex;gap:6px;flex-wrap:wrap;max-height:170px;overflow:auto;padding:4px}.ff-numbers button{padding:6px;min-width:48px;flex:0 0 48px}.ff-section{display:flex;flex-direction:column;gap:12px}.ff-claim{border-left:4px solid #0E3068;padding:8px 12px;background:#D9EEF8;font-weight:700}.ff-story{display:flex;gap:8px;align-items:stretch}.ff-story span{border:2px solid #0E3068;background:#D9EEF8;flex:1;padding:10px;font-size:14px;line-height:1.3}.ff-estimate{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.ff-estimate input{flex:1;min-width:100px;min-height:48px;accent-color:#0E3068}.ff-construct{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.ff-construct label{display:flex;align-items:center;gap:4px}.ff-construct output{min-width:28px;text-align:center;font-weight:800}.ff-hand{position:fixed;z-index:30;width:52px;height:62px;pointer-events:none;filter:drop-shadow(0 2px 1px #0E306855)}.ff-demo-note{padding:8px 12px;background:#D9EEF8;border:2px solid #0E3068}.ff-discovery{background:#E8B44A;color:#141210;border:2px solid #141210;padding:20px;line-height:1.5}.ff a{color:#0E3068}.ff-small{font-size:13px}.ff-demo-note[hidden],.ff [hidden]{display:none!important}
@media(max-width:700px){.ff{font-size:16px;gap:8px}.ff-work{grid-template-columns:minmax(0,1fr);gap:8px}.ff-readout{display:flex;gap:12px;align-items:center;border-left:0;border-top:2px solid #0E3068;padding:8px 0 0}.ff-readout strong{font-size:22px}.ff-readout small{font-size:12px}.ff-head{grid-template-columns:42px 1fr 42px;gap:6px}.ff-character{height:52px;width:42px}.ff h2{font-size:22px}.ff-tools button{padding:6px 9px}.ff-scroll{max-height:295px}.ff-table{font-size:15px}.ff-table td,.ff-table th{padding:4px}.ff-table button{min-width:48px;padding:4px}.ff-story span{font-size:12px;padding:7px}.ff-numbers{max-height:116px}.ff .phase{font-size:11px}.ff-note{font-size:13px}}
@media(max-height:700px) and (min-width:701px){.ff{gap:6px;font-size:16px}.ff-head{grid-template-columns:44px 1fr 44px}.ff-character{height:48px;width:44px}.ff h2{font-size:22px}.ff-scroll{max-height:290px}.ff-numbers{max-height:108px}.ff-story span{padding:6px}.ff-feedback{padding:6px 10px}}
@media(prefers-reduced-motion:no-preference){.ff button:active{transform:scale(.98)}.ff-hand{transition:transform 900ms ease}}
.ff-stage{touch-action:none}.ff-character svg{max-height:74px}.ff-head{min-height:90px}.ff-head .ff-character{align-self:start}.ff-character{overflow:hidden}.ff-scroll{padding:8px}.ff-feedback,.ff-claim,.ff-readout{border-left-width:1px}.ff-head .phase{letter-spacing:0;text-transform:none;font-weight:600}
.ff{height:100%;max-height:100%;overflow:auto;padding:4px;scrollbar-color:#0E3068 #D9EEF8}.ff>*{flex-shrink:0}.ff-head{min-height:80px}.ff-head .phase{font-size:12px}
@media(max-width:700px){.ff-character svg{max-height:52px}.ff-head{min-height:65px}}
@media(max-height:700px) and (min-width:701px){.ff-head{min-height:55px}.ff-character svg{max-height:48px}}
@media(max-height:500px) and (min-width:701px){.ff.kind-model,.ff.kind-proof,.ff.kind-construct{display:grid;grid-template-columns:270px minmax(0,1fr);grid-auto-rows:min-content;align-content:start;gap:8px 16px}.ff.kind-model>*,.ff.kind-proof>*,.ff.kind-construct>*{grid-column:1}.ff.kind-model>.ff-work,.ff.kind-proof>.ff-work,.ff.kind-construct>.ff-work{grid-column:2;grid-row:1/span 7;align-self:start;display:flex;flex-direction:column;align-items:stretch}.ff.kind-model .ff-scroll,.ff.kind-proof .ff-scroll,.ff.kind-construct .ff-scroll{max-height:240px}.ff-readout{display:flex;border:0;gap:16px;padding:0}.ff-readout strong{font-size:22px}.ff-head{grid-template-columns:32px 1fr 32px;min-height:48px;gap:4px}.ff-head .ff-character{width:32px;height:42px}.ff h2{font-size:20px}.ff .phase{font-size:10px}.ff-instruction p{font-size:14px}.ff-tools{gap:4px}.ff-tools button{font-size:14px;padding:5px}.ff-feedback{font-size:14px}}

/* Scene revision 2026-11-01: local surfaces follow the model, not the viewport. */
.ff{max-width:1120px;margin-inline:auto;padding:clamp(10px,2vw,24px);background:transparent}
.ff .ff-head,.ff .ff-note,.ff .ff-small,.ff .ff-readout{background:#F8FCFF;border-radius:8px;padding:8px 12px;max-width:100%;width:fit-content}
.ff .ff-head:empty,.ff .ff-note:empty,.ff .ff-small:empty,.ff .ff-readout:empty{display:none}
@media(max-width:700px){.ff{padding:10px;}}

.ff .ff-instruction{background:#F8FCFF;padding:8px 12px;border-radius:8px;width:fit-content;max-width:100%}.ff .ff-scroll{width:fit-content;max-width:100%;justify-self:start}

/* The working partners live beside the current task. */
.ff-head > .ff-character{display:none}.ff-head{grid-template-columns:1fr}

/* Audit 2026-11-02: keep the measurements together and one instruction visible. */
.ff{overflow-anchor:none}
.ff-work{grid-template-columns:minmax(0,max-content) minmax(140px,180px);justify-content:start;gap:24px}
@media(max-width:600px){}
@media(max-width:600px){}
@media(max-width:700px){.ff-work{grid-template-columns:minmax(0,1fr);gap:8px}}
@media(max-height:500px) and (min-width:701px){
 .ff .ff-partner-listen{grid-column:1;grid-row:2;justify-self:center}
}

/* Revision requested 02.11: decisions precede measurement; illustrated story panels. */
.ff-question{background:#F8FCFF;border-radius:8px;padding:8px 12px;margin:0;width:fit-content;font-weight:700}
.ff-story figure{margin:0;flex:1;min-width:0;background:#F8FCFF;border:1px solid #0E3068;border-radius:8px;overflow:hidden}
.ff-story img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain}
.ff-story figcaption{padding:8px;font-size:14px;line-height:1.4}
.ff-story img{height:clamp(78px,15vh,132px);aspect-ratio:auto;object-fit:contain}
.ff-estimate{background:#F8FCFF;border:1px solid #0E3068;border-radius:8px;padding:12px;color:#0E3068}
.ff-estimate label{line-height:1.5}.ff-estimate input{min-width:140px}
.ff-claim{display:flex;align-items:center;gap:8px;border-radius:8px;width:fit-content;max-width:100%}
.ff-claim img{width:48px;height:48px;object-fit:contain}.ff-claim p{margin:0;flex:1}
.ff-work:not(:has(.ff-readout)){grid-template-columns:minmax(0,max-content)}
.ff.kind-table>.ff-tools [data-tool="erase"],.ff.kind-compare>.ff-tools [data-tool="erase"]{display:none}
@media(max-width:600px){.ff-story figcaption{font-size:12px;padding:6px}.ff-claim{flex-wrap:wrap}.ff .mc-companion-clue svg{display:block}.ff .mc-companion-clue span{display:none}}

.ff-partial-model{margin:0;background:#F8FCFF;width:fit-content;max-width:100%;padding:4px 12px;border-radius:8px}
.ff-partial-model svg{display:block;height:130px;width:auto;max-width:100%;font:12px Manrope,sans-serif;fill:#0E3068}
.ff-estimate-bank{display:flex;flex-wrap:wrap;gap:6px;width:100%}.ff-estimate-bank button{padding:6px;min-width:48px}
.ff-estimate-bank{order:2}.ff-estimate>[data-action="estimate"]{order:1;margin-left:auto}
.ff-estimate:has(.ff-keyboard-estimate) input{position:absolute;width:1px;height:1px;min-width:0;min-height:0;clip-path:inset(50%);overflow:hidden}
.ff-estimate input:focus-visible{position:static;width:100%;height:48px;min-height:48px;clip-path:none}
@media(min-width:900px) and (min-height:700px){
 .ff>.mc-companion[data-single-actor="true"]{grid-template-columns:76px minmax(0,1fr) 48px;gap:6px}
 .ff{gap:8px;padding:10px 16px}.ff>.mc-companion{margin:0 0 4px;min-height:118px}
 .ff .mc-companion[data-single-actor="true"] .mc-companion-actors,.ff .mc-companion[data-single-actor="true"] [data-companion]{width:76px;height:118px}
 .ff-story img{height:90px}.ff-story figcaption{padding:4px 6px;font-size:12px}
 .ff-numbers{max-height:108px}.ff-table td,.ff-table th{padding:4px}.ff-note{font-size:13px}
 .ff-partial-model svg{height:112px}.ff-readout{font-size:14px}.ff-scroll{max-height:345px}
}

@media(min-width:900px) and (min-height:700px){
 .ff.kind-model,.ff.kind-proof,.ff.kind-construct,.ff.kind-missing,.ff.kind-story:has(.ff-stage){display:grid;grid-template-columns:270px minmax(0,1fr);grid-auto-rows:min-content;align-content:start;gap:8px 16px}
 .ff.kind-model>*,.ff.kind-proof>*,.ff.kind-construct>*,.ff.kind-missing>*,.ff.kind-story:has(.ff-stage)>*{grid-column:1}
 .ff:is(.kind-model,.kind-proof,.kind-construct,.kind-missing,.kind-story:has(.ff-stage))>.mc-companion{grid-column:1;grid-row:1;width:100%}
 .ff:is(.kind-model,.kind-proof,.kind-construct,.kind-missing,.kind-story)>.ff-work{grid-column:2;grid-row:1/span 5;display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px}
 .ff:is(.kind-model,.kind-proof,.kind-construct,.kind-missing,.kind-story)>.ff-work .ff-scroll{max-height:430px}
 .ff:is(.kind-model,.kind-proof,.kind-construct,.kind-missing,.kind-story)>.ff-work .ff-readout{width:104px;min-width:0;padding:8px}
 .ff:is(.kind-model,.kind-proof,.kind-construct,.kind-missing,.kind-story)>.ff-note{grid-column:2;grid-row:6}
 .ff:is(.kind-model,.kind-proof,.kind-construct,.kind-missing,.kind-story)>.ff-tools[aria-label="Move the model view"]{grid-column:2;grid-row:7}
 .ff .ff-claim{padding:6px;gap:6px;font-size:14px}.ff .ff-claim img{width:32px;height:40px}.ff .ff-claim strong{font-size:12px}
 .ff.kind-missing>.ff-section{gap:6px}.ff.kind-missing>.ff-section>.ff-note{font-size:12px}
 .ff.kind-missing>.ff-section{grid-column:2;grid-row:6}.ff.kind-missing>.ff-note{grid-column:1;grid-row:4}
 .ff .ff-numbers{max-height:112px}
 .ff .mc-companion-copy{font-size:14px;line-height:1.3}.ff .mc-companion-text{font-size:14px;line-height:1.35}
}

@media(min-width:900px) and (min-height:700px){.ff>.ff-tools[aria-label="Move the model view"]{display:none}}
.ff-discovery>img{max-height:min(40vh,320px);object-fit:contain}

.ff-discovery{background:#F8FCFF;color:#0E3068;border:1px solid #0E3068;border-radius:8px;padding:16px}
.ff-discovery picture{display:block}.ff-discovery img{display:block;width:100%;max-width:700px;max-height:min(40vh,320px);object-fit:contain;margin:auto}
.ff-complete-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.ff-discovery>a{display:inline-block;min-height:48px;padding:12px 0;font-size:14px}
@media(max-width:600px){.ff-discovery img{max-height:none;max-width:340px}}
