/* =====================================================================
   v8: animated scene lessons, locked questions, path map, assessment
   ===================================================================== */
.sp { border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--c) 10%, transparent), transparent 60%), #060910; }
.sp-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 380px; }
.sp-stage.enter .sp-vis { animation: spVis .7s var(--ease); }
.sp-stage.enter .sp-txt > * { animation: spTxt .6s var(--ease) both; }
.sp-stage.enter .sp-txt > *:nth-child(2) { animation-delay: .08s; }
.sp-stage.enter .sp-txt > *:nth-child(3) { animation-delay: .16s; }
@keyframes spVis { from { opacity: 0; transform: scale(.96); filter: blur(6px); } }
@keyframes spTxt { from { opacity: 0; transform: translateX(20px); } }
.sp-vis { position: relative; padding: 1.6rem; display: grid; align-items: center; border-right: 1px solid var(--line); background-image: linear-gradient(color-mix(in srgb, var(--c) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--c) 6%, transparent) 1px, transparent 1px); background-size: 28px 28px; }
.sp-txt { padding: 1.8rem 1.8rem; display: grid; align-content: center; gap: .7rem; }
.sp-k { font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; color: var(--c); }
.sp-h { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 900; letter-spacing: -.01em; line-height: 1.15; }
.sp-p { color: #c4d0d6; line-height: 1.7; font-size: .98rem; }
.sp-p b { color: #fff; }
.sp-bar { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-top: 1px solid var(--line); background: rgba(0,0,0,.25); }
.sp-btn, .sp-auto { font-family: var(--mono); font-size: .78rem; padding: .55rem .9rem; border-radius: 10px; border: 1px solid var(--line); transition: all .2s; }
.sp-btn:hover, .sp-auto:hover { border-color: var(--c); }
.sp-btn:disabled { opacity: .3; }
.sp-next { margin-left: auto; background: var(--c); color: #04060a; font-weight: 800; border-color: var(--c); }
.sp-auto.on { color: var(--c); border-color: var(--c); }
.sp-dots { display: flex; gap: 6px; margin-left: .4rem; }
.sp-dots i { width: 22px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.12); transition: all .3s; }
.sp-dots i.seen { background: color-mix(in srgb, var(--c) 45%, transparent); }
.sp-dots i.on { background: var(--c); width: 36px; box-shadow: 0 0 10px var(--c); }
@media (max-width: 900px) { .sp-stage { grid-template-columns: 1fr; } .sp-vis { border-right: none; border-bottom: 1px solid var(--line); } }

/* --- visuals --- */
.sv-term { border-radius: 12px; overflow: hidden; border: 1px solid #12301f; background: #020403; box-shadow: 0 0 30px rgba(57,255,136,.08); }
.sv-tbar { display: flex; gap: 5px; align-items: center; padding: .45rem .7rem; background: #07100b; }
.sv-tbar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3640; }
.sv-tbar i:nth-child(1) { background: #ff5f57; } .sv-tbar i:nth-child(2) { background: #febc2e; } .sv-tbar i:nth-child(3) { background: #28c840; }
.sv-tbar span { margin-left: .5rem; font-family: var(--mono); font-size: .66rem; color: #4f8f69; }
.sv-tout { font-family: var(--mono); font-size: .8rem; line-height: 1.55; color: #e6fff0; padding: .8rem 1rem; min-height: 200px; max-height: 300px; overflow: auto; white-space: pre-wrap; }
.sv-ps { color: var(--green); }
.sv-tout .typing::after { content: "▋"; color: var(--green); animation: blink 1s steps(1) infinite; }
.sv-res { color: #9fdcb8; margin-bottom: .4rem; animation: fadeUp .3s var(--ease); }
.sv-flow { display: grid; gap: .8rem; }
.sv-nodes { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: .5rem; }
.sv-node { display: grid; justify-items: center; gap: .35rem; text-align: center; transition: transform .35s var(--ease); }
.sv-node span { width: 56px; height: 56px; padding: 13px; border-radius: 16px; color: var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 40%, transparent); background: #0a0f18; transition: all .35s var(--ease); }
.sv-node b { font-size: .72rem; font-family: var(--mono); color: #b9c6cc; }
.sv-node.on { transform: translateY(-4px); }
.sv-node.on span { border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 14%, #0a0f18); }
.sv-track { position: relative; height: 30px; border-top: 2px dashed color-mix(in srgb, var(--c) 30%, transparent); margin-top: 6px; }
.sv-pill { position: absolute; top: -13px; transform: translateX(-50%); opacity: 0; font-style: normal; font-family: var(--mono); font-size: .66rem; white-space: nowrap; padding: .25rem .6rem; border-radius: 99px; background: var(--c); color: #04060a; font-weight: 800; box-shadow: 0 0 18px var(--c); }
.sv-msgs { list-style: none; display: grid; gap: .3rem; max-height: 170px; overflow: auto; }
.sv-msgs li { display: grid; grid-template-columns: 20px auto 1fr; gap: .5rem; align-items: baseline; font-size: .78rem; animation: fadeUp .35s var(--ease); }
.sv-msgs em { font-style: normal; font-family: var(--mono); color: var(--c); }
.sv-msgs b { font-family: var(--mono); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.sv-msgs span { color: #d4dfe4; }
.sv-stack { display: grid; gap: .4rem; }
.sv-layer { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: .8rem; align-items: center; padding: .7rem 1rem; border-radius: 10px; border: 1px solid hsl(var(--h) 70% 60% / .4); background: hsl(var(--h) 70% 50% / .08); opacity: 0; transform: translateY(-14px) scale(.98); transition: all .5s var(--ease); }
.sv-layer.in { opacity: 1; transform: none; }
.sv-layer b { font-family: var(--mono); font-size: .82rem; color: hsl(var(--h) 90% 72%); }
.sv-layer span { font-size: .8rem; color: #b9c6cc; }
.sv-anno { display: grid; gap: .8rem; }
.sv-code { font-family: var(--mono); font-size: .8rem; background: #04070b; border: 1px solid var(--line); border-radius: 12px; padding: .5rem 0; overflow-x: auto; }
.sv-cl { display: grid; grid-template-columns: 30px 1fr; padding: .15rem .8rem .15rem 0; border-left: 3px solid transparent; transition: all .3s; }
.sv-cl span { color: #3c4c58; text-align: right; padding-right: .6rem; }
.sv-cl code { white-space: pre; color: #cfd8dc; font-size: .8rem; }
.sv-cl.hl { background: color-mix(in srgb, var(--c) 14%, transparent); border-left-color: var(--c); }
.sv-notes { list-style: none; display: grid; gap: .35rem; }
.sv-notes li { display: grid; grid-template-columns: 34px 1fr; gap: .4rem; font-size: .82rem; color: #d4dfe4; line-height: 1.45; animation: fadeUp .35s var(--ease); }
.sv-notes em { font-style: normal; font-family: var(--mono); font-size: .68rem; color: var(--c); padding-top: .1rem; }
.sv-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: stretch; }
.sv-vs { align-self: center; font-family: var(--mono); font-weight: 900; color: var(--c); font-size: .85rem; }
.sv-card { padding: 1rem; border-radius: 14px; border: 1px solid var(--line); background: #0a0f18; opacity: 0; transition: all .55s var(--ease); }
.sv-card.a { transform: translateX(-30px); } .sv-card.b { transform: translateX(30px); }
.sv-card.in { opacity: 1; transform: none; }
.sv-card.a { border-color: rgba(255,138,61,.4); } .sv-card.b { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.sv-card h5 { font-family: var(--mono); font-size: .86rem; margin-bottom: .5rem; }
.sv-card ul { list-style: none; display: grid; gap: .4rem; }
.sv-card li { font-size: .82rem; color: #c4d0d6; padding-left: 1rem; position: relative; opacity: 0; transform: translateY(6px); transition: all .35s; line-height: 1.45; }
.sv-card li::before { content: "▸"; position: absolute; left: 0; color: var(--c); }
.sv-card li.in { opacity: 1; transform: none; }
.sv-tree { font-family: var(--mono); font-size: .86rem; line-height: 1.75; background: #04070b; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.sv-tree div { opacity: 0; transform: translateX(-10px); transition: all .35s var(--ease); white-space: pre; color: #a9b6bd; }
.sv-tree div.in { opacity: 1; transform: none; }
.sv-tree div.hi { color: var(--c); text-shadow: 0 0 10px color-mix(in srgb, var(--c) 50%, transparent); }
.sv-big { position: relative; display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 1.5rem 0; }
.sv-rings { position: absolute; top: 1.5rem; width: 120px; height: 120px; }
.sv-rings i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--c); opacity: 0; animation: ripple 2.4s ease-out infinite; }
.sv-rings i:nth-child(2) { animation-delay: .8s; } .sv-rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ripple { from { transform: scale(.5); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }
.sv-bigico { position: relative; width: 120px; height: 120px; padding: 30px; border-radius: 50%; color: var(--c); background: radial-gradient(circle, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%); animation: holoIn .8s var(--ease); }
.sv-val { font-family: var(--mono); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; color: var(--c); text-shadow: 0 0 24px color-mix(in srgb, var(--c) 60%, transparent); line-height: 1; word-break: break-word; }
.sv-big p { color: #b9c6cc; max-width: 34ch; }
.sv-bits { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-family: var(--mono); }
.sv-blabels { display: grid; gap: .45rem; font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding-top: .3rem; }
.sv-brow { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .45rem; opacity: 0; transform: translateY(8px); transition: all .5s var(--ease); }
.sv-brow.in { opacity: 1; transform: none; }
.sv-brow span { padding: .2rem .4rem; border-radius: 5px; background: #0a0f18; border: 1px solid var(--line); font-size: .78rem; }
.sv-brow.c span { color: #fff; font-weight: 800; } .sv-brow.b span { color: var(--green); font-size: .68rem; } .sv-brow.h span { color: var(--yellow); }
.sv-b64 { grid-column: 1 / -1; opacity: 0; transition: opacity .6s; font-size: .85rem; color: var(--muted); } .sv-b64.in { opacity: 1; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.sv-cell { display: grid; gap: .3rem; padding: .9rem; border-radius: 14px; border: 1px solid var(--line); background: #0a0f18; opacity: 0; transform: scale(.85) rotate(-2deg); transition: all .45s var(--ease); }
.sv-cell.in { opacity: 1; transform: none; }
.sv-cell span { width: 34px; height: 34px; color: var(--c); }
.sv-cell b { font-size: .88rem; } .sv-cell small { font-size: .76rem; color: #a9b6bd; line-height: 1.4; }
.sv-packet { display: grid; gap: 1rem; }
.sv-pk { display: flex; gap: 3px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.sv-f { display: grid; gap: .2rem; padding: .9rem .6rem; text-align: center; background: hsl(var(--h) 60% 50% / .08); transition: all .4s var(--ease); min-width: 0; }
.sv-f small { font-family: var(--mono); font-size: .58rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.sv-f b { font-family: var(--mono); font-size: .95rem; color: hsl(var(--h) 90% 72%); word-break: break-all; }
.sv-f.on { background: hsl(var(--h) 70% 50% / .3); transform: translateY(-6px); box-shadow: 0 8px 24px hsl(var(--h) 80% 50% / .3); }
.sv-fdesc { min-height: 3em; color: #c4d0d6; font-size: .9rem; line-height: 1.5; animation: fadeUp .3s; }
.sv-fdesc b { font-family: var(--mono); color: var(--c); margin-right: .4rem; }
.sv-steps { list-style: none; display: grid; gap: .5rem; position: relative; }
.sv-steps li { display: grid; grid-template-columns: 34px 1fr; gap: .7rem; align-items: center; opacity: 0; transform: translateX(-16px); transition: all .45s var(--ease); }
.sv-steps li.in { opacity: 1; transform: none; }
.sv-steps em { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--mono); font-weight: 800; color: #04060a; background: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 50%, transparent); }
.sv-steps span { font-size: .88rem; color: #d4dfe4; line-height: 1.45; }
.sv-slice { display: grid; gap: 1rem; justify-items: center; }
.sv-chars { display: flex; gap: 4px; }
.sv-ch { display: grid; justify-items: center; gap: 2px; padding: .5rem .55rem; border-radius: 8px; border: 1px solid var(--line); background: #0a0f18; transition: all .45s var(--ease); }
.sv-ch b { font-family: var(--mono); font-size: 1.4rem; }
.sv-ch small { font-family: var(--mono); font-size: .6rem; color: var(--muted); }
.sv-ch small.neg { color: #5a4a6a; }
.sv-ch.on { background: color-mix(in srgb, var(--c) 25%, transparent); border-color: var(--c); transform: translateY(-8px); }
.sv-expr { font-size: .95rem; }
.sv-result { font-family: var(--mono); font-size: 1.4rem; color: var(--c); min-height: 1.6em; }

/* locked questions */
.qs.locked { position: relative; }
.qs.locked > :not(.qs-lock) { filter: blur(5px); opacity: .35; pointer-events: none; user-select: none; }
.qs-lock { font-family: var(--mono); font-size: .82rem; color: var(--yellow); padding: .7rem 1rem; border: 1px dashed rgba(255,210,63,.45); border-radius: 10px; background: rgba(255,210,63,.06); }
.qs.unlocked { animation: unlock .8s var(--ease); }
@keyframes unlock { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 40% { box-shadow: 0 0 40px 4px color-mix(in srgb, var(--c) 45%, transparent); } }
.got-it { margin-top: 1.4rem; }
.ut-learn { color: var(--pink); border-color: rgba(255,95,162,.5); }

/* path map */
.path { padding: 3rem 5vw 4rem; background: var(--bg); }
.path-note { color: var(--muted); max-width: 52ch; font-size: .9rem; line-height: 1.5; }
.path-line { display: flex; gap: .7rem; overflow-x: auto; padding: 1rem .2rem 1.2rem; scroll-snap-type: x mandatory; position: relative; }
.path-line::before { content: ""; position: absolute; left: 0; right: 0; top: 62px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--magenta)); opacity: .35; }
.pstop { position: relative; flex: 0 0 150px; scroll-snap-align: start; display: grid; justify-items: center; gap: .35rem; text-align: center; padding: .7rem .6rem; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); transition: all .3s var(--ease); animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.pstop:hover { border-color: var(--c); transform: translateY(-6px); box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 20%, transparent); }
.pstop em { font-style: normal; font-family: var(--mono); font-size: .66rem; color: var(--c); letter-spacing: .1em; }
.pdot { width: 44px; height: 44px; padding: 10px; border-radius: 50%; color: var(--c); border: 1.5px solid var(--c); background: #0a0f18; position: relative; z-index: 1; }
.pstop b { font-size: .8rem; line-height: 1.25; }
.pstop small { font-size: .68rem; color: var(--muted); }
.pbar { width: 100%; height: 3px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.pbar u { display: block; height: 100%; background: var(--c); }
.pstop.done { border-color: rgba(57,255,136,.6); }
.pstop.done .pdot { background: var(--green); color: #031008; border-color: var(--green); }

/* assessment */
.exam { display: grid; gap: 1rem; padding: 1.4rem; border-radius: 18px; border: 1px solid var(--line); background: #070a10; }
.ex-intro { display: grid; justify-items: center; gap: .7rem; text-align: center; padding: 1.5rem 0; }
.ex-badge { width: 84px; height: 84px; padding: 20px; border-radius: 50%; color: #fff; border: 2px solid #fff; box-shadow: 0 0 30px rgba(255,255,255,.25); }
.ex-intro h5 { font-size: 1.3rem; } .ex-intro p { color: var(--muted); }
.ex-top { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.ex-prog { height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.ex-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); transition: width .4s; }
.ex-timer { font-size: 1.1rem; color: var(--yellow); }
.ex-mod { font-family: var(--mono); font-size: .68rem; color: var(--c); letter-spacing: .1em; }
.ex-q { font-size: 1.25rem; line-height: 1.4; }
.ex-result { display: grid; justify-items: center; gap: .5rem; padding: 1rem 0; }
.ex-score { display: grid; justify-items: center; }
.ex-score b { font-family: var(--mono); font-size: 3rem; color: var(--red); }
.ex-result.pass .ex-score b { color: var(--green); text-shadow: 0 0 24px var(--green); }
.ex-review { list-style: none; display: grid; gap: .35rem; max-height: 340px; overflow: auto; }
.ex-review li { display: grid; gap: .1rem; padding: .5rem .8rem; border-radius: 10px; border-left: 3px solid var(--red); background: #0a0f18; font-size: .84rem; }
.ex-review li.ok { border-left-color: var(--green); }
.ex-review small { font-family: var(--mono); font-size: .62rem; color: var(--muted); }
.ex-review span { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.ex-review i { color: var(--green); font-style: normal; }
.ex-again { justify-self: center; }

/* city camera presets */
.city-ctrl .wide, .city-ctrl .wide2 { font-size: .72rem; font-family: var(--mono); }
.city-ctrl .wide { grid-column: 1 / 2; } .city-ctrl .wide2 { grid-column: 2 / 4; }
