
*{box-sizing:border-box}body{margin:0;background:#111722;color:#f4f7fc;font:16px system-ui,sans-serif}button{font:inherit;cursor:pointer}button:focus-visible{outline:3px solid #b9f56c;outline-offset:4px}header{background:#1a2231;border-bottom:1px solid #354156;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 32px}.brand{font-size:25px;font-weight:900;letter-spacing:-1px}.brand span{color:#b9f56c}.demo{font-size:11px;color:#aab7ca}.avatar{border-radius:50%;background:#b9f56c;color:#152110;display:grid;place-items:center;width:38px;height:38px;font-weight:800}.layout{display:grid;grid-template-columns:180px 1fr;max-width:1400px;margin:auto}nav{padding:26px 16px;display:flex;flex-direction:column;gap:10px}nav button{background:none;color:#bfcbdd;border:0;border-radius:12px;text-align:left;padding:14px;font-weight:700}nav button.active{background:#2d3c50;color:#b9f56c}main{padding:28px 32px 50px;min-width:0;max-width:1100px;width:100%}h1{font-size:32px;letter-spacing:-.7px;margin:10px 0}h2{font-size:20px;margin:0}p{line-height:1.5;color:#bdc9db}.topline{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:24px}.sub{font-size:14px;margin:5px 0 0}.button{border:1px solid #52627b;background:#28364a;color:#f4f7fc;border-radius:10px;padding:12px 16px;font-weight:700}.primary{background:#b9f56c;color:#192311;border-color:#b9f56c}.back{background:none;color:#c4d0e3;border:0;padding:0;margin-bottom:18px;font-size:13px}.subjects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.subject{padding:0;text-align:left;color:white;background:#202b3d;border:1px solid #3b4b65;border-radius:18px;overflow:hidden}.subject:hover,.goal:hover{border-color:#b9f56c}.cover{height:155px;padding:22px;position:relative;overflow:hidden;background:#304c91}.cover.german{background:#77502b}.cover.history{background:#2b625b}.cover .subject-name{font-size:23px;font-weight:800;position:relative;z-index:1}.cover .motif{position:absolute;right:10px;bottom:-9px;font-size:92px;line-height:1.2;font-weight:900;opacity:.26;transform:rotate(-8deg)}.subject-content{padding:20px}.subject-content h2{font-size:18px;margin:0 0 10px}.subject-content p{font-size:12px;margin:8px 0 15px}.status{display:inline-block;background:#142132;color:#c0d9fa;padding:5px 8px;border-radius:6px;font-size:11px;font-weight:700}.subject-content .open{display:block;color:#b9f56c;font-size:13px;font-weight:750;margin-top:18px}.progress-label{display:flex;justify-content:space-between;gap:10px;color:#c6d2e4;font-size:12px;margin:15px 0 7px}progress{display:block;width:100%;height:7px;border:0;border-radius:8px;background:#45516a;overflow:hidden}progress::-webkit-progress-bar{background:#45516a}progress::-webkit-progress-value{background:#b9f56c}progress::-moz-progress-bar{background:#b9f56c}.subject-summary{display:flex;align-items:center;justify-content:space-between;gap:25px;margin:22px 0;background:#202b3d;border:1px solid #3b4b65;border-radius:16px;padding:20px}.subject-summary strong{font-size:21px}.subject-summary p{font-size:13px;margin:6px 0 0}.subject-summary .meter{width:210px}.subject-summary .meter b{font-size:28px}.tabs{display:flex;gap:24px;border-bottom:1px solid #40506b;margin:25px 0}.tabs button{padding:12px 0;background:none;border:0;border-bottom:3px solid transparent;color:#c0cde0;font-weight:700}.tabs button.active{color:#b9f56c;border-bottom-color:#b9f56c}.goal-list{display:grid;gap:13px}.goal{display:grid;grid-template-columns:55px 1fr 175px;align-items:center;gap:20px;width:100%;text-align:left;padding:20px;color:white;background:#202b3d;border:1px solid #3b4b65;border-radius:15px}.goal-icon{display:grid;place-items:center;background:#34486a;border-radius:13px;width:55px;height:55px;font-size:26px;font-weight:800}.goal.done .goal-icon{background:#345437;color:#b9f56c}.goal h2{font-size:19px;margin:0 0 7px}.goal .hint{font-size:12px;color:#bccae0}.goal .goal-action{color:#b9f56c;font-size:12px;font-weight:750;display:block;margin-top:12px}.goal .meter b{display:block;font-size:19px;margin-bottom:8px}.context{font-size:12px;color:#aabcdb;margin-bottom:12px}.question-panel{max-width:670px;margin:0 auto;padding:26px;background:#202b3d;border:1px solid #3b4b65;border-radius:20px}.question-panel h1{font-size:27px;margin:26px 0}.answers{display:grid;gap:12px}.answers button{display:flex;gap:16px;align-items:center;background:#2b3950;color:white;text-align:left;border:1px solid #576c8e;border-radius:12px;padding:17px;font-size:18px}.answers button:hover{border-color:#b9f56c}.answers button b{font-size:12px;border:1px solid #6e7d95;padding:5px 8px;border-radius:6px}.feedback{padding:15px;background:#2a4235;border-radius:10px;color:#d0efbc}.quiet-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}.quiet-actions button{background:none;border:1px solid #52627b;color:#d5dff0;padding:10px 14px;border-radius:9px;font-size:13px}.materials{display:grid;grid-template-columns:1fr 1fr;gap:15px}.material{padding:18px;border-radius:15px;border:1px solid #53637a;background:#202b3d;color:white;text-align:left}.paper{background:#f1eddf;color:#213650;padding:22px;border-radius:6px;min-height:150px;font-size:18px;line-height:1.8;margin-bottom:15px}.material b{display:block}.material small{display:block;color:#c0cde0;margin-top:6px}.note{color:#96a6be;font-size:11px;margin-top:30px;line-height:1.6}.empty{padding:25px;background:#202b3d;border-radius:16px}dialog{width:calc(100% - 32px);max-width:520px;background:#202b3d;color:white;border:1px solid #65758d;border-radius:18px;padding:24px}dialog::backdrop{background:#070b13c9}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:14px}.dialog-top button{border:0;background:#344258;color:white;border-radius:9px;padding:8px 12px}.dialog-actions{display:grid;gap:10px;margin-top:20px}.dialog-actions button{text-align:left}label{display:block;font-size:13px;margin:18px 0 7px}input{width:100%;padding:12px;border:1px solid #687b97;border-radius:8px;background:#151f2f;color:white;font:inherit}[hidden]{display:none!important}
@media(max-width:700px){header{padding:14px 16px}.demo{font-size:9px;max-width:120px;text-align:center}.layout{display:block}nav{flex-direction:row;padding:10px 12px;gap:6px;border-bottom:1px solid #354156;background:#1a2231}nav button{flex:1;text-align:center;padding:10px 5px;font-size:12px}main{padding:22px 16px 35px}h1{font-size:27px}.topline{align-items:flex-start;gap:10px}.topline .button{font-size:12px;padding:11px;white-space:nowrap}.sub{font-size:12px}.subjects{grid-template-columns:1fr;gap:15px}.subject{display:grid;grid-template-columns:110px 1fr}.cover{height:100%;min-height:175px;padding:18px 12px}.cover .subject-name{font-size:16px}.cover .motif{font-size:68px;bottom:5px;right:4px}.subject-content{padding:16px}.subject-content h2{font-size:17px}.subject-content p{margin:8px 0;font-size:11px}.subject-content .open{margin-top:12px}.progress-label{font-size:10px;margin-top:12px}.subject-summary{gap:15px;padding:17px}.subject-summary strong{font-size:18px}.subject-summary .meter{width:105px;flex-shrink:0}.subject-summary .meter b{font-size:25px}.subject-summary p{font-size:11px}.tabs{gap:22px;margin:22px 0}.tabs button{font-size:13px}.goal{grid-template-columns:40px 1fr;gap:12px;padding:16px}.goal-icon{width:40px;height:44px;border-radius:10px;font-size:22px}.goal h2{font-size:17px}.goal .meter{grid-column:2}.goal .meter b{font-size:14px;margin-bottom:6px}.goal .hint{font-size:11px}.question-panel{padding:20px 16px}.question-panel h1{font-size:25px}.materials{grid-template-columns:1fr}.context{font-size:11px}}

:root,body{--ink:#f4f7fc;--muted:#bdc9db;--line:#3b4b65;--paper:#111722;--accent:#b9f56c;--accent-deep:#98d44e;--accent-soft:#283e25;--green:var(--accent);--lime:var(--accent)}body[data-style=blue]{--accent:#91b7ff;--accent-deep:#6e9de9;--accent-soft:#273d60}body[data-style=mint]{--accent:#80e2c4;--accent-deep:#50c4a2;--accent-soft:#24463f}body[data-style=orange]{--accent:#ffc58c;--accent-deep:#eca463;--accent-soft:#503925}body[data-style=purple]{--accent:#c2adff;--accent-deep:#ac91f0;--accent-soft:#3f345d}body[data-style=pink]{--accent:#ffabc9;--accent-deep:#ed8db0;--accent-soft:#523344}body{background:var(--paper);color:var(--ink)}header.app-header{position:relative;height:76px;padding:18px 32px;background:#1a2231;border-bottom:1px solid var(--line);display:flex;max-width:none}header .brand{display:inline-flex;gap:3px;align-items:center;color:white;text-decoration:none}header .brand span{background:none;box-shadow:none;transform:none;color:var(--accent);font-size:25px;width:auto;height:auto;border:0}#session-label{color:var(--muted);font-size:13px}.profile-shortcut{color:var(--accent);font-size:27px;text-decoration:none}aside{position:fixed;top:76px;bottom:0;left:0;width:180px;padding:0;background:#111722;border-right:1px solid #283448;z-index:10}nav{display:flex;flex-direction:column;padding:26px 16px;margin:0;gap:10px}nav a{display:flex!important;align-items:center;gap:8px;color:#bfcbdd;background:none;padding:14px 10px;border-radius:12px;font-size:13px;font-weight:700;text-decoration:none;box-shadow:none}nav a.active{background:#2d3c50;color:var(--accent)}nav a:hover{background:#263247}nav a span{font-size:19px}.shell{margin-left:180px}main{max-width:1100px;margin:auto;padding:28px 32px 50px}footer{color:#96a6be;font-size:11px;padding:20px;text-align:center}h1,h2,h3{color:var(--ink)}a{color:var(--accent)}button,.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:inherit;background:var(--accent);color:#152110;border:1px solid var(--accent);border-radius:10px;padding:12px 16px;min-height:44px;font-weight:700;text-decoration:none;box-shadow:none;white-space:normal}button:hover,.btn:hover{filter:brightness(1.09)}button:disabled{background:#364257;color:#99a8bf;border-color:#4d5b71;cursor:default;filter:none}.secondary,.learning-action{background:#28364a;color:#f4f7fc;border:1px solid #52627b}.text-btn{background:none;color:var(--accent);border:0;box-shadow:none}.card{background:#202b3d;border:1px solid #3b4b65;border-radius:18px;padding:24px;box-shadow:none}.card.narrow,.narrow{max-width:760px}.heading{margin-bottom:25px}.heading h1{font-size:30px}.heading .eyebrow{font-size:12px;color:#aabcdb}.heading p{font-size:14px}.muted,.data-note{color:#bdc9db}input,select,textarea{background:#151f2f;color:#f4f7fc;border:1px solid #687b97;border-radius:9px;min-height:44px;font:inherit}input[type=checkbox]{min-height:0;accent-color:var(--accent);width:17px;height:17px}label{color:#d5dff0}.check-row,.checks label{color:#c5d2e6}.tag,.status{background:#142132;color:#c0d9fa;border-radius:7px}.notice,.hypothesis{background:#4b3d23;color:#ffe1a4;border:1px solid #76603a}.page-hint,.fact,.feedback{background:#263e34;color:#d0efbc;border-color:#587a5c}.pending{border-color:#d9b573}.review-goal{background:#182437;border:1px solid #52627b}.list-item{border-color:#3b4b65}.subject-search{margin:0 0 24px;max-width:460px}.subject{display:block;text-decoration:none;color:white}.subject-content .open,.goal .goal-action{color:var(--accent)}.subject-tabs{display:flex;gap:24px;border-bottom:1px solid #40506b;margin:25px 0}.subject-tabs .btn{padding:12px 0;background:none;border:0;border-bottom:3px solid transparent;color:#c0cde0;border-radius:0;font-size:14px}.subject-tabs .btn.active{border-bottom-color:var(--accent);color:var(--accent)}.practice-action{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:20px 0 24px}.practice-action h2{font-size:19px}.practice-action p{font-size:13px;max-width:540px;margin:8px 0}.practice-action>button{flex-shrink:0}.goal{text-decoration:none;min-height:112px}.goal .meter{width:100%;min-width:0}.goal-icon{flex-shrink:0}.pending-material{margin:28px 0}.pending-material h2{font-size:18px;margin-bottom:12px}.pending-link{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px;background:#313a46;color:#ffe1a4;border:1px solid #76603a;border-radius:12px;margin:8px 0;text-decoration:none;font-size:13px}.rules-details{margin:25px 0;font-size:13px;color:var(--muted)}.screen-back{display:inline-block;color:#c4d0e3;text-decoration:none;font-size:13px;margin-bottom:18px}.material-card{display:block;color:white;background:#202b3d;border:1px solid #53637a;border-radius:15px;text-decoration:none;overflow:hidden}.material-cover{height:170px;position:relative;display:grid;place-items:center;background:#34445d}.material-cover img{height:100%;width:100%;object-fit:cover}.material-cover>span{position:absolute;right:10px;bottom:10px;background:#111722e8;color:white;padding:6px 9px;border-radius:7px;font-size:12px}.material-cover>.ui-icon{height:54px;width:54px}.material-caption{padding:18px}.material-caption h2{font-size:18px}.material-caption p{font-size:12px;margin:8px 0 14px}.material-caption b{color:var(--accent);font-size:13px}.materials{grid-template-columns:repeat(3,minmax(0,1fr))}.source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:20px 0}.source-tile{display:block;background:#202b3d;border:1px solid #53637a;padding:0;color:white;overflow:hidden;text-align:left}.source-tile img{display:block;width:100%;height:140px;object-fit:cover}.source-tile span{display:block;padding:15px;font-size:13px}.profile-list{display:grid;max-width:560px;gap:12px}.profile-list>.btn,.profile-list>button{justify-content:flex-start;background:#202b3d;border:1px solid #53637a;color:#f4f7fc;padding:19px}.dialog-preview{background:#202b3d;color:white;border:1px solid #65758d;border-radius:18px;width:calc(100% - 32px);max-width:760px;padding:24px}.dialog-preview::backdrop{background:#070b13c9;backdrop-filter:blur(5px)}.dialog-preview .row h2{font-size:23px}.dialog-preview img{border-radius:10px}.style-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.style-choice{background:#28364a;color:white;border:2px solid #52627b}.style-choice.selected{border-color:var(--accent)}.style-dot{width:24px;height:24px;border-radius:50%;background:#b9f56c}.style-dot[data-swatch=blue]{background:#91b7ff}.style-dot[data-swatch=mint]{background:#80e2c4}.style-dot[data-swatch=orange]{background:#ffc58c}.style-dot[data-swatch=purple]{background:#c2adff}.style-dot[data-swatch=pink]{background:#ffabc9}.ui-icon{height:22px;width:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.photos .photo{background:#202b3d;border:1px solid #53637a;border-radius:14px;overflow:hidden;padding:0;position:relative}.photo-open{padding:0;width:100%;border:0;background:#151f2f;border-radius:0}.photos .photo img{height:170px;object-fit:cover;border-radius:0}.photos .photo p{padding:0 12px;font-size:11px}.photos .photo .row{padding:0 10px 12px}.photo-number{position:absolute;top:8px;left:8px;z-index:1;background:#111722df;color:white;border-radius:6px;padding:4px 8px;font-size:11px}.photo-remove{margin-left:auto;background:#3e2d39;color:#ffbdd1;border-color:#8d5d71;padding:8px;min-width:38px}.photo-remove svg{height:20px;width:20px;fill:none;stroke:currentColor;stroke-width:1.6}.photo-album.card{border:0;background:none;padding:0}.album-heading{margin:18px 0 12px}.album-actions{margin-top:22px}.photo-album>.text-btn{display:none}.upload-dock{background:#202b3d;border:1px solid #53637a;border-radius:16px;padding:20px;margin:20px 0}.upload-buttons{display:flex;gap:12px;flex-wrap:wrap}.upload-pick{position:relative;overflow:hidden;margin:0;cursor:pointer}.upload-pick input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0}.upload-pick:focus-within{outline:3px solid var(--accent);outline-offset:4px}.phone-upload{margin-top:14px;font-size:13px}.upload-intro{margin-top:15px}.qr-live{background:white}.library-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px}.library-toolbar p{font-size:13px}.back-link{display:inline-block;font-size:13px;margin-bottom:18px;color:#c4d0e3;text-decoration:none}.back-link .ui-icon{width:15px;height:15px}.options button{background:#2b3950;color:white;border:1px solid #576c8e;border-radius:12px;padding:17px;text-align:left;justify-content:flex-start;min-height:54px}.options button:hover{border-color:var(--accent)}.options button:disabled{background:#263144;color:#8f9db1}.round-chip{background:#2a354a;color:#c0cde0}.round-chip.current{background:var(--accent);color:#192311}.finish-icon{background:#345437;color:var(--accent)}.finish{background:#202b3d}.step{background:#243349;border-color:#52627b}.step.current{background:#314832;border-color:var(--accent)}.empty{background:#202b3d;color:white}.model-picker,.model-options{background:#151f2f;border-color:#52627b}.model-option{background:#243349;color:white}.usage-table th,.usage-table td{border-color:#52627b}.ai-settings .check-row{color:#d5dff0}.form-error{color:#ffb6bc}#toast{background:#2e4034;color:#d0efbc;border:1px solid #657a56;z-index:100;bottom:20px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}.logged-out .shell{margin:0}.logged-out .app-header,.logged-out aside{display:none!important}.login-story{background:#253f70;color:white}.login-story p{color:#d2dcf0}.login-panel{background:#202b3d}.login-panel h2{color:white}.logged-out main{max-width:1100px}.quiet-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}.quiet-actions .btn{background:none;border:1px solid #52627b;color:#d5dff0;font-size:13px}.topline .btn{flex-shrink:0}body[data-screen=exercise] .heading h1{font-size:25px}body[data-screen=exercise] .heading p{font-size:13px}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:4px}body.upload-only .shell{margin-left:0}
@media(max-width:700px){header.app-header{height:64px;padding:14px 16px;gap:12px}#session-label{font-size:11px;max-width:170px}aside{position:relative;top:auto;bottom:auto;left:auto;width:100%;height:auto;border:0;background:#1a2231}nav{position:relative;display:flex;flex-direction:row;padding:10px 12px;gap:6px;border-bottom:1px solid #354156;max-width:none;justify-content:space-between}nav a{flex:1;display:flex!important;justify-content:center;gap:5px;padding:10px 4px;font-size:11px;min-width:0;border-radius:10px}nav a span{font-size:16px}.shell{margin-left:0}main{padding:22px 16px 35px}.subjects{grid-template-columns:1fr;gap:15px}.subjects>.subject{display:grid;grid-template-columns:110px minmax(0,1fr)}.subject-content h2{overflow-wrap:anywhere}.topline{align-items:flex-start}.topline .btn{padding:11px;font-size:11px;max-width:125px}.subject-tabs{gap:20px}.subject-tabs .btn{font-size:12px}.practice-action{display:block}.practice-action>button{width:100%;margin-top:10px}.goal{grid-template-columns:40px minmax(0,1fr);gap:12px;padding:16px}.goal .meter{grid-column:2}.goal h2{font-size:17px}.goal .meter b{font-size:14px}.materials{grid-template-columns:1fr 1fr;gap:12px}.material-cover{height:130px}.material-caption{padding:13px}.material-caption h2{font-size:14px}.material-caption b{font-size:11px}.source-grid{grid-template-columns:1fr 1fr}.photos{grid-template-columns:1fr 1fr}.photos .photo img{height:140px}.card{padding:20px}.heading h1{font-size:27px}.library-toolbar h1{font-size:25px}.library-toolbar{gap:12px}.library-toolbar .tag{font-size:10px}.upload-dock{padding:16px}.upload-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}.upload-pick{font-size:12px;padding:12px 10px}.dialog-preview{padding:20px}.dialog-preview .row h2{font-size:20px}.subject-summary .meter{width:105px;flex-shrink:0}.pending-link{font-size:12px}.subject-summary strong{font-size:18px}.profile-list{width:100%}.screen-back{font-size:12px}footer{padding-bottom:20px}.heading .eyebrow{font-size:11px}.options button{font-size:16px}.goal-icon{width:40px;height:44px}.form-grid{grid-template-columns:1fr}}
.cover .subject-name{display:block;overflow-wrap:anywhere;hyphens:auto}.goal h2{overflow-wrap:anywhere}
.material-cover{overflow:hidden}.material-cover img{position:absolute;inset:0;min-height:0;min-width:0;width:100%;height:100%;object-fit:cover}
.photos .photo img,.source-tile img{object-fit:contain;background:#151f2f}
.card.narrow{margin:0 auto 24px}
@media(max-width:700px){body[data-screen=tests] .goal>b{grid-column:2;font-size:14px;color:var(--accent)}}
.login-layout{background:#202b3d}
.setup-options{margin:20px 0;color:var(--muted)}.setup-options summary{cursor:pointer;padding:12px 0;font-weight:700}.flow-loading{text-align:center}.flow-spinner{display:block;width:44px;height:44px;border:5px solid #45516a;border-top-color:var(--accent);border-radius:50%;margin:10px auto;animation:flow-spin .9s linear infinite}.flow-loading p{font-size:14px}
@keyframes flow-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.flow-spinner{animation:none}}

/* Profile: recognizable actions and evidence-based learning badges. */
.profile-hero{display:flex;align-items:center;gap:22px;margin:5px 0 32px}.profile-avatar{display:grid;place-items:center;flex-shrink:0;width:88px;height:88px;border-radius:28px;background:var(--accent);color:#142033;font-size:42px;font-weight:900;border:5px solid var(--accent-soft);box-shadow:0 0 0 2px var(--accent)}.profile-role{display:inline-block;color:var(--accent);font-size:12px;font-weight:800;margin-bottom:7px}.profile-hero h1{margin:0;font-size:32px}.profile-hero p{color:var(--muted);margin:7px 0 0;font-size:14px}.profile-tools h2,.profile-section-title h2{font-size:20px;margin:0}.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.profile-tile{display:flex;align-items:center;gap:16px;min-width:0;min-height:112px;padding:22px;border:1px solid #455875;border-radius:18px;background:#202b3d;color:var(--ink);text-decoration:none;text-align:left;justify-content:flex-start;font:inherit}.profile-tile:hover{background:#2a3950;border-color:var(--accent);filter:none}.profile-tile strong{display:block;font-size:18px}.profile-tile small{display:block;margin-top:7px;font-size:13px;font-weight:400;color:var(--muted);line-height:1.5}.profile-symbol{display:grid;place-items:center;flex-shrink:0;width:52px;height:52px;border-radius:16px;background:#32435c;font-size:28px}.profile-style{background:var(--accent-soft);border-color:var(--accent)}.profile-style .profile-symbol{background:#ffffff15}.profile-arrow{margin-left:auto;color:var(--accent);font-size:28px}.profile-swatches{display:flex;gap:5px;margin-top:10px}.profile-swatches i{width:13px;height:13px;border-radius:50%;background:#b9f56c}.profile-swatches i:nth-child(2){background:#91b7ff}.profile-swatches i:nth-child(3){background:#ffc58c}.profile-swatches i:nth-child(4){background:#ffabc9}.profile-parent{grid-column:1/-1}.profile-logout{margin-top:26px;background:transparent;color:var(--muted);border:1px solid #455875}.profile-achievements{margin:0 0 32px}.profile-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.profile-section-title>span{font-size:12px;color:var(--accent);background:var(--accent-soft);border-radius:20px;padding:7px 12px}.profile-achievements>p{font-size:13px;color:var(--muted)}.badge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.learning-badge{display:flex;flex-direction:column;align-items:center;text-align:center;padding:20px 12px;border:1px dashed #65758d;border-radius:18px;background:#192334;text-decoration:none;color:var(--ink)}.badge-medal{display:grid;place-items:center;width:64px;height:64px;border-radius:22px;background:#34425a;font-size:32px;margin-bottom:12px}.learning-badge.earned{border:1px solid var(--accent);background:var(--accent-soft)}.earned .badge-medal{background:var(--accent)}.badge-state{font-size:11px;color:var(--muted);margin:8px 0}.earned .badge-state{color:var(--accent)}.learning-badge small{font-size:12px;line-height:1.5;color:var(--muted)}.profile-tile:focus-visible,.learning-badge:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
@media(max-width:600px){.profile-hero{gap:16px;margin-bottom:26px}.profile-avatar{width:64px;height:64px;border-radius:20px;font-size:30px}.profile-hero h1{font-size:26px}.profile-grid{grid-template-columns:1fr}.profile-tile{min-height:96px;padding:17px;gap:13px}.profile-tile strong{font-size:17px}.profile-symbol{width:46px;height:46px;font-size:25px}.badge-grid{grid-template-columns:1fr}.learning-badge{display:grid;grid-template-columns:56px 1fr;align-items:center;column-gap:14px;text-align:left;padding:16px}.badge-medal{grid-row:1/4;width:56px;height:56px;margin:0;border-radius:18px}.badge-state{margin:5px 0}.profile-section-title h2{font-size:19px}}

/* Shared playful learning cards; main actions precede progress and details. */
.study-pill{display:inline-block;font-size:12px;border-radius:20px;padding:7px 10px;background:#142132;color:#d7e5fb}.learner-caption{font-size:12px;color:var(--muted)}.study-title{display:flex;align-items:center;gap:18px}.study-title>.profile-symbol{width:72px;height:72px;font-size:38px;background:var(--accent-soft);border:1px solid #536784}.study-title h1{margin:0}.study-title .sub{margin:6px 0 10px}.study-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.study-delete{color:#ffc3ce;border-color:#885b6b}.subject-tabs{display:flex;gap:10px;border:0;margin:24px 0}.subject-tabs .btn{background:#202b3d;border:1px solid #455875;padding:14px 18px;border-radius:12px;color:var(--muted)}.subject-tabs .btn.active{background:var(--accent-soft);border:1px solid var(--accent);color:var(--accent)}.subject-summary{background:#202b3d;border:1px solid #455875;border-radius:18px;padding:20px;display:flex;align-items:center;gap:16px}.subject-summary .meter{margin-left:auto}.summary-medal{display:grid;place-items:center;background:var(--accent-soft);width:52px;height:52px;border-radius:16px;font-size:28px;flex-shrink:0}.subject-summary p{font-size:13px}.practice-action{justify-content:flex-start;border:1px solid #455875;background:#202b3d;padding:20px;border-radius:18px}.practice-action h2{margin:0}.practice-action p{margin-bottom:0}.goal{background:#202b3d;border:1px solid #455875;border-radius:18px;box-shadow:none}.goal:hover{border-color:var(--accent);background:#28374c}.goal-icon{background:var(--accent-soft);border-radius:16px;font-size:25px}.goal.done{border-color:var(--accent)}.goal .hint{display:inline-block;border-radius:20px;background:#142132;padding:5px 9px;font-size:11px;margin-top:6px}.goal .goal-action{display:block;margin-top:10px}.setup-route{display:flex;gap:10px;max-width:760px;margin:0 auto 18px}.setup-route>span{display:flex;align-items:center;gap:8px;padding:12px;background:#202b3d;border:1px solid #455875;border-radius:12px;flex:1;color:var(--muted);font-size:13px}.setup-route>span.current{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}.setup-route b{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#34445c}.quiz-card{border:1px solid #536784;padding:26px}.quiz-card .question{font-size:27px;line-height:1.4;margin:18px 0 24px}.quiz-card .options{display:grid;gap:12px}.quiz-card .choice-answer{gap:16px;padding:14px;border-radius:15px;min-height:66px;align-items:center}.answer-letter{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;background:var(--accent-soft);color:var(--accent);border:1px solid #536784;border-radius:12px;font-weight:800}.quiz-card button:disabled .answer-letter{background:#344257;color:#afbdd0}.quiz-card [data-next],.quiz-card [data-open-answer]{width:100%;margin-top:18px}.quiz-card .feedback{border-radius:15px;padding:20px;margin-top:20px}.round-chip{border:1px solid #536784;border-radius:20px}.finish-icon{border:2px solid var(--accent);border-radius:24px}.first-material{border:1px dashed #65758d}.study-actions button,.study-actions .btn{min-height:48px}
@media(max-width:700px){.study-title{gap:14px}.study-title>.profile-symbol{width:54px;height:54px;font-size:28px}.study-title h1{font-size:27px}.study-actions{display:grid;grid-template-columns:1fr 1fr}.study-actions>[data-start]{grid-column:1/-1}.study-actions button,.study-actions .btn{padding:11px 8px;font-size:12px}.subject-tabs{gap:6px}.subject-tabs .btn{flex:1;padding:12px 5px;font-size:11px;min-width:0}.subject-summary{padding:16px;gap:12px;flex-wrap:wrap}.subject-summary>.summary-medal{width:40px;height:40px;font-size:23px}.subject-summary>div:not(.meter){flex:1}.subject-summary .meter{width:100%;flex-basis:100%;margin:0;display:flex;gap:12px;align-items:center}.subject-summary .meter progress{flex:1}.subject-summary .meter b{font-size:20px}.practice-action{display:flex;padding:16px;gap:12px}.practice-action .profile-symbol{width:40px;height:40px;font-size:23px}.practice-action h2{font-size:17px}.setup-route{gap:6px}.setup-route>span{padding:10px 6px;font-size:11px;gap:6px}.setup-route b{width:20px;height:22px}.quiz-card{padding:18px}.quiz-card .question{font-size:23px}.quiz-card .choice-answer{font-size:16px;gap:12px}.rounds{gap:6px;flex-wrap:wrap}.round-chip{font-size:11px;padding:7px 10px}}

/* Compact navigation and mobile cards. */
nav a{border-left:3px solid #53637a;border-radius:10px}nav a:hover,nav a.active{border-left-color:var(--accent);color:var(--accent);background:#2d3c50}.nav-trash{justify-content:center;width:44px;min-height:44px;padding:8px}.nav-trash span{font-size:23px}
@media(max-width:700px){nav{gap:6px;padding:8px 10px}nav a:not(.nav-trash){flex:1 1 auto;white-space:nowrap;padding:10px 7px;font-size:12px;min-height:44px;gap:0}nav a:not(.nav-trash)>span{display:none}nav a.nav-trash{flex:0 0 40px;width:40px;min-height:44px;padding:8px 4px}nav a.nav-trash span{font-size:23px}.topline{gap:12px}.topline h1{font-size:26px}.topline>.btn{white-space:nowrap;max-width:none;padding:10px 12px;min-height:44px;font-size:12px}.badge-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.learning-badge{display:flex;flex-direction:column;text-align:center;padding:12px 6px;gap:0;min-width:0}.badge-medal{width:38px;height:38px;font-size:23px;border-radius:12px;margin-bottom:8px}.learning-badge strong{font-size:12px;line-height:1.4}.badge-state{font-size:10px;margin:6px 0}.learning-badge small{font-size:10px;line-height:1.4}.profile-achievements{margin-bottom:24px}}
@media(max-width:360px){nav{gap:4px;padding:8px}nav a:not(.nav-trash){padding:10px 5px;font-size:11px}.topline h1{font-size:23px}.topline>.btn{font-size:11px;padding:10px}.badge-grid{gap:5px}}

nav a.nav-trash{width:auto;justify-content:flex-start;padding:14px 10px}nav a.nav-trash .nav-trash-label{font-size:13px}.btn>.ui-icon{flex-shrink:0;width:18px;height:18px}
@media(max-width:700px){nav a.nav-trash{width:40px;justify-content:center;padding:8px 4px}nav a.nav-trash .nav-trash-label{display:none}}

/* Approved rayli-concept.html cards: preserve source layout on desktop and mobile. */
.subjects>.subject{font-weight:400}.subjects .status{padding:5px 8px;border-radius:6px;font-size:11px;font-weight:700}.subjects progress{margin:0;height:7px}.subjects .subject:hover{border-color:var(--accent)}

.profile-shortcut{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;border-radius:10px}.profile-shortcut .ui-icon{width:26px;height:26px}.profile-shortcut:hover{background:#2d3c50}
@media(max-width:700px){nav a[href="#profile"]{gap:6px}nav a[href="#profile"] .ui-icon{width:18px;height:18px;flex-shrink:0}}

/* Same subject identity in both overview routes. */
.test-subject{border-left:6px solid var(--subject-color)}.test-subject .goal-icon{background:var(--subject-color);color:#fff;font-size:26px}.test-subject>div{min-width:0}.test-subject .hint{overflow-wrap:anywhere}

.test-card-menu{display:none}@media(min-width:701px){.test-subject{grid-template-columns:55px minmax(0,1fr) 175px 24px}.test-card-menu{display:block;color:var(--accent);width:24px;height:24px}}

nav a.nav-add{display:none!important}@media(max-width:700px){nav a.nav-add{display:flex!important;align-items:center;justify-content:center;gap:6px;border-left-width:0;line-height:1;text-align:center}nav a.nav-add .ui-icon{width:18px;height:18px;flex-shrink:0}nav a.nav-add>.nav-add-label{display:inline;font-size:inherit;transform:translateX(-3px)}nav a[href="#profile"]{display:none!important}.topline>a[href="#new"]{display:none}}

.search-toggle,.search-close{display:none}
@media(max-width:700px){.library-heading{position:relative;overflow:clip}.library-heading .topline{padding-top:0;min-height:54px}.library-heading h1{padding-right:48px}.search-toggle{display:flex;position:absolute;right:0;top:0;width:44px;height:44px;padding:10px;background:none;border:1px solid #52627b;color:var(--accent)}.library-search-panel{position:absolute;top:0;left:0;right:0;display:flex;gap:6px;align-items:center;background:var(--paper);transform:translateX(20%);opacity:0;visibility:hidden;pointer-events:none;transition:transform .24s ease,opacity .24s ease,visibility .24s}.library-search-panel .subject-search{width:100%;min-width:0;max-width:none;margin:0;height:46px}.search-close{display:flex;flex-shrink:0;width:44px;height:44px;padding:10px;background:none;border:1px solid #52627b;color:var(--accent)}.search-open .library-search-panel{transform:translateX(0);opacity:1;visibility:visible;pointer-events:auto}.search-open .search-toggle{visibility:hidden}.search-open h1{visibility:hidden}}
@media(prefers-reduced-motion:reduce){.library-search-panel{transition:none}}

@media(max-width:700px){nav a.nav-add,nav a.nav-add:hover,nav a.nav-add.active{background:var(--accent);color:#152110;border-left-color:var(--accent)}}

/* One progress/start card, followed by compact material management. */
.subject-summary.learning-next{display:grid;grid-template-columns:52px minmax(0,1fr) 210px;gap:16px;margin:20px 0}.learning-next .learning-next-copy{min-width:0}.learning-next .meter{width:100%;margin:0}.learning-next-action{grid-column:2/-1;justify-self:stretch;min-height:48px}.study-actions.study-tools{display:flex;flex-wrap:nowrap;gap:10px}.study-tools .square-action{width:48px;height:48px;min-width:48px;padding:12px;flex-shrink:0}.study-tools>[data-album-compose]{min-width:0}.study-tools .ui-icon{flex-shrink:0}
@media(max-width:700px){.subject-summary.learning-next{grid-template-columns:40px minmax(0,1fr);gap:12px;padding:16px}.learning-next .meter{grid-column:1/-1;display:flex;width:100%;gap:12px;align-items:center}.learning-next-action{grid-column:1/-1;width:100%;font-size:14px}.study-actions.study-tools{gap:8px}.study-tools>[data-album-compose]{flex:1;padding:10px 8px;font-size:12px}.study-tools .square-action{width:48px;min-width:48px;height:48px;padding:10px}}

.study-title>.subject-identity{color:#fff;font-weight:900;border-color:#ffffff26}
.study-title>.subject-identity{align-self:stretch;height:auto;min-height:72px}@media(max-width:700px){.study-title>.subject-identity{min-height:54px}}

.compact-subject{display:grid;grid-template-columns:150px minmax(0,1fr);background:#202b3d;border:1px solid #3b4b65;border-radius:18px;overflow:hidden;margin:0 0 20px}.compact-subject-cover{position:relative;overflow:hidden;padding:16px;min-height:112px}.compact-subject-cover h1{font-size:19px;line-height:1.3;letter-spacing:0;margin:0;position:relative;z-index:1;overflow-wrap:anywhere}.compact-subject-cover>span{position:absolute;right:8px;bottom:-4px;font-size:62px;line-height:1.1;font-weight:900;opacity:.26;transform:rotate(-8deg)}.compact-subject-content{padding:18px;align-self:center;min-width:0}.compact-subject-content h2{font-size:20px;margin:0 0 10px;overflow-wrap:anywhere}.compact-subject-content .status{display:inline-block;font-size:11px;padding:5px 8px;font-weight:700}
@media(max-width:700px){.compact-subject{grid-template-columns:110px minmax(0,1fr)}.compact-subject-cover{min-height:112px;padding:14px 12px}.compact-subject-cover h1{font-size:16px}.compact-subject-cover>span{font-size:56px}.compact-subject-content{padding:14px 16px}.compact-subject-content h2{font-size:17px}}

@media(max-width:700px){nav a.nav-add{flex:0 0 auto;padding-left:14px;padding-right:14px}}
.theme-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.style-dialog h3{margin:22px 0 12px}
body[data-theme=light]{color-scheme:light;--paper:#f3f5fa;--ink:#18283e;--muted:#475c75;--line:#ccd5e2;--accent-text:#426411;--accent-soft:#e5efdb;background:var(--paper);color:var(--ink)}
body[data-theme=light][data-style=blue]{--accent-text:#2458a5;--accent-soft:#e2ebfb}body[data-theme=light][data-style=mint]{--accent-text:#17664f;--accent-soft:#dff3eb}body[data-theme=light][data-style=orange]{--accent-text:#885019;--accent-soft:#faebdb}body[data-theme=light][data-style=purple]{--accent-text:#65429c;--accent-soft:#eee7fa}body[data-theme=light][data-style=pink]{--accent-text:#963d5b;--accent-soft:#fae5ed}
body[data-theme=light] :is(.app-header,aside,nav){background:#fff;border-color:var(--line)}
body[data-theme=light] :is(.brand,.brand span,h1,h2,h3){color:var(--ink)}
body[data-theme=light] :is(p,.muted,.data-note,.sub,label,.hint,.context,.learner-caption,.badge-state,footer,#session-label){color:var(--muted)}
body[data-theme=light] :is(nav a,.screen-back,.back-link,.text-btn,.profile-shortcut,.open,.goal-action,.profile-arrow,.subject-content .open,.goal .goal-action){color:var(--accent-text)}
body[data-theme=light] :is(nav a:hover,nav a.active){background:var(--accent-soft);color:var(--accent-text)}
body[data-theme=light] :is(.card,.subject,.compact-subject,.subject-summary,.goal,.practice-action,.profile-tile,.learning-badge,.material-card,.photo-album,.upload-dock,.quiz-card,.question-panel,.dialog-preview,.style-dialog,.finish,.pending-material,.first-material){background:#fff;color:var(--ink);border-color:var(--line)}
body[data-theme=light] :is(.subject:hover,.goal:hover,.profile-tile:hover){background:#f8faff;border-color:var(--accent-text)}
body[data-theme=light] :is(.cover .subject-name,.compact-subject-cover h1,.compact-subject-cover>span,.cover .motif){color:#fff}
body[data-theme=light] :is(.secondary,.learning-action,.subject-tabs .btn,.style-choice,.quiet-actions .btn,.options button,.source-tile,.profile-logout,.material,.step){background:#edf1f7;color:var(--ink);border-color:#b9c6d7}
body[data-theme=light] :is(.style-choice.selected,.subject-tabs .btn.active){background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-text)}
body[data-theme=light] :is(input,select,textarea,.model-options,.model-picker){background:#fff;color:var(--ink);border-color:#9cacc1}
body[data-theme=light] :is(.profile-symbol,.summary-medal,.goal-icon,.badge-medal,.answer-letter){background:var(--accent-soft);color:var(--accent-text)}
body[data-theme=light] :is(.status,.study-pill,.goal .hint,.round-chip,.tag){background:#e7edf5;color:#304967}
body[data-theme=light] :is(.progress-label,.goal .hint,.subject-content p,.profile-tile small,.learning-badge small,.material-caption p,.rules-details,.heading .eyebrow){color:var(--muted)}
body[data-theme=light] :is(.profile-tile strong,.learning-badge strong,.profile-section-title h2){color:var(--ink)}
body[data-theme=light] .study-delete{background:#fff0f2;color:#a22c45;border-color:#daa0ab}
body[data-theme=light] :is(.search-toggle,.search-close){color:var(--accent-text);border-color:#9cacc1}
body[data-theme=light] .photos .photo{background:#fff;border-color:var(--line)}
body[data-theme=light] .feedback{background:#e5f3e9;color:#245237}
body[data-theme=light] :is(.notice,.hypothesis){background:#fff3d7;color:#6b4a16}
body[data-theme=light] .profile-style{background:var(--accent-soft)}
body[data-theme=light] .badge-count{background:var(--accent-soft);color:var(--accent-text)}
body[data-theme=light] .profile-role{color:var(--accent-text)}
body[data-theme=light] .quiz-card button:disabled{background:#e4e9f0;color:#58697d}
@media(max-width:700px){body[data-theme=light] nav a.nav-add{background:var(--accent);color:#152110}}
body[data-theme=light] .profile-section-title>span{color:var(--accent-text)}body[data-theme=light] .profile-shortcut:hover{background:var(--accent-soft)}body[data-theme=light] .round-chip.current{background:var(--accent);color:#152110}body[data-theme=light] .study-tools .study-delete{background:#fff0f2;color:#a22c45;border-color:#daa0ab}

.quiz-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}.quiz-top h1{font-size:27px;margin:0}.quiz-pause{width:44px;height:44px;min-width:44px;padding:10px}.quiz-help{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:10px}.quiz-help .text-btn{font-size:13px;min-height:44px;padding:8px 10px}.quiz-help .page-hint{flex-basis:100%;margin:0;padding:10px}.quiz-help .page-hint p{margin:5px 0}.quiz-paused{padding:24px;text-align:center}.quiz-card .question{font-size:24px;line-height:1.3;margin:16px 0}.quiz-card .options{gap:8px}.quiz-card .choice-answer{min-height:48px;padding:9px 12px;border-radius:12px}.quiz-card .answer-letter{width:30px;height:30px;border-radius:9px}.quiz-card .feedback{padding:12px;margin-top:10px}.quiz-card .feedback p{margin:6px 0}.quiz-card [data-next],.quiz-card [data-open-answer]{margin-top:10px}.quiz-card textarea{min-height:88px;height:100px}.quiz-card #save-state{margin:5px 0}
@media(max-width:700px){body[data-screen=exercise] main{padding:12px 16px 16px}body[data-screen=exercise] .screen-back{margin-bottom:10px;font-size:11px}body[data-screen=exercise] footer{display:none}.quiz-top{margin-bottom:10px}.quiz-top h1{font-size:24px}.quiz-card{padding:14px;margin-bottom:0}.quiz-card .question{font-size:21px;margin:12px 0;line-height:1.3}.quiz-card progress{margin:10px 0}.quiz-card .choice-answer{font-size:16px;gap:10px}.quiz-card .feedback{font-size:13px}.quiz-card .tiny{font-size:11px}}
.quiz-card .options{margin:0}.quiz-card .feedback{margin-bottom:0}.quiz-card .feedback details{margin-top:6px}.quiz-card .feedback summary{padding:4px 0}
@media(max-width:700px) and (max-height:760px){body[data-screen=exercise] main{padding-top:8px;padding-bottom:8px}body[data-screen=exercise] .screen-back{margin-bottom:6px}.quiz-top{margin-bottom:6px}.quiz-card{padding:12px}.quiz-card .question{margin:8px 0}.quiz-card .options{gap:6px}}

/* Graded choices retain feedback while disabled. */
body .quiz-card :is(.choice-answer,.timeline-slot,.format-choice).answer-correct{background:#194d35;color:#e7fff0;border-color:#53d990;opacity:1}
body .quiz-card :is(.choice-answer,.timeline-slot,.format-choice).answer-wrong{background:#672d39;color:#fff0f2;border-color:#ff8092;opacity:1}
body .quiz-card :is(.choice-answer,.timeline-slot,.format-choice).answer-correct .answer-letter{background:#28764c;color:#fff;border-color:#53d990}
body .quiz-card :is(.choice-answer,.timeline-slot,.format-choice).answer-wrong .answer-letter{background:#993c50;color:#fff;border-color:#ff8092}
body[data-theme=light] .quiz-card :is(.choice-answer,.timeline-slot,.format-choice).answer-correct{background:#d5f4df;color:#14532d;border-color:#24834b}
body[data-theme=light] .quiz-card :is(.choice-answer,.timeline-slot,.format-choice).answer-wrong{background:#ffe0e5;color:#8e2038;border-color:#b63850}
body .quiz-pause{color:var(--accent)}
body[data-theme=light] .quiz-pause{color:var(--accent-text)}

.quiz-card{touch-action:pan-y}
.quiz-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0}
.quiz-position{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:1}
body .quiz-card .quiz-arrow{display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:8px;border:1px solid #536784;border-radius:8px;background:transparent;color:var(--accent);box-shadow:none}
.quiz-arrow svg{width:16px;height:16px;fill:currentColor}
body .quiz-card .quiz-arrow:disabled{background:transparent;color:var(--muted);opacity:.25}
body .quiz-card .quiz-arrow:not(:disabled):hover{background:var(--accent-soft)}
body[data-theme=light] .quiz-card .quiz-arrow{color:var(--accent-text)}
.quiz-card{user-select:none}.quiz-card textarea,.quiz-card input{user-select:text}

.quiz-card [data-next]{margin-top:22px}

/* Feedback conveys the result; hints use the chosen appearance accent. */
body .quiz-card .feedback,body .quiz-card .page-hint{background:var(--accent-soft);border-left:4px solid var(--accent);color:var(--ink)}
body .quiz-card .feedback[data-result=correct]{background:#243e32;border-color:#65ad83;color:#e1f5e8}
body .quiz-card .feedback[data-result=incorrect]{background:#492e38;border-color:#df8295;color:#ffe3e9}
body .quiz-card .feedback summary{color:inherit}
body[data-theme=light] .quiz-card .feedback[data-result=correct]{background:#e5f3e9;border-color:#39865a;color:#245237}
body[data-theme=light] .quiz-card .feedback[data-result=incorrect]{background:#fbe6eb;border-color:#b7556c;color:#7d293d}

body .quiz-card .quiz-arrow.quiz-arrow-ready{border-color:var(--accent)}

.finish-screen .compact-subject{margin-bottom:16px}.finish-screen .compact-subject-cover strong{position:relative;z-index:1;font-size:15px;color:white}
.finish-summary{text-align:left}.finish-heading{display:flex;align-items:center;gap:14px}.finish-check{display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;border-radius:14px;border:1px solid var(--accent);background:var(--accent-soft);color:var(--accent);font-size:30px}.finish-heading h1{font-size:28px;margin:0 0 6px;letter-spacing:-.6px}.finish-heading p{margin:0;color:var(--muted);font-size:14px}
.finish-results{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0 12px}.finish-results>div{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.finish-results strong{display:block;font-size:26px;line-height:1.2}.finish-results small{font-size:16px;color:var(--muted)}.finish-results span{font-size:12px;color:var(--muted)}.finish-retry{font-size:13px;color:var(--muted);margin:0 0 18px}
.finish-progress{padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.finish-progress .row{font-size:15px}.finish-progress p,.finish-next p{font-size:13px;color:var(--muted);margin:6px 0 0}.finish-progress progress{margin:10px 0}.finish-next{margin:16px 0}.finish-next b{font-size:14px}.finish-home{width:100%;margin-top:4px}
body[data-theme=light] .finish-check{color:var(--accent-text)}
@media(max-width:700px){body[data-screen=finish] main{padding:12px 16px 16px}body[data-screen=finish] .screen-back{margin-bottom:12px;font-size:11px}.finish-screen .compact-subject{margin-bottom:12px}.finish-summary{padding:16px}.finish-heading h1{font-size:24px}.finish-heading p{font-size:12px}.finish-results{margin-top:16px}.finish-progress{padding:12px 0}.finish-next{margin:12px 0}body[data-screen=finish] footer{display:none}}

.finish-gain{display:inline-block;font-size:13px;font-weight:700;padding:5px 9px;border-radius:8px;background:var(--paper);color:var(--muted);margin:0 0 4px}.finish-gain.positive{background:var(--accent-soft);color:var(--accent)}body[data-theme=light] .finish-gain.positive{color:var(--accent-text)}

.finish-progress .finish-gain{margin:0;padding:3px 7px;white-space:nowrap}.finish-progress .row{gap:8px}

.study-card-state{display:block;font-size:12px;color:var(--muted);margin:10px 0 5px}.learning-next-action.btn{display:flex}

progress.learning-progress::-webkit-progress-value{background:hsl(var(--progress-hue) 72% 64%)}
progress.learning-progress::-moz-progress-bar{background:hsl(var(--progress-hue) 72% 64%)}
body[data-theme=light] progress.learning-progress::-webkit-progress-value{background:hsl(var(--progress-hue) 68% 40%)}
body[data-theme=light] progress.learning-progress::-moz-progress-bar{background:hsl(var(--progress-hue) 68% 40%)}
.finish-summary .finish-home+.finish-home{margin-top:8px}

/* Both methods share the existing subject progress and visual language. */
.study-methods{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}.study-methods .btn{min-width:0;text-align:center;justify-content:center}
.study-heading,.study-pager{display:flex;align-items:center;justify-content:space-between;gap:12px}.study-heading h1{margin:5px 0 12px}.study-pager{margin:18px 0 12px}.study-pager>span{text-align:center;font-size:13px;color:var(--muted);flex:1}:is(.study-pager,.subject-content) .square-action{flex:0 0 38px;width:38px;height:38px;padding:8px;color:var(--accent)}
.study-card h2{margin:0 0 14px}.study-card blockquote,.study-dialog blockquote{margin:0 0 16px;padding:10px 14px;border-left:3px solid var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent);border-radius:8px}.study-card mark{background:transparent;color:var(--text);font-weight:700}.study-explanation{white-space:pre-line;line-height:1.6}.study-source{margin-top:20px}.study-source summary{cursor:pointer;color:var(--accent);font-weight:700;padding:10px 0}.study-photo-button{display:block;padding:0;margin:10px 0 0;width:100%;background:transparent;border:0}.study-photo{position:relative;line-height:0;overflow:hidden;border-radius:10px}.study-photo img{display:block;width:100%;height:auto;max-height:none!important;margin:0!important}.study-highlight{position:absolute;border:2px solid #d79c00;background:rgba(255,222,0,.22);pointer-events:none}.study-bottom{display:flex;gap:10px;flex-wrap:wrap}.study-bottom>*{flex:1;text-align:center;justify-content:center}.explain-action{margin:10px 0;display:inline-flex}.study-dialog{max-width:850px}.study-dialog .study-photo{margin:16px 0}.study-dialog .row{align-items:center}
@media(max-width:600px){.study-methods{gap:8px}.study-methods .btn{padding:12px 8px;font-size:13px}.study-card{padding:18px}.study-bottom{display:grid;grid-template-columns:1fr}.study-screen .back-link{margin-bottom:16px}.study-heading h1{font-size:24px}}

.study-card .page-hint{background:color-mix(in srgb,var(--accent) 12%,transparent);border-color:var(--accent)}.study-card .page-hint b{color:var(--accent)}

.study-methods .method-mobile{display:none}
@media(max-width:600px){.study-methods .method-desktop{display:none}.study-methods .method-mobile{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}.study-methods .ui-icon{width:20px;height:20px;flex:0 0 20px}}

/* Identical learning actions at every screen width. */
.study-methods .method-desktop{display:none}.study-methods .method-mobile{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}.study-methods .ui-icon{width:20px;height:20px;flex:0 0 20px}

.study-bottom .study-quiz-action,.study-bottom .study-quiz-action:hover,.study-bottom .study-quiz-action:focus-visible{display:inline-flex;align-items:center;gap:8px;background:transparent;color:var(--accent);border:1px solid var(--accent);white-space:nowrap}.study-quiz-action .ui-icon{width:20px;height:20px;flex:0 0 20px}
@media(min-width:901px){.subject-controls{display:flex;align-items:center;gap:20px;margin:20px 0 24px}.subject-controls .study-tools,.subject-controls .subject-tabs{margin:0;flex-wrap:nowrap}.subject-controls .subject-tabs .btn{white-space:nowrap}}

.pending-link .pending-thumb{width:48px;height:56px;object-fit:contain;object-position:center;background:#fff;border-radius:6px;flex:0 0 48px}.pending-link .pending-copy{flex:1;min-width:0}.pending-link>b{flex-shrink:0}.pending-link{gap:12px}@media(max-width:600px){.pending-link{gap:9px;padding:10px}.pending-link .pending-thumb{width:40px;height:48px;flex-basis:40px}.pending-link small{line-height:1.5}}

/* Compact mobile gallery; desktop retains the existing cards. */
@media(max-width:600px){
 .photos{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .photos[data-draft=true]{grid-template-columns:repeat(2,minmax(0,1fr))}
 .photos .photo{border-radius:8px}
 .photos .photo .photo-open{display:block;aspect-ratio:1;padding:0;min-height:0}
 .photos .photo .photo-open img{display:block;width:100%;height:100%;padding:4px;box-sizing:border-box;object-fit:contain}
 .photos .photo>p{display:none}
 .photos .photo .row{padding:0 3px;margin:0;gap:2px;min-height:44px;justify-content:flex-end;flex-wrap:nowrap}
 .photos .photo .row button{padding:8px;min-height:40px;min-width:36px;margin-top:0;margin-bottom:0}
 .photos .photo .photo-remove{border:0;background:transparent}
 .photos .photo .photo-number{top:4px;left:4px;padding:2px 5px;font-size:10px}
 .materials{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .material-card{border-radius:8px}.material-cover{height:auto;aspect-ratio:1}
 .material-cover img{object-fit:contain}.material-cover>span{font-size:10px;padding:3px 5px}
 .material-caption{padding:8px}.material-caption h2{font-size:12px;overflow-wrap:anywhere;margin:0}
 .material-caption p{font-size:10px;margin:5px 0}.material-caption b{font-size:10px}
 .source-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.source-tile img{height:auto;aspect-ratio:1;object-fit:contain}.source-tile span{padding:8px 5px;font-size:10px}
}

/* Shared action contract for subject, topic, learning, feedback, pause and finish. */
@media(max-width:700px){.subjects .study-card-state,.subjects .subject-open-label{display:none}.subjects .subject-content{position:relative}.subjects .subject-content .open{position:absolute;right:13px;bottom:10px;margin:0;font-size:22px;line-height:1}.subjects .subject-content .progress-label{margin-right:28px}.subjects .subject-content progress{width:calc(100% - 28px)}}
.admin-ai-section{align-self:start}.admin-ai-section>summary{cursor:pointer;font-size:18px;font-weight:700}.admin-ai-section[open]>summary{margin-bottom:20px}
.cover .roman-motif,.compact-subject-cover>.roman-motif{font-family:Georgia,'Times New Roman',serif;font-weight:700;letter-spacing:-.06em}
body[data-theme] .learning-action:is(a,button),body[data-theme] .learning-action:is(a,button):hover,body[data-theme] .learning-action:is(a,button):focus-visible{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--learning-action-color,var(--accent));outline-color:var(--learning-action-color,var(--accent));white-space:nowrap}.learning-action .ui-icon{width:20px;height:20px;flex:0 0 20px;color:var(--learning-action-color,var(--accent))}
.learning-action>span{text-transform:uppercase}
.learning-action-learn .ui-icon{position:absolute;left:15px;top:50%;transform:translateY(-50%)}

body[data-theme=light]{--learning-action-color:var(--accent-text)}
body[data-theme=light] :is(.study-source summary,.study-card .page-hint b,.study-pager .square-action,.subject-content .square-action){color:var(--accent-text)}
.subjects>.subject>.cover{height:auto;min-height:0;padding:14px 16px}.subjects .cover .subject-name{padding-right:62px;overflow-wrap:normal;hyphens:none;line-height:1.35}.subjects .cover .motif{font-size:46px;right:12px;bottom:-7px}
@media(max-width:700px){.subjects>.subject{grid-template-columns:minmax(0,1fr)}.subjects .subject-content{padding:16px}}
@media(max-width:700px){body[data-theme] :is(.subjects>.subject,.compact-subject){border-color:var(--subject-color);border-left:6px solid var(--subject-color);background:linear-gradient(135deg,color-mix(in srgb,var(--subject-color) 32%,#202b3d),#202b3d 85%)}:is(.subjects>.subject>.cover,.compact-subject-cover){background-image:none!important}.subjects .cover .motif{opacity:.4}body[data-theme=light] :is(.subjects>.subject,.compact-subject){background:linear-gradient(135deg,color-mix(in srgb,var(--subject-color) 12%,white),white 85%)}body[data-theme] .subjects>.subject:hover{border-color:var(--subject-color)}.compact-subject{grid-template-columns:minmax(0,1fr)}.compact-subject-cover{min-height:0;padding:14px 16px}.compact-subject-cover :is(h1,strong){display:block;font-size:16px;line-height:1.35;padding-right:62px;overflow-wrap:normal;hyphens:none}.compact-subject-cover>span{font-size:46px;right:12px;bottom:-7px;opacity:.4}.compact-subject-content{padding:16px}}

/* One visible calendar in every browser, without taking away typed dates. */
.date-entry{position:relative}.date-entry input{padding-right:54px;color-scheme:dark;border-width:2px;appearance:none}.date-entry input::-webkit-calendar-picker-indicator{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none;width:0;height:0;margin:0;padding:0}.date-entry .date-toggle{position:absolute;right:2px;top:2px;bottom:2px;width:46px;padding:0;border:0;background:transparent;color:inherit;display:grid;place-items:center;border-radius:8px}.date-toggle:hover{background:var(--accent-soft,#2d3c50)}
.date-calendar{margin-top:10px;padding:12px;border:3px solid #52627b;border-radius:12px;background:#202b3d;color:#f4f7fc;max-width:350px}.date-calendar[hidden]{display:none}.date-month{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.date-month strong{font-size:15px;text-transform:capitalize}.date-calendar button{background:transparent;color:inherit;border:1px solid transparent;border-radius:8px;padding:0;min-height:36px;font:inherit}.date-month button{width:36px;font-size:26px}.date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.date-days span{font-size:12px;padding:4px 0;color:inherit}.date-days button{width:100%;font-size:14px}.date-calendar button:hover:not(:disabled){border-color:currentColor}.date-days button[aria-pressed=true]{background:var(--accent-soft,#2d3c50);border-color:var(--accent-text,var(--accent));font-weight:800}.date-days button:disabled{opacity:.3;cursor:default}.date-calendar .date-close{display:block;margin:8px 0 0 auto;padding:4px 10px;font-size:13px}body[data-theme=light] .date-calendar{background:#fff;color:var(--ink);border-color:var(--line)}body[data-theme=light] .date-entry input{color-scheme:light}

.acting-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 16px}.acting-banner p{margin:4px 0 0}.acting-banner button{flex-shrink:0}@media(max-width:700px){.acting-banner{flex-direction:column;align-items:stretch}.acting-banner button{width:100%}}

.subject-content .subject-open-button{display:none}
@media(max-width:700px){.subjects .subject-open-arrow{display:none}.subjects .subject-open-button{display:inline-flex;font-size:16px}.subjects .subject-content .open{bottom:10px}.subjects .subject-content .progress-label{margin-right:48px}.subjects .subject-content progress{width:calc(100% - 48px)}}

.reading-actions{display:flex;justify-content:center;gap:10px}.reading-actions>.btn,.reading-actions>button{flex:1;min-width:0;padding:12px 8px}

.flow-loading .reading-time{font-size:12px;color:var(--muted);margin:8px 0 0}

/* Keep assignment headings compact on every screen size. */
.compact-subject-content h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}

.app-header .brand{gap:8px;white-space:nowrap}.buddy-logo{width:30px;height:30px;flex-shrink:0;transform:rotate(-8deg);fill:none;stroke:var(--accent);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.buddy-logo circle{fill:var(--accent);stroke:none}

header.app-header{gap:12px}#session-label{margin-left:auto;font-size:15px;text-align:right;min-width:0}@media(max-width:700px){#session-label{font-size:14px}}

.buddy-title{display:flex;align-items:center;gap:10px}.buddy-helper{width:25px;height:25px}.text-btn .buddy-helper{width:21px;height:21px}.buddy-preparing .buddy-helper{width:36px;height:36px}.study-card .buddy-helper{width:29px;height:29px}

.quiz-screen{overflow-x:clip}

.round-review .subject-tabs{margin:18px 0}.round-answer{padding:0;text-align:left;margin-bottom:12px}.round-answer>summary{display:flex;flex-direction:column;gap:8px;padding:18px;cursor:pointer;font-weight:700;list-style:none}.round-answer>summary::after{content:'Bekijk antwoord en uitleg ▾';font-size:12px;color:var(--accent)}.round-answer[open]>summary::after{content:'Sluiten ▴'}.round-answer-status{font-size:13px;color:var(--accent)}.round-answer[data-review-result=incorrect] .round-answer-status{color:#ffc3ce}.round-answer-content{padding:0 18px 18px;border-top:1px solid var(--line)}.round-answer-content h3{font-size:14px;margin:16px 0 6px}.round-answer-content p{white-space:pre-wrap;overflow-wrap:anywhere}.round-review>.btn{margin:12px 8px 0 0}.round-history-link{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:10px;text-align:left}.round-history-link span{font-size:12px;color:var(--muted)}body[data-theme=light] .round-answer[data-review-result=incorrect] .round-answer-status{color:#a51c3b}

.buddy-chat{padding-bottom:16px}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.chat-heading h1{font-size:28px;margin:0 0 16px}.chat-heading .buddy-helper{width:34px;height:34px}.chat-topic{padding:16px;position:sticky;top:8px;z-index:2}.chat-topic label{font-size:13px}.chat-topic select{width:100%;min-width:0}.chat-topic-name{font-weight:700;margin:12px 0 4px;overflow-wrap:anywhere}.chat-topic .tiny{margin:4px 0 0}.chat-messages{display:flex;flex-direction:column;gap:24px;margin:24px 0}.chat-turn{display:flex;flex-direction:column;gap:14px}.chat-bubble{border:1px solid var(--line);border-radius:18px;padding:16px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.chat-user{align-self:flex-end;background:var(--accent-soft);max-width:85%;border-bottom-right-radius:5px}.chat-buddy{display:flex;align-items:flex-start;gap:10px}.chat-buddy>.buddy-helper{width:26px;height:26px;margin-top:12px;flex-shrink:0}.chat-assistant{background:var(--paper);min-width:0;flex:1;border-top-left-radius:5px}.chat-assistant p{margin:0}.chat-sources{font-size:13px;margin-top:14px;white-space:normal}.chat-sources summary{color:var(--accent);cursor:pointer}.chat-sources blockquote{border-left:3px solid var(--accent);padding-left:12px;margin:14px 0 0;color:var(--muted)}.chat-composer{position:sticky;bottom:12px;display:flex;align-items:flex-end;gap:10px;padding:10px;background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 28px #0004;z-index:3}.chat-composer textarea{flex:1;min-width:0;min-height:70px;max-height:180px;resize:vertical;margin:0;border:0;background:transparent}.chat-composer button{flex-shrink:0;width:46px;height:46px;padding:11px}.chat-welcome{text-align:center;padding:24px 12px}.chat-welcome>.buddy-helper{width:52px;height:52px}.chat-welcome h2{margin:12px 0}.chat-wait{display:flex;align-items:center;gap:12px;font-size:14px}.chat-wait .flow-spinner{display:inline-block;width:22px;height:22px;margin:0;flex-shrink:0}.chat-wait .flow-spinner::after{display:none}#chat-error:empty{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.buddy-logo.buddy-thinking,.chat-buddy.is-thinking>.buddy-helper{animation:buddy-thinking 6s ease-in-out infinite;animation-delay:var(--buddy-thinking-offset,0s);transform-origin:center}
.flow-loading>.buddy-helper{display:block;width:44px;height:44px;margin:10px auto}
.app-header .buddy-logo.buddy-idle{animation:buddy-thinking 6s ease-in-out 1;transform-origin:center}
@keyframes buddy-thinking{0%,10%{transform:rotate(-8deg) scale(1)}30%,45%{transform:rotate(352deg) scale(1)}60%,80%{transform:rotate(352deg) scale(1.2)}70%,90%,100%{transform:rotate(352deg) scale(1)}}
@media(prefers-reduced-motion:reduce){.buddy-logo.buddy-thinking,.chat-buddy.is-thinking>.buddy-helper,.app-header .buddy-logo.buddy-idle{animation:none}}
@media(max-width:700px){.chat-heading h1{font-size:24px}.chat-topic{padding:12px;top:4px}.chat-bubble{padding:12px;font-size:15px}.chat-buddy{gap:7px}.chat-buddy>.buddy-helper{width:22px;height:22px}.chat-composer{bottom:8px}.chat-topic-name{font-size:14px}.chat-heading .text-btn{font-size:12px}}

@property --quiz-sweep{syntax:"<angle>";inherits:false;initial-value:0deg}
@keyframes timer-sweep{from{--quiz-sweep:0turn}to{--quiz-sweep:1turn}}
@keyframes timer-enter{0%{opacity:0;transform:scale(.90)}22%{opacity:1;transform:scale(1.11)}78%,100%{opacity:1;transform:scale(1)}}
.quiz-progress-row{display:flex;align-items:center;gap:14px;margin:12px 0}.quiz-progress-row>progress{flex:1;min-width:0;width:auto;margin:0}.quiz-timer{position:relative;width:44px;height:44px;margin:0;color:#b9f56c;flex-shrink:0}.quiz-timer::before{content:"";position:absolute;inset:3px;border-radius:50%;background:conic-gradient(#45516a var(--quiz-sweep),currentColor 0);animation:timer-sweep 1s cubic-bezier(.3,.2,.7,.8) infinite,timer-enter 1s ease-in-out infinite;animation-delay:var(--timer-offset,0s)}.quiz-timer.timer-empty::before,.quiz-timer.timer-expired::before{animation:none;background:#45516a;opacity:1;transform:none}.quiz-timer b{position:absolute;inset:0;display:grid;place-items:center;font-size:19px;font-weight:800;font-variant-numeric:tabular-nums;color:#ffe36b;text-shadow:0 1px 2px #101722,0 0 3px #101722}.quiz-timer.timer-warning{color:#ff869b;animation:timer-pulse 1.5s ease-in-out infinite}.quiz-timer.timer-paused,.quiz-timer.timer-paused::before{animation-play-state:paused}@keyframes timer-pulse{50%{opacity:.6}}@media(prefers-reduced-motion:reduce){.quiz-timer,.quiz-timer::before{animation:none!important;transition:none!important}}

.quiz-timer.timer-expired{color:#ff869b}

.timer-ended{padding:10px 12px;border:1px solid #ff869b;background:#642c3b;color:#fff;border-radius:12px;font-weight:700}.timer-expired b{color:#ffe36b}

.admin-basics,.admin-overview{margin:20px 0}.admin-basics>.card,.admin-overview>.card{margin:0}.ai-cost-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,135px),1fr));gap:12px}.ai-cost-totals .page-hint{margin:0;padding:12px}.ai-cost-totals b{display:block;font-size:20px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.ai-task-costs>summary{cursor:pointer;font-weight:700;color:var(--accent)}.ai-task-costs .row{align-items:flex-start}.ai-task-costs .data-note{margin:6px 0}.ai-runtime-table{width:100%;font-size:14px}.ai-runtime-table th,.ai-runtime-table td{padding:10px 8px;vertical-align:top}.ai-runtime-table .data-note{display:block;margin-top:4px}
@media(max-width:700px){.ai-cost-totals{grid-template-columns:1fr}.ai-runtime-table{font-size:13px}}

.ai-task-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;border-top:1px solid var(--line)}
.ai-task-label>b{font-size:14px}
.ai-task-badge{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:9px;min-height:44px;max-width:100%;padding:10px 12px;flex-shrink:0;font-size:13px}
.ai-task-badge>b{min-width:0;overflow-wrap:anywhere}
.ai-task-badge .tag{font-size:11px;padding:3px 7px;white-space:nowrap}
.ai-model-dialog{max-width:820px;max-height:88vh;overflow:auto}
.ai-model-heading{align-items:flex-start;margin-bottom:18px}
.ai-model-heading h2{margin:4px 0 0}
.ai-model-heading>button{flex-shrink:0}
.ai-task-form{margin:0;padding:0;border:0}
.ai-model-choices{grid-template-columns:repeat(2,minmax(0,1fr));padding:0;gap:12px;background:none;margin:14px 0 20px;border:0}
.ai-model-choices .model-option{height:100%;padding:14px}
.ai-model-choices .model-option.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.ai-model-choices .model-option .row{align-items:flex-start;flex-wrap:wrap;margin-top:0}
.ai-model-choices .model-option .tag{color:var(--accent);font-weight:700;white-space:nowrap}
.ai-model-choices .model-option>span:not(.row){font-size:13px;line-height:1.5;font-weight:400}
.ai-model-choices .model-option>small{font-size:11px;line-height:1.5;color:var(--muted);font-weight:400}
body[data-theme=light] .ai-model-choices .model-option{background:var(--paper);color:var(--ink)}body[data-theme=light] .ai-model-choices .model-option .tag{background:var(--accent-soft);color:var(--accent-text)}
@media(max-width:700px){.ai-task-row{align-items:flex-start;flex-direction:column;gap:9px;padding:16px 0}.ai-task-badge{max-width:100%}.ai-model-dialog{width:calc(100% - 24px);padding:18px;max-height:90vh}.ai-model-choices{grid-template-columns:1fr}.ai-model-heading .eyebrow{font-size:11px}.ai-model-heading h2{font-size:21px}}
.ai-task-body{padding-bottom:18px}
.ai-task-body .page-hint{margin:0 0 14px}
.ai-task-body .page-hint p{margin:8px 0}
.ai-task-body select{width:100%;min-width:0}
.ai-task-actions{justify-content:flex-start;flex-wrap:wrap;margin-top:16px}
.ai-check-result{margin-top:16px!important;overflow-wrap:anywhere}
.ai-check-result>h3{margin-top:0}
.ai-check-result summary{color:var(--accent);cursor:pointer;font-weight:700}
.ai-check-text{white-space:pre-wrap;max-height:260px;overflow:auto;font-size:14px;line-height:1.6}
.admin-overview{align-items:start}

.ai-money{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:0 .4em;font-variant-numeric:tabular-nums}.ai-money>span{white-space:nowrap}.ai-money .ai-eur{color:#b5b8bf;font-size:.75em;font-weight:400}body[data-theme=light] .ai-money .ai-eur{color:#626873}

.ai-task-label{display:flex;flex-direction:column;gap:4px;min-width:0}.ai-task-label .tiny{font-size:11px;line-height:1.3}

@media(min-width:701px){.admin-overview{grid-template-rows:auto 1fr}.admin-overview>.ai-cost-summary{grid-column:1;grid-row:1}.admin-overview>.ai-runtime{grid-column:2;grid-row:1 / span 2}.admin-overview>.admin-ai-section{grid-column:1;grid-row:2}}

.ai-model-choices .model-option>span.ai-card-effort{color:var(--muted);font-weight:400;font-size:13px;line-height:1.5}.ai-model-choices .ai-card-effort strong{color:#fff;font-weight:700}
.ai-effort-picker{position:relative}.ai-effort-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;text-align:left}.ai-effort-trigger .row{justify-content:flex-start;gap:12px;margin:0}.ai-effort-picker .tag{color:var(--accent);font-weight:700;font-size:11px;white-space:nowrap}
.ai-effort-menu{position:absolute;z-index:5;left:0;right:0;top:calc(100% + 6px);padding:6px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 28px #0006}.ai-effort-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0 0 4px;text-align:left}.ai-effort-option:last-child{margin-bottom:0}.ai-effort-option.selected{border-color:var(--accent)}
body[data-theme=light] .ai-model-choices .ai-card-effort strong{color:var(--ink)}body[data-theme=light] .ai-effort-picker .tag{background:var(--accent-soft);color:var(--accent-text)}

/* Keep StudyBuddy chat visible beside My tests, with compact mobile actions. */
nav a.nav-chat .buddy-logo{width:21px;height:21px;stroke:currentColor}nav a.nav-chat .buddy-logo circle{fill:currentColor}
@media(max-width:700px){nav a.nav-chat{flex:1 1 0;gap:5px;min-width:0}nav a.nav-add{padding-left:9px;padding-right:9px}nav a[href="#home"]{flex:1.25 1 0;min-width:0}}
@media(max-width:360px){nav a.nav-chat{gap:4px}nav a.nav-chat .buddy-logo{width:19px;height:19px}nav a.nav-add{padding-left:6px;padding-right:6px;gap:4px}}

/* Parent views reuse the subject cards, progress bars, badges and dialogs. */
.parent-learner-section{margin:24px 0 32px}.parent-section-heading{align-items:center;flex-wrap:wrap;gap:10px}.parent-section-heading h2{margin:0}.parent-section-heading .text-btn{font-size:13px;min-height:44px}.parent-own-heading{margin-bottom:18px}.parent-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.parent-round{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}.parent-round>div{min-width:0}.parent-unit-view progress{margin-top:18px}.parent-round h3{margin:4px 0 10px}:is(.parent-child-active,.parent-child-trash) summary{cursor:pointer;color:var(--accent);font-weight:700}.parent-action-dialog{max-width:620px}.parent-action-dialog .row{align-items:flex-start;gap:14px;flex-wrap:nowrap}.parent-action-dialog h2{line-height:1.35;min-width:0}.parent-action-dialog .row button{flex-shrink:0}.parent-action-dialog [data-parent-status]:empty{display:none}
@media(max-width:700px){.parent-round{align-items:flex-start;flex-direction:column;gap:8px}.parent-actions button{flex:1 1 150px;font-size:13px}.parent-section-heading h2{font-size:20px}.parent-action-dialog{padding:20px}.parent-action-dialog .row h2{font-size:20px}}

.parent-child-active[open]>summary{margin-bottom:18px}

/* One account-wide chat window, without a subject selector. */
body[data-screen=chat] main{padding:20px 24px 14px}.buddy-chat{display:flex;flex-direction:column;max-width:860px;height:calc(100dvh - 154px);min-height:460px;margin:auto;padding:22px;background:#202b3d;border:1px solid var(--line);border-radius:20px}.buddy-chat .chat-heading{flex-shrink:0;gap:10px}.buddy-chat .chat-heading h1{margin:0;font-size:26px}.buddy-chat .chat-heading .buddy-helper{width:30px;height:30px}.buddy-chat .chat-heading .text-btn{padding:6px 0;white-space:nowrap;min-height:36px}.chat-context{font-size:12px;color:var(--muted);margin:8px 0 4px;flex-shrink:0}.buddy-chat .chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:14px 0;padding:4px;gap:20px}.buddy-chat .chat-welcome{margin:auto;max-width:420px;padding:24px 8px}.buddy-chat .chat-welcome h2{font-size:23px}.buddy-chat .chat-welcome>.buddy-helper{width:46px;height:46px}.buddy-chat .chat-composer{position:static;flex-shrink:0;margin:0;background:var(--paper);box-shadow:none;border-radius:16px}.buddy-chat .chat-composer textarea{resize:none;min-height:54px;max-height:150px;font-size:16px;line-height:1.5}.buddy-chat .chat-composer button{width:44px;height:44px;min-height:44px}.buddy-chat #chat-error{margin:0 0 10px;font-size:13px}.buddy-chat .chat-user{max-width:90%}.buddy-chat .chat-assistant{background:var(--paper)}body[data-theme=light] .buddy-chat{background:#edf0f4}
@media(max-width:700px){body[data-screen=chat] main{padding:14px 10px}.buddy-chat{height:calc(100dvh - 198px);min-height:380px;padding:16px;border-radius:18px}.buddy-chat .chat-heading h1{font-size:22px;gap:8px}.buddy-chat .chat-heading .buddy-helper{width:28px;height:28px}.buddy-chat .chat-heading .text-btn{font-size:12px}.buddy-chat .chat-messages{margin:10px 0}.buddy-chat .chat-welcome h2{font-size:21px}.buddy-chat .chat-buddy>.buddy-helper{width:21px;height:21px}.buddy-chat .chat-composer{padding:8px;gap:8px}}

.parent-round-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;flex-shrink:0}.parent-round-actions .btn{white-space:nowrap}@media(max-width:700px){.parent-round-actions{width:100%;justify-content:flex-start}.parent-round-actions>.btn,.parent-round-actions>button{flex:1 1 140px}}

.round-answer-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}.round-answer-type{font-size:12px;font-weight:400;color:var(--muted)}

/* Measured mastery and preparation schedule stay separate. */
.progress-schedule{display:flex;flex-wrap:wrap;gap:3px 9px;margin:8px 0 4px;font-size:12px;line-height:1.5;color:var(--muted)}
.progress-schedule strong{font-weight:700;color:var(--accent)}.progress-schedule .schedule-deadline{flex-basis:100%}
.progress-schedule[data-state=behind] strong,.progress-schedule[data-state=overdue] strong{color:#f4a0ab}
.progress-schedule[data-state=due_today] strong,.progress-schedule[data-state=no_days] strong{color:#ffd28b}
.meter .progress-schedule{display:block}.meter .progress-schedule>span,.meter .progress-schedule>strong{display:block}
.schedule-compact{font-size:11px;display:block}.schedule-compact>span,.schedule-compact>strong{display:block}
body[data-theme=light] .progress-schedule strong{color:var(--accent-text)}
body[data-theme=light] .progress-schedule:is([data-state=behind],[data-state=overdue]) strong{color:#a4273b}
body[data-theme=light] .progress-schedule:is([data-state=due_today],[data-state=no_days]) strong{color:#865300}
@media(max-width:700px){.learning-next .meter{flex-wrap:wrap}.learning-next .meter .progress-schedule{flex:0 0 100%;width:100%;margin-top:0}.subjects .schedule-compact{margin-right:48px}}

/* Recent conversations share the StudyBuddy card and button styling. */
.chat-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;max-width:1180px;margin:auto;min-width:0;position:relative}
.chat-layout .buddy-chat{max-width:none;width:auto;min-width:0;margin:0}
.chat-history{display:flex;flex-direction:column;min-width:0;height:calc(100dvh - 154px);min-height:460px;padding:16px;background:#1a2434;border:1px solid var(--line);border-radius:20px}
.chat-history-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:2px 0 18px}.chat-history-heading h2{font-size:17px;margin:0}
.chat-new{display:flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;margin:0 0 16px;font-size:14px;min-height:44px;width:100%}
.chat-history-list{overflow-y:auto;min-height:0;flex:1}.chat-history-item{display:block;text-align:left;width:100%;min-width:0;border:1px solid transparent;background:transparent;color:var(--muted);border-radius:11px;padding:12px 10px;margin-bottom:6px;font-weight:400}
.chat-history-item>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:700}.chat-history-item small{display:block;font-size:11px;margin-top:4px;color:var(--muted);font-weight:400}
.chat-history-item:hover,.chat-history-item.selected{background:#2d3c50;border-color:var(--line);color:var(--ink)}.chat-history-item.selected{border-left:3px solid var(--accent);padding-left:8px}
.chat-history-backdrop,.chat-history-toggle,.chat-history-close,.chat-new-short{display:none}
body[data-theme=light] .chat-history{background:#edf0f4}body[data-theme=light] .chat-history-item:hover,body[data-theme=light] .chat-history-item.selected{background:#fff;color:var(--ink)}
@media(min-width:701px) and (max-width:1050px){.chat-layout{grid-template-columns:180px minmax(0,1fr);gap:12px}.chat-history{padding:12px}.chat-layout .buddy-chat{padding:16px}.chat-layout .chat-heading{flex-wrap:wrap}.chat-layout .chat-heading h1{font-size:22px}}
@media(max-width:700px){.chat-layout{display:block}.chat-layout .buddy-chat{height:calc(100dvh - 198px)}.chat-history{display:none;position:absolute;inset:0 auto 0 0;width:min(300px,calc(100% - 28px));height:100%;min-height:0;z-index:6;padding:16px;border-radius:18px;box-shadow:8px 0 25px #0005}.chat-layout.history-open .chat-history{display:flex}.chat-layout.history-open .chat-history-backdrop{display:block;position:absolute;inset:0;width:100%;height:100%;background:#0008;border:0;border-radius:18px;z-index:5}.chat-history-toggle,.chat-history-close{display:inline-flex;align-items:center;justify-content:center;padding:8px;width:36px;height:36px;min-height:36px;flex:0 0 36px}.chat-layout .chat-heading{gap:7px;flex-wrap:wrap}.chat-layout .chat-heading h1{font-size:20px;gap:5px;flex:1}.chat-layout .chat-heading .buddy-helper{width:25px;height:25px}.chat-layout .chat-heading>.text-btn[href]{font-size:11px}.chat-new-short{display:inline-flex;align-items:center;justify-content:center;padding:6px;min-height:36px}.chat-new-short .ui-icon{width:20px;height:20px}.chat-history-close{font-size:18px}.chat-history-heading{margin-bottom:14px}}

/* Deletion history uses the same collapsed admin card and table styling. */
.quiz-deletion-log[open]>summary{margin-bottom:18px}.quiz-deletion-table{table-layout:fixed;overflow-wrap:anywhere}.quiz-deletion-table th{width:30%}.quiz-deletion-table th:nth-child(2){width:40%}.quiz-deletion-table time{display:block}.quiz-deletion-log [data-deletion-log-status]:empty{display:none}

/* Daily effort is distinct from demonstrated knowledge. */
.daily-practice{display:flex;flex-direction:column;gap:7px;margin:12px 0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;min-width:0}.daily-practice strong{font-size:16px}.daily-practice span,.daily-practice small{font-size:12px;line-height:1.6;color:var(--muted)}.daily-practice.complete{border-color:var(--accent)}.daily-practice.complete strong{color:var(--accent)}.daily-practice progress{width:100%;margin:2px 0}.daily-practice-meter{display:flex;align-items:center;gap:12px;min-width:0}.daily-practice-meter progress{flex:1;min-width:0}.daily-practice-meter b{flex:none;color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.daily-practice-compact{display:block;font-size:12px;line-height:1.5;margin-top:10px}.daily-practice-compact.complete{color:var(--accent)}.learning-next .meter>.tiny{display:block}.learning-next .meter .knowledge-percent{display:block;font-size:23px;margin:4px 0 8px}.quiz-more-explanation{margin-top:16px}.quiz-more-explanation>summary{font-weight:700;color:var(--accent);padding:9px 0;cursor:pointer}.quiz-more-explanation .page-hint{margin:8px 0}.quiz-more-explanation h3{font-size:15px;margin:18px 0 7px}.quiz-more-explanation blockquote{margin:12px 0;padding-left:12px;border-left:2px solid var(--line);color:var(--muted);font-size:12px;line-height:1.7}.quiz-more-explanation p{white-space:pre-wrap;overflow-wrap:anywhere}.quiz-more-explanation section:first-of-type h3{margin-top:14px}
@media(max-width:700px){.learning-next .learning-next-copy{grid-column:2/-1}.learning-next .meter{display:block}.learning-next .meter .knowledge-percent{font-size:20px}.daily-practice{padding:12px}.quiz-more-explanation .page-hint{padding:14px}}

/* AI-co daily workload, split into short rounds. */
.daily-goal-details{font-size:12px;line-height:1.6}.daily-goal-details>summary{color:var(--accent);font-weight:700;cursor:pointer}.daily-goal-details p{margin:10px 0 0;overflow-wrap:anywhere}.daily-practice[data-goal-state=pending]{border-style:dashed}
/* Overall knowledge stays with the subject; daily practice has one compact card. */
.subject-title-details,.subject-with-progress .compact-subject-content,.subject-knowledge{min-width:0}
.subject-knowledge{margin-top:16px}.subject-knowledge .progress-label{align-items:center;margin:0 0 8px}.subject-knowledge .progress-label b{font-size:18px;color:var(--ink)}.subject-knowledge .progress-schedule{margin:8px 0 0}
.subject-summary.learning-next.day-goal-summary{display:block}.day-goal-summary .daily-practice{margin:0;padding:0;border:0;border-radius:0}.day-goal-summary .daily-goal-details{margin:6px 0 0}.day-goal-summary .study-methods{margin-top:16px}
@media(min-width:1000px){.subject-with-progress .compact-subject-content{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:center}.subject-with-progress .subject-knowledge{margin-top:0}}
@media(max-width:700px){.subject-knowledge{margin-top:14px}.day-goal-summary .daily-practice{gap:6px}.day-goal-summary .study-methods{margin-top:12px}}


/* A pupil sees today's subjects and time first; the full plan stays available. */
.coach-today .row{flex-wrap:wrap;gap:6px 12px}.coach-today h3{margin:0}.coach-today-time{font-size:13px;color:var(--muted)}.coach-today .coach-today-topics{margin:8px 0;line-height:1.6}.coach-today-topics span{overflow-wrap:anywhere}
.coach-plan-details{margin-top:14px}.coach-plan-details>summary{color:var(--accent);font-weight:700;cursor:pointer}.coach-plan-details[open]>summary{margin-bottom:14px}

/* Subject details stay quiet; the current daily actions come first. */
body[data-screen=unit] main{padding-top:16px}
.subject-breadcrumb{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 12px;margin:0 0 12px}
.subject-breadcrumb .screen-back{margin:0;font-size:12px;white-space:nowrap}
.subject-breadcrumb-progress{display:contents;color:var(--muted);font-size:11px}.knowledge-meter{display:flex;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}.subject-breadcrumb-progress>.knowledge-details{grid-column:1/-1;margin:0}
.subject-breadcrumb-progress b{font-size:14px;color:var(--ink)}
.subject-breadcrumb-progress progress{width:60px;height:5px;flex:none;margin:0}
.subject-context{position:relative;overflow:hidden;margin:0 0 12px;padding:8px 76px 8px 12px;border-left:3px solid var(--subject-color);border-radius:8px;background:var(--subject-color);color:#fff}
.subject-context-motif{position:absolute;right:12px;top:50%;transform:translateY(-50%) rotate(-8deg);font-size:44px;font-weight:800;line-height:1;color:var(--ink);opacity:.3;pointer-events:none}
.subject-context-motif.roman-motif{font-family:Georgia,'Times New Roman',serif;font-weight:700;letter-spacing:-.06em}
.subject-context h1{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 14px;font-size:16px;line-height:1.4;margin:0}
.subject-context h1 span{font-size:11px;font-weight:400;color:#e0edf1}
.subject-context p{font-size:12px;line-height:1.5;color:#e0edf1;margin:4px 0 0;overflow-wrap:anywhere}
.subject-context>.xp-total-badge,.subjects .cover>.xp-total-badge{position:absolute;top:4px;right:5px;z-index:1}
.coach-time-warning{margin:12px 0;padding:12px 14px;border:1px solid #a1823c;border-radius:12px;background:#9f7d2620;color:var(--ink)}.coach-time-warning strong{font-size:14px}.coach-time-warning p{margin:6px 0 0;font-size:12px;line-height:1.6}

/* Quiet reporting beside quiz help; touch targets remain usable on phones. */
.quiz-help .quiz-report{margin-left:auto;color:var(--muted);font-size:12px;font-weight:400}.quiz-help .quiz-report .ui-icon{width:16px;height:16px}.quiz-help .quiz-report:hover{color:var(--accent)}.quiz-help .quiz-report:disabled{background:none;border:0;color:var(--muted)}.question-report-dialog textarea{min-height:90px}.question-report-dialog [data-report-error]:empty{display:none}.reported-question>summary{display:flex;flex-direction:column;gap:4px}.reported-question>summary .data-note{font-size:12px;font-weight:400}.reported-question>summary span,.reported-question h3,.report-note{overflow-wrap:anywhere}.reported-question[open]>summary{margin-bottom:16px}.report-note{white-space:pre-wrap}.report-reference{margin:16px 0;padding:14px;border:1px solid var(--line);border-radius:12px}.report-reference h3{font-size:16px}

.question-moderation-dialog{max-width:720px}.question-moderation-dialog textarea{min-height:86px}.question-moderation-dialog h3,.question-moderation-dialog p{overflow-wrap:anywhere}.question-edit-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.question-edit-options label{margin:0}.question-edit-options textarea{margin-top:6px;min-height:72px}.question-moderation-dialog [data-moderation-error]:empty{display:none}@media(max-width:700px){.question-edit-options{grid-template-columns:1fr}.question-moderation-dialog{width:calc(100% - 24px);padding:18px}.question-moderation-dialog .parent-actions{align-items:stretch}}

.round-answer[data-review-result=excluded] .round-answer-status{color:var(--muted)}

/* One quiet explanation for knowledge; practice time stays a separate daily goal. */
.knowledge-details{min-width:0;margin:8px 0 0;font-size:12px;line-height:1.65;white-space:normal;color:var(--ink)}
.knowledge-details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;cursor:pointer;padding:4px 0}
.knowledge-details>summary::-webkit-details-marker{display:none}
.knowledge-caption{font-size:11px;font-weight:400;color:var(--muted)}
.knowledge-toggle{font-size:11px;font-weight:700;color:var(--accent);white-space:nowrap}
.knowledge-toggle::before{content:'▸ '}.knowledge-details[open] .knowledge-toggle::before{content:'▾ '}
.knowledge-details-body{margin-top:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper);overflow-wrap:anywhere}
.knowledge-details-body p{margin:0 0 10px;font-size:12px;line-height:1.65}.knowledge-details-body p:last-child{margin-bottom:0}
.knowledge-details-body ul{margin:0 0 12px;padding-left:18px}.knowledge-details-body li+li{margin-top:8px}
@media(max-width:380px){.knowledge-details>summary{gap:6px}.knowledge-caption,.knowledge-toggle{font-size:10px}}

.question-report-reasons{border:0;padding:0;margin:16px 0 0;min-width:0}.question-report-reasons legend{padding:0;margin-bottom:8px;font-size:13px;font-weight:700;color:var(--ink)}
.question-report-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.question-report-choices label{display:flex;align-items:center;gap:8px;margin:0;padding:10px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--paper);font-size:13px;line-height:1.4;cursor:pointer}.question-report-choices label:has(:checked){border-color:var(--accent);background:var(--accent-soft);color:var(--ink)}.question-report-choices label:focus-within{outline:2px solid var(--accent);outline-offset:2px}.question-report-choices input[type=radio]{position:static;opacity:1;appearance:auto;flex:none;width:17px;height:17px;min-height:0;margin:0;padding:0;accent-color:var(--accent)}

.report-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.report-comparison section{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper);min-width:0}.report-comparison section+section{margin-top:12px}.report-comparison h3{margin:0 0 10px}.report-comparison p{font-size:13px;line-height:1.65}.report-comparison ul{padding-left:18px;font-size:13px;overflow-wrap:anywhere}.report-history>summary{cursor:pointer}
@media(max-width:600px){.report-comparison{grid-template-columns:1fr}.question-report-choices label{font-size:12px}}

.report-previous-answer{border-top:1px solid var(--line);margin-top:14px;padding-top:14px}.report-previous-answer .report-answer-result{font-size:13px;color:var(--muted)}.report-previous-answer[data-result=correct] .report-answer-result{color:var(--accent)}.report-previous-answer[data-result=incorrect] .report-answer-result{color:#ffc3ce}.report-previous-answer .data-note{font-size:12px}body[data-theme=light] .report-previous-answer[data-result=incorrect] .report-answer-result{color:#a51c3b}

.report-repeat-reason{border:1px solid var(--line);border-radius:12px;padding:14px;margin:16px 0;background:var(--paper)}.report-repeat-reason h3{font-size:15px;margin:0 0 10px}.report-repeat-reason strong{font-size:14px}.report-repeat-reason p{font-size:13px;line-height:1.65;margin:8px 0 0}.report-repeat-reason .data-note{font-size:12px}.report-repeat-reason.planned{border-color:var(--accent);background:var(--accent-soft)}.report-repeat-reason.planned>strong{color:var(--accent)}

/* Readable AI-co learner profiles reuse the collapsed parent cards. */
.learner-profile[open]>summary{margin-bottom:18px}.learner-profile-note{min-width:0;overflow-wrap:anywhere}.learner-profile-note h3{margin:0}.learner-profile-note dl{margin:16px 0 0}.learner-profile-note dt{font-weight:700;margin:16px 0 5px}.learner-profile-note dd{margin:0;line-height:1.6;white-space:pre-line;color:var(--muted)}.learner-profile-note dd p{margin:8px 0 0}.learner-profile-goal{line-height:1.6}.learner-profile-evidence{margin-top:16px}.learner-profile-evidence>summary{color:var(--accent);font-weight:700}.learner-profile [data-profile-body]>.text-btn{display:inline-flex;min-height:44px;align-items:center;max-width:100%;flex-wrap:wrap}

.learner-profile-review{border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:18px;overflow-wrap:anywhere}.learner-profile-review>strong{font-size:16px;color:var(--accent)}.learner-profile-review[data-review-state=processing]>strong{color:#ffd28b}.learner-profile-review[data-review-state=failed]>strong{color:#f4a0ab}.learner-profile-review p{margin:10px 0}.learner-profile-review ul{padding-left:20px;margin:6px 0 12px;color:var(--muted);line-height:1.7}.learner-profile-review p:last-child{margin-bottom:0}body[data-theme=light] .learner-profile-review[data-review-state=processing]>strong{color:#865300}body[data-theme=light] .learner-profile-review[data-review-state=failed]>strong{color:#a4273b}

/* Per-quiz coordinator history uses the existing admin disclosure styling. */
.coach-round-history{flex:1 0 100%;width:100%;min-width:0;margin-top:4px;border:1px solid var(--line);border-radius:14px;padding:8px 16px}.coach-round-history>summary{color:var(--accent);font-weight:700;min-height:44px;display:list-item}.coach-review-entry{padding:18px 0;border-top:1px solid var(--line);min-width:0}.coach-review-entry h4{font-size:14px;margin:10px 0 6px}.coach-review-entry p{margin:6px 0 12px}.coach-review-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}.coach-review-meta h4{margin:0}.coach-review-changes{padding-left:20px;margin:8px 0 18px}.coach-review-changes li{margin:8px 0;overflow-wrap:anywhere}.coach-round-history .status{white-space:normal}.coach-review-entry>.data-note:last-child{margin-bottom:0}
@media(max-width:700px){.coach-round-history{flex:0 0 auto;padding:8px 12px}.coach-review-meta{align-items:flex-start;flex-direction:column}.coach-review-entry{padding:14px 0}}

.coach-effect-topic{border-top:1px solid var(--line);padding:12px 0}.coach-effect-comparison{border-left:3px solid var(--line);padding-left:12px;margin:12px 0}.coach-effect-comparison p{margin:4px 0;overflow-wrap:anywhere}

/* Keep the subject-card date and knowledge together in one compact row. */
.subjects .subject-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:12px}
.subjects .subject-meta>.status{white-space:nowrap;justify-self:start}

/* Every live progress bar uses the same track and internal value label. */
.progress-meter{display:block;position:relative;width:100%;min-width:0;height:20px;margin:14px 0;border-radius:5px;overflow:hidden}
.progress-meter>progress{display:block;width:100%;height:20px;margin:0;border-radius:5px}
.progress-meter>progress::-webkit-progress-bar,.progress-meter>progress::-webkit-progress-value{border-radius:5px}
.progress-meter>progress::-moz-progress-bar{border-radius:5px}
.progress-meter .progress-meter-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:6px;padding:0;background:transparent;color:#fff;font-size:12px;line-height:1.3;white-space:nowrap;pointer-events:none;text-shadow:0 1px 2px #142132,0 0 1px #142132}
.progress-meter .progress-meter-label>b{display:inline;font-size:inherit;color:inherit;margin:0;line-height:inherit}
/* Ordinary meters keep a continuous track with contrasting text on each side of the fill. */
body[data-theme] .progress-meter:not(.daily-race *)>progress::-webkit-progress-value{background-image:repeating-linear-gradient(-45deg,rgba(255,255,255,.07) 0 6px,rgba(17,23,34,.025) 6px 12px)}
body[data-theme] .progress-meter:not(.daily-race *)>progress::-moz-progress-bar{background-image:repeating-linear-gradient(-45deg,rgba(255,255,255,.07) 0 6px,rgba(17,23,34,.025) 6px 12px)}
.progress-meter:not(.daily-race *) .progress-meter-label{font-weight:700;text-shadow:none;background:linear-gradient(to right,#142132 0 var(--progress-percent,0%),#fff var(--progress-percent,0%) 100%);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;-webkit-text-stroke:0}
.progress-meter:not(.daily-race *) .progress-meter-label>b{font-weight:700}
.subjects .subject-content .progress-meter>progress{width:100%;height:20px;margin:0}
:is(.subject-meta,.knowledge-meter,.daily-practice-meter,.goal .meter,.subject-summary .meter)>.progress-meter{margin:0}
.subject-breadcrumb-progress .knowledge-meter{display:block;width:160px;max-width:44vw}
.daily-practice-meter{display:block}
.quiz-progress-row>.progress-meter{flex:1;min-width:0;width:auto;margin:0}
.parent-unit-view>.card>.progress-meter{margin-top:18px}

/* Daily goal and compact quiz action share one row. */
.subjects .subject-practice-action{display:inline-flex;align-items:center;gap:8px;max-width:100%;margin:0;padding:8px 10px;box-sizing:border-box;height:38px;min-height:38px;font-size:12px;text-align:left;white-space:nowrap;flex:none}
.subjects .subject-practice-row>.daily-practice-compact{margin:0;font-size:12px}
.subject-practice-label{font-weight:700;text-transform:uppercase}
.subject-practice-play{position:absolute;right:15px;top:50%;transform:translateY(-50%);color:var(--accent);font-size:16px;line-height:1}
body[data-theme=light] .subject-practice-play{color:var(--accent-text)}

.subjects>.subject{position:relative}
.subject-card-link{position:absolute;inset:0;z-index:2;border-radius:inherit}
.subject-card-link:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.subject-practice-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:12px;margin-top:12px}
.subjects .subject-practice-action{position:relative;z-index:3;border-color:var(--accent);width:100%;justify-content:center}
body[data-theme=light] .subjects .subject-practice-action{border-color:var(--accent-text)}

@media(min-width:701px) and (max-width:1200px){.subjects{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}}
@media(max-width:380px){.subjects .subject-meta,.subjects .subject-practice-row{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}.subjects .subject-practice-action{gap:6px;padding-inline:8px;font-size:11px}.subjects .subject-practice-row>.daily-practice-compact{font-size:11px}}

/* Keep action icons at their outer edges, independent of label length. */
body[data-theme] .learning-action{position:relative}
.learning-action.learning-action-learn{padding-inline:40px 12px}
.subjects .subject-practice-action,.learning-action.learning-action-quiz{padding-inline:12px 36px}

/* Keep the one-shot quiz cue quiet when reduced motion is requested. */
@media(prefers-reduced-motion:reduce){.quiz-entry-pulse{box-shadow:none!important}}

@media(max-width:380px){.study-methods:has(.learning-action-learn):has(.learning-action-quiz){grid-template-columns:minmax(0,.6fr) minmax(0,1fr)}.study-methods .learning-action{font-size:12px}}

/* Shared compact daily-goal panel for subject and quiz completion. */
.subject-summary.day-goal-summary{padding:16px}
.daily-practice.daily-practice-concise{display:grid;grid-template-columns:minmax(0,1fr) calc(clamp(88px,34%,220px) + 28px);gap:4px 12px;align-items:center}
.daily-practice.daily-practice-concise>strong{grid-column:1;grid-row:1;line-height:1.35}
.daily-practice.daily-practice-concise>.daily-practice-meter{grid-column:2;grid-row:1;display:flex;align-items:center;gap:8px}
.daily-practice-concise>.daily-practice-meter>.progress-meter{flex:1;min-width:0}
.daily-practice.daily-practice-concise>span,.daily-practice.daily-practice-concise>small,.daily-practice.daily-practice-concise>.daily-goal-details{grid-column:1/-1}
.daily-practice.daily-practice-concise:not([data-goal-state=ready])>strong{grid-column:1/-1}
.daily-practice-concise>.daily-goal-details{margin-top:2px}
.day-goal-summary .study-methods{margin-top:10px}
@media(max-width:380px){.daily-practice.daily-practice-concise{column-gap:8px}.daily-practice.daily-practice-concise>strong{font-size:14px}}

/* Shared contextual explanation: compact entry, child-friendly modal. */
.help-control{display:inline-block;position:relative;width:20px;height:20px;flex:none;vertical-align:middle;line-height:1}
.search-toggle,.search-close,button.help-button{width:44px;height:44px;min-height:44px;background:none;border:1px solid #52627b;border-radius:10px;color:var(--accent)}
button.help-button,body[data-theme=light] .help-control button.help-button{position:absolute;top:0;left:0;width:20px;height:20px;min-width:20px;min-height:20px;max-width:none;padding:1px;flex:none;background:#52627b;color:#b9f56c;border-color:transparent;border-radius:5px}
.help-button .help-mark{display:block;width:16px;height:16px;font-size:16px;font-weight:600;line-height:16px;text-align:center;transform:translateY(-1px);color:inherit}
@media(max-width:700px){.help-button .help-mark{transform:none}}
.help-heading-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.help-heading-row>h1{min-width:0;flex:1}
.library-heading .help-heading-row{justify-content:flex-start}.library-heading .help-heading-row>h1{flex:none;padding-right:0}
.chat-heading>.help-heading-row{flex:1}
.quiz-top>.help-heading-row{flex:1}.study-heading>.help-heading-row{flex:1}
.subject-breadcrumb-progress{display:flex;align-items:center;gap:8px}
.subject-breadcrumb-progress .knowledge-meter{width:clamp(96px,28vw,160px);max-width:none}
.daily-practice.daily-practice-concise>.daily-practice-note{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.daily-practice-note>small{flex:1;min-width:0}
.daily-practice.daily-practice-concise .daily-practice-note small{font-size:12px;line-height:1.5}
.finish-progress>.row{gap:10px}.finish-progress>.row>b{margin-right:auto}.finish-progress .knowledge-help{margin:0}
.topics-heading{margin:20px 0 12px}.topics-heading h2{font-size:19px}.topics-heading p{margin:5px 0 0}
.coach-warning-note{display:flex;align-items:center;justify-content:space-between;gap:12px}.coach-warning-note p{margin:6px 0}
.help-dialog{max-width:560px;max-height:calc(100dvh - 32px);padding:20px;overflow-y:auto;overscroll-behavior:contain}
.help-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.help-dialog-heading h2{font-size:21px;line-height:1.35;margin:4px 0;min-width:0;align-items:flex-start}
.help-dialog-heading .buddy-helper{width:27px;height:27px;flex:none}
.help-dialog-heading>button{width:36px;height:36px;min-height:36px;padding:7px;flex:none}
.help-dialog-body{font-size:15px;line-height:1.6;overflow-wrap:anywhere}
.help-sections{display:grid;gap:16px;margin:20px 0}
.help-sections>section{display:flex;align-items:flex-start;gap:12px}
.help-step{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:800;margin-top:1px}
.help-sections h3{font-size:16px;line-height:1.5;margin:0 0 4px}
.help-sections p{margin:0;font-size:14px;line-height:1.6}
.help-note{font-size:12px;line-height:1.65;padding:12px;background:var(--paper);border:1px solid var(--line);border-radius:10px}
.help-more{margin:14px 0;font-size:13px;line-height:1.65}.help-more>summary{cursor:pointer;font-weight:700;color:var(--accent);padding:7px 0}.help-more p{margin:8px 0;white-space:pre-line}
.help-lead{margin:18px 0;font-size:15px;line-height:1.65;white-space:pre-line}
.help-dialog-done{width:100%;margin-top:8px}
body[data-theme=light] .help-button,body[data-theme=light] .help-step,body[data-theme=light] .help-more>summary{color:var(--accent-text)}
@media(max-width:700px){.library-heading .help-heading-row{gap:10px;padding-right:48px}.help-dialog{padding:18px}.help-dialog-heading h2{font-size:19px}.help-sections{gap:14px}.help-sections>section{gap:10px}.topics-heading h2{font-size:17px}}

body[data-screen=goal] .heading h1{font-size:26px;line-height:1.3}
@media(max-width:700px){body[data-screen=goal] .heading h1{font-size:22px}.heading:has(.page-help){margin-bottom:18px}}
body[data-theme=light] .help-dialog .buddy-helper{stroke:var(--accent-text)}body[data-theme=light] .help-dialog .buddy-helper circle{fill:var(--accent-text)}
.subject-breadcrumb-progress:has(>.knowledge-details){display:contents}.subject-breadcrumb-progress:has(>.knowledge-details) .knowledge-meter{width:160px;max-width:44vw}

/* One shared caption placement and proportional size for explanation buttons. */
.help-caption-row{display:flex;align-items:center;gap:8px;min-width:0}
.help-caption-row>[data-help-caption]{margin:0;min-width:0;flex-shrink:1}
.buddy-chat>.help-caption-row{flex-shrink:0}
body[data-theme=light] button.help-button{border-color:transparent}

.daily-goal-comparison.daily-race{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:0 0 12px;padding:16px}
.daily-race-mode{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:3px 0;min-height:28px;border:0;border-radius:4px;background:transparent;color:var(--accent);font:inherit;font-size:12px;text-align:left;box-shadow:none}
.daily-race-mode:hover{background:rgba(255,255,255,.06)}
.daily-race-mode:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.daily-race .daily-race-rules{font-size:10px;color:var(--muted)}
.daily-race-trophy[hidden]{display:none}
.quiz-xp-earned{color:var(--accent);font-weight:800}
.quiz-xp-celebration{position:fixed;inset:0;z-index:80;display:grid;place-items:center;pointer-events:none;padding:24px}
.quiz-xp-celebration>div{display:grid;place-items:center;width:100%;text-align:center}
.quiz-xp-celebration strong,.quiz-xp-celebration b{grid-area:2/1;display:block;margin:0;max-width:100%;font-weight:900;line-height:1.1;opacity:0;transform-origin:center;text-shadow:0 3px 0 #152110,0 0 8px #152110,0 0 28px #b9f56c88;-webkit-text-stroke:1px #253c26}
.xp-buddy-presence{grid-area:1/1;display:grid;place-items:center;margin-bottom:14px;animation:xp-buddy-visible 3.45s both;filter:drop-shadow(0 3px 0 #152110) drop-shadow(0 0 12px #b9f56c66)}
.xp-buddy-motion{display:block;width:clamp(64px,14vw,96px);height:clamp(64px,14vw,96px);animation:xp-buddy-hop 3.45s ease-in-out both}
.xp-buddy-motion .buddy-helper{display:block;width:100%;height:100%;animation:xp-buddy-spin 1.1s .06s ease-in-out both}
.xp-buddy-sway{animation-name:xp-buddy-sway}
.xp-buddy-pop{animation-name:xp-buddy-pop}
@keyframes xp-buddy-visible{0%{opacity:0}8%,88%{opacity:1}100%{opacity:0}}
@keyframes xp-buddy-spin{0%{transform:rotate(-8deg)}78%{transform:rotate(370deg)}100%{transform:rotate(352deg)}}
@keyframes xp-buddy-hop{0%{transform:translateY(12px) scale(.75)}14%{transform:translateY(-12px) scale(1.08)}28%,45%,65%,84%,100%{transform:translateY(0) scale(1)}36%{transform:translateY(-6px) scale(1.04)}55%,75%{transform:translateY(-3px) scale(1.1)}}
@keyframes xp-buddy-sway{0%{transform:translateX(-12px) scale(.75)}16%{transform:translateX(10px) rotate(7deg) scale(1.05)}32%{transform:translateX(-8px) rotate(-6deg)}45%,65%,84%,100%{transform:translateX(0) rotate(0) scale(1)}55%,75%{transform:translateX(3px) rotate(3deg) scale(1.08)}}
@keyframes xp-buddy-pop{0%{transform:scale(.65)}16%{transform:scale(1.16)}30%{transform:scale(.96)}42%,65%,84%,100%{transform:scale(1)}55%,75%{transform:scale(1.12)}}
.quiz-xp-celebration strong{color:#fff;font-size:clamp(30px,7vw,64px);text-transform:uppercase;animation:xp-streak-burst 1.2s both}
.quiz-xp-celebration strong small{display:block;margin-top:8px;font-size:clamp(18px,4vw,26px);font-weight:700;line-height:1.3;text-transform:none;-webkit-text-stroke:0}
.quiz-xp-celebration b{color:var(--accent);font-size:clamp(52px,12vw,104px);animation:xp-bonus-burst 2.2s 1.25s both}
@keyframes xp-streak-burst{0%{opacity:0;transform:scale(.15) rotate(-6deg)}28%{opacity:1;transform:scale(1.12) rotate(2deg)}42%,72%{opacity:1;transform:scale(1) rotate(0)}100%{opacity:0;transform:scale(1.35) translateY(-14px)}}
@keyframes xp-bonus-burst{0%{opacity:0;transform:scale(.2)}15%{opacity:1;transform:scale(1.12)}25%,49%,73%{opacity:1;transform:scale(1)}37%,61%{opacity:1;transform:scale(1.16);text-shadow:0 3px 0 #152110,0 0 12px #152110,0 0 45px #b9f56ccc}83%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.25) translateY(-20px)}}
@keyframes xp-reduced-phase{0%{opacity:0}1%,85%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.quiz-xp-celebration strong{animation:xp-reduced-phase 1.2s both}.quiz-xp-celebration b{animation:xp-reduced-phase 2.2s 1.25s both}}
@media(prefers-reduced-motion:reduce){.xp-buddy-presence{animation:xp-buddy-visible 3.45s both}.xp-buddy-motion,.xp-buddy-motion .buddy-helper{animation:none}}
.daily-race-lane{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.daily-race-person{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;font-size:12px;line-height:1.3;white-space:nowrap}.daily-race-count{font-size:12px;font-weight:800;font-variant-numeric:tabular-nums}
.daily-race-lane.race-finished{grid-template-columns:116px minmax(0,1fr)}.daily-race-count .race-good{color:#b9f56c}.daily-race-count .race-wrong{color:#ffb6bc}
.daily-race-name{display:inline-flex;align-items:center;gap:3px;position:relative;padding-left:8px;font-weight:700}.daily-race-trophy{position:absolute;left:-8px;top:50%;transform:translateY(-50%);width:12px;font-size:12px;line-height:1;transform-origin:50% 100%;animation:race-trophy-celebrate 5s ease-in-out .5s infinite}
.daily-race.race-revealing .daily-race-trophy{visibility:hidden;animation:none}
.daily-race.race-revealing .progress-meter-label{z-index:4}
@keyframes race-trophy-celebrate{0%,14%,100%{transform:translateY(-50%) rotate(0)}3%{transform:translateY(calc(-50% - 3px)) rotate(-12deg)}6%{transform:translateY(calc(-50% - 1px)) rotate(10deg)}9%{transform:translateY(calc(-50% - 2px)) rotate(-7deg)}12%{transform:translateY(-50%) rotate(4deg)}}
@media(prefers-reduced-motion:reduce){.daily-race-trophy{animation:none}}
.daily-race-track{position:relative;min-width:0;height:20px;isolation:isolate}
.daily-race-track>.progress-meter{display:block;margin:0}
.daily-race-track::after{content:"";position:absolute;inset:0 0 0 auto;width:8px;border-radius:0 5px 5px 0;background:repeating-conic-gradient(#dce6f2 0 25%,#202c3e 0 50%) 0 0/8px 8px;pointer-events:none;z-index:3}
.daily-race-racer{position:absolute;top:0;left:clamp(0px,calc(var(--race-percent) - 10px),calc(100% - 28px));width:20px;height:20px;display:grid;place-items:center;z-index:2;pointer-events:none}
.daily-race-racer svg{width:18px;height:18px;fill:#202c3e;stroke:var(--race-color);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(1px 0 0 #101722) drop-shadow(-1px 0 0 #101722) drop-shadow(0 1px 0 #101722) drop-shadow(0 -1px 0 #101722)}
.daily-race-lane .progress-meter-label{justify-content:flex-end;padding:0 14px;box-sizing:border-box}
.daily-race-lane .race-label-left .progress-meter-label{justify-content:flex-start}
.daily-race-lane .progress-meter-label>span:empty{display:none}
.daily-race-lane .progress-meter-label>b{padding:0 6px;border-radius:5px;background:#1b2738;color:#fff;font-size:13px;font-weight:800;line-height:16px;text-shadow:none;font-variant-numeric:tabular-nums}
.daily-race-lane progress{accent-color:var(--race-color)}
.daily-race-lane progress::-webkit-progress-value{background:repeating-linear-gradient(-45deg,rgba(255,255,255,.18) 0 8px,rgba(17,23,34,.08) 8px 16px),var(--race-color)}
.daily-race-lane progress::-moz-progress-bar{background:repeating-linear-gradient(-45deg,rgba(255,255,255,.18) 0 8px,rgba(17,23,34,.08) 8px 16px),var(--race-color)}
.daily-race>p{margin:0;color:var(--accent);font-size:12px;line-height:1.5}
.profile-race-icon .profile-symbol svg{width:30px;height:30px;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.race-icon-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:20px 0;border:0;padding:0}
.race-icon-choice{position:relative;margin:0;cursor:pointer}
.race-icon-choice input{position:absolute;opacity:0;width:1px;height:1px}
.race-icon-choice>span{display:flex;align-items:center;justify-content:center;aspect-ratio:1;min-height:0;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--paper);box-sizing:border-box}
.race-icon-choice svg{width:30px;height:30px;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.race-icon-choice input:checked+span{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.race-icon-choice input:focus-visible+span{outline:2px solid var(--accent);outline-offset:3px}
.race-icon-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:16px 0}
.race-icon-tabs .btn{min-width:0;min-height:40px;padding:8px 2px;font-size:12px;line-height:1.2;white-space:nowrap}
.race-icon-emoji{display:inline-grid;place-items:center;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-size:30px}
.daily-race-racer .race-icon-emoji{font-size:18px}
.race-icon-dialog .form-error:empty{display:none}
@media(max-width:360px){.race-icon-choices{grid-template-columns:repeat(4,minmax(0,1fr))}.race-icon-tabs .btn{font-size:10px;letter-spacing:-.15px}}


.daily-practice-concise.has-daily-comparison>.daily-goal-comparison{grid-column:1/-1;grid-row:1}.daily-practice-concise.has-daily-comparison>strong,.daily-practice-concise.has-daily-comparison>.daily-practice-meter{grid-row:2}

.race-invite-control{position:relative;z-index:3;margin:12px 0}.challenge-invitation .study-actions{margin-bottom:0}

.daily-race-track:is(button){display:block;min-height:20px;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;box-shadow:none;text-align:inherit;cursor:pointer}
.daily-race-track:is(button):hover{background:transparent}
.daily-race-track:is(button):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.progress-xp-heading{flex-wrap:wrap;gap:8px}
.xp-total-badge{display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;height:20px;border:0;border-radius:5px;padding:0 5px;background:rgba(35,43,52,.45);color:#e0edf1;font-size:12px;font-weight:600;line-height:20px;font-variant-numeric:tabular-nums;white-space:nowrap}

.daily-race-lane{grid-template-columns:94px minmax(0,1fr)}
.subject-date-xp{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.subject-date-xp>.status{white-space:nowrap}

.daily-race-modes{position:relative;isolation:isolate;display:flex;align-items:center;gap:6px}
.daily-race-modes::before{content:"";position:absolute;inset:0 auto 0 0;width:calc((100% - 6px)/2);border-radius:5px;background:#89a568;transform:translateX(0);transition:transform .65s cubic-bezier(.22,.68,.25,1);pointer-events:none}
.daily-race-modes:has([data-race-mode=total][aria-pressed=true])::before{transform:translateX(calc(100% + 6px))}
.daily-race-modes .daily-race-mode{position:relative;z-index:1;flex:1;width:auto;justify-content:center;height:20px;min-height:20px;padding:0 8px;border:1px solid var(--muted);border-radius:5px;background:transparent;color:var(--ink);font-size:12px;font-weight:800;line-height:16px;transition:color .35s ease,border-color .35s ease}
.daily-race-modes .daily-race-mode[aria-pressed=true]{border-color:transparent;background:transparent;color:#1b2738}
.daily-race-modes .daily-race-mode[aria-pressed=false]{border-color:#526077;color:#97a5b8}
@media(prefers-reduced-motion:reduce){.daily-race-modes::before,.daily-race-modes .daily-race-mode{transition:none}}

.daily-race-count{font-size:11px}

.daily-race-heading{display:flex;align-items:center;gap:8px}
.daily-race-heading>.daily-race-modes{flex:1;min-width:0}

.subject-knowledge-xp{display:block;position:relative;min-width:0}
.subject-knowledge-xp>.progress-meter{margin:0}
.subjects .subject-meta>.status{height:20px;padding:0 8px;line-height:20px}
.subjects .subject-content .subject-knowledge-xp>.progress-meter,.subjects .subject-content .subject-knowledge-xp>.progress-meter>progress{height:20px}
.subject-breadcrumb-progress .progress-meter,.subject-breadcrumb-progress .progress-meter>progress{height:20px;border-radius:5px;overflow:hidden}
.subject-breadcrumb-progress progress::-webkit-progress-bar,.subject-breadcrumb-progress progress::-webkit-progress-value{border-radius:5px}
.subject-breadcrumb-progress progress::-moz-progress-bar{border-radius:5px}
.daily-practice-meter>.progress-meter{border-radius:5px;outline:1px solid rgba(185,201,224,.35)}
.daily-practice-meter>.progress-meter>progress{background:#52627b}
.daily-practice-meter>.progress-meter>progress::-webkit-progress-bar{background:#52627b}
.subjects .subject{--subject-control-radius:5px}
.subjects .subject :is(.status,.xp-total-badge,.progress-meter,.progress-meter>progress){border-radius:var(--subject-control-radius)}
.subjects .subject .progress-meter{overflow:hidden}
.subjects .subject progress::-webkit-progress-bar,.subjects .subject progress::-webkit-progress-value{border-radius:var(--subject-control-radius)}
.subjects .subject progress::-moz-progress-bar{border-radius:var(--subject-control-radius)}

@media(max-width:800px){
 .logged-out main{padding:12px}
 .logged-out footer{padding:12px;font-size:10px}
 .login-layout{min-height:0;border-radius:16px}
 .login-story{padding:16px}
 .login-story .brand{display:inline-flex;align-items:center;gap:8px;font-size:24px;line-height:1}
 .login-story .brand span{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;font-size:22px}
 .login-story .eyebrow{margin-top:10px!important;font-size:10px;letter-spacing:1px}
 .login-story h1{font-size:20px;line-height:1.2;margin:10px 0 8px}
 .login-story p{font-size:12px;line-height:1.4;margin:8px 0}
 .login-milestone{gap:8px;margin-top:10px;font-size:12px;line-height:1.3}
 .login-milestone>span{width:24px;height:24px;flex:none;font-size:15px}
 .login-milestone small{font-size:11px}
 .login-panel{padding:16px}
 .login-panel h2{font-size:22px;line-height:1.2;margin:0 0 6px}
 .login-panel>p{font-size:13px;line-height:1.4;margin:6px 0 12px}
 .login-panel label{font-size:12px;margin:0}
 .login-panel input{height:44px;min-height:44px;margin:4px 0 10px;padding:10px 12px;font-size:16px}
 .login-panel .full.gap{min-height:44px;margin-top:8px;padding:8px 12px}
 .login-panel>p.tiny{font-size:11px;line-height:1.4;margin:10px 0 0}
 .login-panel #login-error{font-size:12px;margin:8px 0 0}
 .login-panel #login-error:empty{display:none}
}

.profile-avatar svg{width:46px;height:46px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.profile-avatar .race-icon-emoji{font-size:inherit}

button.profile-avatar{padding:0;cursor:pointer}button.profile-avatar:focus-visible{outline:3px solid var(--accent);outline-offset:5px}

@media(max-width:600px){.profile-avatar svg{width:32px;height:32px}}
.page-loading-list,.page-loading-profile,.page-loading-form{display:grid;gap:18px}
.page-loading-form{max-width:760px}
.page-loading-grid,.page-loading-subjects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.page-loading-card{min-width:0;margin:0}
.page-loading-card h2{font-size:18px}
.page-loading-status{font-size:13px;color:var(--muted);margin:12px 0 18px}
.page-loading-placeholders{display:grid;gap:12px}
.page-loading-placeholders>span{display:block;height:14px;border-radius:5px;background:var(--line);opacity:.55}
.page-loading-placeholders>span:nth-child(2){width:82%}
.page-loading-placeholders>span:last-child{width:58%}
.page-loading-content,.page-loading .learning-badge>.page-loading-placeholders{width:100%;min-width:0}
.page-loading-avatar{background:var(--line);border-color:var(--line);box-shadow:none}
.page-loading .profile-symbol,.page-loading .badge-medal{background:var(--line)}
.page-loading .profile-tile .page-loading-status{margin-top:0}
.page-loading-profile{display:block}
@media(max-width:700px){.page-loading-grid,.page-loading-subjects{grid-template-columns:1fr}}

/* Every hero face occupies half of its square, including the race marker. */
.race-icon-choice>span,.profile-race-icon .profile-symbol,.profile-avatar{position:relative}
.race-icon-choice .race-hero-face,.profile-race-icon .profile-symbol .race-hero-face,.profile-avatar .race-hero-face,.daily-race-racer .race-hero-face{position:absolute;top:50%;left:50%;width:calc(var(--race-face-size,50%) + var(--race-face-border,0px));height:calc(var(--race-face-size,50%) + var(--race-face-border,0px));max-width:none;transform:translate(-50%,-50%);filter:none}
.race-icon-choice .race-hero-face{--race-face-border:1px}
.profile-avatar .race-hero-face{--race-face-border:5px}
.daily-race-racer .race-hero-face{--race-face-size:70%}

/* Only the compact Hint control is clickable, never the rest of its row. */
.quiz-help > button[data-hint]{flex:0 0 auto;width:max-content;max-width:100%;align-self:flex-start;touch-action:pan-y}

/* A small game tip overlaps the existing second-chance action, without an extra row. */
.second-chance-action{position:relative;overflow:visible}
.recommended-action-shimmer{position:relative}
.recommended-action-shimmer::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.22) 50%,transparent 60%);background-size:250% 100%;background-position:150% 0;opacity:0;pointer-events:none;animation:second-chance-shimmer 3s .9s ease-in-out infinite}
@keyframes second-chance-shimmer{0%{background-position:150% 0;opacity:0}12%{opacity:.4}48%{opacity:.4}60%{background-position:-50% 0;opacity:0}100%{background-position:-50% 0;opacity:0}}
@media(prefers-reduced-motion:reduce){.recommended-action-shimmer::after{animation:none}}
.second-chance-tip{position:absolute;top:0;right:10px;transform:translateY(-50%) rotate(-5deg);display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:1px solid var(--accent);border-radius:5px;background:var(--accent);color:#152110;font-size:11px;font-weight:900;line-height:16px;letter-spacing:.3px;white-space:nowrap;pointer-events:none}
.second-chance-tip .buddy-helper{width:20px;height:20px;stroke:currentColor;transform:none}
.second-chance-tip .buddy-thinking{animation-delay:2s}
.second-chance-tip .buddy-helper circle{fill:currentColor}

/* Loading uses real component geometry; only pending values are covered. */
[data-slot-loading],.page-loading-placeholders>span,.page-loading-avatar{position:relative;overflow:hidden;isolation:isolate}
.loading-slot-value{visibility:hidden}
[data-slot-loading="block"]{color:transparent!important}
[data-slot-loading="block"]>*{visibility:hidden}
[data-slot-loading]::after,.page-loading-placeholders>span::after,.page-loading-avatar::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;visibility:visible;background:linear-gradient(100deg,transparent 15%,rgba(189,201,219,.35) 50%,transparent 85%);transform:translateX(-100%);animation:page-data-shimmer 1.2s linear infinite}
body[data-theme=light] [data-slot-loading]::after,body[data-theme=light] .page-loading-placeholders>span::after,body[data-theme=light] .page-loading-avatar::after{background:linear-gradient(100deg,transparent 15%,rgba(114,136,162,.2) 50%,transparent 85%)}
@keyframes page-data-shimmer{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){[data-slot-loading]::after,.page-loading-placeholders>span::after,.page-loading-avatar::after{animation:none;transform:none;background:var(--line);opacity:.25}}

/* Compact round history and a quick return from long topic lists. */
.round-history>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0;list-style:none;cursor:pointer}.round-history>summary::-webkit-details-marker{display:none}.round-history>summary h2{margin:0}.round-history>summary .ui-icon{flex:none;width:22px;height:22px;color:var(--accent)}.round-history[open]>summary{margin-bottom:12px}.round-history[open]>summary .ui-icon{transform:rotate(180deg)}
.back-to-top{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:25;width:46px;height:46px;min-height:46px;padding:0;border-radius:50%;box-shadow:0 3px 12px #0004}.back-to-top[hidden]{display:none}.back-to-top svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}

/* The same question controls are used in learner quizzes and the admin demo. */
.quiz-format-label{display:inline-block;margin:0 0 12px;padding:4px 10px;border-radius:5px;background:var(--accent);color:#172126;font-size:.8rem;font-weight:800}
.quiz-structured{display:grid;gap:12px}.format-pair{display:grid;grid-template-columns:minmax(90px,.7fr) minmax(0,1.8fr);gap:12px;align-items:center;margin:0}.format-pair select{width:100%;min-width:0;margin:0;white-space:normal}.quiz-structured>button{justify-self:start}.quiz-source p{white-space:pre-wrap}
.demo-controls{margin-bottom:20px}.demo-controls>.row{align-items:center}.demo-controls strong{display:flex;align-items:center;gap:8px}.demo-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.demo-options label,.demo-options select{min-width:0;width:100%}.demo-test-panel{margin-top:14px}.demo-test-panel .row{flex-wrap:wrap}.demo-controls .data-note{margin:10px 0}.demo-controls summary{cursor:pointer}
@media(max-width:600px){.demo-options{grid-template-columns:minmax(0,1fr)}.format-pair{grid-template-columns:minmax(0,1fr);gap:5px}.demo-test-panel .row>button{flex:1 1 42%}.demo-controls>.row{flex-wrap:wrap}.quiz-structured>button{width:100%}}

/* Timeline placement and one-use matching choices share stored structured answers. */
.format-choice{justify-content:space-between;text-align:left;width:100%}.format-picker{max-width:560px;max-height:85dvh;overflow:auto}.format-picker-options{display:grid;gap:10px;margin:18px 0}.format-picker-options button{display:flex;flex-direction:column;align-items:flex-start;text-align:left}.format-picker-options small{font-weight:400}.format-picker .selected,.timeline-event.selected,.timeline-slot.selected,.timeline-slot.drop-target{border-color:var(--accent);background:var(--accent-soft);color:var(--ink)}
.timeline-bank{display:flex;flex-wrap:wrap;gap:10px}.timeline-event{flex:1 1 160px;text-align:left;touch-action:none}.timeline-event:disabled{opacity:.45}.quiz-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));position:relative;padding-top:10px;gap:12px}.quiz-timeline:before{content:"";position:absolute;top:17px;left:5%;right:5%;height:3px;background:var(--accent)}.timeline-stop{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}.timeline-dot{width:16px;height:16px;border:3px solid var(--accent);background:var(--paper);border-radius:50%;z-index:1}.timeline-position{font-size:.8rem;color:var(--muted)}.timeline-slot{width:100%;min-height:90px;border-style:dashed;touch-action:none;font-size:.9rem}.timeline-clear{min-height:32px;padding:3px 8px;font-size:.8rem}.timeline-event.dragging,.timeline-slot.dragging{position:relative;z-index:100;pointer-events:none;box-shadow:0 8px 22px #0005;opacity:.85}.timeline-slot.drop-target{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:600px){.quiz-timeline{display:flex;flex-direction:column;gap:16px;padding:0 0 0 28px}.quiz-timeline:before{top:8px;bottom:20px;left:7px;right:auto;width:3px;height:auto}.timeline-stop{display:grid;grid-template-columns:1fr auto;gap:5px;align-items:center}.timeline-dot{position:absolute;left:-28px;top:5px}.timeline-position{grid-column:1/-1}.timeline-slot{min-height:64px;text-align:left;justify-content:flex-start}.timeline-event{flex-basis:100%;min-height:48px}.timeline-clear{padding:8px}.format-picker .row{align-items:flex-start}.format-picker h2{overflow-wrap:anywhere}}

.timeline-drag-ghost{position:fixed!important;z-index:1000!important;pointer-events:none!important;margin:0;opacity:.94;box-shadow:0 10px 28px #0007;border:2px solid var(--accent);transform:rotate(-2deg);text-align:left}.timeline-event.drag-source,.timeline-slot.drag-source{opacity:.25}.timeline-slot{position:relative}.timeline-slot.drop-target{transition:background .12s,border-color .12s}.timeline-event,.timeline-slot{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.format-picker>[data-format-empty]{width:100%;padding:12px 18px;min-height:48px;white-space:normal;overflow-wrap:anywhere;text-align:center}

.timeline-bank{display:grid;grid-template-columns:minmax(0,1fr)}.timeline-bank>p{margin:0}.timeline-bank .timeline-event{width:100%;justify-content:space-between;text-align:left;min-height:58px;animation:timeline-next-in .22s ease-out}.timeline-drag-hint{font-size:24px;color:var(--accent);flex:none}@keyframes timeline-next-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.timeline-bank .timeline-event{animation:none}.timeline-slot.drop-target{transition:none}}

.timeline-bank{min-height:96px;align-content:start}.timeline-moving{z-index:3!important;position:relative}.timeline-slot:focus-visible,.timeline-event:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.timeline-moving{transform-origin:top left}
@media(max-width:600px){.timeline-stop{grid-template-columns:minmax(0,1fr)}.timeline-slot{grid-column:1/-1}}

.demo-controls .demo-answer-good{background:#263e34;color:#d0efbc;border-color:#78b366}.demo-controls .demo-answer-bad{background:#4c2630;color:#ffd1d6;border-color:#d98a94}body[data-theme=light] .demo-controls .demo-answer-good{background:#e2f3df;color:#225227;border-color:#629a65}body[data-theme=light] .demo-controls .demo-answer-bad{background:#ffe4e7;color:#872232;border-color:#ba6c77}.demo-controls [data-demo-fill]:disabled{opacity:.55}

.demo-question-reset{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.demo-question-reset button{flex:none}.quiz-structured [data-timeline-status]:empty{display:none}

.quiz-answer-help{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.quiz-answer-help button{flex:1 1 90px;min-width:0;padding:10px 12px;white-space:nowrap}.quiz-answer-help .buddy-helper{width:23px;height:23px;flex:none}.quiz-card .assisted-placement:disabled{background:#263e34;color:#d0efbc;border:2px solid #78b366;opacity:1}.quiz-card .assisted-eliminated:disabled{opacity:.4;text-decoration:line-through}.quiz-assistance-note{color:var(--muted)}body[data-theme=light] .quiz-card .assisted-placement:disabled{background:#e2f3df;color:#225227;border-color:#629a65}
@media(max-width:600px){.quiz-timeline:before{bottom:0}}

.timeline-slot.timeline-placeholder{color:var(--muted);font-weight:400}.timeline-position{font-size:1rem;font-weight:700;color:var(--ink)}

/* The header uses the same selected avatar and live updates as profile and race. */
#session-label{display:inline-flex;align-items:center;justify-content:flex-end;gap:7px}.session-name{min-width:0}.header-race-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:none;background:var(--accent-soft);border:1px solid var(--line);border-radius:7px;color:var(--accent)}.header-race-icon>svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.header-race-icon>.race-avatar{stroke:none}.header-race-icon>.race-icon-emoji{font-size:20px;line-height:1}.header-race-icon>.race-hero-face{position:absolute;top:50%;left:50%;width:70%;height:70%;transform:translate(-50%,-50%);max-width:none;filter:none}@media(max-width:700px){#session-label{max-width:none}.header-race-icon{width:26px;height:26px}.header-race-icon>svg{width:19px;height:19px}.header-race-icon>.race-hero-face{width:70%;height:70%}.header-race-icon>.race-icon-emoji{font-size:18px}}

.selection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.selection-badge{display:flex;align-items:center;gap:10px;position:relative;min-width:0;min-height:64px;padding:12px;background:#28364a;border:1px solid #52627b;border-radius:10px;cursor:pointer;transition:background .18s,border-color .18s,transform .18s}.selection-badge input{position:absolute;width:1px;height:1px;opacity:0;min-height:0}.selection-badge>span:last-child{overflow-wrap:anywhere;min-width:0}.selection-badge small{display:block;font-size:.7rem;font-weight:400;margin-top:4px}.selection-badge.selected{border-color:var(--accent);background:var(--accent-soft);transform:translateY(-1px)}.selection-badge:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:3px}.selection-badge.selection-good{background:#194d35;color:#e7fff0;border-color:#53d990;transform:none}.selection-badge.selection-wrong{background:#672d39;color:#fff0f2;border-color:#ff8092;transform:none}.selection-badge:has(input:disabled){cursor:default}.quiz-xp-earned.quiz-xp-lost{color:#ff8092}body[data-theme=light] .selection-badge{background:#eef2f7;color:var(--ink)}body[data-theme=light] .selection-badge.selected{background:var(--accent-soft)}body[data-theme=light] .selection-badge.selection-good{background:#d5f4df;color:#14532d;border-color:#24834b}body[data-theme=light] .selection-badge.selection-wrong{background:#ffe0e5;color:#8e2038;border-color:#b63850}body[data-theme=light] .quiz-xp-earned.quiz-xp-lost{color:#a9233a}@media(max-width:700px){.selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(prefers-reduced-motion:reduce){.selection-badge{transition:none;transform:none}}
.selection-badge{margin:0}
.header-race-icon{top:-1px}

.selection-badge>span:last-child{font-size:1.15rem;font-weight:700;line-height:1.3}

.selection-badge.selection-missed{background:rgba(83,217,144,.09);border-color:rgba(83,217,144,.4);transform:none}body[data-theme=light] .selection-badge.selection-missed{background:rgba(36,131,75,.08);border-color:rgba(36,131,75,.4)}
.selection-badge.selection-missed{color:#ffc078;border-color:#ffc078}body[data-theme=light] .selection-badge.selection-missed{color:#9a4b00;border-color:#b56516}

.demo-hint-dialog{width:min(560px,calc(100% - 32px));box-sizing:border-box}.demo-hint-dialog h2{margin:0}.demo-hint-buddy{display:flex;justify-content:center;margin:16px 0;color:var(--accent)}.demo-hint-buddy svg{width:64px;height:64px;transform:rotate(-8deg)}.demo-hint-dialog .page-hint{margin:16px 0}.demo-hint-dialog .page-hint p{margin:0}.demo-hint-dialog .format-picker-options button{font-size:1.1rem;min-height:56px}.demo-hint-dialog .demo-mini-wrong{border-color:#ff8092;background:#672d39;color:#fff0f2}.demo-hint-cheer{font-size:1.15rem;font-weight:700;color:var(--accent)}.demo-mini-feedback{min-height:1.4em}.demo-hint-won .demo-hint-buddy svg{animation:demo-hint-happy .85s ease-in-out}.demo-hint-won>button:last-child{width:100%}@keyframes demo-hint-happy{0%,100%{transform:rotate(-8deg) scale(1)}30%{transform:rotate(15deg) scale(1.12)}65%{transform:rotate(-15deg) scale(1.05)}}@media(prefers-reduced-motion:reduce){.demo-hint-won .demo-hint-buddy svg{animation:none}}

.selection-badge{justify-content:center;text-align:center}

@media(max-width:700px){.quiz-answer-help [data-demo-hint]{flex:1 0 100%;display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;overflow-wrap:normal}}

.demo-quiz-tools{display:flex;align-items:center;gap:10px;flex:none}.demo-streak{display:flex;align-items:center;gap:7px;padding:6px 10px;border:1px solid var(--line);border-radius:12px;background:var(--accent-soft);color:var(--accent);text-align:center;transform-origin:center}.demo-streak-buddy{display:flex;align-items:center}.demo-streak-buddy svg{width:28px;height:28px;transform:rotate(-8deg)}.demo-streak b{display:block;font-size:1.15rem;line-height:1.1;font-variant-numeric:tabular-nums}.demo-streak-target{font-size:.9rem}.demo-streak small{display:block;font-size:.65rem;line-height:1.3;margin-top:3px}.demo-streak-bump{animation:demo-streak-pop .65s cubic-bezier(.2,.8,.2,1)}.demo-streak-bump .demo-streak-buddy svg{animation:demo-hint-happy .85s ease-in-out}@keyframes demo-streak-pop{0%,100%{transform:scale(1)}35%{transform:scale(1.1)}65%{transform:scale(.98)}}@media(max-width:700px){.quiz-top:has(.demo-quiz-tools){gap:10px}.quiz-top:has(.demo-quiz-tools) h1{font-size:1.4rem;min-width:0}.demo-quiz-tools{gap:7px}.demo-streak{padding:6px 8px;gap:5px}.demo-streak-buddy svg{width:25px;height:25px}}@media(prefers-reduced-motion:reduce){.demo-streak-bump,.demo-streak-bump .demo-streak-buddy svg{animation:none}}

.demo-streak{border:0;background:transparent;border-radius:0;padding:3px 5px;color:var(--ink);gap:9px}.demo-streak-buddy{color:var(--accent)}.demo-streak-buddy svg{width:34px;height:34px}.demo-streak b{font-size:1.3rem}.demo-streak-target{font-size:1rem;color:var(--muted)}.demo-streak small{color:var(--muted);font-size:.65rem;margin-top:2px}@media(max-width:700px){.demo-streak{padding:3px 4px;gap:7px}.demo-streak-buddy svg{width:31px;height:31px}}

.demo-streak{padding:2px 3px;gap:5px}.demo-streak-buddy svg{width:23px;height:23px}.demo-streak b{font-size:1rem;font-weight:600}.demo-streak-target{font-size:.85rem}@media(max-width:700px){.demo-streak{padding:2px 3px;gap:5px}.demo-streak-buddy svg{width:23px;height:23px}}

.demo-streak{gap:7px;color:var(--muted)}.demo-streak-buddy{position:relative;color:var(--muted);opacity:.8}.demo-streak-buddy>svg:not(.demo-streak-thumb){width:19px;height:19px}.demo-streak-buddy>.demo-streak-thumb{position:absolute;width:11px;height:11px;right:-5px;bottom:-3px;transform:none;color:var(--accent);background:var(--paper);border-radius:3px}.demo-streak b,.demo-streak-target{font-size:.8rem;font-weight:500}.demo-streak-bump .demo-streak-buddy>.demo-streak-thumb{animation:none}

.demo-streak{gap:8px;color:var(--ink)}.demo-streak-buddy{width:35px;height:30px;opacity:1}.demo-streak-buddy>svg:not(.demo-streak-thumb){width:28px;height:28px}.demo-streak-buddy>.demo-streak-thumb{width:18px;height:18px;right:-2px;bottom:-2px;border-radius:4px}.demo-streak b{font-size:1rem;font-weight:600}.demo-streak-target{font-size:.9rem;font-weight:500}

.demo-streak{gap:3px;padding:0 3px}.demo-streak-buddy{width:24px;height:26px}.demo-streak-buddy>svg:not(.demo-streak-thumb){width:24px;height:24px}.demo-streak-hand{position:relative;display:block;width:56px;height:49px;color:var(--accent)}.demo-streak-hand>svg{display:block;width:56px;height:49px;fill:currentColor}.demo-streak-count{position:absolute;left:16px;right:4px;top:24px;text-align:center;font-size:12px;font-weight:800;line-height:20px;font-variant-numeric:tabular-nums;color:#142017}

.demo-streak-balloon{position:relative;display:block;width:42px;height:42px;transform:rotate(-8deg)}.demo-streak-balloon>.buddy-logo{width:42px;height:42px;transform:none;stroke:var(--accent);stroke-width:1.6}.demo-streak-balloon-count{position:absolute;left:0;right:6px;top:13px;height:18px;line-height:18px;text-align:center;color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}.demo-streak-bump .demo-streak-balloon{animation:demo-hint-happy .85s ease-in-out}@media(prefers-reduced-motion:reduce){.demo-streak-bump .demo-streak-balloon{animation:none}}

.demo-streak-balloon{width:38px;height:38px}.demo-streak-balloon>.buddy-logo{width:38px;height:38px}.demo-streak-balloon-count{top:11px;right:5px;color:var(--accent)}

.demo-streak-balloon{transform:none}.demo-streak-balloon>.buddy-logo{transform:rotate(-8deg)}.demo-streak-balloon-count{transform:none}.demo-streak-bump .demo-streak-balloon{animation:none}.demo-streak-bump .demo-streak-balloon>.buddy-logo{animation:demo-hint-happy .85s ease-in-out}@media(prefers-reduced-motion:reduce){.demo-streak-bump .demo-streak-balloon>.buddy-logo{animation:none}}

.demo-streak-slash{opacity:.9;font-weight:400}

.demo-streak-balloon>.buddy-logo{stroke-opacity:.85}

.demo-streak-balloon-xp{position:absolute;right:-1px;bottom:3px;padding:0 1px;background:var(--paper);color:var(--accent);font-size:8px;font-weight:700;line-height:10px;letter-spacing:.1px}

.demo-streak-balloon-xp{right:1px;opacity:.9;font-weight:400}

.demo-streak-balloon-xp{right:5px;font-size:10px;line-height:12px}

.demo-streak-balloon-xp{bottom:1px}

.demo-controls .demo-neutral-border{border:1px solid currentColor}

.demo-controls [data-demo-reset].demo-neutral-border{padding:10px 14px}

/* Compact placement badges share drag/swap behavior with dated timelines. */
.quiz-card .timeline-slot{min-height:48px;padding:10px 14px}.timeline-bank .timeline-event{min-height:48px;padding:10px 14px}.timeline-bank{min-height:80px}.quiz-placement:before,.quiz-placement .timeline-dot{display:none}.quiz-placement{padding-top:0}@media(max-width:600px){.quiz-placement{padding-left:0}}
.quiz-timeline:not(.quiz-placement):after{content:"";position:absolute;width:12px;height:12px;border-radius:50%;background:var(--accent);right:5%;top:18.5px;transform:translate(50%,-50%)}@media(max-width:600px){.quiz-timeline:not(.quiz-placement):after{left:8.5px;right:auto;top:auto;bottom:0;transform:translate(-50%,50%)}}

@media(max-width:600px){.format-pair>span{padding-left:16px}}

.selection-badge>span:last-child{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}.selection-grid.selection-many .selection-badge{min-height:48px;padding:8px 10px}
.selection-grid.selection-wrap .selection-badge>span:last-child{flex:1 1 auto;white-space:normal;overflow-wrap:anywhere;line-height:1.4;text-align:left}

/* The same catch-up notice and controls on the library card and subject page. */
.missed-practice{position:relative;margin-top:16px;padding:16px;border:1px solid #e8a15b;border-radius:14px;background:rgba(232,161,91,.08);color:var(--ink);font-size:13px;line-height:1.55}
.missed-practice-copy>strong{display:block;color:#ffc58b;font-size:15px;line-height:1.4}
.missed-practice p{margin:7px 0;overflow-wrap:anywhere}
.missed-practice details{margin:8px 0;font-size:12px}
.missed-practice summary{cursor:pointer;color:var(--accent);font-weight:700}
.missed-practice details p{margin:10px 0}
.missed-practice>small{display:block;margin:10px 0;color:var(--muted);font-size:12px}
.missed-practice-action{display:flex;width:100%;justify-content:space-between;margin-top:10px;gap:12px;border-color:var(--accent)}
.missed-practice-action>span{color:var(--accent)}
.missed-practice.complete{border-color:var(--accent);background:rgba(178,234,74,.06)}
.missed-practice.complete .missed-practice-copy>strong{color:var(--accent)}
.subject .missed-practice{z-index:3;margin-top:14px;padding:12px;font-size:12px}
.subject .missed-practice-copy>strong{font-size:14px}

body[data-theme=light] .missed-practice-copy>strong{color:#874500}
body[data-theme=light] .missed-practice.complete .missed-practice-copy>strong{color:var(--accent-text)}

.catchup-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin-top:12px}
.catchup-controls select{box-sizing:border-box;width:100%;min-width:0;height:38px;min-height:38px;margin:0;padding:10px 8px;font-size:12px;line-height:1.2;border-radius:10px;border-color:#e8a15b}
.catchup-controls .missed-practice-action{box-sizing:border-box;width:auto;min-width:96px;height:38px;min-height:38px;margin:0;padding:10px 12px;gap:10px;border-radius:10px;justify-content:center;font-size:13px;line-height:1.2;border-color:#e8a15b}
.catchup-controls .missed-practice-action:disabled{opacity:.5;cursor:default}

@media(max-width:700px){
 .catchup-controls{position:relative;align-items:stretch}
 .catchup-controls select,.catchup-controls .missed-practice-action{-webkit-appearance:none;appearance:none;height:38px;min-height:38px;max-height:38px;border:1px solid #e8a15b;border-radius:10px}
 .catchup-controls select{padding-right:28px}
 .catchup-controls::after{content:"";position:absolute;right:118px;top:14px;width:7px;height:7px;border-right:2px solid var(--ink);border-bottom:2px solid var(--ink);transform:rotate(45deg);pointer-events:none}
}

.catchup-controls select:focus,.catchup-controls select:focus-visible,.catchup-controls [data-catchup-start]:focus,.catchup-controls [data-catchup-start]:focus-visible{outline:0;box-shadow:none;border-color:#e8a15b}

.catchup-controls [data-catchup-start]:disabled::after{animation:none;opacity:0}

.missed-practice-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.missed-practice-copy{min-width:0;flex:1}
.missed-buddy{display:block;flex:0 0 64px;width:64px;height:71px;color:var(--accent);overflow:visible;pointer-events:none}
.missed-buddy-tear{fill:#87cbd9;stroke:none;opacity:0;transform-box:fill-box;transform-origin:50% 0;animation:missed-buddy-tear 6s linear 2s infinite}
@keyframes missed-buddy-tear{0%{opacity:0;transform:translateY(0) scale(.15)}15%{opacity:1;transform:translateY(0) scale(1)}33%{opacity:1;transform:translateY(0) scale(1)}41%{opacity:1;transform:translateY(12px) scale(.9)}45%,100%{opacity:0;transform:translateY(18px) scale(.8)}}
@media(prefers-reduced-motion:reduce){.missed-buddy-tear{animation:none;opacity:0}}

.missed-buddy-splash>*{opacity:0;animation:missed-buddy-splash 6s linear 2s infinite;--splash-x:0px;--splash-y:-3px}
.missed-buddy-splash .splash-left{--splash-x:-4px;--splash-y:-2px}
.missed-buddy-splash .splash-right{--splash-x:4px;--splash-y:-2px}
@keyframes missed-buddy-splash{0%,44%{opacity:0;transform:translate(0,0)}45%{opacity:.6;transform:translate(0,0)}49%{opacity:.45;transform:translate(var(--splash-x),var(--splash-y))}54%,100%{opacity:0;transform:translate(var(--splash-x),1px)}}
@media(prefers-reduced-motion:reduce){.missed-buddy-splash>*{animation:none;opacity:0}}


.day-goal-summary .study-methods .learning-action{box-sizing:border-box;height:38px;min-height:38px;padding-block:8px}
.open-practice-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px;width:100%}
.open-practice-action{position:relative;box-sizing:border-box;min-width:0;min-height:38px;padding:8px 10px;border-color:var(--accent);font-size:13px;white-space:nowrap}
.open-practice-badge{position:absolute;top:0;right:12px;transform:translateY(-50%);padding:2px 6px;border:1px solid var(--accent);border-radius:999px;background:var(--paper);color:var(--accent);font-size:10px;line-height:1}

.subject-missed-note{margin:0;color:#ffc58b;font-size:12px;font-weight:700}
body[data-theme=light] .subject-missed-note{color:#874500}

/* Compact topic links: keep the whole card clickable. */
.goal.goal-topic{grid-template-columns:55px minmax(0,1fr);padding-right:20px}.goal.goal-topic h2{font-size:16px;margin:0}.goal-topic-heading{display:grid;grid-template-columns:minmax(0,1fr) 12px;align-items:center;gap:14px;margin-right:-10px}.goal-topic .goal-chevron{width:12px;height:32px;background:var(--accent);clip-path:polygon(0 0,100% 50%,0 100%);font-size:0;line-height:0}.goal.goal-topic .meter{grid-column:1/-1}@media(max-width:700px){.goal.goal-topic{grid-template-columns:40px minmax(0,1fr);padding-right:16px}.goal.goal-topic h2{font-size:14px}.goal-topic-heading{margin-right:-6px}}

/* Read-only parent review uses the shared learner question components. */
.parent-review-card .quiz-navigation{margin-bottom:20px}.parent-review-card .quiz-navigation:last-child{margin-top:24px;margin-bottom:0}.parent-review-card .quiz-position{flex-wrap:wrap}.parent-review-card .parent-chosen-answer{overflow-wrap:anywhere;white-space:pre-wrap}.parent-review-card .round-answer-status[data-review-result=incorrect]{color:#ff8092}body[data-theme=light] .parent-review-card .round-answer-status[data-review-result=incorrect]{color:#a51c3b}

.parent-review-card:has(.feedback[data-result=correct]) textarea[readonly]{border-color:#53d990}.parent-review-card:has(.feedback[data-result=incorrect]) textarea[readonly]{border-color:#ff8092}

/* Quiz request feedback is separate from the answer controls and never moves the question. */
.quiz-storage-status{position:fixed;z-index:1500;left:50%;bottom:calc(22px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:calc(100vw - 28px);padding:12px 16px;border:1px solid var(--line,#526580);border-radius:14px;background:var(--panel,#202c3e);color:var(--text,#f5f7fb);box-shadow:0 6px 22px #0004;font-size:15px;pointer-events:none}.quiz-storage-status [data-storage-copy]{min-width:0}.quiz-storage-status [data-storage-seconds]{white-space:nowrap;font-variant-numeric:tabular-nums;opacity:.8}.quiz-storage-spinner{width:18px;height:18px;flex:0 0 18px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:quiz-storage-spin .8s linear infinite}@keyframes quiz-storage-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.quiz-storage-spinner{animation:none}}

/* The document scanner shares the existing upload row and dialog. */
.upload-buttons{display:inline-grid;grid-template-columns:auto auto 44px;align-items:stretch;gap:8px;max-width:100%}
.upload-buttons .upload-pick{padding-inline:10px;white-space:nowrap}
.upload-buttons .scan-pick{width:44px;height:44px;min-height:44px;align-self:center;padding:0;display:grid;place-items:center}
.scan-pick .ui-icon{width:25px;height:25px}
.a4-scanner{max-width:540px;max-height:94vh;overflow:auto}
.a4-scanner h2{margin:0}
.a4-scanner .scan-stage{--scan-height:min(52vh,470px);position:relative;overflow:hidden;isolation:isolate;height:var(--scan-height);background:#101620;border-radius:10px}
.scan-stage video{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.scan-frame{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(88%,calc(var(--scan-height) * .62));aspect-ratio:210 / 297;box-shadow:0 0 0 100vmax #0008;pointer-events:none}
.scan-frame i{position:absolute;width:22px;height:22px;border:solid var(--accent);filter:drop-shadow(0 1px 2px #172318)}
.scan-frame i:nth-child(1){left:0;top:0;border-width:3px 0 0 3px}
.scan-frame i:nth-child(2){right:0;top:0;border-width:3px 3px 0 0}
.scan-frame i:nth-child(3){right:0;bottom:0;border-width:0 3px 3px 0}
.scan-frame i:nth-child(4){left:0;bottom:0;border-width:0 0 3px 3px}
.a4-scanner [data-capture]{width:100%}
@media(max-width:700px){.upload-buttons{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px}.upload-buttons .upload-pick{padding-inline:4px;gap:5px}}

.knowledge-reading{display:block;min-width:0;width:100%}.knowledge-coverage{display:block;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.35;margin-top:3px;color:var(--muted,#64748b);font-weight:400;text-align:center}.knowledge-reading .progress-meter{display:block}
