html{--fn-surface:#fff;--fn-backdrop:#f0f4fa;--fn-ink:#183b55;--fn-muted:#526d81;--fn-line:#c9d9e9;--fn-soft:#edf3fa;--fn-accent:#335fa0;color-scheme:light}
html[data-fn-theme=dark]{--fn-surface:#182638;--fn-backdrop:#101a27;--fn-ink:#e5eef9;--fn-muted:#b2c5da;--fn-line:#3a5068;--fn-soft:#22364d;color-scheme:dark}
.fn-appearance{display:flex;gap:6px;align-items:center;flex-shrink:0}.fn-appearance label{font-size:12px;color:var(--fn-muted)}.fn-appearance select,.fn-appearance button{font:inherit;font-size:13px;min-height:40px;border:1px solid var(--fn-line);border-radius:8px;background:var(--fn-surface);color:var(--fn-ink);padding:7px 9px;cursor:pointer}.fn-appearance button{white-space:nowrap}.fn-appearance select{max-width:105px}.fn-prefs-status:empty{display:none}.fn-prefs-status{position:absolute;right:12px;top:100%;padding:8px;background:var(--fn-surface);border:1px solid var(--fn-line);font-size:12px;max-width:300px;z-index:99}.fn-appearance-direct{position:fixed;right:12px;bottom:12px;z-index:105;padding:8px;border:1px solid var(--fn-line);border-radius:12px;background:var(--fn-surface)}
.fn-language-note{margin:0;padding:9px 18px;font-size:13px;line-height:1.7;background:var(--fn-soft);color:var(--fn-ink);border-bottom:1px solid var(--fn-line)}.fn-language-note[hidden]{display:none}.fn-brand-icon{width:30px;height:30px;display:block}.subject-symbol .fn-brand-icon{width:34px;height:34px}.chem-brand>span{display:grid;place-items:center}
html[data-fn-theme=dark][data-fieldnote] .fn-sim>header>p{color:var(--fn-muted)!important}
html[data-fn-theme=dark][data-fieldnote=business] .site-shell>section{background:var(--fn-backdrop)!important;color:var(--fn-ink)!important}html[data-fn-theme=dark][data-fieldnote=arc] header{background:var(--fn-surface)!important;color:var(--fn-ink)!important}html[data-fn-theme=dark][data-fieldnote=arc] :where(a.text-primary,.text-primary,.studio-toolbar,.studio-header){color:#a9cafa!important}
html[data-fn-theme=dark][data-fieldnote] :where(.unit-card,.formula-hub-section,.formula-filter-row button,.formula-filters button,.formula-filter button,.formula-card,.formula-example,.formula-how,.topic-body,.topic-section,.quiz-panel,.answer-lab-panel,.search-trigger,.course-search,.search-box,.breadcrumb,.breadcrumbs){background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark][data-fieldnote] :where(.formula-card p,.formula-card small,.formula-hub-heading p,.formula-header p,.formula-how p,.formula-example p,.breadcrumb,.breadcrumbs,.fn-sim>header p){color:var(--fn-muted)!important}
html[data-fn-theme=dark][data-fieldnote] :where(.chem-rail nav a.active,.sidebar nav a.active,.business-desk-rail nav a.active,.business-desk-rail nav a[aria-current=page],.formula-filters button.selected,.formula-filter-row button.selected){background:var(--fn-soft)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}
#subject-search-slot{display:flex;gap:8px;align-items:center}#subject-search-slot[hidden]{display:none}#subject-search-slot>.fn-search-launch{flex:1;min-width:0}.fn-header-tips{font:inherit;font-size:13px;min-height:42px;white-space:nowrap;border:1px solid var(--fn-line);background:var(--fn-surface);color:var(--fn-ink);border-radius:8px;padding:8px 11px;cursor:pointer}.fn-header-tips:before{content:'✦';margin-right:7px;color:#c59134}
@media(max-width:750px){#subject-search-slot .fn-search-launch kbd{display:none}#subject-search-slot .fn-search-launch{font-size:14px;gap:8px;padding:10px 12px}}
@media(min-width:751px) and (max-width:1000px){.subject-mode .masthead{grid-template-columns:auto minmax(0,1fr) auto;gap:8px 12px;padding:12px 16px}.subject-mode .brand{grid-row:1;grid-column:1}.subject-header{grid-row:1;grid-column:2;justify-content:flex-start}.subject-mode .masthead>.fn-appearance{grid-row:1;grid-column:3}.subject-mode #subject-search-slot{grid-row:2;grid-column:1/3;max-width:none}.subject-mode .fn-focus-button{grid-row:2;grid-column:3;min-height:44px}.subject-mode #subject-search-slot>.fn-search-launch{min-height:44px}}
html[data-fieldnote=physics]{--fn-accent:#bb503c}html[data-fieldnote=physics] .physics-discovery{background:#493237!important;border-left-color:#e99275!important}html[data-fieldnote=physics] .physics-discovery :where(p,.ss-kicker){color:#f4d9d1!important}html[data-fieldnote=physics] .physics-discovery svg{color:#efb39e}html[data-fieldnote=physics] .physics-discovery a{background:#f2bda9;color:#4c2a24}
html[data-fn-theme=dark][data-fieldnote=physics] .rail-card{background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark][data-fieldnote=physics] :where(.rail-card p,.rail-card ul,.subtopic-card p,.reading-content,.reading-content p,.subtopic-summary,.subtopic-remember){color:var(--fn-muted)!important}
html[data-fn-theme=dark][data-fieldnote] :where(.page-heading,.page-header,.discovery-banner,.quick-tools a,.study-card,.studio-panel,.dashboard-card){background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark][data-fieldnote] :where(.page-heading p,.page-header p,.discovery-banner p,.quick-tools a span,.quick-tools a strong,.study-card p){color:var(--fn-muted)!important}
html[data-fn-theme=dark][data-fieldnote=business] :where(.hero p,.hero-note,.section-intro,.topic-reading p,.desk-card p,.answer-model-list p,.feedback-panel p,.flashcard-application,.quiz-model-answer span){color:var(--fn-muted)!important}html[data-fn-theme=dark][data-fieldnote=business] :where(.journey-strip,.learning-strip,.study-path,.learning-path,.case-method,.case-study-method,.method-strip,.formula-intro){background:var(--fn-soft)!important;color:var(--fn-ink)!important}
@media(max-width:750px){html[data-fieldnote=physics] .right-rail{grid-template-columns:minmax(0,1fr)!important;min-width:0}html[data-fieldnote=physics] .rail-card{min-width:0;grid-column:auto!important;grid-row:auto!important}}
html[data-fn-theme=dark][data-fieldnote=business] :where(.formula-explain,.formula-tip,.formula-example,.formula-intro,.unit-card p,.detail-card p,.flashcard-controls,.answer-help,.model-answer-card p,.quiz-panel p){color:var(--fn-muted)!important}html[data-fn-theme=dark][data-fieldnote=business] :where(.formula-filter button,.filter-row button){background:var(--fn-soft)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark][data-fieldnote=business] :where(.formula-filter button.selected,.filter-row button.selected){background:#4d3c69!important;color:#f2eaff!important}
html[data-fn-theme=dark][data-fieldnote=physics] :where(.utility-tabs button,.mobile-course-nav button,.physics-lesson-tabs button,.search-trigger,.search-box,.search-trigger input){background:var(--fn-soft)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark][data-fieldnote=physics] :where(.utility-tabs button.active,.mobile-course-nav button.active,.physics-lesson-tabs button.active){background:#e99275!important;color:#42261c!important}
@media(max-width:750px){html[data-fieldnote=physics] .workspace-grid{grid-template-columns:minmax(0,1fr)!important;min-width:0}html[data-fieldnote=physics] :where(.main-column,.topic-hero,.physics-lesson-tabs,.subtopic-list){max-width:100%;min-width:0}html[data-fieldnote=physics] .physics-lesson-tabs{display:flex;flex-wrap:wrap}html[data-fieldnote=physics] .physics-lesson-tabs button{min-width:0;flex:1}html[data-fieldnote=physics] .topic-hero{overflow:hidden}}
body.subject-mode #main>.fn-language-note{display:none}html[data-fn-theme=dark] :where(.intro-index,.eyebrow,.brand-caption,.section-label>span){color:var(--fn-muted)!important}html[data-fn-theme=dark] :where(.desk-label,.intro-index>span,.science-code,.science-route-note,.science-library-note,.science-filter-bar,.science-filterbar,.science-result-count,.science-pagination){background:var(--fn-soft)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark][data-fieldnote=arc]{--muted:var(--fn-soft)}
html[data-fn-theme=dark][data-fieldnote]{--forest:var(--fn-ink);--mint:var(--fn-soft);--teal:var(--fn-soft);--cream:var(--fn-surface);--soft:var(--fn-soft);--setup-ink:var(--fn-ink)}
html[data-fn-theme=dark] :where(.science-filters,.science-paper-meta,.science-result-bar,.science-pagination button,.science-source-links a,.science-year-links a){background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}
html[data-fn-theme=dark][data-fieldnote] :where(.course-mode-desk,.coordinated-map>div,.science-tier-card,.sim-view,.sim-inspector,.sim-library button,.sim-controls,.sim-control,.sim-readout,.sim-challenge,.sim-toolbar,.sim-access,.sim-switches,.sim-fallback,.sim-source,.sim-truth,.sim-button,.sim-quality,.computer-explorer,.computer-explorer-info,.computer-part,.computer-detail,.computer-parts button,.dashboard-grid>.card,.dashboard-side>.card,.definition,.callout,.lesson-intro,.lesson-aside,.diagram-panel,.inline-visual,.answer,.feedback,.flashcard-face,.course-banner,.hero-banner,.dashboard-strip,.dashboard-insight,.exam-card,.exam-question-panel,.exam-score-panel,.formula-tool,.formula-grid article,.formula-row,.tool-panel,.study-overview,.topic-overview,.notes-paper,.note-card,.subtopic,.subtopic-section,.reading-sheet,.physics-card,.tool-card,.topic-row){background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}
html[data-fn-theme=dark][data-fieldnote] :where(.sim-library button.active,.sim-control,.sim-readout,.sim-challenge,.course-mode-desk,.science-tier-extended,.definition,.callout){background:var(--fn-soft)!important}
html[data-fn-theme=dark][data-fieldnote] :where(.fn-sim>p,.sim-library button span,.sim-caption,.sim-explain p,.sim-challenge p,.sim-kicker,.sim-source,.sim-hint,.page-heading>p,.page-heading .eyebrow,.panel p,.card p,.course-mode-desk p,.science-setup-head p,.science-setup-note,.reading-panel p,.subtopic-section p,.topic-row p,.lesson-aside p,.notes-paper p,.note-card p){color:var(--fn-muted)!important}
html[data-fn-theme=dark][data-fieldnote] :where(.sim-view-heading,.sim-view-heading>span,.sim-explain,.sim-controls label,.sim-library button strong,.course-mode-desk strong,.science-setup,.science-setup-note){color:var(--fn-ink)!important}
html[data-fn-theme=dark][data-fieldnote] :where([class~="bg-white"],[class~="bg-slate-50"],[class~="bg-slate-100"],[class~="bg-gray-50"],[class~="bg-gray-100"],[class~="bg-zinc-50"],[class~="bg-neutral-50"]){background:var(--fn-surface)!important;border-color:var(--fn-line)!important}
html[data-fn-theme=dark][data-fieldnote] :where([class~="text-slate-900"],[class~="text-slate-800"],[class~="text-gray-900"],[class~="text-gray-800"],[class~="text-zinc-900"],[class~="text-neutral-900"]){color:var(--fn-ink)!important}html[data-fn-theme=dark][data-fieldnote] :where([class~="text-slate-500"],[class~="text-slate-600"],[class~="text-slate-700"],[class~="text-gray-500"],[class~="text-gray-600"],[class~="text-gray-700"],[class~="text-zinc-600"],[class~="text-muted-foreground"]){color:var(--fn-muted)!important}
html[data-fn-language=th] body{line-height:1.8}html[data-fn-language=th] :where(h1,h2,h3,.eyebrow,.overline,.brand-caption,.rail-label){letter-spacing:normal;line-height:1.5}
.masthead{background:var(--fn-surface)!important;color:var(--fn-ink);border-color:var(--fn-line)!important}.masthead .brand,.masthead .picker-button,.masthead select,.masthead .fn-focus-button{color:var(--fn-ink)}.subject-mode .masthead{grid-template-columns:auto auto minmax(160px,1fr) auto auto}.home-header{margin-left:auto}.header-note,.desk-label{color:var(--fn-muted)}
html[data-fn-theme] body:not(.subject-mode){background:var(--fn-backdrop);color:var(--fn-ink)}html[data-fn-theme] #home .subjects .subject{background:linear-gradient(145deg,var(--fn-surface) 55%,color-mix(in srgb,var(--tone) 8%,var(--fn-surface)));color:var(--fn-ink);border:1px solid var(--fn-line);border-left:4px solid var(--tone);--surface:var(--fn-surface)}html[data-fn-theme] #home .subject .card-copy h3{color:var(--fn-ink)}html[data-fn-theme] #home .subject :where(.card-copy p,.card-bottom,.course-code,.subject-number){color:var(--fn-muted)}html[data-fn-theme] #home .subject .card-bottom{border-color:var(--fn-line)}html[data-fn-theme] #home .subject .tool-tags span{background:var(--fn-soft);color:var(--fn-muted);border-color:var(--fn-line)}
#home .physics{--tone:#bb503c;--tile:#fbe5dc}html[data-fn-theme=dark] #home .physics{--tone:#f5a18a;--tile:#54372f}html[data-fn-theme=dark] #home .maths{--tone:#90b8fa;--tile:#273f61}html[data-fn-theme=dark] #home .biology{--tone:#96d2b0;--tile:#28473c}html[data-fn-theme=dark] #home .chemistry{--tone:#f1cb73;--tile:#51452d}html[data-fn-theme=dark] #home .business{--tone:#c4aceb;--tile:#453956}html[data-fn-theme=dark] #home .computing{--tone:#83d8d1;--tile:#294b4e}
html[data-fn-theme=dark] :where(.resume-panel,.science-papers,.science-sources,.paper-entry,.science-filter,.science-results,.science-paper,.science-card,.quick-action,.fn-search-launch,.fn-search-dialog,.fn-search-form,.fn-search-result,.fn-search-empty){background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}html[data-fn-theme=dark] :where(.resume-detail,.resume-name,.science-scope,.science-fine,.science-heading p,.home-footer,.intro-note,.section-label>span,.quick-label,.science-sources p){color:var(--fn-muted)!important}html[data-fn-theme=dark] :where(input,textarea,select,.picker-button,.fn-focus-button){background:var(--fn-surface);color:var(--fn-ink);border-color:var(--fn-line)}html[data-fn-theme=dark] :where(.fn-search-result h3,.fn-search-result p,.fn-search-result-meta,.fn-search-heading,.fn-search-scope,.fn-search-close,.fn-search-form label){color:var(--fn-ink)!important}html[data-fn-theme=dark] .fn-search-dialog::backdrop{background:#020b18b8}
html[data-fieldnote=physics]{--coral:#ba513e;--ss-deep:#9b3d2e;--ss-accent:#f5bb9d;--ss-tint:#fbece5}html[data-fieldnote=physics] :where(.brand-icon,.progress-track>span,.topic-nav-item.selected .topic-number){background:#e99275!important;color:#251c1a!important}html[data-fieldnote=physics] :where(.physics-desk-tools button.active,.utility-tabs button.active,.topic-nav-item.selected){background:#f8d8cd!important;color:#672d22!important;border-color:#de9b88!important}
html[data-fn-theme=dark][data-fieldnote]{--ink:var(--fn-ink);--muted:var(--fn-muted);--paper:var(--fn-backdrop);--line:var(--fn-line);--navy:#142c46;--ss-paper:var(--fn-surface);--ss-ink:var(--fn-ink);--ss-muted:var(--fn-muted);--ss-line:var(--fn-line);--background:var(--fn-backdrop);--foreground:var(--fn-ink);--card:var(--fn-surface);--card-foreground:var(--fn-ink);--popover:var(--fn-surface);--popover-foreground:var(--fn-ink);--secondary:var(--fn-soft);--secondary-foreground:var(--fn-ink);--muted-foreground:var(--fn-muted);--border:var(--fn-line);--input:var(--fn-line);--sidebar:#142338;--sidebar-foreground:var(--fn-ink);--sidebar-accent:var(--fn-soft);--sidebar-accent-foreground:var(--fn-ink);--sidebar-border:var(--fn-line)}
html[data-fn-theme=dark][data-fieldnote] :where(body,.site-shell,.chem-body,.workspace,.main-content,main){background:var(--fn-backdrop)!important;color:var(--fn-ink)}html[data-fn-theme=dark][data-fieldnote] :where(.chem-topbar,.topbar,.utility-tabs,.mobile-tools,.mobile-dock,.course-overview>div,.topic-card,.lesson-paper,.contents,.notes-section,.worked,.trap,.card-stage,.flashcard,.formula-card,.practice-card,.quiz-card,.panel,.card,.stat-card,.lesson-card,.lesson-section,.lesson-reading,.study-card,.reading-card,.course-card,.study-paper,.subtopic-card,.reading-panel,.content-panel,.topic-head,.ss-card,.ss-panel,.ss-session,.ss-plan,.sim-panel,.sim-card,.practical-card,.practical-panel,.practical-paper,.formula-panel,.formula-item,.formula-calculator,.cs-reference,.cs-course-note,.cs-explorer-link,.cs-memory-diagram,.cs-hardware-diagram,.cs-diagram,.computer-part-detail,.computer-explorer-controls){background:var(--fn-surface)!important;color:var(--fn-ink)!important;border-color:var(--fn-line)!important}
html[data-fn-theme=dark][data-fieldnote] :where(h1,h2,h3,h4,.section-head,.page-title,.lesson-title,.panel-heading,.formula-name,.stat-value,.unit-title,.subject-title){color:var(--fn-ink)!important}html[data-fn-theme=dark][data-fieldnote] :where(.page-head p,.summary,.lede,.small,.muted,.subtitle,.topic-card p,.stat-label,.lesson-meta,.chem-footer,.reading-lead,.lead,.course-stat p,.topic-card small){color:var(--fn-muted)!important}html[data-fn-theme=dark][data-fieldnote] :where(input,textarea,select,summary){color:var(--fn-ink);background:var(--fn-soft);border-color:var(--fn-line)}html[data-fn-theme=dark][data-fieldnote] .btn.secondary{background:var(--fn-soft);color:var(--fn-ink);border-color:var(--fn-line)}
/* Scientific diagrams retain their labelled light drawing canvas in either palette. */
html[data-fn-theme=dark] :where(.diagram,.lesson-diagram,.cs-diagram svg,.cs-memory-diagram svg,.cs-hardware-diagram svg,.sim-diagram,.formula-diagram,.diagram-frame){background:#f4f8fc!important;color:#17364d!important;border-radius:10px}html[data-fn-theme=dark][data-fieldnote=physics] .theme-toggle{display:none}html[data-fn-theme=light][data-fieldnote=physics] .theme-toggle{display:none}
.fn-tips-link{display:flex;align-items:center;gap:10px;padding:11px 14px;min-height:44px;border:1px solid #ffffff30;border-radius:9px;text-decoration:none;color:inherit;font-weight:650;margin:9px 0;background:#ffffff0c}.fn-tips-link:before{content:'✦';color:#f1cc83}.fn-tips-link[aria-disabled=true]{opacity:.5;pointer-events:none}.fn-tips-mobile{display:none}
@media(max-width:1200px){.subject-mode .masthead{gap:9px;grid-template-columns:auto auto minmax(125px,1fr) auto auto}.fn-appearance label{display:none}.subject-mode .brand>span:last-child{display:none}.home-header .desk-label{display:none}}
@media(max-width:750px){.masthead{height:auto!important;min-height:70px;flex-wrap:wrap;gap:10px;padding:12px 16px}.home-header{display:none!important}.masthead .brand{font-size:21px}.masthead .brand-mark{width:31px;height:31px}.masthead>.fn-appearance{margin-left:auto}.subject-mode .masthead{grid-template-columns:auto minmax(0,1fr) auto;padding:10px 12px;gap:8px}.subject-mode .masthead .fn-appearance{grid-row:2;grid-column:1/3;justify-self:start;margin:0}.subject-mode #subject-search-slot{grid-row:3;grid-column:1/-1}.subject-mode .fn-focus-button{grid-row:2;grid-column:3}.subject-header select{max-width:170px}.fn-tips-mobile{display:inline-flex;margin:6px 12px;padding:8px 13px;border-color:var(--fn-line);background:var(--fn-surface);color:var(--fn-ink)}.fn-direct-search{bottom:75px}.fn-appearance-direct{left:12px;right:auto}.fn-language-note{padding:8px 12px}}
@media(prefers-reduced-motion:no-preference){body,.masthead,.subject,.tips-card{transition:background-color .18s ease,border-color .18s ease,color .18s ease}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
