/* Shared learning-desk palette for the journal. */
#journalWorkspace{--journal-glass:linear-gradient(135deg,#f1efdf,#e8efdf)}
#journalWorkspace .journalHeading{position:relative;isolation:isolate;padding:24px;border:1px solid #f8ffec;border-radius:23px;background:radial-gradient(ellipse at 8% 20%,#b1d8cd66,transparent 55%),radial-gradient(ellipse at 90% 75%,#c3bfe052,transparent 60%),linear-gradient(120deg,#e6eddc,#e1eee5)}
#journalWorkspace .stats>div:nth-child(2n),#journalWorkspace .insightCard:nth-child(2n){background:linear-gradient(135deg,#eeedde,#e6e3ec)}
#journalWorkspace :is(.journalPanel,.stats>div,.insightCard){border-color:#c0cfb6;box-shadow:inset 0 1px #fff9,0 8px 24px #344b2910}
#journalWorkspace .tradeRow,#journalWorkspace .directionResult{background:#f5f7ed;border-color:#b7c8ae80}
#journalWorkspace #undoBar{background:#e5eedc;border:1px solid #9bb18a;border-radius:12px;padding:12px}
#theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:40px;padding:8px 13px;border-radius:99px;border:1px solid #7fa18d;background:#edf5ee;color:#254d38;font:600 12px/1.4 'DM Sans',Arial,sans-serif;cursor:pointer;white-space:nowrap}
.is-signed-in #theme-toggle{background:#edf5ee;color:#254d38;border-color:#b7d1bf}
#theme-toggle:hover{background:#dceade}
#theme-toggle:focus-visible{outline:3px solid #bde3cc;outline-offset:3px}
@media(max-width:640px){header,.is-signed-in header{flex-wrap:wrap}#theme-toggle{min-height:44px;margin-left:auto}#journalWorkspace .journalHeading{padding:18px}.journalEntryActions{gap:8px}}
html[data-theme=dark]{color-scheme:dark;--ink:#eef0f4;--muted:#b8bec9;--line:#48505e;--accent:#a8d4b6}
html[data-theme=dark] body,html[data-theme=dark] body.is-signed-in{background:radial-gradient(ellipse at 0% 0%,#272c38,transparent 50%),radial-gradient(ellipse at 100% 65%,#292d3b,transparent 55%),#171a21;color:#eef0f4}
html[data-theme=dark] :is(#profile-panel,#auth-panel,#recovery-panel,#admin-tools,#journalWorkspace,#courseWorkspace){color:#eef0f4}
html[data-theme=dark] :is(#auth-panel,#recovery-panel,.panel){background:#242831;border-color:#48505e}
html[data-theme=dark] #profile-panel{background:transparent;border:0}
html[data-theme=dark] :is(#profile-panel,#auth-panel,#recovery-panel,#admin-tools) :is(h1,h2,h3,h4,h5,strong,label){color:#eef0f4}
html[data-theme=dark] :is(#profile-panel,#auth-panel,#recovery-panel,#admin-tools) :is(p,small,.fine,.eyebrow,.review,.feed-meta,.feed-note,.market-note,.coin-name,.chart-footer,.calendar-event-meta,.calendar-agenda h4,.community-count>span:last-child){color:#b8bec9;opacity:1}
html[data-theme=dark] #profile-panel>.panel-heading #member-email{color:#eef0f4}
html[data-theme=dark] :is(#profile-panel,#auth-panel,#recovery-panel,#admin-tools) a{color:#b7deca}
html[data-theme=dark] #profile-panel>.journalNav{background:#22262f;border-color:#48505e}
html[data-theme=dark] #profile-panel>.journalNav button{color:#e2e6ee;background:transparent;border-color:transparent}
html[data-theme=dark] #profile-panel>.journalNav button[aria-pressed=true]{background:#a8d4b6;color:#173c29;border-color:#a8d4b6}
html[data-theme=dark] #dashboardOverview :is(.dashboard-card,.market-board){background:linear-gradient(135deg,#2a2e38,#232730);border-color:#48505e;box-shadow:0 8px 24px #0002,inset 0 1px #ffffff0a}
html[data-theme=dark] #dashboardOverview :is(.access-card,.updates-card){background:linear-gradient(135deg,#2d303d,#282d36)}
html[data-theme=dark] #dashboardOverview .calendar-card{background:linear-gradient(135deg,#2c3038,#262a32)}
html[data-theme=dark] #dashboardOverview .market-board:after{opacity:.05;filter:brightness(2)}
html[data-theme=dark] #dashboardOverview :is(.calendar-event,.dashboardFoldIcon){background:#292e38;border-color:#505967;color:#e2e6ee}
html[data-theme=dark] #dashboardOverview :is(.market-tile+.market-tile,.dashboardFoldContent,.card-heading,.feed-item,.mobileDrawingFold){border-color:#65708060}
html[data-theme=dark] #dashboardOverview :is(#market-status,.feed-meta span,.calendar-event-meta span,.chart-drawing-note,.chart-drawing-row){color:#b8bec9}
html[data-theme=dark] #dashboardOverview :is(.calendar-event a,.calendar-event-meta time,.chart-drawing-row button){color:#b7deca}
html[data-theme=dark] #dashboardOverview :is(.chart-mount,.chart-start,.kybera-chart-controls,.kybera-ema-legend,.chart-switch,.chart-scale-settings[open],.chart-scale-settings summary,.chart-tool-group,.mobileDashboardNav){background:#1e222b;color:#e2e6ee;border-color:#505967}
html[data-theme=dark] :is(#auth-panel,#recovery-panel,#admin-tools,#dashboardOverview,#journalWorkspace) :is(button,.secondary,select,input:not([type=color]):not([type=checkbox]),textarea){background:#303641;color:#f2f4f8;border:1px solid #657080;color-scheme:dark}
html[data-theme=dark] :is(#auth-panel,#recovery-panel,#admin-tools,#dashboardOverview,#journalWorkspace) :is(button,.secondary):hover:not(:disabled){background:#3d4655;color:#f2f4f8}
html[data-theme=dark] :is(#auth-panel,#recovery-panel,#admin-tools,#dashboardOverview,#journalWorkspace) :is(.primary,button[aria-pressed=true]){background:#b9dfc7;color:#173c29;border-color:#b9dfc7}
html[data-theme=dark] #dashboardOverview .dashboard-utility-column .uid-card .stack .primary{background:#303641;color:#f2f4f8;border-color:#657080}
html[data-theme=dark] :is(#auth-panel,#recovery-panel,#admin-tools,#dashboardOverview,#journalWorkspace) :is(input,textarea)::placeholder{color:#b8bec9;opacity:1}
html[data-theme=dark] #dashboardOverview :is(.access-state,.access-remaining,.uid-status--approved:not(:empty)){background:#254b37;color:#c0eed1;border-color:#7bac89}
html[data-theme=dark] #dashboardOverview .uid-status:not(:empty){background:#303640;color:#e1e5ed;border-color:#657080}
html[data-theme=dark] #dashboardOverview .uid-status--approved:not(:empty){background:#254b37;color:#c0eed1;border-color:#7bac89}
html[data-theme=dark] #dashboardOverview :is(.uid-status--rejected:not(:empty),.access-expired .access-state){background:#52392f;color:#f2cab6;border-color:#ae8976}
html[data-theme=dark] #dashboardOverview :is(.uid-status--unsaved:not(:empty),.access-upcoming .access-state){background:#454831;color:#ece5b5;border-color:#9ca172}
html[data-theme=dark] #dashboardOverview :is(.dashboardDisclosure>summary,.mobileDrawingFold>summary){color:#e2e6ee}
html[data-theme=dark] #journalWorkspace{--journal-glass:linear-gradient(135deg,#2a2e38,#272c36)}
html[data-theme=dark] #journalWorkspace :is(.journalHeading,.stats>div,.journalPanel,.insightCard){background:var(--journal-glass);border-color:#48505e;box-shadow:inset 0 1px #ffffff0a}
html[data-theme=dark] #journalWorkspace :is(.tradeRow,.directionResult,#undoBar){background:#292e38;border-color:#505967;color:#e2e6ee}
html[data-theme=dark] #journalWorkspace :is(.tradeRow strong,.stats strong,.insightCard h3){color:#eef0f4}
html[data-theme=dark] #journalWorkspace :is(.insightTip,.tradeNote,.journalStatus,.journalFine,.directionResult p,.directionResult small){color:#b8bec9}
html[data-theme=dark] #journalWorkspace .positive{color:#a7e4be!important}
html[data-theme=dark] #journalWorkspace .negative{color:#ffc0c7!important}
html[data-theme=dark] #courseWorkspace :is(.courseHead,.courseLesson,.courseMenu,.courseGlossary,.courseTopTools,.courseRankStrip,.learningModuleCard,.learningResume,.learningModuleHero,.coursePagerDock,.courseSimpleIntro,.courseOriginalChart,.courseNumberExample,.learningLessonRow){background:linear-gradient(135deg,#2a2e38,#292d37);border-color:#505967;box-shadow:inset 0 1px #ffffff0a,0 10px 24px #0002;color:#eef0f4}
html[data-theme=dark] #courseWorkspace .courseHead:before{opacity:.2}
html[data-theme=dark] #courseWorkspace :is(h2,h3,h4,strong,.courseRankTitle,.courseRankCount,.courseStep strong){color:#eef0f4}
html[data-theme=dark] #courseWorkspace :is(p,li,small,summary,.courseEyebrow,.courseMeta,.courseFine,.coursePercent,.courseRankNext,.coursePageNumber,.courseImageLegend,figcaption,.coursePagerInfo small){color:#b8bec9;opacity:1}
html[data-theme=dark] #courseWorkspace :is(.courseTask,.courseKeyPoint,.courseExercise,.courseRiskLab,.courseImageCheck,.courseAnswers,.courseStep,.courseNumberExample[open],.learningModuleCopy){background:#2b303b;border-color:#505967;color:#e2e6ee}
html[data-theme=dark] #courseWorkspace :is(button,input,select,textarea,.courseMeta){background:#303641;color:#f2f4f8;border-color:#657080;color-scheme:dark}
html[data-theme=dark] #courseWorkspace :is(button[aria-pressed=true],.courseMenu button[aria-current=step],.courseComplete,.learningModuleStart,.coursePagerDock .coursePagerFinish){background:#b9dfc7!important;color:#173c29!important;border-color:#b9dfc7}
html[data-theme=dark] #courseWorkspace :is(button:hover:not(:disabled),.coursePagerDock button:last-child:not(.coursePagerFinish)){background:#3d4655;color:#f2f4f8}
html[data-theme=dark] #courseWorkspace :is(.courseSyncStatus,.courseSyncStatus:disabled){background:transparent;color:#b8bec9;border:0}
html[data-theme=dark] #admin-tools{background:linear-gradient(135deg,#283649,#213241);border-color:#7c93b2;box-shadow:0 12px 34px #0003}
html[data-theme=dark] #admin-tools :is(.admin-tool-card,#admin-panel,.admin-optional,.admin-records,.admin-area-label){background:#2b3c4b;border-color:#7890a6;color:#deebf6}
html[data-theme=dark] #admin-tools :is(.admin-tools-heading h2,.admin-tools-heading .eyebrow,.admin-tools-heading .fine,.admin-optional summary,.admin-records summary,.admin-optional summary span,.request-row code){color:#deebf6}
html[data-theme=dark] :is(#auth-panel,#recovery-panel,#admin-tools,#dashboardOverview,#courseWorkspace,#journalWorkspace) button:disabled{background:#303640!important;color:#bcc3cf!important;border-color:#626d7d;opacity:1}
html[data-theme=dark] #courseWorkspace .courseSyncStatus:disabled{background:transparent!important;color:#b8bec9!important}
html[data-theme=dark] :is(button,a,input,select,textarea,summary,[role=button]):focus-visible{outline-color:#cbd7f0!important}
html[data-theme=dark] #theme-toggle{background:#303641;color:#f2f4f8;border-color:#657080}
html[data-theme=dark] footer,html[data-theme=dark] footer a{color:#b8bec9}
@media(prefers-contrast:more){html[data-theme=dark] #dashboardOverview .dashboard-card,html[data-theme=dark] #dashboardOverview .market-board{background:#242831;border-color:#657080}}
#theme-toggle{width:40px;height:40px;min-height:40px;padding:9px;border-radius:50%;box-sizing:border-box}
#theme-toggle svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html[data-theme=dark] .chart-overlay text[fill="#183129"]{fill:#e3e7ef}
@media(pointer:coarse){#theme-toggle{width:44px;height:44px;min-height:44px}}

html[data-theme=dark] #courseWorkspace :is(.courseTeachingFigure,.courseNativeFigure){background:#2b303b;border-color:#505967}
html[data-theme=dark] #courseWorkspace .learningResumeAction{color:#f6faef}

/* Static glass surfaces avoid repeated backdrop rasterization during scrolling. */
#profile-panel :is(.dashboard-card,.market-board),
#journalWorkspace :is(.stats>div,.journalPanel,.insightCard),
#courseWorkspace :is(.courseHead,.courseLesson,.courseMenu,.learningModuleCard,.courseRankStrip,.coursePagerDock){backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#dashboardOverview .dashboard-card:before{animation:dashboardGlassBreathe 10s ease-in-out infinite alternate!important;opacity:.2}
#dashboardOverview .dashboard-card{transition:border-color .15s!important}
#dashboardOverview .dashboard-card:hover{transform:none!important}
#dashboardOverview .dashboardDisclosure[open] .dashboardFoldContent{animation:dashboardFoldReveal .3s ease-out}
#courseWorkspace::before,#courseWorkspace::after,.courseHead:before,.learningModuleVisual:after{animation:none!important}

/* Compact learning identity and workspace headings. */
#profile-panel .learningRankCompact,#courseWorkspace .learningRank{grid-template-columns:58px minmax(0,1fr) auto;gap:8px 16px;padding:16px 20px;margin:12px 0;border-radius:17px;align-items:center}
#profile-panel .learningRankBadge,#courseWorkspace .learningRankBadge{width:56px;height:64px;grid-row:1/3}
#profile-panel .learningRankBadge img,#courseWorkspace .learningRankBadge img{width:100%;height:100%;object-fit:contain}
#profile-panel .learningRankInfo strong,#courseWorkspace .learningRankInfo strong{font-size:22px;margin:3px 0}
#profile-panel .learningRankInfo p,#courseWorkspace .learningRankInfo p{font-size:12px;margin:3px 0}
#profile-panel .learningRankInfo small,#courseWorkspace .learningRankInfo small{font-size:10px}
#profile-panel .learningRankInfo progress,#courseWorkspace .learningRankInfo progress{height:4px;margin:7px 0}
#profile-panel .learningRankNote,#courseWorkspace .learningRankNote{grid-column:2/-1;font-size:10px;line-height:1.4;margin:0;max-width:760px}
#profile-panel .learningRank .courseSyncStatus{grid-column:3;grid-row:1;align-self:center;justify-self:end;background:transparent;border:0;color:#b8cabc;font:inherit;font-size:10px;padding:5px;min-height:32px}
#profile-panel .learningRank:after,#courseWorkspace .learningRank:after{width:160px;height:160px;top:-85px;right:-35px}
#courseWorkspace .learningRankLadder{padding-top:10px;gap:6px}
#courseWorkspace .learningRankStep{padding:8px;gap:4px}
#dashboardLearningRank{margin-bottom:14px}
#dashboardLearningRank .dashboardLearnButton{padding:8px 14px;font-size:12px;min-height:36px}
#courseWorkspace .courseHead{padding:18px 22px;margin:12px 0}
#courseWorkspace .courseHead h2{font-size:clamp(24px,2.5vw,32px);margin:6px 0}
#courseWorkspace .courseHead p{font-size:12px;line-height:1.6;margin:6px 0;max-width:760px}
#courseWorkspace .courseRankStrip{padding:10px 14px;gap:8px 14px;margin:12px 0}
#journalWorkspace .journalHeading{padding:16px 20px;margin:10px 0 16px;border-radius:17px;align-items:center}
#journalWorkspace .journalHeading h1{font-size:clamp(25px,2.7vw,34px);margin:5px 0 7px}
#journalWorkspace .journalHeading p{font-size:12px;line-height:1.6;margin:0;max-width:580px}
#journalWorkspace .journalEntryActions button{padding:8px 13px;font-size:12px;min-height:36px}
#journalWorkspace .stats{gap:10px;margin:14px 0 18px}
#journalWorkspace .stats>div{padding:14px 17px;border-radius:15px}
#journalWorkspace .stats strong{font-size:24px;margin-top:5px}
#journalWorkspace .stats span{font-size:11px}

 :where(html[data-motion="full"]) #profile-panel .learningRankBadge img,:where(html[data-motion="full"]) #courseWorkspace .learningRankBadge img{animation:rankGentleFloat 6s ease-in-out infinite}
 :where(html[data-motion="full"]) #journalWorkspace .journalHeading,:where(html[data-motion="full"]) #courseWorkspace .courseHead,:where(html[data-motion="full"]) .learningRank{position:relative;overflow:hidden}
 :where(html[data-motion="full"]) #journalWorkspace .journalHeading:after,:where(html[data-motion="full"]) #courseWorkspace .courseHead:after{content:'';position:absolute;top:0;bottom:0;left:0;width:90px;height:auto;background:linear-gradient(100deg,transparent,#ffffff12,transparent);pointer-events:none;animation:workspaceSheen 10s ease-in-out infinite;opacity:.5}
 @keyframes rankGentleFloat{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-3px) rotate(1deg)}}
 @keyframes workspaceSheen{0%,20%{transform:translateX(-110px)}75%,100%{transform:translateX(1000px)}}

@media(max-width:640px){
 #profile-panel .learningRankCompact,#courseWorkspace .learningRank{grid-template-columns:46px minmax(0,1fr);gap:6px 12px;padding:13px 14px}
 #profile-panel .learningRankBadge,#courseWorkspace .learningRankBadge{width:44px;height:52px;grid-row:1}
 #profile-panel .learningRank .courseSyncStatus{grid-column:2;grid-row:auto;justify-self:start;min-height:24px;padding:0}
 #profile-panel .learningRankNote,#courseWorkspace .learningRankNote{grid-column:1/-1}
 #courseWorkspace .learningRankLadder{grid-template-columns:repeat(3,minmax(0,1fr))}
 #journalWorkspace .journalHeading,#courseWorkspace .courseHead{padding:14px 16px}
 #journalWorkspace .journalEntryActions{margin-top:12px;gap:7px}
 #journalWorkspace .journalEntryActions button{min-height:44px}
}

/* Final dark-theme contrast rules also cover nested button text and hover states. */
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools){--dark-text:#f2f4f8;--dark-muted:#c4cbd6}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) :is(button,.secondary,select,input:not([type=color]):not([type=checkbox]),textarea){background:#303641!important;color:#f2f4f8!important;border-color:#748094!important;color-scheme:dark}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) button:hover:not(:disabled){background:#414b5c!important;color:#f2f4f8!important}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) :is(.primary,button[aria-pressed=true],.courseComplete,.learningModuleStart,.coursePagerFinish,.courseMenu button[aria-current=step]){background:#b9dfc7!important;color:#173c29!important;border-color:#b9dfc7!important}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) :is(.primary,button[aria-pressed=true],.courseComplete,.learningModuleStart,.coursePagerFinish,.courseMenu button[aria-current=step]):hover:not(:disabled){background:#cbead5!important;color:#173c29!important}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) :is(button,.primary,.secondary) :is(span,strong,small,em){color:inherit!important}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) button:disabled{background:#303640!important;color:#bcc3cf!important;border-color:#626d7d!important;opacity:1}
html[data-theme=dark] body :is(#courseWorkspace,#dashboardLearningRank) :is(.courseSyncStatus,.courseSyncStatus:disabled,.rankBadgeTrigger){background:transparent!important;color:#c4cbd6!important;border:0!important}
html[data-theme=dark] #dashboardOverview :is(.chart-scale-settings summary,.dashboardDisclosure>summary,.mobileDrawingFold>summary){color:#f2f4f8!important}
html[data-theme=dark] #dashboardOverview .feed-meta span{background:#303b47;color:#d9e3ee}
html[data-theme=dark] #dashboardOverview :is(.quick-links a,.calendar-discord){background:#303641;color:#d7f0e1;border-color:#748094}
html[data-theme=dark] #dashboardOverview :is(.coin-name small,.access-item-heading,.access-item .fine,.market-note,.chart-footer,.feed-note){color:#c4cbd6}
html[data-theme=dark] :is(header .back-link,header .brand,header .language-switch a,.intro h1){color:#eef0f4}
html[data-theme=dark] header .language-switch a[aria-current=page]{background:#303641;color:#eef0f4;border-color:#748094}
html[data-theme=dark] .intro :is(p,.eyebrow){color:#c4cbd6}
html[data-theme=dark] #courseWorkspace :is(.learningModuleStage,.learningModuleStatus,.learningModuleProgress,.learningLessonIndex,.learningSectionIntro,.courseSearchResults small,.courseTopTools label,.courseGlossary dt,.courseGlossary dd,.courseText,.courseRiskLab label){color:#c4cbd6}
html[data-theme=dark] #courseWorkspace :is(.learningModuleCopy,.courseTask,.courseExercise,.courseKeyPoint,.courseAnswers,.courseImageCheck,.courseRiskLab) :is(p,li,span,small,label,summary){color:#c4cbd6}
html[data-theme=dark] #courseWorkspace :is(a,.courseVideoLink){color:#c0e5d1}
html[data-theme=dark] #courseWorkspace .learningResumeAction{background:#315b44!important;color:#f2f4f8!important}
html[data-theme=dark] #courseWorkspace :is(.learningRank,.learningRankStep){background:#272e38;border-color:#647084;color:#eef0f4}
html[data-theme=dark] #courseWorkspace .learningRankStep{opacity:1}
html[data-theme=dark] #courseWorkspace .learningRankStep[aria-current=step]{background:#35483e;border-color:#a8d4b6}
html[data-theme=dark] #courseWorkspace .learningRank :is(.courseEyebrow,p,small,span){color:#c4cbd6}
html[data-theme=dark] #journalWorkspace :is(.stats span,.tradeRow small,.journalToolbar label,.filePick,.previewMessage,.formActions span,.importSource,.optional summary,.journalFine,.journalStatus,label){color:#c4cbd6}
html[data-theme=dark] #journalWorkspace dialog{background:#242831;color:#eef0f4;border-color:#748094}
html[data-theme=dark] #journalWorkspace dialog :is(h2,h3,label,p,small,summary){color:#e2e6ee}
html[data-theme=dark] #journalWorkspace :is(.importPreview,#importMapping,.directionResult){background:#292e38;color:#e2e6ee;border-color:#647084}
html[data-theme=dark] #journalWorkspace :is(.importSource a,.journalPreviewLink){color:#c0e5d1}
html[data-theme=dark] body :is(#dashboardOverview,#courseWorkspace,#journalWorkspace,#auth-panel,#recovery-panel,#admin-tools) :is(input,textarea)::placeholder{color:#c4cbd6;opacity:1}

/* Account sync belongs to the rank details rather than a detached action. */
body #profile-panel .learningRankCompact{grid-template-columns:58px minmax(0,1fr);gap:5px 16px}
body #profile-panel .learningRankCompact .learningRankBadge{grid-row:1/4}
body #profile-panel .learningRankCompact .learningRankNote{grid-column:2;grid-row:3}
body #profile-panel .learningRankCompact .courseSyncStatus{grid-column:2;grid-row:2;justify-self:start;align-self:start;display:inline-flex;align-items:center;gap:6px;max-width:100%;font-size:10px;line-height:1.5;padding:2px 0;min-height:24px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none;color:#d5e7da!important;text-align:left}
body #profile-panel .learningRankCompact .courseSyncStatus:before{content:'';width:5px;height:5px;flex-shrink:0;border-radius:50%;background:currentColor;opacity:.7}
html[data-theme=dark] body #dashboardOverview .learningRankCompact .courseSyncStatus,
html[data-theme=dark] body #dashboardOverview .learningRankCompact .courseSyncStatus:hover,
html[data-theme=dark] body #dashboardOverview .learningRankCompact .courseSyncStatus:disabled{background:transparent!important;color:#d5e7da!important;border:0!important;box-shadow:none}
@media(max-width:640px){body #profile-panel .learningRankCompact{grid-template-columns:46px minmax(0,1fr);gap:5px 12px}body #profile-panel .learningRankCompact .learningRankNote{grid-column:1/-1}}

body #profile-panel .learningRankCompact .learningRankNoteDetails{grid-column:2;grid-row:3;display:block;font-size:10px;color:#d5e7da}
body #profile-panel .learningRankNoteDetails summary{cursor:pointer;line-height:1.5;color:#d5e7da;padding:2px 0}
body #profile-panel .learningRankNoteDetails .learningRankNote{display:block;margin:5px 0 0;color:#d5e7da}
@media(max-width:640px){
 body #profile-panel .learningRankCompact{grid-template-columns:38px minmax(0,1fr);padding:10px 12px;gap:2px 10px;margin:8px 0;border-radius:14px}
 body #profile-panel .learningRankCompact .learningRankBadge{width:36px;height:44px;align-self:start;grid-row:1/4}
 body #profile-panel .learningRankCompact .courseEyebrow{font-size:8px;letter-spacing:.1em}
 body #profile-panel .learningRankCompact .learningRankInfo strong{font-size:18px;margin:2px 0;line-height:1.15}
 body #profile-panel .learningRankCompact .learningRankInfo p{font-size:11px;margin:3px 0;line-height:1.3}
 body #profile-panel .learningRankCompact .learningRankInfo small{font-size:10px;line-height:1.3;display:block}
 body #profile-panel .learningRankCompact .learningRankInfo progress{margin:5px 0;height:3px}
 body #profile-panel .learningRankCompact .courseSyncStatus{font-size:9px;min-height:18px;padding:1px 0;line-height:1.3}
 body #profile-panel .learningRankCompact .learningRankNoteDetails{grid-column:2;grid-row:3;font-size:9px}
 body #profile-panel .learningRankNoteDetails summary{min-height:24px;display:flex;align-items:center;gap:5px;font-size:9px}
 body #profile-panel .learningRankNoteDetails summary:after{content:'+'}
 body #profile-panel .learningRankNoteDetails[open] summary:after{content:'−'}
 body #profile-panel .learningRankCompact:after{display:none}
 #dashboardLearningRank{margin-bottom:10px}
 #dashboardLearningRank .dashboardLearnButton{padding:6px 12px;font-size:11px;min-height:36px}
}

/* Compact controls and frame only inside the market chart. */
body #dashboardOverview .chart-card{padding:12px}
body #dashboardOverview .chart-card .chart-heading{margin-bottom:9px;gap:10px}
body #dashboardOverview .chart-card .chart-switch{padding:2px;gap:2px;border-radius:9px}
body #dashboardOverview .chart-card :is(.chart-switch button,.kybera-chart-controls button,.chart-drawing-tools button){padding:4px 7px;min-height:28px;font-size:10px;border-radius:7px}
body #dashboardOverview .chart-card .chart-mount{border-radius:11px;border-width:1px}
body #dashboardOverview .chart-card .chart-footer{margin-top:6px;font-size:10px}
body #dashboardOverview .chart-card .mobileDrawingFold{margin-top:4px}
body #dashboardOverview .chart-card .mobileDrawingFold>summary{padding:8px 0;font-size:11px;min-height:32px}
@media(max-width:720px){body #dashboardOverview .chart-card{padding:7px;border-radius:13px}body #dashboardOverview .chart-card .chart-heading{margin-bottom:7px}body #dashboardOverview .chart-card .chart-heading h3{font-size:19px;margin:3px 0 7px}body #dashboardOverview .chart-card .chart-switch button{padding:4px 6px}}
@media(pointer:coarse){body #dashboardOverview .chart-card :is(.chart-switch button,.kybera-chart-controls button,.chart-drawing-tools button){min-height:44px;padding:4px 6px}}

/* Community is a compact metric, with the count and its label kept together. */
body #dashboardOverview .dashboard-summary>.community-dashboard{position:relative;display:flex;flex-direction:column;justify-content:center;gap:12px;min-height:0;padding:18px 20px;border-radius:18px;overflow:hidden}
body #dashboardOverview .community-dashboard>.eyebrow{font-size:9px;letter-spacing:.12em;line-height:1.4;margin:0}
body #dashboardOverview .community-dashboard .community-count{display:flex;flex-direction:row;align-items:baseline;justify-content:flex-start;flex-wrap:nowrap;gap:10px;margin:0}
body #dashboardOverview .community-dashboard .community-count strong{font-size:36px;line-height:1;letter-spacing:-.055em;font-weight:600;font-variant-numeric:tabular-nums}
body #dashboardOverview .community-dashboard .community-count>span:last-child{max-width:none;font-size:11px;line-height:1.4;white-space:nowrap;font-weight:500}
body #dashboardOverview .community-count-dot{display:none}
@media(max-width:720px){
 body #dashboardOverview .dashboard-summary>.community-dashboard{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:0;padding:14px 16px;border-radius:15px}
 body #dashboardOverview .community-dashboard>.eyebrow{font-size:9px;letter-spacing:.08em;max-width:130px}
 body #dashboardOverview .community-dashboard .community-count{gap:7px}
 body #dashboardOverview .community-dashboard .community-count strong{font-size:29px}
 body #dashboardOverview .community-dashboard .community-count>span:last-child{font-size:10px}
}
@media(max-width:360px){body #dashboardOverview .dashboard-summary>.community-dashboard{grid-template-columns:1fr;gap:7px;padding:12px 14px}body #dashboardOverview .community-dashboard>.eyebrow{max-width:none}}

/* Independent columns keep account cards attached to the chart as panels grow. */
body #dashboardOverview .dashboard-grid{grid-template-areas:'workspace sidebar';align-items:start;gap:14px}
body #dashboardOverview .dashboard-main-column{grid-area:workspace;display:flex;flex-direction:column;gap:14px;min-width:0}
body #dashboardOverview .dashboard-main-column>.chart-card{margin:0;min-width:0}
body #dashboardOverview .dashboard-utility-column{grid-area:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;align-items:start}
body #dashboardOverview .dashboard-utility-column .dashboardDisclosure{min-width:0;border-radius:15px}
body #dashboardOverview .dashboard-utility-column .dashboardDisclosure>summary{padding:13px 15px;min-height:60px}
body #dashboardOverview .dashboard-utility-column .dashboardFoldContent{padding:0 15px 15px;min-width:0}
body #dashboardOverview .dashboard-utility-column .uid-card .stack{grid-template-columns:1fr;gap:10px}
body #dashboardOverview .dashboard-utility-column .uid-card input{min-width:0;width:100%;box-sizing:border-box}
body #dashboardOverview .dashboard-utility-column .quick-links a{padding:10px 0;background:transparent;border-radius:0;font-size:12px}
html[data-theme=dark] body #dashboardOverview .calendar-event strong{color:#eef0f4!important}
@media(max-width:1050px){body #dashboardOverview .dashboard-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:'workspace' 'sidebar'}body #dashboardOverview .dashboard-main-column{gap:12px}}
@media(max-width:720px){body #dashboardOverview .dashboard-main-column{display:contents}body #dashboardOverview .dashboard-utility-column{display:contents}body #dashboardOverview .dashboard-main-column>.chart-card{margin-bottom:12px}}

/* One ordered desk: no independent columns or empty expansion slots. */
body #dashboardOverview .dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'chart' 'sidebar' 'utilities';gap:14px;align-items:stretch}
body #dashboardOverview .chart-card{grid-area:chart;margin:0}
body #dashboardOverview .chart-mount{height:clamp(400px,47vh,510px);max-height:none}
body #dashboardOverview .dashboard-side{grid-area:sidebar;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
body #dashboardOverview .dashboard-side>.dashboard-card{display:flex;flex-direction:column;height:360px;min-height:0;box-sizing:border-box;margin:0;padding:18px;overflow:hidden}
body #dashboardOverview .dashboard-side .calendar-top{flex-shrink:0}
body #dashboardOverview .dashboard-side .calendar-day-controls{flex-shrink:0;margin:12px 0}
body #dashboardOverview .dashboard-side .calendar-layout{min-height:0;overflow:auto;scrollbar-width:thin}
body #dashboardOverview .dashboard-side #calendar-day-events{display:block}
body #dashboardOverview .dashboard-side .calendar-event{margin:8px 0;padding:10px}
body #dashboardOverview .dashboard-side #updates-feed{flex:1;min-height:0;max-height:none;overflow:auto;grid-template-columns:1fr}
body #dashboardOverview .dashboard-utility-column{grid-area:utilities;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
body #dashboardOverview .dashboard-utility-column .dashboardDisclosure{margin:0;align-self:start}
body #dashboardOverview .dashboard-utility-column .dashboardDisclosure>summary{min-height:56px;padding:12px 17px}
body #dashboardOverview .dashboard-utility-column .uid-card .stack{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}
body #dashboardOverview .dashboard-utility-column .uid-card .stack .primary{grid-column:1/-1}
body #dashboardOverview .dashboard-utility-column .quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:720px){
 body #dashboardOverview .dashboard-grid{display:block}
 body #dashboardOverview .dashboard-side,body #dashboardOverview .dashboard-utility-column{display:contents}
 body #dashboardOverview .dashboard-side>.dashboard-card{display:block;height:auto;overflow:visible;margin-bottom:12px;padding:17px}
 body #dashboardOverview .chart-card{margin-bottom:12px}
 body #dashboardOverview .chart-mount{height:390px}
 body #dashboardOverview .dashboard-utility-column .dashboardDisclosure{margin-bottom:10px}
 body #dashboardOverview .dashboard-utility-column .uid-card .stack,body #dashboardOverview .dashboard-utility-column .quick-links{grid-template-columns:minmax(0,1fr)}
 body #dashboardOverview .dashboard-side .calendar-layout,body #dashboardOverview .dashboard-side #updates-feed{overflow:visible;max-height:none}
}

/* Compact agenda rows inside the unchanged calendar panel. */
body #dashboardOverview .calendar-card .calendar-top{margin-bottom:0}
body #dashboardOverview .calendar-card .calendar-top h3{margin:4px 0 5px}
body #dashboardOverview .calendar-card .calendar-top .fine{line-height:1.4}
body #dashboardOverview .calendar-card .calendar-day-controls{margin:9px 0}
body #dashboardOverview .calendar-card .calendar-agenda{padding:0}
body #dashboardOverview .calendar-card .calendar-agenda h4{margin:0 0 6px;font-size:11px;line-height:1.4}
body #dashboardOverview .calendar-card #calendar-day-events{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
body #dashboardOverview .calendar-card .calendar-event{display:flex;align-items:center;gap:12px;margin:0;padding:7px 10px;min-height:44px;box-sizing:border-box;border-radius:9px}
body #dashboardOverview .calendar-card .calendar-event-meta{display:flex;flex-direction:column;align-items:flex-start;gap:2px;flex:0 0 104px;margin:0;font-size:10px;line-height:1.3}
body #dashboardOverview .calendar-card .calendar-event-meta time{white-space:nowrap;font-variant-numeric:tabular-nums}
body #dashboardOverview .calendar-card .calendar-event strong{flex:1;min-width:0;font-size:12px;line-height:1.35}
body #dashboardOverview .calendar-card .calendar-event .remove-update{flex-shrink:0;margin:0;padding:5px 7px;font-size:10px}
@media(max-width:420px){body #dashboardOverview .calendar-card .calendar-event{gap:8px}body #dashboardOverview .calendar-card .calendar-event-meta{flex-basis:94px}}

/* Visible ambient motion in rank headers without moving their layout. */
body #profile-panel .learningRank{isolation:isolate}
body #profile-panel .learningRank>*{position:relative;z-index:1}
body #profile-panel .learningRank:before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(110deg,transparent 20%,#c8ffe824 43%,#e1fff43b 50%,#c8ffe824 57%,transparent 80%);transform:translateX(-110%);animation:rankHeaderLight 7s ease-in-out infinite}
body #profile-panel .learningRankBadge{animation:rankBadgeFloat 4s ease-in-out infinite;transform-origin:center}
@keyframes rankHeaderLight{0%{transform:translateX(-110%)}65%,100%{transform:translateX(110%)}}
@keyframes rankBadgeFloat{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-4px) rotate(2deg)}}
/* Keep the requested dashboard motion consistent across device motion settings.
   Animate decorative layers only; controls and card layout remain stationary. */
body #dashboardOverview .dashboard-card:before{background:linear-gradient(110deg,transparent 20%,#c8ffe824 43%,#e1fff43b 50%,#c8ffe824 57%,transparent 80%);background-size:250% 100%;opacity:.65;animation:dashboardCardSheen 9s ease-in-out infinite!important;pointer-events:none}
body #dashboardOverview .community-dashboard:before{animation-delay:-3s!important}
body #dashboardOverview .access-card:before{animation-delay:-6s!important}
@keyframes dashboardCardSheen{0%,15%{background-position:160% 0;opacity:.35}65%,100%{background-position:-60% 0;opacity:.65}}



/* Glossary cards need their own dark surfaces inside the course panel. */
html[data-theme=dark] #courseWorkspace .courseGlossaryList details{background:#242a34;border-color:#505967;color:#e2e6ee;box-shadow:inset 0 1px #ffffff06}
html[data-theme=dark] #courseWorkspace .courseGlossaryList details[open]{background:#2b323d;border-color:#748094}
html[data-theme=dark] #courseWorkspace .courseGlossaryList summary{color:#d0e7d7}
html[data-theme=dark] #courseWorkspace .courseGlossaryList summary:hover{color:#f2f4f8}
html[data-theme=dark] #courseWorkspace .courseGlossaryList summary::marker{color:#a8cbb7}
html[data-theme=dark] #courseWorkspace .courseGlossary :is(label,p,li,.courseText){color:#c4cbd6}
html[data-theme=dark] #courseWorkspace .courseGlossary :is(h3,h4,strong,.courseSectionTitle){color:#eef0f4}
html[data-theme=dark] #courseWorkspace .courseGlossary input:focus{border-color:#b9dfc7!important;box-shadow:0 0 0 3px #b9dfc71c}

/* Matching quiet green identity surfaces across dashboard, course and journal. */
html[data-theme=dark] body #courseWorkspace :is(.courseRankStrip,.learningRank),
html[data-theme=dark] body #journalWorkspace .journalHeading{background:linear-gradient(125deg,#20362c,#2b4235);border-color:#7eaa8b66;box-shadow:inset 0 1px #d9ffe510,0 10px 24px #0002;color:#eef5ef}
html[data-theme=dark] body #courseWorkspace .courseRankStrip :is(.courseRankTitle span,.courseRankNext,.courseRankCount){color:#c7d9cb}
html[data-theme=dark] body #courseWorkspace .courseRankStrip .courseSyncStatus,
html[data-theme=dark] body #courseWorkspace .courseRankStrip .courseSyncStatus:disabled{background:transparent!important;color:#c7d9cb!important;border:0!important;box-shadow:none}
html[data-theme=dark] body #journalWorkspace .journalHeading :is(p,.eyebrow){color:#c7d9cb}

/* Repeating character reveal with a fixed full-word footprint. */
header .brand-typewriter{display:inline-block;white-space:nowrap}
header .brand-typewriter .brand-letter{display:inline-block;opacity:0;animation:brandLetterReveal 10s steps(1,end) infinite;animation-delay:var(--letter-delay);color:inherit}
@keyframes brandLetterReveal{0%{opacity:0}1%,89%{opacity:1}91%,100%{opacity:0}}
.locked-access-panel{max-width:740px;margin:24px auto;padding:26px;border-radius:20px}
.locked-access-panel p{line-height:1.7}
.locked-access-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.locked-access-actions a{display:inline-flex;align-items:center;padding:11px 18px;text-decoration:none;border-radius:99px}
html[data-theme=dark] #locked-panel{background:linear-gradient(125deg,#20362c,#2b4235);border-color:#7eaa8b66;color:#eef5ef}
html[data-theme=dark] #locked-panel :is(p,.fine){color:#c7d9cb}

/* Completed learning path: readable confirmation in both themes. */
body #courseWorkspace .courseFinish{position:relative;margin:24px 0 8px;padding:22px 24px;border:1px solid #a7c7ae;border-left:4px solid #4d8c61;border-radius:16px;background:linear-gradient(120deg,#e3f0df,#f1f6ea);color:#294633!important;font-size:14px!important;line-height:1.8;box-shadow:0 8px 24px #244b3010;max-width:none}
body #courseWorkspace .courseFinish:before{content:'Lernweg abgeschlossen';display:block;margin-bottom:7px;color:#23462e;font-size:16px;font-weight:700;letter-spacing:-.02em}
html[lang=en] body #courseWorkspace .courseFinish:before{content:'Learning path completed'}
html[data-theme=dark] body #courseWorkspace .courseFinish{background:linear-gradient(120deg,#263f30,#25332c);border-color:#567c60;border-left-color:#a5d5ae;color:#d3e5d7!important;box-shadow:0 8px 24px #0002}
html[data-theme=dark] body #courseWorkspace .courseFinish:before{color:#e8f6e9}
@media(max-width:600px){body #courseWorkspace .courseFinish{padding:17px 18px;font-size:13px!important}}
