/* Theme-specific overrides intentionally follow every layout/palette layer. */
:root[data-theme=dark]{color-scheme:dark;--spot:#85334b33!important;--ink:#fff1f5!important;--muted:#e6c0cf!important;--faint:#caa2b3!important;--bg:#190f16!important;--bg2:#24141e!important;--card:#2a1a24!important;--card-solid:#2a1a24!important;--field:#21141c!important;--chip:#34202c!important;--line:#694052!important;--card-b:#765063!important;--nav:#24151eea!important;--cream:#25151e!important}
html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark].embedded-view,html[data-theme=dark] body.embedded{background:radial-gradient(ellipse at 80% 0,#8b3b4929,transparent 60%),linear-gradient(155deg,#190f16,#28131f 65%,#21141a)!important;color:#fff1f5!important}
html[data-theme=dark] body .hero,html[data-theme=dark] body .uni{background:radial-gradient(60% 55% at 60% 30%,#ff3c8c33,transparent 70%),radial-gradient(60% 50% at 10% 100%,#ff5a002e,transparent 70%),linear-gradient(180deg,#280f1d,#190f16)!important}
html[data-theme=dark] body .pt,html[data-theme=dark] body .acc,html[data-theme=dark] body footer{background:#21141c!important}html[data-theme=dark] body .panel,html[data-theme=dark] body .card,html[data-theme=dark] body .stat,html[data-theme=dark] body .learn-card,html[data-theme=dark] body .box,html[data-theme=dark] body #progressView,html[data-theme=dark] body .streak-panel,html[data-theme=dark] body .dev,html[data-theme=dark] body .layer,html[data-theme=dark] body .lay,html[data-theme=dark] body .plan,html[data-theme=dark] body .subject,html[data-theme=dark] body .table-wrap,html[data-theme=dark] body .word-list,html[data-theme=dark] body .flash-card,html[data-theme=dark] body .plan-card,html[data-theme=dark] body .tile,html[data-theme=dark] body .day,html[data-theme=dark] body .week,html[data-theme=dark] body .score-simulation,html[data-theme=dark] body .development-details,html[data-theme=dark] body .numeric-response,html[data-theme=dark] body .bubble,html[data-theme=dark] body .intro{background:#2a1a24!important;border-color:#694052!important;color:#fff1f5!important;box-shadow:0 12px 28px -20px #0008!important}
html[data-theme=dark] body .sidebar,html[data-theme=dark] body .side,html[data-theme=dark] body .rail,html[data-theme=dark] body .nav,html[data-theme=dark] body .sidebar-note{background:#23151ff5!important;border-color:#694052!important}html[data-theme=dark] body h1,html[data-theme=dark] body h2,html[data-theme=dark] body h3,html[data-theme=dark] body h4,html[data-theme=dark] body #learningView>h1,html[data-theme=dark] body #progressView>h1,html[data-theme=dark] body #qTitle,html[data-theme=dark] body .page-title h1,html[data-theme=dark] body .top h1,html[data-theme=dark] body .panel h2,html[data-theme=dark] body .streak-copy h2,html[data-theme=dark] body strong,html[data-theme=dark] body b,html[data-theme=dark] body .brand,html[data-theme=dark] body .brand b{color:#fff1f5!important;text-shadow:none!important}
html[data-theme=dark] body p,html[data-theme=dark] body label,html[data-theme=dark] body small,html[data-theme=dark] body td,html[data-theme=dark] body summary,html[data-theme=dark] body .fine,html[data-theme=dark] body .muted,html[data-theme=dark] body .sub,html[data-theme=dark] body .lbl,html[data-theme=dark] body .breadcrumb,html[data-theme=dark] body .eyebrow,html[data-theme=dark] body .domain-cell,html[data-theme=dark] body .question-id,html[data-theme=dark] body .row-snippet,html[data-theme=dark] body .brand small,html[data-theme=dark] body .sidebar nav button,html[data-theme=dark] body .acc .info,html[data-theme=dark] body .acc .info *,html[data-theme=dark] body footer p,html[data-theme=dark] body footer nav a,html[data-theme=dark] body footer .studio-contacts,html[data-theme=dark] body footer .studio-contacts a,html[data-theme=dark] body .studio-contacts h2{color:#e6c0cf!important}
html[data-theme=dark] body input:not([type=checkbox]):not([type=radio]),html[data-theme=dark] body select,html[data-theme=dark] body textarea,html[data-theme=dark] body .search{background:#21141c!important;color:#fff1f5!important;border-color:#87556d!important}html[data-theme=dark] body input::placeholder,html[data-theme=dark] body textarea::placeholder{color:#caa2b3!important}
html[data-theme=dark] body dialog,html[data-theme=dark] body .answer-pane,html[data-theme=dark] body .reading-pane,html[data-theme=dark] body .exam-passage,html[data-theme=dark] body #passagePane{background:#24161f!important;color:#fff1f5!important;border-color:#694052!important}html[data-theme=dark] body #qPrompt,html[data-theme=dark] body #qPassage,html[data-theme=dark] body #examQuestion>p,html[data-theme=dark] body #examQuestion h3,html[data-theme=dark] body .choice>span,html[data-theme=dark] body .choice .letter{color:#fff1f5!important}html[data-theme=dark] body .choice,html[data-theme=dark] body .opt,html[data-theme=dark] body .quiz-option{background:#31202b!important;border-color:#87556d!important;color:#fff1f5!important}html[data-theme=dark] body .choice:has(input:checked){background:#643148!important;border-color:#ff90b9!important}html[data-theme=dark] body .solution,html[data-theme=dark] body .res,html[data-theme=dark] body .bubble.staff{background:#402435!important;color:#fff1f5!important}
html[data-theme=dark] body .dialog-header,html[data-theme=dark] body .question-timebar,html[data-theme=dark] body .workspace-switch,html[data-theme=dark] body thead,html[data-theme=dark] body th,html[data-theme=dark] body .desmos-head,html[data-theme=dark] body .desmos-foot{background:#36202d!important;color:#e6c0cf!important;border-color:#694052!important}html[data-theme=dark] body .badge,html[data-theme=dark] body .chip,html[data-theme=dark] body .tag,html[data-theme=dark] body .pill,html[data-theme=dark] body .eyebrow,html[data-theme=dark] body .source-button,html[data-theme=dark] body .btn,html[data-theme=dark] body .light,html[data-theme=dark] body .textbtn,html[data-theme=dark] body .iconbtn,html[data-theme=dark] body .account-icon,html[data-theme=dark] body .sidebar .mobile-menu,html[data-theme=dark] body .sidebar .mobile-menu *,html[data-theme=dark] body .workspace-switch button{background:#382431!important;color:#f4cede!important;border-color:#87556d!important}html[data-theme=dark] body .sidebar nav button.active,html[data-theme=dark] body .button.dark,html[data-theme=dark] body .btn.primary,html[data-theme=dark] body .primary,html[data-theme=dark] body .chip.on,html[data-theme=dark] body .workspace-switch button[aria-pressed=true]{background:linear-gradient(115deg,#d35a32,#d72d78)!important;color:#fff!important}html[data-theme=dark] body .stat strong{color:#ffa6ca!important}html[data-theme=dark] body .correct,html[data-theme=dark] body .choice.is-correct{background:#17382c!important;color:#d4f5e3!important}html[data-theme=dark] body .incorrect,html[data-theme=dark] body .choice.is-wrong{background:#502532!important;color:#ffe0e4!important}html[data-theme=dark] body #activityChart svg text{fill:#e6c0cf!important}html[data-theme=dark] body #activityChart svg line{stroke:#694052!important}html[data-theme=dark] body .contact-links a{color:#f4cede!important}body .theme-control{min-width:42px;min-height:42px;font-size:22px}
html[data-theme=dark] body #theme,html[data-theme=dark] body .tbtn{background:#382431!important;color:#fff1f5!important;border-color:#a16a82!important}html[data-theme=dark] body #qMeta,html[data-theme=dark] body .desmos-foot a,html[data-theme=dark] body .formlabel,html[data-theme=dark] body .checklabel span{color:#e6c0cf!important}html[data-theme=dark] body .nav{background:#24151ef2!important}html[data-theme=dark] body .code{background:#34202c!important;color:#fff1f5!important}
/* Light flashcard surfaces are intentional in both themes. */
html body #flip .face.f{background:linear-gradient(135deg,#fff3c4,#ffc9a8)!important;border-color:#fff8ed!important;color:#3b1c2b!important}
html body #flip .face.b{background:linear-gradient(135deg,#ffe6ef,#ffd7bc)!important;border-color:#fff8ed!important;color:#3b1c2b!important}
html body #flip .face b,html body #flip .face small{color:#3b1c2b!important;text-shadow:none!important;opacity:1!important}
html body #flip .face small{color:#7b3150!important;font-weight:700!important}
html[data-theme=dark] body .stack .lay,html body .stack .lay{background:linear-gradient(135deg,#fffaf5,#ffe4ec)!important;border:1px solid #fff7ed!important;box-shadow:0 22px 45px -20px #160a1455!important;color:#3b1c2b!important}
html[data-theme=dark] body .stack .lay h1,html[data-theme=dark] body .stack .lay h2,html[data-theme=dark] body .stack .lay h3,html[data-theme=dark] body .stack .lay h4,html[data-theme=dark] body .stack .lay b,html[data-theme=dark] body .stack .lay strong,html[data-theme=dark] body .stack .lay p,html[data-theme=dark] body .stack .lay small,html[data-theme=dark] body .stack .lay span,html body .stack .lay h3,html body .stack .lay b,html body .stack .lay p,html body .stack .lay small,html body .stack .lay span{color:#3b1c2b!important;opacity:1!important;text-shadow:none!important}
/* Consistent dark surfaces prevent pale text on inherited light controls. */
html[data-theme=dark] body .sidebar nav button:not(.active),html[data-theme=dark] body .sidebar nav button:not(.active) *,html[data-theme=dark] body .nav button:not(.on),html[data-theme=dark] body .nav button:not(.on) *,html[data-theme=dark] body .study-subnav button:not(.active){background:#382431!important;color:#f7dce7!important;border-color:#87556d!important}
html[data-theme=dark] body .sidebar nav .navlabel,html[data-theme=dark] body .navlabel{background:transparent!important;color:#e5abc3!important}
html[data-theme=dark] body .rail .quote,html[data-theme=dark] body .quote,html[data-theme=dark] body .next,html[data-theme=dark] body .sum,html[data-theme=dark] body .sum>div,html[data-theme=dark] body .lv,html[data-theme=dark] body .period,html[data-theme=dark] body .dom,html[data-theme=dark] body .checklist button,html[data-theme=dark] body .checklist,html[data-theme=dark] body .review-card,html[data-theme=dark] body .answer-review,html[data-theme=dark] body .payment-summary,html[data-theme=dark] body .data-notice,html[data-theme=dark] body .account-panel,html[data-theme=dark] body .tour-stage,html[data-theme=dark] body .tour-actions,html[data-theme=dark] body .tour-nav,html[data-theme=dark] body .demo,html[data-theme=dark] body .preview-note,html[data-theme=dark] body .word-row,html[data-theme=dark] body .bar-card,html[data-theme=dark] body .exam-number,html[data-theme=dark] body #examTimer{background:#2a1a24!important;color:#f7dce7!important;border-color:#694052!important}
html[data-theme=dark] body .rail .quote *,html[data-theme=dark] body .next *,html[data-theme=dark] body .sum *,html[data-theme=dark] body .lv *,html[data-theme=dark] body .period *,html[data-theme=dark] body .dom *,html[data-theme=dark] body .checklist button *,html[data-theme=dark] body .review-card *,html[data-theme=dark] body .subject h3,html[data-theme=dark] body .subject span,html[data-theme=dark] body .subject small,html[data-theme=dark] body .subject strong,html[data-theme=dark] body .subject-total,html[data-theme=dark] body .subject-total small{color:#f7dce7!important}
html[data-theme=dark] body .subject-icon{background:#503043!important;color:#ffe6ef!important}
html[data-theme=dark] body .sidebar nav button.active,html[data-theme=dark] body .sidebar nav button.active *{color:#fff!important}
/* Surfaces deliberately kept light always use dark text in both themes. */
html body #flip .face *,html body .stack .lay *,html body .face.f *,html body .face.b *{color:#3b1c2b!important;text-shadow:none!important;opacity:1!important}
@media(max-width:700px){body .subject-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}body .subject{display:grid!important;grid-template-columns:36px minmax(0,1fr) auto!important;align-items:center!important;gap:12px!important;width:100%!important;min-width:0!important;padding:18px!important;text-align:left!important}body .subject>div:nth-child(2){min-width:0!important;max-width:100%!important}body .subject h3{font-family:'DM Sans',sans-serif!important;font-size:18px!important;line-height:1.35!important;letter-spacing:-.02em!important;margin:0 0 5px!important;overflow-wrap:anywhere!important;word-break:normal!important}body .subject p{display:block!important;font-size:12px!important;line-height:1.5!important;white-space:normal!important}body .subject-total{margin:0!important;min-width:0!important;font-size:22px!important;text-align:right!important}body .subject-total small{font-size:10px!important;white-space:normal!important}}
@media(max-width:420px){body .subject{grid-template-columns:32px minmax(0,1fr)!important;gap:8px 12px!important}body .subject-icon{grid-column:1!important;grid-row:1!important;width:32px!important;height:32px!important}body .subject>div:nth-child(2){grid-column:2!important;grid-row:1!important}body .subject-total{grid-column:2!important;grid-row:2!important;display:flex!important;gap:10px!important;align-items:baseline!important;justify-content:flex-start!important;text-align:left!important;font-size:22px!important}body .subject-total small{font-size:12px!important}}
html[data-theme=dark] body .stp,html[data-theme=dark] body .stp.on,html[data-theme=dark] body .stp i,html[data-theme=dark] body .stp span,html[data-theme=dark] body .sc .lead,html[data-theme=dark] body .hint,html[data-theme=dark] body .lbl,html[data-theme=dark] body .field-hint,html[data-theme=dark] body #learningView>.muted{color:#f0cddd!important;opacity:1!important}html[data-theme=dark] body .stp i{background:#382431!important;border-color:#a9778c!important}html[data-theme=dark] body .stp.on i{background:linear-gradient(115deg,#d35a32,#d72d78)!important;color:white!important}html[data-theme=dark] body .sc h2 span,html[data-theme=dark] body .top h1 span{background:none!important;color:#ffb6d2!important;-webkit-text-fill-color:#ffb6d2!important}
html[data-theme=dark] body #bankCoverage,html[data-theme=dark] body #coverageSummary,html[data-theme=dark] body .coverage,html[data-theme=dark] body .coverage-skills,html[data-theme=dark] body .coverage-grid{background:#2a1a24!important;color:#f7dce7!important;border-color:#694052!important}html[data-theme=dark] body #bankCoverage *,html[data-theme=dark] body #coverageSummary *{color:#f7dce7!important}
