/* StarTacks unified workspace, 2026-09-25.
   Product behavior and semantic result colors stay in the existing modules. */
:root {
  --bg:#f5f4f0; --surface:#fff; --surface-subtle:#f0f1eb; --surface-raised:#edf5e5;
  --text:#20241f; --text-soft:#60695c; --text-faint:#737b6d;
  --border:#e3e7de; --border-strong:#c7cfbf;
  --accent:#28c94d; --accent-hover:#20b843; --accent-soft:#e8f5df; --accent-border:#b1d79b; --accent-ink:#387b37;
  --success:#318449; --success-soft:#eaf6e6; --success-border:#b6d8a9;
  --blue:#8270b7; --blue-soft:#f0ecf8;
  --shadow-sm:0 3px 14px #24321b04; --shadow-md:0 16px 50px #24321b12;
  --radius-sm:10px; --radius:16px; --radius-lg:22px; --sidebar-width:226px;
  --workspace-sans:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  --workspace-serif:Georgia,'Songti SC','STSong',serif;
  --workspace-lilac:#eee8f8; --workspace-peach:#f9eee3; --workspace-sage:#eaf1e1;
  --mono:SFMono-Regular,Menlo,Consolas,'Liberation Mono',monospace;
  font-family:var(--workspace-sans);
}
[data-theme="dark"] {
  --bg:#171b17; --surface:#212721; --surface-subtle:#2a3129; --surface-raised:#2c3b29;
  --text:#eef3e8; --text-soft:#c3cdbc; --text-faint:#a2ae9a; --border:#384333; --border-strong:#58684f;
  --accent:#28c94d; --accent-hover:#37d35b; --accent-soft:#2a4227; --accent-border:#4c7740; --accent-ink:#a7d497;
  --success:#8ec47e; --success-soft:#263e26; --success-border:#4d7540; --blue:#b9a8e5; --blue-soft:#332f43;
  --workspace-lilac:#322d40; --workspace-peach:#3c3329; --workspace-sage:#2c3a27;
  --shadow-sm:0 3px 14px #00000008; --shadow-md:0 16px 50px #00000030;
}
body {font-family:var(--workspace-sans);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
button,input,select,textarea {font-family:var(--workspace-sans)}
::selection {background:var(--accent-soft);color:var(--text)}
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible {outline:3px solid var(--accent-ink);outline-offset:4px}
.eyebrow,.card-kicker,.nav-label,.plan-use-case,.recommend-label,.credit-recommend-label {
  font-family:var(--workspace-sans);font-size:12px;font-weight:550;letter-spacing:.08em;color:var(--text-faint)
}
h1 {font-family:var(--workspace-serif);font-weight:600;letter-spacing:-.035em;line-height:1.4}
h2,h3 {font-weight:600;letter-spacing:-.02em}
.page-intro h1,.membership-header h1,.question-bank-header h1,.records-header h1 {font-size:36px}
.page-intro {margin-bottom:29px}
.sidebar {top:16px;height:calc(100vh - 32px);margin:16px 0 16px 16px;padding:20px 13px 16px;background:var(--surface);border:1px solid var(--border);border-radius:22px;gap:17px}
.brand-row {min-height:56px;padding:0 4px 18px;border-bottom:1px solid var(--border)}
.brand {gap:7px;padding:0}
.brand-mark {width:36px;height:31px}
.brand-copy strong {font:750 22px/1.2 var(--workspace-sans);letter-spacing:-.8px}
.brand:hover .brand-mark {transform:rotate(-5deg)}
[data-theme="dark"] .brand-mark {background:transparent;padding:0;border-radius:0}
.nav-groups {margin-top:0;gap:24px}
.nav-group {gap:7px}
.nav-item {min-height:45px;border-radius:12px;padding:10px 13px;gap:11px;color:var(--text-soft);border:1px solid transparent;background:transparent}
.nav-item span:nth-child(2) {font-size:13px;font-weight:500}
.nav-item svg {width:17px;height:17px;stroke-width:1.6}
.nav-item:hover {background:var(--surface-subtle);color:var(--text)}
.nav-item.is-active {color:var(--accent-ink);background:var(--accent-soft);border-color:transparent;box-shadow:none}
.nav-item.is-active::before {display:none}
.sidebar-collapse {min-height:40px;border-top:1px solid var(--border);color:var(--text-faint);font-size:12px;padding-top:15px;gap:10px}
.main-shell {background:var(--bg)}
.topbar {top:15px;min-height:62px;height:62px;margin:15px 26px 0;padding:0 22px;border:1px solid var(--border);border-radius:32px;background:var(--surface);box-shadow:0 4px 14px #23311b02;backdrop-filter:blur(16px)}
.topbar-left {min-width:0}
.breadcrumb {font-size:12px;color:var(--text-faint)}
.breadcrumb strong {font-size:13px;font-weight:550;text-decoration:none;color:var(--text)}
.topbar-actions {gap:11px}
.topbar-actions>.icon-button {width:31px;height:31px;border-radius:50%}
.top-user-trigger {border:0;border-radius:30px;background:transparent;box-shadow:none;padding:3px 0 3px 11px;gap:11px}
.top-user-trigger:hover {background:var(--surface-subtle)}
.top-user-copy strong {font-size:12px;font-weight:600}.top-user-copy small {font-size:12px;color:var(--text-faint)}
.avatar,.top-avatar {background:var(--workspace-lilac);border:0;color:var(--text);border-radius:50%;font-family:var(--workspace-sans)}
.top-avatar {width:34px;height:34px;font-size:12px}
.top-ai-wallet-trigger {background:var(--surface-subtle);border:1px solid var(--border);border-radius:30px;box-shadow:none;min-height:41px;padding:5px 12px 5px 7px}
.top-ai-wallet-icon {background:var(--accent-soft);color:var(--accent-ink);border:0}
.top-ai-wallet-copy small {font-size:12px;color:var(--text-faint)}
.top-ai-wallet-copy strong {font-size:13px;color:var(--text)}
.top-ai-wallet-popover,.account-menu {border:1px solid var(--border);border-radius:17px;background:var(--surface);box-shadow:var(--shadow-md)}
.account-menu-profile {border-bottom:1px solid var(--border)}
.account-menu button {border-radius:8px;font-size:13px}
.account-menu button:hover {background:var(--surface-subtle)}
.view-container {padding:35px 36px 75px;max-width:1450px}
.button,.cr-button,.aiss-button,.ad-button {border-radius:99px;font-weight:550;box-shadow:none;transition:background .18s,transform .18s,border-color .18s}
.button {min-height:42px;padding:10px 20px;font-size:13px;line-height:1.6}
.button.small {min-height:35px;padding:7px 14px;font-size:12px}
.button.primary,.button.primary:hover,.aiss-button.is-primary,.cr-button.is-primary,.adaptive-space .ad-button.is-primary {
  background:var(--accent);border:1px solid var(--accent);color:#fff;box-shadow:none
}
.button.primary:hover,.aiss-button.is-primary:hover,.cr-button.is-primary:hover,.adaptive-space .ad-button.is-primary:hover {background:var(--accent-hover);border-color:var(--accent-hover);transform:translateY(-1px);box-shadow:0 4px 12px #27c64b13}
.button.primary svg,.aiss-button.is-primary svg,.cr-button.is-primary svg,.ad-button.is-primary svg {color:#fff}
.button.secondary {border:1px solid var(--border);background:var(--surface);color:var(--text-soft);box-shadow:none}
.button.secondary:hover {background:var(--surface-subtle);border-color:var(--border-strong);box-shadow:none}
.button.accent {border:1px solid var(--text);background:var(--text);color:var(--surface);border-radius:99px;box-shadow:none}
.button.accent:hover {background:var(--text-soft)}
.button:disabled {transform:none;box-shadow:none}
.icon-button {border-radius:10px}
.filter-button {border-radius:99px;border:1px solid var(--border);background:var(--surface);color:var(--text-soft);font-size:12.5px;padding:9px 18px;min-height:38px}
.filter-button:hover {background:var(--surface-subtle)}
.filter-button.is-active {background:var(--text);color:var(--surface);border-color:var(--text);box-shadow:none}
.filter-button.is-active svg {color:inherit}
:is(.panel,.hero-card,.continue-card,.metric-card,.upload-panel,.recognition-panel,.correction-shell,.exam-setup-card,.result-hero,.result-panel,.mistake-row,.settings-panel,.recommendation-paper-card,.usage-overview-card,.learning-recommendation-card,.daily-limit-card,.pricing-plan,.quota-pack,.knowledge-canvas,.knowledge-detail,.notebook-card,.vocabulary-card,.current-usage-panel,.checkout-product-card,.payment-method-section,.checkout-summary,.modal-card,.subject-setup-card) {
  border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-sm)
}
.metric-card:nth-child(n),.recommendation-paper-card:nth-child(n),.notebook-card:nth-child(n) {transform:none}
:is(.metric-icon,.recommendation-icon,.subject-setup-icon,.active-session-icon) {border:0;border-radius:11px;background:var(--accent-soft);color:var(--accent-ink);box-shadow:none}
.hero-card {background:var(--surface-raised);border-color:var(--border)}
.hero-card::after {border:1px solid var(--border);transform:rotate(-3deg)}
.progress-track,.usage-bar {border:0;border-radius:20px;background:var(--surface-subtle)}
.progress-track>span,.usage-bar>span,.dashboard-course-progress>div[role=progressbar]>span {background:var(--accent);border-radius:20px}
.status-pill,.subject-pill {border-radius:99px;font-family:var(--workspace-sans)}
.active-session-banner {border-color:var(--accent-border);border-radius:16px;background:var(--surface-raised);box-shadow:none}
.ai-wallet-notice {border-radius:12px;background:var(--surface-raised);border-color:var(--accent-border);margin-top:14px}
.course-home-hero {grid-template-columns:minmax(0,1.4fr) minmax(275px,.7fr);gap:38px;padding:31px 34px 34px;border:0;border-radius:22px;background:transparent;margin:0 0 32px}
.course-home-copy h1 {font:600 clamp(35px,3.8vw,51px)/1.4 var(--workspace-serif);letter-spacing:-1.5px;margin:12px 0 14px}
.course-home-copy>.eyebrow {display:flex;gap:8px;align-items:center;color:var(--text-faint);font-size:12px;letter-spacing:1.5px}
.course-home-copy>.eyebrow::before {content:'';width:6px;height:6px;border-radius:50%;background:var(--accent)}
.course-home-copy>p:last-of-type {font-size:13.5px;line-height:1.95;max-width:535px}
.course-search {margin-top:25px;min-height:49px;border:1px solid var(--border);background:var(--surface);border-radius:99px;box-shadow:none;padding:0 17px;gap:10px}
.course-search input {font-size:13px}.course-search kbd {font-size:12px;border-radius:5px}
.course-search:focus-within {border-color:var(--accent-border);box-shadow:0 0 0 3px var(--accent-soft)}
.course-trial-card {position:relative;padding:25px 25px 23px;border:1px solid var(--border);border-radius:19px;background:var(--surface);overflow:hidden}
.course-trial-card::after {content:'✧';position:absolute;right:16px;top:8px;font:44px var(--workspace-serif);color:#bba2d8;pointer-events:none}
.course-trial-card>span {font-size:12px;font-weight:500;letter-spacing:.03em;color:var(--accent-ink);padding-right:26px}
.course-trial-card h2 {font-size:20px;line-height:1.5;margin:18px 0 12px}
.course-trial-card p {font-size:12.5px;line-height:1.9;color:var(--text-soft);margin-bottom:20px}
.course-trial-card .button {font-size:12px;min-height:39px}
.course-library-intro {border-bottom:0;padding:15px 7px 16px;margin-bottom:21px}
.course-library-intro h1 {font:600 40px/1.5 var(--workspace-serif);letter-spacing:-1px}
.course-library-intro p:last-child {font-size:13px;line-height:1.9;margin-top:10px}
.dashboard-course-heading h2 {font-size:23px;font-weight:550}.dashboard-course-heading p {font-size:12.5px;color:var(--text-faint)}
.dashboard-course-heading .eyebrow {font-size:12px}
.course-filter-row {gap:8px;margin:23px 0 32px}
.previous-learning-reminder {border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:none;margin-bottom:30px}
.previous-learning-label>span {background:var(--workspace-lilac);color:var(--blue);border:0;border-radius:9px}
.course-empty {background:var(--surface);border:1px dashed var(--border-strong);border-radius:18px}
/* Chapter reading, learning stages, resources, and individual evidence. */
.knowledge-course-toolbar,.knowledge-course-toolbar-simple,.knowledge-toolbar {border-color:var(--border);background:var(--surface);border-radius:14px}
.knowledge-course-overview {border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:none;padding:24px}
.knowledge-course-overview-copy>strong {font-size:24px;font-weight:550}
.knowledge-course-overview-copy p {font-size:13px;line-height:1.9;color:var(--text-soft)}
.knowledge-course-overview-copy>span {font-family:var(--workspace-sans);color:var(--text-faint)}
.knowledge-course-progress-track {background:var(--surface-subtle);border:0;border-radius:20px}
.knowledge-course-progress-track>i {background:var(--accent);border-radius:20px}
.knowledge-course-outline {border:1px solid var(--border);border-radius:17px;background:var(--surface);box-shadow:none;overflow:hidden}
.knowledge-outline-head {border-color:var(--border);background:var(--surface-subtle)}
.knowledge-outline-head strong {font-size:14px;font-weight:600}
.knowledge-outline-search {border:1px solid var(--border);border-radius:9px;background:var(--surface)}
.knowledge-outline-tools {border-color:var(--border)}
.knowledge-tree-node.is-selected>.knowledge-tree-row,.knowledge-tree-row.is-selected,.knowledge-outline-node.is-active {background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent-ink)}
.knowledge-lesson,.knowledge-course-content,.knowledge-stage-shell,.knowledge-graph-detail {border-color:var(--border);border-radius:17px;background:var(--surface);box-shadow:none}
.knowledge-stage-shell {overflow:hidden}
.knowledge-stage-nav {background:var(--surface);border-color:var(--border);box-shadow:none;top:90px}
.knowledge-stage-list {gap:5px;padding:12px}
.knowledge-stage-trigger {border-radius:10px;font-family:var(--workspace-sans)}
.knowledge-stage-item.is-current .knowledge-stage-trigger {border-color:var(--accent-border);background:var(--accent-soft)}
.knowledge-stage-item.is-current .knowledge-stage-number {background:var(--accent);border-color:var(--accent);color:#fff}
.knowledge-stage-item.is-complete .knowledge-stage-number {background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent-border)}
.knowledge-stage-item.is-complete:not(:last-child)::after {background:var(--accent-border)}
.knowledge-stage-actions {border-color:var(--border);background:var(--surface);padding-block:18px}
.knowledge-stage-header>span {font-family:var(--workspace-sans);color:var(--accent-ink)}
.knowledge-stage-header h2 {font-weight:550;line-height:1.5}
.knowledge-stage-progress {background:var(--surface-subtle);border-color:var(--border)}
.knowledge-stage-progress>i>b {background:var(--accent)}
.knowledge-stage-shell .knowledge-summary-grid>:is(article,div,li) {border-color:var(--border);border-radius:12px;background:var(--surface-subtle)}
.knowledge-stage-shell .knowledge-summary-grid>:is(article,div,li):nth-child(even) {background:var(--workspace-lilac)}
.knowledge-stage-shell .knowledge-summary-grid>:is(article,div,li):nth-child(n+3) {background:var(--surface-raised)}
.knowledge-formula-card,.knowledge-intuition,.knowledge-practice-section,.knowledge-learning-objectives {border-color:var(--border);background:var(--surface-subtle);border-radius:12px}
.knowledge-check-option {border-color:var(--border);border-radius:10px}
.knowledge-check-option.is-selected {background:var(--accent-soft);border-color:var(--accent-border)}
.knowledge-check-option.is-correct {background:var(--success-soft);border-color:var(--success-border)}
.knowledge-check-option.is-wrong {background:var(--danger-soft);border-color:var(--danger)}
.cr-center,.aiss-plan,.aiss-coach,.aiss-estimate {border-radius:18px;border-color:var(--border);box-shadow:none}
.aiss-plan {background:var(--surface)}
.cr-tabs [aria-selected=true] {background:var(--accent-soft);color:var(--accent-ink)}
.cr-pill,.cr-count,.aiss-tag {border-radius:99px}
.cr-button,.aiss-button {border-radius:99px}
.adaptive-space,html[data-theme=dark] .adaptive-space,[data-theme=dark] .adaptive-space {
  --ad-ink:var(--text);--ad-muted:var(--text-soft);--ad-line:var(--border);--ad-surface:var(--surface);--ad-soft:var(--surface-subtle);--ad-gold:var(--accent);--ad-green:var(--accent-ink)
}
.adaptive-space h1 {font-family:var(--workspace-serif);font-size:36px;font-weight:600}
.adaptive-space :focus-visible {outline-color:var(--accent-ink)}
.adaptive-space .ad-next,[data-theme=dark] .ad-next {border:1px solid var(--border);border-radius:20px;background:var(--surface-raised);box-shadow:none}
.adaptive-space .ad-next-content p,[data-theme=dark] .ad-next-content p {color:var(--text-soft)}
.adaptive-space .ad-next-content h2 {font-weight:550}
.adaptive-space .ad-button {border-radius:99px;font-size:13px!important;min-height:40px}
.adaptive-space .ad-button.secondary {background:var(--surface);border-color:var(--border);color:var(--text-soft)}
.adaptive-space .ad-review-card,[data-theme=dark] .ad-review-card {background:var(--workspace-sage);border-color:var(--border)}
.adaptive-space .ad-lesson-card,.ad-plan,.ad-evidence-card,.ad-full-evidence {border-color:var(--border);border-radius:18px;box-shadow:none}
.adaptive-space .ad-path>.is-current,[data-theme=dark] .ad-path>.is-current,.adaptive-space .ad-choices .is-selected,[data-theme=dark] .ad-choices .is-selected,.adaptive-space .ad-radio:has(input:checked),[data-theme=dark] .ad-radio:has(input:checked) {border-color:var(--accent-border);background:var(--accent-soft);color:var(--text)}
.adaptive-space .ad-radio input {accent-color:var(--accent)}
.adaptive-space .ad-badge {background:var(--surface-subtle);color:var(--text-soft);font-size:12px;border-radius:99px}
.adaptive-space .ad-badge.green {background:var(--success-soft);color:var(--success)}
.adaptive-space .ad-badge.amber {background:var(--warning-soft);color:var(--warning)}
.adaptive-space .ad-eyebrow,.adaptive-space .ad-fine,.adaptive-space .ad-date small,.adaptive-space .ad-path small,.adaptive-space .ad-evidence-stats small,.adaptive-space .ad-stepper li,.adaptive-space .ad-receipt-summary small,.adaptive-space .ad-lesson-side li {font-size:12px}
.adaptive-space .ad-explore {background:var(--surface-subtle);border-color:var(--border);border-radius:14px}
.adaptive-space .ad-slider-label strong,.adaptive-space .ad-heading h1 span {color:var(--accent-ink)}
.adaptive-space .ad-next-footer {border-color:var(--border)}
/* Question bank, records and notes use the same white reading surfaces. */
.question-bank-page,.records-page {color:var(--text)}
.question-bank-tabs {padding:5px;background:var(--surface-subtle);border:1px solid var(--border);border-radius:16px;gap:5px}
.question-bank-tab {border-radius:12px;border:1px solid transparent;background:transparent}
.question-bank-tab.is-active {background:var(--surface);border-color:var(--border);box-shadow:none;color:var(--accent-ink)}
.question-bank-tab.is-active .question-bank-tab-icon {background:var(--accent-soft);color:var(--accent-ink)}
.library-toolbar,.collection-toolbar,.records-toolbar {border-color:var(--border);background:var(--surface);border-radius:14px}
.paper-row,.record-row,.practice-record-row,.record-card {border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:none}
.paper-row:hover,.record-row:hover {border-color:var(--border-strong);background:var(--surface)}
.paper-row-icon,.paper-type-icon,.record-icon {background:var(--workspace-lilac);color:var(--blue);border:0;border-radius:12px}
.library-empty,.empty-state {border-color:var(--border);border-radius:18px;background:var(--surface)}
.notebook-card {border-radius:16px;border-color:var(--border);background:var(--surface);box-shadow:none}
.vocabulary-card {border-radius:17px;border-color:var(--border)}
.notes-tabs .is-active,.collection-tabs .is-active {border-color:var(--accent-border);background:var(--accent-soft);color:var(--accent-ink)}
/* Membership, settings, checkout, and shared dialogs. */
.membership-header h1 {font-family:var(--workspace-serif)}
.unified-wallet-panel {background:var(--surface);border-radius:20px;border:1px solid var(--border);box-shadow:none}
.unified-wallet-balance {border-color:var(--border)}
.unified-wallet-balance>strong {font-family:var(--workspace-serif);font-weight:500}
.pricing-plan {padding:27px;border-radius:18px;border-color:var(--border)}
.pricing-plan.is-recommended {background:var(--surface-raised);border-color:var(--accent-border)}
.pricing-plan .recommend-label,.credit-recommend-label {background:var(--accent);color:#fff;border:0;border-radius:99px;padding:5px 14px}
.pricing-plan .plan-head h2 {font-size:20px;font-weight:550}
.plan-price>strong,.credit-points>strong {font-family:var(--workspace-serif);font-weight:500;letter-spacing:-1px}
.membership-points-emphasis {border-radius:12px;border-color:var(--border);background:var(--surface-subtle)}
.pricing-plan.is-recommended .membership-points-emphasis {background:var(--accent-soft);border-color:var(--accent-border)}
.ai-credit-section,.membership-invite-line,.membership-cost-details {background:var(--surface);border:1px solid var(--border);border-radius:17px}
.ai-credit-pack {border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:none}
.ai-credit-pack.is-recommended {border-color:var(--accent-border);background:var(--surface-raised)}
.settings-panel {padding:28px;border-radius:18px}
.settings-row {border-color:var(--border)}
.settings-row input,.settings-row select {border-color:var(--border);border-radius:9px;background:var(--surface);font-size:13px}
.modal-card,.subject-setup-card {border-radius:22px;box-shadow:var(--shadow-md)}
.modal-icon {background:var(--accent-soft);color:var(--accent-ink);border:0;border-radius:14px}
.modal-backdrop,.subject-setup-backdrop {background:#15201066;backdrop-filter:blur(6px)}
.toast {border:1px solid var(--border);border-radius:13px;background:var(--surface);box-shadow:var(--shadow-md)}
.payment-method.is-active {border-color:var(--accent-border);background:var(--accent-soft)}
.checkout-product-card,.payment-method-section,.checkout-summary {border-radius:18px}
/* Keep the exam reading canvas quiet while its controls follow the brand. */
body:is([data-visual-mode=practice],[data-visual-mode=exam]) {--reading-gold:#709559;--reading-blue:#8374a1;background:var(--bg)}
body:is([data-visual-mode=practice],[data-visual-mode=exam]) .paper-view-toolbar {border-color:var(--border);background:var(--surface);border-radius:14px}
body:is([data-visual-mode=practice],[data-visual-mode=exam]) .real-paper-sheet {border-color:var(--border);box-shadow:none;border-radius:15px}
body:is([data-visual-mode=practice],[data-visual-mode=exam]) .paper-section-title {border-color:var(--border);border-left-color:var(--accent-ink);color:var(--text);background:var(--surface-subtle)}
body[data-visual-mode=practice] .paper-question.is-current {background:var(--surface-raised);border-left-color:var(--accent-border)}
body[data-visual-mode=exam] .paper-question.is-current {background:var(--surface-subtle);border-left-color:var(--border-strong)}
body:is([data-visual-mode=practice],[data-visual-mode=exam]) .real-answer-sheet {border-radius:15px;border-color:var(--border);box-shadow:none}
body:is([data-visual-mode=practice],[data-visual-mode=exam]) .answer-section.is-current-section {background:var(--surface-subtle);border-color:var(--border)}
body[data-visual-mode=report] .result-hero {background:var(--surface);border-color:var(--border);box-shadow:none}
.mobile-nav {background:var(--surface);border-color:var(--border);box-shadow:0 -5px 22px #20321a05}
.mobile-nav button.is-active {color:var(--accent-ink);background:var(--accent-soft);border-radius:12px}
.mobile-nav small {font-family:var(--workspace-sans);font-size:12px}
@media(min-width:901px) {
  .app-shell.is-sidebar-collapsed {--sidebar-width:90px;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
  .app-shell.is-sidebar-collapsed .sidebar {padding-inline:9px;margin-left:13px;border-radius:19px}
  .app-shell.is-sidebar-collapsed .brand-row {padding:0 0 17px;justify-content:center}
  .app-shell.is-sidebar-collapsed .brand-mark {width:35px}
  .app-shell.is-sidebar-collapsed .nav-item {border-radius:12px;padding:10px;justify-content:center}
}
@media(max-width:1180px) and (min-width:901px) {
  :root {--sidebar-width:200px}
  .brand-copy strong {font-size:19px}.brand-mark {width:31px}
  .view-container {padding:30px 25px 65px}.topbar {margin-inline:22px}
  .course-home-hero {gap:24px;padding:22px 6px;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)}
  .course-home-copy h1 {font-size:40px}
}
@media(max-width:900px) {
  .sidebar {position:fixed;top:12px;left:0;margin:0 0 0 12px;width:236px;height:calc(100dvh - 24px);z-index:50;border-radius:20px}
  .topbar {top:12px;margin:12px 18px 0;padding:0 18px;min-height:59px;height:59px;border-radius:30px}
  .view-container {padding:28px 24px 90px}
  .course-home-hero {gap:22px;padding:20px 4px;grid-template-columns:minmax(0,1.3fr) minmax(260px,.8fr)}
  .course-home-copy h1 {font-size:38px}
  .course-trial-card {padding:22px}.course-trial-card h2 {font-size:19px}
  .knowledge-stage-nav {top:83px}
  .sidebar-scrim {background:#15201055;backdrop-filter:blur(3px)}
  .brand-row {padding-bottom:16px}.brand-copy strong {font-size:22px}
  .mobile-nav {padding-inline:18px}
}
@media(max-width:680px) {
  .topbar {margin:10px 12px 0;top:10px;min-height:57px;height:57px;padding:0 12px;border-radius:29px}
  .topbar-actions {gap:6px}.topbar-left {gap:6px}.topbar-actions>.icon-button {width:28px;height:28px}
  .top-user-copy {display:none}.top-user-trigger {padding:3px;gap:0}
  .top-ai-wallet-trigger {min-height:35px;padding:4px 8px 4px 5px}.top-ai-wallet-icon {width:25px;height:25px}
  .top-ai-wallet-copy small {font-size:12px}.top-ai-wallet-copy strong {font-size:12px}
  .top-avatar {width:31px;height:31px;font-size:12px}
  .breadcrumb strong {font-size:12px}.breadcrumb>span,.breadcrumb>svg {display:none}
  .view-container {padding:24px 18px 95px}
  .course-home-hero {display:grid;grid-template-columns:1fr;gap:23px;padding:13px 2px 24px;margin-bottom:22px}
  .course-home-copy h1 {font-size:36px;line-height:1.4;margin:12px 0}
  .course-home-copy>p:last-of-type {font-size:13px;line-height:1.9}
  .course-home-copy>.eyebrow {font-size:12px;letter-spacing:.08em}
  .course-search {min-height:47px;margin-top:21px;padding-inline:14px}.course-search input {font-size:12px}.course-search kbd {display:none}
  .course-trial-card {padding:21px 22px;border-radius:17px;min-height:0}.course-trial-card h2 {font-size:20px;margin:13px 0 10px}.course-trial-card p {font-size:12px;margin-bottom:16px}
  .course-trial-card .button {min-height:39px;font-size:12px}
  .dashboard-course-heading h2 {font-size:22px}.dashboard-course-heading p {font-size:12px}
  .course-library-intro {padding:5px 2px 10px}.course-library-intro h1 {font-size:34px}.course-library-intro p:last-child {font-size:12px}
  .course-library-intro .course-search {width:100%}
  .course-filter-row {gap:7px;margin:19px 0 25px;overflow-x:auto;flex-wrap:nowrap;padding-block:3px 7px}
  .course-filter-row .filter-button {min-height:36px;padding:8px 17px;font-size:12px;flex-shrink:0}
  .button {font-size:13px;padding:9px 18px}.button.small {font-size:12px;padding:7px 13px}
  .page-intro h1,.membership-header h1,.question-bank-header h1,.records-header h1 {font-size:30px}
  .knowledge-course-overview {padding:20px;border-radius:15px}.knowledge-course-overview-copy>strong {font-size:21px}
  .knowledge-stage-nav {top:79px}.knowledge-stage-list {gap:3px;padding:9px}
  .knowledge-course-outline {border-radius:14px}.knowledge-course-content,.knowledge-stage-shell {border-radius:14px}
  .knowledge-stage-actions {flex-wrap:wrap;gap:10px;padding:15px 13px}.knowledge-stage-actions>.button {padding-inline:12px;font-size:12px}
  .knowledge-stage-actions .knowledge-save-state {order:3;flex-basis:100%;text-align:center;font-size:12px}
  .adaptive-space h1 {font-size:29px}.adaptive-space .ad-button {font-size:12px!important}
  .adaptive-space .ad-lesson-card {padding:23px 20px}.adaptive-space .ad-next {padding:21px}
  .cr-center {border-radius:15px}.cr-heading,.cr-panel {padding-inline:19px}.cr-tabs {padding-inline:10px}
  .cr-tabs [role=tab] {font-size:12px;padding-inline:10px}
  .settings-panel {padding:21px}.pricing-plan {padding:22px}.modal-card {padding:25px 21px;border-radius:19px}
  .ai-wallet-notice {margin-inline:18px;font-size:12px}
  .mobile-nav {padding:7px 12px max(9px,env(safe-area-inset-bottom));gap:7px}
}
@media(max-width:380px) {
  .view-container {padding-inline:14px}.topbar {padding-inline:10px;margin-inline:10px}.topbar-actions {gap:3px}
  .topbar-page-context {display:none}.course-home-copy h1 {font-size:32px}
  .top-ai-wallet-copy small {display:none}.top-ai-wallet-copy strong {font-size:12px}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
/* Secondary learning tools and focused reading overlays. */
.answer-picker button.is-selected,.sentence-practice-actions button,.writing-outline-wrap>button,.paper-written-answer>button,.exam-mobile-dock .answer-sheet-trigger,.basic-subjects button.is-active,.basic-view-switch button[aria-selected=true],.sprint-clock button.is-active,.note-tabs button.is-active {background:var(--accent);border-color:var(--accent);color:#fff}
.sentence-practice-actions button,.writing-outline-wrap>button,.paper-written-answer>button,.exam-mobile-dock .answer-sheet-trigger {border-radius:99px;box-shadow:none}
.credit-recommend-label {color:#fff!important}
.dashboard-course-card:hover .dashboard-course-action {color:#fff}
.library-hero {border-color:var(--border);border-radius:20px;background:var(--surface);box-shadow:none}
.library-hero h1 {font-family:var(--workspace-serif);font-weight:600;line-height:1.4}
.paper-card {border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:none;transform:none}
.paper-card:hover {border-color:var(--border-strong);box-shadow:var(--shadow-sm)}
.records-mode-tabs,.learning-records-tabs {background:var(--surface-subtle);border:1px solid var(--border);border-radius:99px;padding:5px}
.records-mode-tabs button,.learning-records-tabs button {border-radius:99px}
.records-mode-tabs .is-active,.learning-records-tabs .is-active {color:var(--accent-ink);background:var(--surface);border-color:var(--border);box-shadow:none}
.record-daily-count {background:var(--accent-soft);color:var(--accent-ink);border-radius:99px}
.note-drawer {background:var(--surface);border-color:var(--border);box-shadow:var(--shadow-md)}
.note-drawer-head,.note-drawer-foot {background:var(--surface);border-color:var(--border)}
.note-drawer-head h2 {font-family:var(--workspace-sans)}
.ai-cost-group {background:var(--surface);border-color:var(--border);border-radius:14px}
.basic-stage {background:var(--surface);border:1px solid var(--border);border-radius:18px;box-shadow:none}
.basic-stepper-item.is-current {border-color:var(--accent-border);background:var(--accent-soft)}
body.exam-mode .view-container {max-width:none;height:100vh;padding:0;overflow:hidden}
@media(min-width:901px){body:not(.exam-mode) :is(.note-drawer,.ai-panel){top:90px;height:calc(100vh - 90px)}}
@media(max-width:680px){.records-mode-tabs,.learning-records-tabs{border-radius:14px;flex-wrap:wrap;gap:4px}.records-mode-tabs button,.learning-records-tabs button{font-size:12px}.library-hero h1{font-size:30px}}
@media(max-width:900px){.sidebar:not(.is-open){transform:translateX(calc(-100% - 24px))}.sidebar.is-open{transform:translateX(0)}}
@media(max-width:680px){.learning-records-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;border-radius:14px;padding:5px;max-width:100%}.learning-records-tabs button{min-width:126px;flex:0 0 auto}.learning-records-page .filter-tabs{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:5px}.learning-records-page .filter-tabs .filter-button{flex:0 0 auto;white-space:nowrap}}
/* Keep the selected course introduction compact above its chapter path. */
.knowledge-course-toolbar-simple {padding:10px 0;background:transparent;border:0;border-radius:0;margin-bottom:12px}
.knowledge-course-toolbar-simple>div:first-child>strong {display:none}
.knowledge-view-toggle {border:1px solid var(--border);border-radius:99px;padding:4px;background:var(--surface)}
.knowledge-view-toggle>button {border-radius:99px;font-size:12px;min-height:32px}
.knowledge-view-toggle>button.is-active {background:var(--text);color:var(--surface);border-color:var(--text)}
.knowledge-view-toggle>button.is-active svg {color:inherit}
.math-scope-note {background:transparent;border:0;border-bottom:1px solid var(--border);padding:0 0 17px;margin-bottom:18px;border-radius:0;color:var(--text-faint)}
.knowledge-course-overview {grid-template-columns:minmax(0,1.5fr) minmax(150px,.85fr) minmax(100px,.6fr) minmax(100px,.65fr);gap:22px;padding:22px 24px;align-items:center}
.knowledge-course-overview-copy>span,.knowledge-course-overview-copy>strong {display:none}
.knowledge-course-overview-copy p {font-size:12.5px;line-height:1.85;margin:0}
.knowledge-course-progress {padding-inline:20px;border-inline:1px solid var(--border)}
.knowledge-course-mastery strong {font-size:19px}
.knowledge-course-evidence {padding:0;border:0;background:transparent}
.knowledge-course-evidence strong {font-size:16px}
@media(max-width:1100px){.knowledge-course-overview{grid-template-columns:1.4fr 1fr 1fr;gap:19px}.knowledge-course-overview-copy{grid-column:1/-1}.knowledge-course-progress{padding-left:0;border-left:0}}
@media(max-width:680px){.achievement-intro{gap:16px;margin-bottom:18px}.achievement-week{padding:13px 16px;border-radius:12px}.knowledge-course-toolbar-simple{flex-direction:row;align-items:center;gap:10px}.knowledge-course-toolbar-simple>div:first-child>span{font-size:12px}.knowledge-view-toggle>button{padding:7px 11px}.math-scope-note{font-size:12px;line-height:1.8;margin-bottom:17px;padding-bottom:15px}.knowledge-course-overview{grid-template-columns:1fr 1fr;gap:16px;padding:19px}.knowledge-course-progress{grid-column:1/-1;border:0;padding:0}.knowledge-course-mastery{padding-right:13px;border-right:1px solid var(--border)}}

/* Compact workspace chrome: learning content owns the vertical canvas. */
.topbar {
  display: none;
}

.view-container {
  padding-top: 20px;
}

.ai-wallet-notice:not([hidden]) {
  margin-top: 16px;
}

.brand-row {
  position: relative;
  gap: 8px;
}

.brand-row .brand {
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar .sidebar-collapse {
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-faint);
  background: var(--surface);
}

.sidebar .sidebar-collapse:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.sidebar .sidebar-collapse > span:last-child {
  display: none;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-footer :is(.top-ai-wallet, .top-account) {
  width: 100%;
}

.sidebar-footer :is(.top-ai-wallet-trigger, .top-user-trigger) {
  width: 100%;
}

.sidebar-footer .top-ai-wallet-trigger {
  justify-content: flex-start;
  min-height: 46px;
  padding: 5px 9px 5px 6px;
  border-color: transparent;
  background: var(--surface-subtle);
}

.sidebar-footer .top-ai-wallet-copy {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 7px;
  flex: 1 1 auto;
}

.sidebar-footer .top-ai-wallet-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer .top-ai-wallet-copy strong {
  justify-self: end;
}

.sidebar-footer .top-ai-wallet-copy em {
  display: inline;
}

.sidebar-footer .top-user-trigger {
  min-height: 46px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-align: left;
}

.sidebar-footer .top-user-trigger:hover,
.sidebar-footer .top-user-trigger[aria-expanded="true"] {
  border-color: var(--border);
  background: var(--surface-subtle);
}

.sidebar-footer .top-avatar {
  margin: 0;
  flex: 0 0 auto;
}

.sidebar-footer .top-user-copy {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.sidebar-footer .top-user-copy :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--text-faint);
}

.sidebar-footer .top-ai-wallet-popover,
.sidebar-footer .account-menu {
  top: auto;
  right: auto;
  left: calc(100% + 14px);
  bottom: 0;
  transform-origin: bottom left;
}

.sidebar-footer .top-ai-wallet-popover {
  transform: translateX(-5px) scale(.985);
}

.sidebar-footer .top-ai-wallet:hover .top-ai-wallet-popover,
.sidebar-footer .top-ai-wallet:focus-within .top-ai-wallet-popover {
  transform: translateX(0) scale(1);
}

.sidebar-footer .top-ai-wallet-popover::before {
  display: none;
}

.sidebar-footer .account-menu {
  width: 264px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.account-theme {
  margin: 5px 0 4px;
  padding: 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.account-theme > span {
  display: block;
  margin: 0 2px 7px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
}

.theme-options {
  display: grid;
  gap: 3px;
}

.account-menu .theme-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}

.account-menu .theme-option > svg {
  width: 16px;
  height: 16px;
}

.account-menu .theme-option > span:nth-child(2) {
  color: var(--text-soft);
}

.account-menu .theme-option.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.account-menu .theme-option.is-active > span:nth-child(2) {
  color: var(--text);
  font-weight: 600;
}

.theme-option-check {
  opacity: 0;
}

.theme-option.is-active .theme-option-check {
  opacity: 1;
}

.app-shell.is-sidebar-collapsed .brand-row {
  justify-content: center;
}

.app-shell.is-sidebar-collapsed .brand-row .brand {
  flex: 0 0 auto;
}

.app-shell.is-sidebar-collapsed .brand-row .sidebar-collapse {
  position: absolute;
  top: 0;
  right: -29px;
  z-index: 2;
  width: 29px;
  height: 29px;
  min-height: 29px;
  box-shadow: var(--shadow-sm);
}

.app-shell.is-sidebar-collapsed .brand-row .sidebar-collapse > svg,
.app-shell.is-sidebar-collapsed .brand-row .sidebar-collapse > span:first-child {
  display: block;
}

.app-shell.is-sidebar-collapsed .sidebar-footer {
  justify-items: center;
}

.app-shell.is-sidebar-collapsed .sidebar-footer :is(.top-ai-wallet-copy, .top-user-copy, .sidebar-account-chevron) {
  display: none;
}

.app-shell.is-sidebar-collapsed .sidebar-footer :is(.top-ai-wallet, .top-account) {
  width: 42px;
}

.app-shell.is-sidebar-collapsed .sidebar-footer :is(.top-ai-wallet-trigger, .top-user-trigger) {
  width: 42px;
  min-height: 42px;
  justify-content: center;
  padding: 4px;
}

.main-shell .knowledge-stage-nav {
  top: 16px;
}

.main-shell .cc-path-summary {
  top: 24px;
}

.main-shell :is(.ci-main, .cc-page [tabindex="-1"]) {
  scroll-margin-top: 24px;
}

@media(min-width:901px) {
  body:not(.exam-mode) :is(.note-drawer, .ai-panel) {
    top: 16px;
    height: calc(100vh - 32px);
  }
}

@media(max-width:900px) {
  .topbar {
    width: max-content;
    min-height: 46px;
    height: 46px;
    display: flex;
    align-self: flex-start;
    justify-content: flex-start;
    top: 10px;
    margin: 10px 0 0 12px;
    padding: 0 12px 0 7px;
    border-radius: 24px;
  }

  .topbar-left {
    gap: 7px;
  }

  .topbar .mobile-menu {
    width: 32px;
    height: 32px;
  }

  .topbar-page-context {
    position: static;
    width: auto;
    height: auto;
    display: flex;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: nowrap;
  }

  .topbar-page-context > span,
  .topbar-page-context > svg {
    display: none;
  }

  .topbar-page-context strong {
    font-size: 12.5px;
  }

  .view-container {
    padding: 18px 24px 90px;
  }

  .sidebar .sidebar-collapse {
    display: none;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer {
    justify-items: stretch;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer :is(.top-ai-wallet, .top-account),
  .app-shell.is-sidebar-collapsed .sidebar-footer :is(.top-ai-wallet-trigger, .top-user-trigger) {
    width: 100%;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer .top-ai-wallet-trigger {
    min-height: 46px;
    justify-content: flex-start;
    padding: 5px 9px 5px 6px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer .top-user-trigger {
    min-height: 46px;
    justify-content: flex-start;
    padding: 5px 7px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer :is(.top-ai-wallet-copy, .top-user-copy) {
    display: grid;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer .sidebar-account-chevron {
    display: block;
  }

  .sidebar-footer .top-ai-wallet-popover,
  .sidebar-footer .account-menu {
    position: absolute;
    top: auto;
    right: auto;
    left: 0;
    bottom: calc(100% + 9px);
    width: min(326px, calc(100vw - 48px));
    max-height: calc(100dvh - 150px);
  }

  .main-shell .knowledge-stage-nav {
    top: 66px;
  }

  .main-shell :is(.ci-main, .cc-page [tabindex="-1"]) {
    scroll-margin-top: 66px;
  }
}

@media(max-width:680px) {
  .view-container {
    padding: 16px 18px 95px;
  }

  .ai-wallet-notice:not([hidden]) {
    margin-top: 12px;
  }
}
