/* Learning surfaces only; the home page and private HTML lessons keep their own design. */
html[data-study-theme] {
  --study-accent:#e75c2f; --study-deep:#9b371b; --study-soft:#fff0dc;
  --study-bg:#fff8ef; --study-card:#fffdf9; --study-panel:#fff4e4;
  --study-ink:#40291f; --study-muted:#796154; --study-line:#edd9c6;
  --study-glow:#ffcf70; --study-nav:#fffdf7;
}
html[data-study-theme="coral"] {
  --study-accent:#c74763; --study-deep:#95334c; --study-soft:#ffe9eb;
  --study-bg:#fff5f2; --study-card:#fffdfb; --study-panel:#fff0ec;
  --study-ink:#472730; --study-muted:#805c63; --study-line:#eed3d6;
  --study-glow:#ffc29f; --study-nav:#fffaf7;
}
html[data-study-theme="amber"] {
  --study-accent:#a96516; --study-deep:#7d4510; --study-soft:#ffedc5;
  --study-bg:#fff9e8; --study-card:#fffef7; --study-panel:#fff3d6;
  --study-ink:#42331b; --study-muted:#79663f; --study-line:#e7d6ad;
  --study-glow:#ffce60; --study-nav:#fffdf2;
}
html[data-study-theme="cocoa"] {
  color-scheme:dark;
  --study-accent:#ffb16f; --study-deep:#ffcc93; --study-soft:#50362c;
  --study-bg:#211b19; --study-card:#302623; --study-panel:#382b25;
  --study-ink:#fff2e4; --study-muted:#cfb9a8; --study-line:#60483a;
  --study-glow:#9a573b; --study-nav:#2b211e;
}
body.student-theme {
  --primary:var(--study-accent); --primary-dark:var(--study-deep);
  --ink:var(--study-ink); --muted:var(--study-muted); --soft:var(--study-muted);
  --line:var(--study-line); --bg:var(--study-bg); --card:var(--study-card);
  background:var(--study-bg); color:var(--study-ink);
  font-family:ui-rounded,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}
.student-theme .nav { background:var(--study-nav); border-color:var(--study-line); gap:14px; }
.student-theme .nav-links { margin-left:auto; gap:18px; min-width:0; }
.student-theme .nav a { color:var(--study-ink); }
.student-theme .brand strong { color:var(--study-ink); }
.student-theme .brand small,.student-theme .footer { color:var(--study-muted); }
.student-theme .brand-mark { background:var(--study-accent); }
.student-theme .nav-search { background:var(--study-panel); border-color:var(--study-line); }
.student-theme input,.student-theme textarea,.student-theme select { color:var(--study-ink); background:var(--study-card); border-color:var(--study-line); }
.student-theme .nav-search input { background:transparent; }
.student-theme .btn-secondary { color:var(--study-ink); background:var(--study-card); border-color:var(--study-line); }
.student-theme .btn-primary { color:#fff; background:var(--study-accent); border-color:var(--study-accent); }
html[data-study-theme="cocoa"] .student-theme .btn-primary { color:#2b1b16; }
.student-theme :is(button,a,input,summary):focus-visible { outline:3px solid var(--study-accent); outline-offset:3px; }
.student-theme .nav-search input:focus-visible { outline:none; }
.study-theme-switch { position:relative; flex:0 0 auto; z-index:70; font-size:12px; }
html[data-study-theme-host="true"] .exam-body .study-theme-switch { display:none; }
html[data-study-theme-host="true"] .exam-body .study-mission-brand { padding-right:0; }
.study-theme-switch>summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; border:1px solid var(--study-line); border-radius:999px; padding:8px 12px; background:var(--study-card); color:var(--study-ink); font-weight:750; white-space:nowrap; min-height:34px; }
.study-theme-switch>summary::-webkit-details-marker { display:none; }
.study-theme-dot { width:12px; height:12px; border-radius:50%; background:var(--study-accent); box-shadow:0 0 0 3px var(--study-soft); }
.study-theme-chevron { font-size:16px; line-height:12px; }
.study-theme-switch[open] .study-theme-chevron { transform:rotate(180deg); }
.study-theme-menu { position:absolute; top:calc(100% + 9px); right:0; width:302px; max-width:calc(100vw - 24px); padding:16px; border:1px solid var(--study-line); border-radius:20px; background:var(--study-card); color:var(--study-ink); box-shadow:0 18px 50px #24130930; }
.study-theme-menu-head { display:flex; flex-direction:column; gap:5px; margin-bottom:12px; }
.study-theme-menu-head strong { font-size:16px; }
.study-theme-menu-head small,.study-theme-note { color:var(--study-muted); }
.study-theme-options { display:grid; gap:8px; }
.study-theme-option { display:flex; align-items:center; gap:10px; width:100%; min-height:60px; padding:8px; border:1px solid var(--study-line); border-radius:13px; background:var(--study-card); color:var(--study-ink); text-align:left; cursor:pointer; }
.study-theme-option[aria-pressed="true"] { background:var(--study-soft); border-color:var(--study-accent); }
.study-theme-option b { display:block; font-size:13px; }
.study-theme-option small { display:block; margin-top:3px; font-size:11px; color:var(--study-muted); }
.study-theme-check { margin-left:auto; color:var(--study-accent); font-weight:900; opacity:0; }
.study-theme-option[aria-pressed="true"] .study-theme-check { opacity:1; }
.study-theme-swatch { display:grid; place-items:center; flex:0 0 38px; height:38px; border-radius:11px; font-size:22px; }
.swatch-orange { background:#ffdfb3; color:#a43c1f; }.swatch-coral { background:#ffdbe1; color:#a43051; }
.swatch-amber { background:#ffe7a8; color:#805010; }.swatch-cocoa { background:#4b342b; color:#ffca90; }
.study-theme-note { font-size:11px; line-height:1.5; margin:12px 0 0; }
.student-theme .exam-aside { background:var(--study-nav); border-right:1px solid var(--study-line); padding:14px; gap:12px; }
.study-mission-brand { display:flex; align-items:center; gap:9px; padding-bottom:12px; border-bottom:1px solid var(--study-line); }
.study-mission-icon { width:36px; height:36px; flex-shrink:0; border-radius:12px; background:linear-gradient(145deg,var(--study-accent),var(--study-glow)); }
.study-mission-icon svg { width:100%; height:100%; }
.study-mission-brand b { font-size:15px; letter-spacing:1px; }
.study-mission-brand small { display:block; margin-top:3px; font-size:11px; color:var(--study-muted); }
.student-theme .exam-meta strong { font-size:15px; line-height:1.55; color:var(--study-ink); }
.student-theme .exam-meta small { color:var(--study-muted); line-height:1.5; }
.student-theme .exam-status { border:1px solid var(--study-line); background:var(--study-panel); border-radius:12px; padding:10px; color:var(--study-muted); font-size:12px; }
.student-theme .exam-status b { color:var(--study-ink); }
.student-theme .exam-timer-controls { gap:6px; }
.student-theme .exam-timer-controls small { color:var(--study-muted); font-size:10px; }
.study-progress { display:grid; gap:6px; font-size:11px; color:var(--study-muted); }
.study-progress progress { width:100%; height:7px; border:0; border-radius:99px; overflow:hidden; appearance:none; background:var(--study-line); }
.study-progress progress::-webkit-progress-bar { background:var(--study-line); }
.study-progress progress::-webkit-progress-value { background:var(--study-accent); border-radius:99px; }
.study-progress progress::-moz-progress-bar { background:var(--study-accent); }
.study-exam-help { font-size:11px; color:var(--study-muted); }
.study-exam-help summary { cursor:pointer; }
.student-theme .study-exam-help .exam-instruction { color:var(--study-muted); margin:8px 0 0; font-size:11px; }
.student-theme .exam-group-head { color:var(--study-muted); font-size:11px; letter-spacing:1px; }
.student-theme .exam-num { background:var(--study-card); color:var(--study-ink); border-color:var(--study-line); border-radius:12px; width:38px; height:38px; font-size:14px; }
.student-theme:not(.exam-review) .exam-num.done { background:var(--study-soft); border-color:var(--study-accent); color:var(--study-deep); }
.student-theme .exam-num.active { box-shadow:0 0 0 2px var(--study-accent); border-color:var(--study-accent); }
.student-theme .exam-num.correct { background:#edf5ff; border-color:#2b71b1; color:#245f98; }
.student-theme .exam-num.wrong { background:#fff0ed; border-color:#bf4238; color:#ad3329; }
.student-theme .exam-legend { color:var(--study-muted); font-size:10px; }
.student-theme:not(.exam-review) .lg-dot.done { background:var(--study-accent); }
.student-theme .exam-q-bar { background:var(--study-nav); border-color:var(--study-line); padding:7px 12px; position:relative; z-index:60; }
.student-theme #qTitle { font-size:12px; color:var(--study-muted); }
.student-theme .exam-page-actions { gap:7px; align-items:center; }
.student-theme .exam-page-actions>.btn { padding:7px 10px; font-size:12px; border-radius:10px; }
.student-theme .exam-main { background:var(--study-bg); }
.student-theme .exam-content { background:radial-gradient(ellipse at top right,var(--study-soft),transparent 60%),var(--study-bg); padding:10px; gap:10px; }
.student-theme .q-body { background:var(--study-card); border:1px solid var(--study-line); border-radius:17px; padding:14px; box-shadow:0 5px 20px #3c201006; }
.study-question-heading { display:flex; align-items:center; gap:7px; font-size:11px; color:var(--study-muted); margin-bottom:12px; }
.study-question-symbol { background:var(--study-soft); color:var(--study-deep); border-radius:8px; padding:4px 7px; font-size:15px; }
.study-question-tag { margin-left:auto; border:1px solid var(--study-line); padding:4px 8px; border-radius:99px; white-space:nowrap; }
.student-theme .q-title { color:var(--study-ink); font-size:15px; line-height:1.8; }
.student-theme .q-opts { gap:8px; }
.student-theme .q-opt { background:var(--study-card); color:var(--study-ink); border:1px solid var(--study-line); border-radius:13px; padding:10px; gap:9px; font-size:14px; line-height:1.5; min-height:48px; }
.student-theme .q-opt:hover,.student-theme .redo-opt:hover { border-color:var(--study-accent); background:var(--study-soft); }
.student-theme .q-opt:has(input:checked),.student-theme .redo-opt:has(input:checked) { border-color:var(--study-accent); background:var(--study-soft); box-shadow:inset 0 0 0 1px var(--study-accent); }
.student-theme .q-opt input { width:16px; height:16px; min-height:16px; padding:0; margin:0; flex:0 0 16px; accent-color:var(--study-accent); }
.study-option-key { display:grid; place-items:center; width:27px; height:27px; flex:0 0 27px; border-radius:8px; background:var(--study-panel); color:var(--study-deep); font-weight:850; }
.student-theme .q-opt:has(input:checked) .study-option-key { background:var(--study-accent); color:#fff; }
html[data-study-theme="cocoa"] .student-theme .q-opt:has(input:checked) .study-option-key { color:#2b1b16; }
.student-theme .q-option-content { min-width:0; }
.student-theme :is(.q-image,.q-option-image,.redo-img) { background:#fffaf3; border-radius:10px; color-scheme:light; }
.student-theme .q-analysis { border:1px solid var(--study-line); border-radius:17px; background:var(--study-card); }
.student-theme .qa-head { background:var(--study-panel); color:var(--study-muted); border-color:var(--study-line); }
.student-theme .exam-score-card { background:var(--study-soft); color:var(--study-ink); border-color:var(--study-line); }
.student-theme .exam-score-card strong { color:var(--study-deep); }
.student-theme .q-result,.student-theme .q-steps,.student-theme .q-analysis-text { background:var(--study-panel); color:var(--study-ink); border-color:var(--study-line); }
.student-theme :is(.wk-side,.wk-map-view,.wk-mv-head,.wk-paper-directory,.wk-paper-row,.redo-card) { background:var(--study-card); color:var(--study-ink); border-color:var(--study-line); }
.student-theme .wk-main { background:var(--study-bg); }
.student-theme :is(.wk-menu a,.wk-paper-title,.wk-title) { color:var(--study-ink); }
.student-theme :is(.wk-menu a.active,.wk-menu a:hover,.wk-paper-row:hover,.wk-paper-directory>summary) { background:var(--study-soft); color:var(--study-deep); }
.student-theme .wk-menu a.on { background:var(--study-soft); color:var(--study-deep); box-shadow:inset 3px 0 var(--study-accent); }
.student-theme .wk-side-foot { border-color:var(--study-line); }
.student-theme .wk-side-foot a { color:var(--study-muted); }
.student-theme .wk-side-foot a:hover { background:var(--study-soft); color:var(--study-deep); }
.student-theme .exam-aside .exam-submit { box-shadow:0 -6px 16px var(--study-nav); }
.student-theme :is(.wk-subdir .n,.wk-paper-tag,.redo-head) { background:var(--study-soft); color:var(--study-deep); }
.student-theme :is(.wk-paper-meta,.wk-empty) { color:var(--study-muted); }
.student-theme .redo-opt { background:var(--study-card); border-color:var(--study-line); }
.student-theme .redo-opt input { accent-color:var(--study-accent); }
.student-theme .redo-wrap { color:var(--study-ink); }
@media(max-width:1100px) {
  .student-theme .nav-links { gap:10px; }.student-theme .nav-search { max-width:150px; }
  .student-theme .nav .study-theme-current { display:none; }
}
@media(max-width:760px) {
  .student-theme .nav { flex-wrap:wrap; gap:8px; padding:8px 12px; }
  .student-theme .nav .brand { order:0; flex:1; min-width:0; }
  .student-theme .nav>.study-theme-switch { order:1; }
  .student-theme .nav-links { order:2; flex-basis:100%; flex-wrap:wrap; font-size:12px; justify-content:flex-start; }
  .student-theme .nav-search { max-width:none; }
  .student-theme .exam-page-actions { gap:5px; }
  .student-theme .exam-page-actions>.btn { padding:7px; }
  .student-theme .study-theme-current { display:none; }
}
@media(max-width:600px) {
  .student-theme .exam-aside { padding:12px; }
  .student-theme .study-mission-brand { padding-right:82px; }
  .student-theme.exam-body .study-theme-switch { position:fixed; top:10px; right:12px; }
  .student-theme .exam-q-bar { flex-wrap:nowrap; padding:9px 12px; }
  .student-theme .exam-content { padding:10px; }
  .student-theme .q-body { padding:13px; }
  .student-theme .q-title { font-size:15px; }
}
@media(prefers-reduced-motion:no-preference) {
  .student-theme .q-opt,.student-theme .exam-num,.student-theme .study-theme-option { transition:background .16s,border-color .16s,box-shadow .16s; }
}
