/* A shared drawing surface and a quiet, opt-in replay player. */
.page-ghost{--ghost:#237f91;--ghost-soft:#edf5f7;--ghost-ink:#303a42}.page-ghost #main{max-width:1440px;margin:auto;padding:28px 40px 55px}.ghost-intro{display:flex;justify-content:space-between;align-items:end;gap:36px;padding:10px 0 25px;border-bottom:1px solid var(--line)}.ghost-intro .eyebrow{font-size:12px;margin:0 0 12px}.ghost-intro h1{font-size:clamp(2rem,3.2vw,3rem)}.ghost-intro>p{font-size:15px;line-height:1.7;max-width:360px;color:var(--muted);margin:0}.ghost-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 0;border-bottom:1px solid var(--line)}.ghost-categories{display:flex;flex-wrap:wrap;gap:6px}.ghost-categories button{border:1px solid transparent;background:none;border-radius:28px;padding:8px 16px;font-size:14px}.ghost-categories button[aria-pressed=true]{background:var(--ink);color:white}.ghost-problem-picker{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--muted)}.ghost-problem-picker select{max-width:290px;border:1px solid var(--line);border-radius:7px;padding:9px 12px;background:white;font-size:14px}.ghost-brief{display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:center;padding:26px 0}.ghost-brief .eyebrow{font-size:12px;margin:0 0 8px}.ghost-brief h2{font-size:clamp(1.6rem,2.4vw,2.1rem)}.ghost-brief>p{margin:0;color:#687078;font-size:15px;line-height:1.75}.ghost-workspace{display:grid;grid-template-columns:minmax(0,1.95fr) minmax(300px,1fr);gap:28px;align-items:start}.ghost-board{background:white;border:1px solid #dce2e4;border-radius:16px;overflow:hidden;box-shadow:0 18px 55px #233a4205}.ghost-board-top{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:19px 24px;border-bottom:1px solid #edf0f1;font-size:12px}.ghost-board-top>span{color:var(--muted)}.ghost-legend{display:flex;gap:17px;align-items:center;font-size:12px}.ghost-legend span:before{content:'';display:inline-block;width:17px;height:3px;background:var(--ghost-ink);vertical-align:middle;margin-right:7px}.ghost-legend span:last-child{color:var(--ghost)}.ghost-legend span:last-child:before{background:var(--ghost);opacity:.5}.ghost-canvas{width:100%;touch-action:pan-y;min-height:200px;background:linear-gradient(165deg,#fff 30%,#f9fbfc);overflow:hidden}.ghost-visual{display:block;width:100%;height:auto}.ghost-visual [data-point]{cursor:grab;touch-action:none}.ghost-visual [data-point]:hover{filter:drop-shadow(0 0 4px #237f9170)}.ghost-scene-readout{font-size:14px;min-height:25px;text-align:center;margin:0!important;padding:5px 24px 20px;line-height:1.6;color:#59656c;overflow-wrap:anywhere}.ghost-side{min-width:0;padding:5px 0 0}.ghost-side h3{font-size:20px;line-height:1.4;letter-spacing:-.025em}.ghost-record-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.ghost-record-dot{width:7px;height:7px;border-radius:50%;background:var(--ghost);box-shadow:0 0 0 5px #237f910e}.ghost-side p{font-size:14px;line-height:1.75;color:#697278;margin:12px 0 18px}.ghost-field{display:flex;flex-direction:column;gap:7px;font-size:14px;min-width:0}.ghost-field input,.ghost-field select{width:100%;min-width:0;padding:11px 12px;border:1px solid #ced7da;border-radius:7px;background:white;font-size:16px}.ghost-field input:focus,.ghost-field select:focus{border-color:var(--ghost)}#ghost-fields{display:grid;gap:14px}.ghost-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ghost-primary{display:block;width:100%;border:1px solid var(--ink);background:var(--ink);color:white;border-radius:30px;padding:12px 20px;font-size:14px;margin-top:18px}.ghost-primary:hover{background:var(--ghost-ink);transform:translateY(-1px)}#ghost-input-error:empty{display:none}#ghost-input-error{border-left:2px solid #a57638;padding-left:12px;color:#855d29}.ghost-edit-actions{display:flex;justify-content:space-between;gap:14px;margin-top:14px}.ghost-edit-actions button,.ghost-text-button,.ghost-bottom button{border:0;background:none;text-decoration:underline;text-underline-offset:4px;padding:8px 0;font-size:13px}.ghost-edit-actions button:last-child{color:var(--ghost);font-weight:650}.ghost-edit-actions button:disabled{color:#92999c}.ghost-history{margin-top:26px;padding-top:22px;border-top:1px solid var(--line)}.ghost-history-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.ghost-history-heading h3{font-size:14px!important;font-family:var(--font-body);letter-spacing:0}.ghost-history-heading span{font-size:12px;color:var(--muted)}#ghost-steps{list-style:none;padding:0;margin:14px 0 0;max-height:280px;overflow:auto;overscroll-behavior:contain}#ghost-steps li{margin:0;border-bottom:1px solid #e4e7e7}#ghost-steps button{display:flex;width:100%;gap:14px;text-align:left;border:0;background:none;padding:12px 4px;line-height:1.5;font-size:14px;overflow-wrap:anywhere}#ghost-steps button>span:first-child{font-size:12px;color:#8a9296;min-width:18px;padding-top:1px}#ghost-steps button[aria-current=true]{color:var(--ghost);background:var(--ghost-soft);border-radius:6px}#ghost-steps button:disabled{opacity:1;color:var(--ghost-ink);cursor:default}.ghost-small-symbol{font-size:40px!important;color:var(--ghost)!important;margin:0 0 10px!important}.ghost-bottom{display:flex;align-items:center;justify-content:space-between;gap:30px;margin-top:25px}.ghost-bottom p{font-size:12px;max-width:500px;color:var(--muted);margin:0}.ghost-bottom>div{display:flex;gap:24px}.ghost-bottom button{white-space:nowrap}.ghost-player-top{display:flex;align-items:center;gap:8px;padding:17px 22px 12px;border-top:1px solid #e4eaec}.ghost-player-top>button{min-width:37px;height:37px;border:1px solid #d8e1e4;background:white;border-radius:25px;padding:0 12px;font-size:17px}.ghost-player-top #ghost-play{background:var(--ghost-ink);color:white;border-color:var(--ghost-ink);font-size:14px;min-width:85px}.ghost-player-top output{font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted);margin-left:6px;white-space:nowrap}.ghost-player-top label{display:flex;gap:7px;align-items:center;margin-left:auto;font-size:12px;color:var(--muted)}.ghost-player-top select{border:0;background:none;font-size:13px;padding:5px}.ghost-timeline{position:relative;margin:0 24px 8px;height:26px}.ghost-timeline input{position:relative;z-index:1;width:100%;margin:0;height:26px;accent-color:var(--ghost);cursor:ew-resize;background:none}.ghost-timeline>span{position:absolute;top:4px;height:18px;width:3px;background:#b28339;z-index:2;pointer-events:none}.ghost-player-options{display:flex;flex-wrap:wrap;gap:12px 20px;padding:0 24px 18px;font-size:12px;align-items:center}.ghost-player-options label{display:flex;gap:6px;align-items:center}.ghost-player-options input{accent-color:var(--ghost)}.ghost-player-options button{border:0;background:none;color:#8a642f;text-decoration:underline;text-underline-offset:3px;font-size:12px;padding:0}.ghost-side .eyebrow{color:var(--ghost);font-size:12px;margin:0 0 12px}.ghost-side.is-divergence #ghost-replay-panel{border-left:2px solid #a97a35;padding-left:18px}.ghost-side.is-divergence #ghost-history-title{color:var(--muted)}.sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}.ghost-visually-complete{opacity:.6}
@media(max-width:1000px){.page-ghost #main{padding:25px 25px 50px}.ghost-workspace{grid-template-columns:minmax(0,1.5fr) minmax(285px,1fr);gap:22px}.ghost-toolbar{align-items:start}.ghost-problem-picker{display:block}.ghost-problem-picker>span{display:block;margin-bottom:5px}.ghost-intro>p{max-width:280px}.ghost-player-top{padding:14px 14px 10px}.ghost-player-top label>span{display:none}.ghost-player-options{gap:12px}.ghost-board-top{padding:16px}.ghost-legend{gap:10px}}
@media(max-width:760px){.page-ghost #main{padding:20px 18px 40px}.ghost-intro{display:block;padding:5px 0 22px}.ghost-intro h1{font-size:2rem}.ghost-intro>p{max-width:100%;font-size:14px;margin:14px 0 0}.ghost-toolbar{display:block;padding:16px 0}.ghost-categories{gap:2px;margin-bottom:15px}.ghost-categories button{padding:8px 10px;font-size:13px}.ghost-problem-picker{display:flex;justify-content:space-between;gap:15px}.ghost-problem-picker>span{margin:0}.ghost-problem-picker select{flex:1;max-width:260px;min-width:0}.ghost-brief{display:block;padding:22px 0}.ghost-brief h2{font-size:1.7rem}.ghost-brief>p{margin-top:12px;font-size:14px}.ghost-workspace{display:flex;flex-direction:column;gap:24px}.ghost-board,.ghost-side{width:100%}.ghost-board-top{font-size:12px;padding:15px 13px}.ghost-legend{font-size:12px}.ghost-legend span:before{width:12px;margin-right:5px}.ghost-canvas{min-height:0}.ghost-visual{width:145%;max-width:none;transform:translateX(-15.5%)}.ghost-board[data-kind=algebra] .ghost-visual,.ghost-board[data-kind=word] .ghost-visual{width:115%;transform:translateX(-6.5%)}.ghost-board[data-kind=word] .ghost-visual{width:110%;transform:translateX(-4.5%)}.ghost-scene-readout{font-size:13px;padding:6px 14px 16px}.ghost-side{padding:0 5px}.ghost-history{margin-top:20px;padding-top:20px}#ghost-steps{max-height:200px}.ghost-bottom{align-items:start;flex-direction:column;gap:16px}.ghost-bottom>div{justify-content:space-between;width:100%}.ghost-bottom p{font-size:12px}.ghost-player-options{padding:0 14px 18px}.ghost-timeline{margin:0 16px 8px}.ghost-player-top output{margin:0}.ghost-player-top{gap:5px}.ghost-player-top #ghost-play{min-width:74px}.ghost-player-top>button{min-width:33px;padding:0 9px}.ghost-player-top label{margin-left:auto}.ghost-player-options{font-size:12px;gap:10px 12px}.ghost-player-options label{gap:4px}}
@media(prefers-reduced-motion:reduce){.ghost-primary:hover{transform:none}*{scroll-behavior:auto!important}}

.page-ghost .ghost-board{margin-bottom:0!important}.page-ghost .ghost-intro .eyebrow{margin-top:0}
@media(max-width:760px){.ghost-intro{padding-bottom:18px}.ghost-intro h1{font-size:1.8rem}.ghost-intro>p{margin-top:10px}.ghost-toolbar{padding:14px 0}.ghost-brief{padding:18px 0}.ghost-brief>p{margin-top:9px}.ghost-brief .eyebrow{display:none}#ghost-app[data-mode=record][data-kind=algebra] .ghost-side,#ghost-app[data-mode=record][data-kind=word] .ghost-side{order:-1}.ghost-side p{margin:10px 0 14px}}
