/* Student preferences share the admin theme names while keeping the reading surface calm. */
[data-theme=builder]{--ink:#2d2922;--muted:#685b49;--accent:#87500a;--line:#e7dbc7;--bg:#faf7ef;--soft:#f8eacc;--highlight:#f5b640;--secondary:#3b6384}
[data-theme=panda]{--ink:#213b2b;--muted:#586d5f;--accent:#32633f;--line:#d7e4d7;--bg:#f3f7ef;--soft:#e2edda;--highlight:#91b65d;--secondary:#373b32}
[data-theme=spider]{--ink:#172e4a;--muted:#5b687a;--accent:#a12d3b;--line:#dce2ee;--bg:#f4f6fc;--soft:#fbe8eb;--highlight:#d54552;--secondary:#2f5b95}
[data-theme=avengers]{--ink:#2b2440;--muted:#70667e;--accent:#655092;--line:#e2dceb;--bg:#f7f4fb;--soft:#ede6f7;--highlight:#ba9450;--secondary:#655092}
[data-theme=captain]{--ink:#21324d;--muted:#5d6d83;--accent:#2b527e;--line:#d9e1eb;--bg:#f3f6fa;--soft:#e4edf7;--highlight:#b54148;--secondary:#2b527e}
[data-theme=builder]{--theme-motif:linear-gradient(#87500a0a 1px,transparent 1px),linear-gradient(90deg,#87500a0a 1px,transparent 1px);--theme-motif-size:24px 24px}
[data-theme=panda]{--theme-motif:repeating-linear-gradient(94deg,transparent 0 45px,#32633f09 45px 49px,transparent 49px 90px);--theme-motif-size:auto}
[data-theme=spider]{--theme-motif:repeating-conic-gradient(from 15deg at 100% 0,#2f5b9509 0deg 1deg,transparent 1deg 20deg);--theme-motif-size:auto}
[data-theme=avengers]{--theme-motif:radial-gradient(circle at 88% 22%,#ba94501d 0 2px,transparent 3px),radial-gradient(circle at 70% 78%,#65509213 0 2px,transparent 3px);--theme-motif-size:auto}
[data-theme=captain]{--theme-motif:repeating-radial-gradient(circle at 100% 50%,transparent 0 26px,#b541480a 26px 29px,transparent 29px 48px);--theme-motif-size:auto}
body{accent-color:var(--accent)}::selection{background:var(--soft);color:var(--ink)}
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#account{display:flex;align-items:center;gap:9px;flex:none}
.personalize-trigger{display:inline-flex;align-items:center;gap:9px;min-height:42px;padding:4px 11px 4px 5px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:12px;font-weight:650;white-space:nowrap}
.personalize-trigger:hover,.personalize-trigger[aria-expanded=true]{background:var(--soft);border-color:var(--accent)}
.avatar-mark{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:var(--accent);color:#fff;font-size:17px;font-weight:700;line-height:1}
.avatar-mark svg{width:22px;height:22px}.avatar-mark span{max-width:100%;overflow:hidden}
.personalize-panel{margin-bottom:25px;scroll-margin-top:calc(var(--student-header-height,100px) + 15px);padding:26px}
.personalize-heading{display:flex;align-items:start;justify-content:space-between;gap:18px;margin-bottom:18px}
.personalize-heading h2{font-size:24px;line-height:1.2;margin:0 0 6px;letter-spacing:-.02em}
.personalize-heading p{margin:0;color:var(--muted);font-size:13px}
#student-preferences fieldset{min-width:0;margin:0;padding:0;border:0}
#student-preferences legend{padding:0;margin:0 0 10px;font-size:13px;font-weight:700;color:var(--ink)}
.theme-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.student-theme-choice{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;min-height:122px;padding:9px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;color:var(--ink);font-size:12px;line-height:1.25}
.student-theme-choice:has(input:checked),.identity-choice:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.student-theme-choice:has(input:focus-visible),.identity-choice:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.student-theme-choice input,.identity-choice input{position:absolute;width:1px;height:1px;opacity:0}
.student-theme-choice strong{font-size:12px;line-height:1.3}.student-theme-choice small{font-size:10px;line-height:1.35;color:var(--muted)}
.theme-preview{display:flex;align-items:end;gap:6px;width:100%;height:43px;padding:8px;border-radius:7px;background:var(--preview-soft)}
.theme-preview i{width:13px;height:13px;border-radius:50%;background:var(--preview-main)}.theme-preview i:nth-child(2){background:var(--preview-accent)}.theme-preview i:nth-child(3){background:var(--preview-secondary)}
[data-preview-theme=builder]{--preview-soft:#f8eacc;--preview-main:#87500a;--preview-accent:#f5b640;--preview-secondary:#3b6384}
[data-preview-theme=panda]{--preview-soft:#e2edda;--preview-main:#32633f;--preview-accent:#91b65d;--preview-secondary:#373b32}
[data-preview-theme=spider]{--preview-soft:#fbe8eb;--preview-main:#a12d3b;--preview-accent:#d54552;--preview-secondary:#2f5b95}
[data-preview-theme=avengers]{--preview-soft:#ede6f7;--preview-main:#655092;--preview-accent:#ba9450;--preview-secondary:#2b2440}
[data-preview-theme=captain]{--preview-soft:#e4edf7;--preview-main:#2b527e;--preview-accent:#b54148;--preview-secondary:#21324d}
.identity-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}
.identity-fields label{display:block;color:var(--ink);font-size:13px;font-weight:650}.identity-fields input{min-height:44px;font-size:16px}
.identity-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:21px}
.identity-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.identity-choice{position:relative;display:grid;justify-items:center;gap:5px;min-width:0;padding:9px 4px 7px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);cursor:pointer;font-size:10px;font-weight:600;text-align:center}
.choice-art{display:grid;place-items:center;width:35px;height:35px;border-radius:9px;background:var(--soft);color:var(--accent);font-size:18px;font-weight:700}.choice-art svg{width:24px;height:24px}
.preference-footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px 22px;padding-top:18px;border-top:1px solid var(--line)}
.preference-footer label{display:flex;align-items:center;gap:8px;min-width:0;margin:0;font-size:12px;color:var(--ink);font-weight:500}.preference-footer input{width:18px;height:18px;margin:0;flex:none}
.preference-footer #student-preferences-reset{margin-left:auto}.preference-footer #student-preferences-status{color:var(--muted);font-size:11px}
.student-motivation{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:16px;margin:0 0 25px;padding:17px 20px;border:1px solid var(--line);border-radius:12px;background-color:var(--soft);background-image:var(--theme-motif);background-size:var(--theme-motif-size);color:var(--ink)}
.student-motivation .avatar-mark{width:54px;height:54px;font-size:25px}.student-motivation .avatar-mark svg{width:32px;height:32px}
.motivation-copy{min-width:0}.motivation-heading{display:flex;align-items:center;gap:7px;color:var(--accent);font-size:11px;letter-spacing:.02em}.motivation-heading svg{width:17px;height:17px}
.motivation-copy p{margin:3px 0;font-size:16px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}.motivation-copy small{color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.motivation-prop{display:grid;place-items:center;width:54px;height:54px;border-radius:12px;background:#ffffffa8;color:var(--accent)}.motivation-prop svg{width:34px;height:34px}
.motivation-next{border:0;background:none;color:var(--accent);font-size:11px;font-weight:700;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.welcome-quote{padding:12px 15px;border-radius:9px;background:var(--soft);color:var(--accent);font-size:14px;font-weight:600}
[data-density=comfortable] .question{padding:clamp(22px,3vw,34px)}
[data-density=comfortable] .question-body,[data-density=comfortable] .option>div,[data-density=comfortable] .passage{line-height:1.9}
[data-density=comfortable] .option{padding:20px}
[data-density=compact] .question{padding:18px 22px}
[data-density=compact] .question-heading{gap:6px 9px;margin-bottom:10px}
[data-density=compact] .question-heading .badge{padding:3px 6px}
[data-density=compact] .question .options{margin:12px 0}
[data-density=compact] .question .option{padding:10px 12px}
[data-density=compact] .question .question-actions,[data-density=compact] .question .review-note,[data-density=compact] .question>small.muted{display:none}
[data-density=compact] .question .concepts{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;margin:12px 0 0;padding-bottom:3px;scrollbar-width:thin}
[data-density=compact] .question .concept{flex:none;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:999px}
.student-density-panel{margin-bottom:20px!important}.student-density-panel>p{margin:-4px 0 10px;color:var(--muted);font-size:12px}
.density-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.density-choice{position:relative;display:flex;align-items:center;gap:10px;min-width:0;min-height:78px;padding:10px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);cursor:pointer}
.density-choice:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.density-choice:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:3px}
.density-choice input{position:absolute;width:1px;height:1px;opacity:0}.density-choice>span:last-child{display:grid;gap:3px}.density-choice strong{font-size:12px}.density-choice small{font-size:10px;line-height:1.35;color:var(--muted)}
.density-mini{display:grid;align-content:start;gap:4px;width:54px;height:46px;flex:none;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}
.density-mini i{display:block;height:4px;border-radius:3px;background:var(--accent);opacity:.65}.density-mini i:nth-child(2){width:75%}.density-mini i:nth-child(n+3){background:var(--highlight)}
[data-preview-density=comfortable] .density-mini i{height:6px}[data-preview-density=compact] .density-mini{gap:3px}[data-preview-density=compact] .density-mini i{height:3px}
.student-theme-choice .theme-preview{position:relative;display:block;height:56px;padding:0;overflow:hidden;border:1px solid var(--preview-line,var(--line));background:var(--preview-soft)}
.student-theme-choice .theme-preview>span{position:absolute;display:block}
.student-theme-choice .theme-preview .preview-top{inset:0 0 auto;height:13px;background:var(--preview-main)}
.student-theme-choice .theme-preview .preview-card{inset:18px 10px 5px;display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:3px;padding:5px;border-radius:5px;background:#fff;box-shadow:0 3px 7px #172b2c18}
.student-theme-choice .theme-preview i{display:block;width:auto;height:3px;border-radius:2px;background:var(--preview-main)}
.student-theme-choice .theme-preview .preview-line{grid-column:1/-1}.student-theme-choice .theme-preview .preview-line.short{width:70%;background:var(--preview-secondary)}
.student-theme-choice .theme-preview .preview-option{height:8px;border-radius:3px;background:var(--preview-soft);border:1px solid var(--preview-line,var(--line))}
.student-theme-choice .theme-preview .preview-accent{top:19px;right:12px;width:5px;height:5px;border-radius:50%;background:var(--preview-accent)}
[data-preview-theme=builder]{--preview-line:#d9bc87}[data-preview-theme=panda]{--preview-line:#b4d0b5}[data-preview-theme=spider]{--preview-line:#e3b8c2}[data-preview-theme=avengers]{--preview-line:#cdbde0}[data-preview-theme=captain]{--preview-line:#b7cce2}
@media(max-width:900px){.theme-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.identity-options{grid-template-columns:1fr}.identity-choices{grid-template-columns:repeat(4,minmax(0,90px))}.student-motivation{grid-template-columns:auto minmax(0,1fr) auto}.motivation-next{grid-column:2/-1;justify-self:start}}
@media(max-width:650px){#account{gap:6px}.personalize-trigger{width:42px;padding:4px;justify-content:center}.personalize-label{display:none}.personalize-panel{padding:18px}.personalize-heading h2{font-size:21px}.theme-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.identity-fields{grid-template-columns:1fr}.identity-choices{grid-template-columns:repeat(4,minmax(0,1fr))}.student-motivation{grid-template-columns:auto minmax(0,1fr);gap:10px;padding:13px}.student-motivation .avatar-mark{width:42px;height:42px;font-size:21px}.student-motivation .avatar-mark svg{width:26px;height:26px}.motivation-prop{display:none}.motivation-next{grid-column:2;justify-self:start}.motivation-copy p{font-size:14px}.preference-footer #student-preferences-reset{margin-left:0}}
@media(max-width:900px){.density-choices{grid-template-columns:1fr}}
@media(max-width:650px){[data-density=comfortable] .question{padding:20px}[data-density=compact] .question{padding:14px}}
.student-motivation{gap:12px;margin-bottom:12px;padding:10px 14px}
.student-motivation .avatar-mark{width:40px;height:40px;font-size:19px}
.student-motivation .avatar-mark svg{width:25px;height:25px}
.student-motivation .motivation-prop{width:40px;height:40px}
.student-motivation .motivation-prop svg{width:24px;height:24px}
.student-motivation .motivation-copy p{margin:1px 0;font-size:14px;line-height:1.35}
@media(max-width:650px){.student-motivation{grid-template-columns:auto minmax(0,1fr) auto;padding:8px 10px;gap:8px}.student-motivation .avatar-mark{width:32px;height:32px;font-size:16px}.student-motivation .avatar-mark svg{width:20px;height:20px}.student-motivation .motivation-heading,.student-motivation .motivation-copy small{display:none}.student-motivation .motivation-next{grid-column:auto;font-size:10px}.student-motivation .motivation-copy p{font-size:12px}}
