/* Studio: editorial surfaces and a focused learning workspace. */
:root { --bg:#111918; --bg-deep:#0d1413; --surface:#1a2422; --surface-2:#222f2c; --surface-3:#2b3b36; --line:#394640; --line-soft:#2a3832; --text:#f1f1e8; --text-dim:#c1ccc2; --muted:#9bac9f; --action:#dce9ad; --action-ink:#1d2a19; --select:#94cbb8; --focus:#dce9ad; --memory:#bbb4df; --action-tint:rgba(220,233,173,.10); --select-tint:rgba(148,203,184,.12); --r-lg:22px; --r-xl:30px; }
[data-theme="daylight"] { --bg:#f4f3ed; --bg-deep:#ebece3; --surface:#fffef9; --surface-2:#eeefe6; --surface-3:#e2e7da; --line:#c7cfc0; --line-soft:#dee3d6; --text:#20372d; --text-dim:#41594b; --muted:#5f7264; --action:#304f3a; --action-ink:#fffef9; --select:#386e5a; --focus:#386e5a; --memory:#685e91; }
body { background-image:radial-gradient(ellipse at 85% 5%,color-mix(in srgb,var(--select) 7%,transparent),transparent 55%); }
.aurora,.grain { display:none; }
.topbar-inner { min-height:80px; height:auto; padding-block:15px; }
.brand-mark { background:var(--action); color:var(--action-ink); border-radius:50% 50% 12px 50%; width:38px; height:38px; }
.studio-nav { display:flex; gap:24px; margin-right:20px; font-size:14px; }
.studio-nav a:hover { color:var(--action); }
.eyebrow { display:block; font:600 10px/1.5 var(--font-mono); letter-spacing:.19em; color:var(--select); margin-bottom:20px; }
.hero { padding-block:64px 30px; }
.hero h1 { font-size:clamp(40px,4.8vw,66px); letter-spacing:-.055em; font-weight:500; line-height:1.08; }
.accent-line { background:none; -webkit-text-fill-color:currentColor; color:var(--action); }
.hero-lede { max-width:470px; line-height:1.8; margin-top:26px; }
.hero-grid { gap:60px; align-items:center; }
.btn { border-radius:12px; padding:13px 20px; box-shadow:none; font-weight:500; }
.btn:hover { box-shadow:0 6px 20px #0002; }
.studio-visual { border:1px solid var(--line); border-radius:28px; overflow:hidden; background:radial-gradient(ellipse at 50% 40%,color-mix(in srgb,var(--select) 13%,var(--surface)),var(--surface)); }
.visual-caption { display:flex; justify-content:space-between; gap:12px; padding:24px 25px 0; color:var(--muted); font-size:11px; }
.visual-caption .eyebrow { margin:0; font-size:9px; }
.studio-visual .topology { width:100%; max-height:260px; }
.mentor-preview { display:flex; align-items:center; gap:20px; padding:8px 24px 0; border-top:1px solid var(--line); background:var(--glass); }
.mentor-preview .teacher { width:78px; align-self:flex-end; }
.mentor-preview span { display:block; }
.mentor-preview small { font:9px var(--font-mono); letter-spacing:.15em; color:var(--muted); }
.mentor-preview b { display:block; font-size:15px; font-weight:500; margin-block:7px; }
.mentor-preview span span { color:var(--select); font-size:12px; margin-bottom:15px; }
.bento { margin-top:36px; gap:14px; }
.tile,.part-card { background:var(--surface); box-shadow:none; border:1px solid var(--line-soft); }
.part-card { padding:28px; transition:transform .2s,border-color .2s; }
.part-card:hover { transform:translateY(-4px); border-color:var(--select); }
.tile b { font-weight:400; }
.teacher { --tc-top:#8da999; --tc-skin:#b67f60; --tc-skin-2:#936045; --tc-hair:#322723; }
.library { padding-block:48px 70px; }
.library-heading { display:flex; justify-content:space-between; gap:24px; align-items:end; margin-bottom:34px; }
.library-heading h1 { font-size:clamp(34px,4vw,52px); font-weight:500; letter-spacing:-.045em; }
.library-heading p { color:var(--muted); margin-top:12px; }
.library-grid { display:grid; grid-template-columns:260px minmax(0,1fr); gap:24px; align-items:start; }
.library-index { background:var(--surface); border:1px solid var(--line-soft); border-radius:20px; padding:20px; position:sticky; top:100px; max-height:calc(100vh - 130px); overflow:auto; }
.library-index label { font-size:12px; color:var(--muted); }
.library-index input { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line); padding:11px; border-radius:9px; margin:8px 0 18px; }
.lesson-link { display:flex; gap:12px; width:100%; text-align:left; border:0; border-radius:10px; padding:12px; background:none; color:var(--text-dim); cursor:pointer; font-size:13px; line-height:1.5; }
.lesson-link span { color:var(--muted); font:11px var(--font-mono); margin-top:4px; }
.lesson-link[aria-current="true"] { background:var(--select-tint); color:var(--select); }
.lesson-link:hover { background:var(--surface-2); }
.index-group { font:10px var(--font-mono); color:var(--muted); text-transform:uppercase; letter-spacing:.13em; padding:20px 12px 8px; }
.lesson { min-width:0; }
.lesson-cover { display:grid; grid-template-columns:1fr 190px; border:1px solid var(--line); border-radius:24px; overflow:hidden; background:var(--surface); }
.lesson-cover-copy { padding:32px; align-self:center; }
.lesson-cover h2 { font-size:clamp(23px,3vw,34px); font-weight:500; line-height:1.2; }
.lesson-cover p { margin-top:18px; color:var(--text-dim); line-height:1.8; }
.mentor-stage { display:flex; flex-direction:column; align-items:center; justify-content:end; padding:25px 12px 0; background:radial-gradient(ellipse at center,#7f9f7e55,transparent 70%); }
.mentor-stage .teacher { width:170px; max-width:100%; }
.mentor-label { font:10px var(--font-mono); color:var(--select); letter-spacing:.1em; margin-bottom:15px; }
.lesson-tools { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:22px 0; }
.lesson-tools .step-count { margin-right:auto; font:12px var(--font-mono); color:var(--muted); }
.lesson-content { padding:32px; background:var(--surface); border:1px solid var(--line-soft); border-radius:20px; }
.lesson-content h3 { font-size:15px; margin-bottom:18px; color:var(--select); }
.lesson-content .explanation { font-size:19px; line-height:1.9; max-width:65ch; }
.lesson-content .picture { margin-top:26px; }
.recall-card { margin-top:20px; padding:28px; border:1px solid var(--line); border-radius:20px; }
.recall-card p { color:var(--text-dim); margin:12px 0 18px; }
.recall-card textarea { display:block; width:100%; min-height:100px; resize:vertical; background:var(--bg); border:1px solid var(--line); border-radius:12px; color:var(--text); font:inherit; padding:14px; margin-block:14px; }
.recall-answer { border-left:2px solid var(--select); padding-left:18px; }
.lesson-source { font-size:11px; color:var(--muted); margin:20px 4px; }
.theory { border-radius:20px; background:var(--surface); border:1px solid var(--line); }
.th-head { padding:18px 22px; }
.th-body { padding:24px; gap:24px; }
.th-text p { line-height:1.85; }
.is-speaking .tc-mouth { transform-box:fill-box; transform-origin:center; animation:speak .24s alternate infinite; }
@keyframes speak { to { transform:scaleY(1.7); } }
@media(max-width:800px) { .library-grid { grid-template-columns:1fr; } .library-index { position:static; max-height:250px; } .hero-grid { gap:28px; } .studio-nav { gap:14px; margin:0; } .topbar-inner { flex-wrap:wrap; gap:10px; } .topbar .xp-hud,.topbar .streak-chip { display:none; } .library-heading { align-items:start; flex-direction:column; } }
@media(max-width:480px) { .lesson-cover { grid-template-columns:1fr 100px; } .lesson-cover-copy,.lesson-content { padding:22px; } .mentor-stage { padding-inline:0; } .mentor-label { font-size:8px; } .lesson-cover h2 { font-size:24px; } .hero { padding-top:35px; } .brand small { display:none; } .studio-nav { font-size:12px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
[data-motion="reduced"] *,[data-motion="none"] *,[data-motion="off"] * { animation:none!important; transition:none!important; }

[hidden] { display:none!important; }
@media(max-width:480px) { .topbar .brand { flex:1; } .topbar-spacer { display:none; } .studio-nav { order:5; flex-basis:100%; justify-content:center; padding-top:4px; } }
/* Retrieval is a real dialog, with the previous screen hidden and inert. */
.recall-dialog { border:1px solid var(--line); border-radius:28px; padding:36px; width:min(680px,calc(100vw - 28px)); max-height:calc(100dvh - 28px); overflow:auto; background:var(--surface); color:var(--text); box-shadow:0 30px 100px #0006; }
.recall-dialog::backdrop { background:var(--bg); }
.recall-dialog h2 { font-size:clamp(22px,4vw,30px); line-height:1.35; }
.retrieval-intro { color:var(--muted); margin:18px 0 26px; }
.recall-dialog label { display:block; font-weight:500; margin-bottom:9px; }
.recall-dialog input,.recall-dialog textarea { width:100%; font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:15px; }
.retrieval-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }
.retrieval-mentor { display:flex; align-items:center; gap:20px; margin-bottom:20px; color:var(--muted); font-size:13px; }
.retrieval-mentor .teacher { width:90px; }
.retrieval-error { color:var(--no); margin-top:8px; }
.unaided-question .q-tag,.unaided-question #chapters { visibility:hidden; }
.unaided-question .study > div:last-child { visibility:hidden; }
/* Articulated docent: a jacket, a separate head and a shoulder-driven arm. */
.teacher .tc-body { animation:mentor-breathe 5s ease-in-out infinite; }
.teacher .tc-head { transform-origin:70px 94px; animation:mentor-attend 8s ease-in-out infinite; }
.tc-shirt { fill:#e9e4d2; }
.tc-lapel { fill:color-mix(in srgb,var(--tc-top) 76%,#1c3128); }
.tc-seam { fill:none; stroke:color-mix(in srgb,var(--tc-top) 60%,#1c3128); stroke-width:1; }
.tc-button { fill:var(--action); }
.tc-gaze { transform:translate(var(--gaze-x,0px),var(--gaze-y,0px)); transition:transform .18s ease-out; }
.tc-speaking-mouth { fill:#653734; stroke:var(--tc-ink); stroke-width:1; opacity:0; transform-origin:70px 76px; }
.teacher .tc-gesture { transform-origin:106px 150px; }
.teacher.is-waving .tc-gesture { animation:mentor-wave .42s ease-in-out 4; }
.teacher.is-waving .tc-head { animation:mentor-nod .9s ease-in-out 2; }
.teacher.is-emphasizing .tc-gesture { animation:mentor-explain 1.2s ease-in-out; }
.teacher[data-pose="denk"] .tc-head { transform:rotate(-5deg); animation:none; }
.teacher[data-pose="goed"] .tc-head { animation:mentor-nod .7s ease-in-out 2; }
.teacher.is-speaking .tc-expression { opacity:0; }
.teacher.is-speaking .tc-speaking-mouth { opacity:1; animation:mentor-speak .38s ease-in-out infinite; }
.teacher.is-speaking .tc-gesture { animation:mentor-explain 3s ease-in-out infinite; }
.teacher.speech-beat .tc-head { animation:mentor-nod .45s ease-out; }
.mentor-stage { position:relative; min-height:225px; }
.mentor-stage::before { content:''; position:absolute; width:150px; height:150px; border:1px solid color-mix(in srgb,var(--select) 25%,transparent); border-radius:50%; top:45px; pointer-events:none; }
.mentor-stage .teacher { position:relative; filter:drop-shadow(0 12px 14px #0002); }
.mentor-controls { display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
.mentor-controls button { font-size:12px; border:1px solid var(--line); background:var(--surface-2); color:var(--text); border-radius:9px; padding:9px 12px; cursor:pointer; }
.mentor-controls button[aria-pressed="true"] { color:var(--select); border-color:var(--select); }
.mentor-stage[data-paused="true"] *,[data-motion="off"] .teacher * { animation:none!important; transition:none!important; }
@keyframes mentor-breathe { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-1.5px); } }
@keyframes mentor-attend { 0%,40%,100% { transform:rotate(0); } 55%,70% { transform:rotate(2deg); } }
@keyframes mentor-wave { 0%,100% { transform:rotate(-7deg); } 50% { transform:rotate(12deg); } }
@keyframes mentor-nod { 0%,100% { transform:rotate(0); } 45% { transform:rotate(5deg) translateY(1px); } }
@keyframes mentor-explain { 0%,100% { transform:rotate(0); } 40% { transform:rotate(-9deg) translateY(-2px); } 70% { transform:rotate(3deg); } }
@keyframes mentor-speak { 0%,100% { transform:scale(.8,.35); } 32% { transform:scale(1,1.3); } 63% { transform:scale(.7,.65); } 82% { transform:scale(1.15,1); } }
@media(prefers-reduced-motion:reduce) { .teacher * { animation:none!important; transition:none!important; } }
[data-motion="subtle"] .teacher .tc-body,[data-motion="subtle"] .teacher .tc-head { animation:none; }
@media(max-width:480px) { .recall-dialog { padding:24px; } .mentor-stage::before { width:85px; height:85px; } }
.unaided-question .part-head h1,.unaided-question .part-head p,.unaided-question .crumbs > span { visibility:hidden; }
.study-time { color:var(--select); font:12px var(--font-mono); white-space:nowrap; padding:6px 9px; border:1px solid var(--line); border-radius:8px; }
.lesson-group { border-bottom:1px solid var(--line-soft); padding-block:5px; }
.lesson-group summary { cursor:pointer; font-weight:600; padding:12px 3px; text-transform:capitalize; }
.lesson-group summary span { float:right; color:var(--muted); font-weight:400; font-size:11px; }
.lesson-diagram { margin:24px 0 0; border:1px solid var(--line); padding:20px 12px 16px; border-radius:16px; background:var(--bg); overflow:auto; }
.lesson-diagram .eyebrow { margin:0 10px; }
.lesson-diagram svg { display:block; width:100%; min-width:470px; }
.lesson-diagram figcaption { color:var(--text-dim); font-size:12px; line-height:1.6; margin:4px 10px; }
.lesson-wire { fill:none; stroke:var(--select); stroke-width:1.5; }
.lesson-node { fill:var(--surface-2); stroke:var(--line); }
.lesson-number { fill:var(--select); font:10px var(--font-mono); }
.lesson-node-label { fill:var(--text); font:13px var(--font-ui); }
.library-heading { margin-bottom:24px; }
.library-heading h1 { font-size:clamp(30px,3.4vw,44px); }
.lesson-cover-copy { padding:25px; }
.lesson-content { padding:26px; }
.lesson-content .explanation { font-size:18px; line-height:1.8; }
#learning-answer { padding:24px; margin-top:24px; background:var(--surface-2); border-radius:18px; }
@media(max-width:480px) { .study-time { font-size:11px; padding:5px; } .library-index { max-height:220px; } .lesson-content { padding:18px; } }
