/* ==========================================================================
   I Learn German — selectable themes and night colours (presentation only)
   --------------------------------------------------------------------------
   html[data-ilg-theme]  current | notebook | journey | clean   (set by themes.js)
   html[data-ilg-night]  on | off
   html[data-ilg-skin]   present when a new theme or night colours are active.
   The "current" theme in day colours sets no data-ilg-skin, so nothing here
   applies and the published design stays as it was, except the small
   readability fix in section 9 (three faint texts darkened to 4.5:1).
   The skin prefix  :root[data-ilg-skin]:not(#i):not(#i)  carries two ID-level
   specificity points so it wins over the older layered stylesheets
   (styles.css, design5.css, visual.css, portal-modern.css, reading-appearance.css).
   Fonts are system font stacks: the CSP allows font-src 'self' only and no
   font files are added.
   ========================================================================== */

/* ---------- 1. Theme tokens ---------- */
:root[data-ilg-theme]{--t-radius:18px;--t-radius-sm:12px;--t-shadow:0 6px 20px rgba(0,0,0,.06);--t-body:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Noto Sans Thai",sans-serif;--t-head:var(--t-body);--t-head-weight:750}

/* Current theme, night colours (dimmed botanical green) */
:root[data-ilg-theme=current][data-ilg-night=on]{--t-bg:#0f1a16;--t-surface:#16231e;--t-surface2:#1c2c26;--t-top:#121e19;--t-ink:#e6eee9;--t-muted:#a9bab1;--t-line:#2f4239;--t-accent:#7fd1a8;--t-accent-ink:#8fdcb4;--t-on-accent:#0b1f16;--t-accent-soft:#1d3a2e;--t-accent2:#e2c36b;--t-on-accent2:#231a00;--t-good:#7fd1a8;--t-good-bg:#143023;--t-good-ink:#c4f0da;--t-bad:#ff9b8a;--t-bad-bg:#3a1c18;--t-bad-ink:#ffd5cd;--t-warn:#f0b960;--t-warn-bg:#33270f;--t-warn-ink:#ffe2a8;--t-shadow:0 6px 20px rgba(0,0,0,.35);--t-page:linear-gradient(rgba(15,26,22,.9),rgba(15,26,22,.9)),url('/portal-botanical-paper.png') center center/cover no-repeat,#0f1a16}
:root[data-ilg-theme=current][data-ilg-night=on][data-reading-background=spring]{--t-page:linear-gradient(rgba(15,26,22,.88),rgba(15,26,22,.88)),url('/backgrounds/spring-20261025.webp') center center/cover no-repeat,#0f1a16}
:root[data-ilg-theme=current][data-ilg-night=on][data-reading-background=summer]{--t-page:linear-gradient(rgba(15,26,22,.88),rgba(15,26,22,.88)),url('/backgrounds/summer-20261025.webp') center center/cover no-repeat,#0f1a16}
:root[data-ilg-theme=current][data-ilg-night=on][data-reading-background=autumn]{--t-page:linear-gradient(rgba(15,26,22,.88),rgba(15,26,22,.88)),url('/backgrounds/autumn-20261025.webp') center center/cover no-repeat,#0f1a16}
:root[data-ilg-theme=current][data-ilg-night=on][data-reading-background=winter]{--t-page:linear-gradient(rgba(15,26,22,.88),rgba(15,26,22,.88)),url('/backgrounds/winter-20261025.webp') center center/cover no-repeat,#0f1a16}
:root[data-ilg-theme=current][data-ilg-night=on][data-reading-background=plain]{--t-page:#0f1a16}

/* A — Calm notebook */
:root[data-ilg-theme=notebook]{--t-radius:6px;--t-radius-sm:8px;--t-head:"Lora","Noto Serif","Noto Serif Thai","Iowan Old Style","Palatino Linotype",Georgia,serif;--t-body:"Nunito","Noto Sans","Segoe UI",system-ui,"Noto Sans Thai",sans-serif;--t-head-weight:700;--t-rule:#e3d7bb;--t-margin:#e8a598}
:root[data-ilg-theme=notebook][data-ilg-night=off]{--t-bg:#fbf5e6;--t-surface:#fffdf6;--t-surface2:#f2e8cd;--t-top:#f6edd5;--t-ink:#2a2118;--t-muted:#5e5445;--t-line:#e0d4b8;--t-accent:#1f5a43;--t-accent-ink:#1f5a43;--t-on-accent:#ffffff;--t-accent-soft:#e7efe4;--t-accent2:#f3d98a;--t-on-accent2:#3b2a00;--t-good:#2f7d4f;--t-good-bg:#e6f3e4;--t-good-ink:#17482b;--t-bad:#a1472b;--t-bad-bg:#fbe3d0;--t-bad-ink:#6e2a12;--t-warn:#c27a1c;--t-warn-bg:#fff2d6;--t-warn-ink:#5b3600;--t-shadow:0 2px 0 #e7dcc0,0 8px 18px -10px rgba(80,55,20,.35);--t-tape:rgba(243,217,138,.85)}
:root[data-ilg-theme=notebook][data-ilg-night=on]{--t-bg:#1d1913;--t-surface:#262019;--t-surface2:#30291f;--t-top:#221d16;--t-ink:#efe6d2;--t-muted:#c4b79c;--t-line:#433929;--t-accent:#a3d6b8;--t-accent-ink:#a9dabd;--t-on-accent:#11261a;--t-accent-soft:#24362b;--t-accent2:#d9b860;--t-on-accent2:#241a00;--t-good:#a3d6b8;--t-good-bg:#1c3226;--t-good-ink:#cdeedb;--t-bad:#f1a58c;--t-bad-bg:#3b221a;--t-bad-ink:#ffd9cb;--t-warn:#e8b86a;--t-warn-bg:#352a15;--t-warn-ink:#ffe3b0;--t-shadow:0 2px 0 #15120d,0 8px 18px -10px rgba(0,0,0,.6);--t-tape:rgba(160,128,58,.55);--t-rule:#2c261d;--t-margin:#5a3a33}

/* B — Journey through Germany */
:root[data-ilg-theme=journey]{--t-radius:24px;--t-radius-sm:16px;--t-head:"Nunito","Varela Round",ui-rounded,"SF Pro Rounded","Noto Sans","Noto Sans Thai",system-ui,sans-serif;--t-body:var(--t-head);--t-head-weight:800}
:root[data-ilg-theme=journey][data-ilg-night=off]{--t-bg:#eaf7fb;--t-surface:#ffffff;--t-surface2:#e0f1f6;--t-top:#ffffff;--t-ink:#14323a;--t-muted:#47636b;--t-line:#c9e4ec;--t-accent:#0b6e5a;--t-accent-ink:#0b6e5a;--t-on-accent:#ffffff;--t-accent-soft:#dcf2ec;--t-accent2:#ffcf4a;--t-on-accent2:#3b2a00;--t-good:#1f8a4c;--t-good-bg:#dff5e6;--t-good-ink:#10502c;--t-bad:#b3401f;--t-bad-bg:#ffe0d6;--t-bad-ink:#7a2410;--t-warn:#e08a00;--t-warn-bg:#fff0cc;--t-warn-ink:#4d3000;--t-shadow:0 6px 0 #c3e1ea;--t-sky1:#c6e9f7;--t-sky2:#eaf7fb;--t-hill1:#7cc89a;--t-hill2:#2f9a6c;--t-sun:#ffd04d;--t-roof:#e4573d;--t-wall:#fff3d6;--t-train:#e4573d;--t-route:#e08a00}
:root[data-ilg-theme=journey][data-ilg-night=on]{--t-bg:#0f1d24;--t-surface:#16272f;--t-surface2:#1d323b;--t-top:#132229;--t-ink:#e3f1f5;--t-muted:#a8c2ca;--t-line:#2b4752;--t-accent:#6fd6bd;--t-accent-ink:#79dcc4;--t-on-accent:#062a22;--t-accent-soft:#183a35;--t-accent2:#e6b93a;--t-on-accent2:#2b1f00;--t-good:#6fd6a0;--t-good-bg:#123326;--t-good-ink:#c6f2da;--t-bad:#ff9f86;--t-bad-bg:#3c1f19;--t-bad-ink:#ffd8cc;--t-warn:#f0b860;--t-warn-bg:#33280f;--t-warn-ink:#ffe3ab;--t-shadow:0 6px 0 #0a151a;--t-sky1:#13283a;--t-sky2:#0f1d24;--t-hill1:#1f4a3b;--t-hill2:#173a2e;--t-sun:#f3e6b0;--t-roof:#8a3a2c;--t-wall:#c9b98f;--t-train:#a8483a;--t-route:#c58a2a}

/* C — Clean learner */
:root[data-ilg-theme=clean]{--t-radius:20px;--t-radius-sm:14px;--t-head:"Inter","Segoe UI Variable","Segoe UI",system-ui,-apple-system,Roboto,"Noto Sans","Noto Sans Thai",sans-serif;--t-body:var(--t-head);--t-head-weight:800}
:root[data-ilg-theme=clean][data-ilg-night=off]{--t-bg:#ffffff;--t-surface:#ffffff;--t-surface2:#f1f5f3;--t-top:#ffffff;--t-ink:#0d1712;--t-muted:#4a5750;--t-line:#dfe5e2;--t-accent:#0a6b45;--t-accent-ink:#0a6b45;--t-on-accent:#ffffff;--t-accent-soft:#e6f6ee;--t-accent2:#0d1712;--t-on-accent2:#ffffff;--t-good:#0a7a4a;--t-good-bg:#e6f6ee;--t-good-ink:#075a37;--t-bad:#b3261e;--t-bad-bg:#fdecea;--t-bad-ink:#8c1d16;--t-warn:#b86e00;--t-warn-bg:#fff4de;--t-warn-ink:#523000;--t-shadow:none}
:root[data-ilg-theme=clean][data-ilg-night=on]{--t-bg:#0c1511;--t-surface:#121d17;--t-surface2:#18241e;--t-top:#0c1511;--t-ink:#f2f7f4;--t-muted:#b4c3ba;--t-line:#26352d;--t-accent:#5fd39a;--t-accent-ink:#6fdaa5;--t-on-accent:#06281a;--t-accent-soft:#143024;--t-accent2:#f2f7f4;--t-on-accent2:#0c1511;--t-good:#4cc58a;--t-good-bg:#10301f;--t-good-ink:#bff0d6;--t-bad:#ff8a80;--t-bad-bg:#3a1714;--t-bad-ink:#ffd2cd;--t-warn:#f0b040;--t-warn-bg:#33260a;--t-warn-ink:#ffe2a8;--t-shadow:none}

/* Page backgrounds of the new themes */
:root[data-ilg-theme=notebook]{--t-page:repeating-linear-gradient(180deg,transparent 0 33px,var(--t-rule) 33px 34px),linear-gradient(90deg,transparent 0 58px,var(--t-margin) 58px 59px,transparent 59px),var(--t-bg)}
:root[data-ilg-theme=journey]{--t-page:linear-gradient(180deg,var(--t-sky1) 0,var(--t-sky2) 420px,var(--t-bg) 100%)}
:root[data-ilg-theme=clean]{--t-page:var(--t-bg)}

/* Map the theme onto the variables of the existing stylesheets */
:root[data-ilg-skin]:not(#i):not(#i){color-scheme:light;--bg:var(--t-bg)!important;--card:var(--t-surface)!important;--ink:var(--t-ink)!important;--text:var(--t-ink)!important;--muted:var(--t-muted)!important;--line:var(--t-line)!important;--soft:var(--t-surface2)!important;--accent:var(--t-accent-ink)!important;--accent-soft:var(--t-accent-soft)!important;--good:var(--t-good)!important;--good-soft:var(--t-good-bg)!important;--bad:var(--t-bad)!important;--bad-soft:var(--t-bad-bg)!important;--shadow:var(--t-shadow)!important;--paper:var(--t-surface)!important;--primary:var(--t-accent)!important;
 --tak-canvas:var(--t-bg)!important;--tak-surface:var(--t-surface)!important;--tak-ink:var(--t-ink)!important;--tak-muted:var(--t-muted)!important;--tak-line:var(--t-line)!important;--tak-accent:var(--t-accent-ink)!important;--tak-soft:var(--t-surface2)!important;--tak-hero:var(--t-surface2)!important;--tak-panel:var(--t-surface)!important;--tak-green:var(--t-accent)!important;--tak-workspace:var(--t-bg)!important;
 --tak-public-ink:var(--t-ink)!important;--tak-public-muted:var(--t-muted)!important;--tak-public-line:var(--t-line)!important;--tak-public-surface:var(--t-surface)!important;--tak-public-soft:var(--t-surface2)!important;
 --v-ink:var(--t-ink)!important;--v-muted:var(--t-muted)!important;--v-line:var(--t-line)!important;--portal-header:var(--t-top)!important;--study-page-background:var(--t-page)!important;
 --reading-accent:var(--t-accent-ink)!important;--reading-soft:var(--t-accent-soft)!important;--reading-canvas:var(--t-bg)!important;--reading-panel:var(--t-surface)!important;--reading-line:var(--t-line)!important;--reading-ink:var(--t-ink)!important;--reading-muted:var(--t-muted)!important;--reading-radius:var(--t-radius)!important;--reading-shadow:var(--t-shadow)!important;--reading-blur:0px!important;--reading-background:var(--t-page)!important}
:root[data-ilg-skin][data-ilg-night=on]:not(#i):not(#i){color-scheme:dark}

/* ---------- 2. Shared skin: page, typography, text colours ---------- */
:root[data-ilg-skin]:not(#i):not(#i){background:var(--t-bg)}
:root[data-ilg-skin]:not(#i):not(#i) body{background:var(--t-bg)!important;color:var(--t-ink)!important;font-family:var(--t-body)!important}
:root[data-ilg-skin]:not(#i):not(#i) body.design-five{background:var(--t-bg)!important}
:root[data-ilg-skin]:not(#i):not(#i) body.design-five::before{content:""!important;position:fixed!important;inset:0!important;z-index:-1!important;pointer-events:none!important;background:var(--t-page)!important;opacity:1!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(button,input,select,textarea){font-family:inherit}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(h1,h2,h3,h4,legend,.lesson-title,.question-text){font-family:var(--t-head)!important}
/* Text inherits the theme ink; semantic colours are added back below with higher specificity. */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) *{color:inherit!important;-webkit-text-fill-color:currentColor!important;text-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(small,.muted,.muted *,.local-title,[class*="eyebrow"],[class*="subtitle"],[class*="description"],[class*="-meta"],[class*="-detail"],[class*="-note"],.lesson-meta,.hint,.small){color:var(--t-muted)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(a){color:var(--t-accent-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(input,select,textarea){background:var(--t-surface)!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(input,textarea)::placeholder{color:var(--t-muted)!important;opacity:1}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(option){background:var(--t-surface);color:var(--t-ink)}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(hr){border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(table,th,td){border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(th){background:var(--t-surface2)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :focus-visible{outline:3px solid var(--t-accent)!important;outline-offset:3px!important}

/* ---------- 3. Shell: header bar, navigation, dialogs ---------- */
:root[data-ilg-skin]:not(#i):not(#i) :where(.topbar,#topbar,.side-nav,#sideNav,.takv-portal-nav,.preview-shell,.side-nav-items){background:var(--t-top)!important;background-image:none!important;border-color:var(--t-line)!important;box-shadow:none!important;backdrop-filter:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.nav-item,.side-setting-row,.side-profile-card,.side-nav-tool,.ghost-btn,.takv-settings,.portal-logo-link,.takv-portal-nav button,.mobile-language-trigger){background:transparent!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important;box-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.nav-item.active,.nav-item[aria-current],.preview-shell-links .active,.takv-settings,.ilg-theme-shortcut){background:var(--t-accent-soft)!important;color:var(--t-accent-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.nav-group-label){color:var(--t-muted)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.takv-dialog,.help-dialog,.language-picker,.takv-modal,[role=dialog]){background:var(--t-surface)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.nav-backdrop,.help-overlay,.language-picker-overlay,.takv-dialog-backdrop){background:rgba(0,0,0,.45)!important}

/* ---------- 4. Surfaces: cards, panels, lesson and exercise blocks ---------- */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.card,.lesson-head,.question-card,.explain-box,.phrase,.knowledge-card,.learning-guide,.new-learning-card,.grammar-section,.grammar-example,.grammar-dialogue,.grammar-quiz,.grammar-result,.grammar-topic-header,.grammar-hero,.practice-lab-task,.reading-body,.study-search,.lesson-card,.lesson-row,.module-card,.result,.admin-panel,.notice,.takv-entry-card,.tak-language-card,.tak-modern-intro,.takv-copy,.takv-ribbon-languages,.study-course-intro,.lesson-resume-card,.reading-settings,.takv-settings-option,.takv-settings-language,details,.updates-list>*,[class*="-card"]:not(img):not(svg),[class*="-panel"]:not(img),[class*="-box"]:not(img)){background-color:var(--t-surface)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important;box-shadow:var(--t-shadow)!important;backdrop-filter:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.card .card,.reading-body>.card,.question-card .card,[class*="-card"] [class*="-card"],details details,.card details,[class*="-card"] details){box-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.lesson-head,.card,.question-card,.grammar-quiz,.explain-box,.reading-body,.lesson-resume-card,.study-search,.takv-entry-card,.module-card,.grammar-section){border-radius:var(--t-radius)!important}

/* Buttons */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.primary-btn,#practiceBtn,#checkBtn,#resumeLastLesson,.takv-entry-card.account,.takv-portal-nav-account,button.primary,.button-primary){background:var(--t-accent)!important;background-image:none!important;color:var(--t-on-accent)!important;border:1px solid var(--t-accent)!important;text-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.primary-btn,#practiceBtn,#checkBtn,#resumeLastLesson,.takv-entry-card.account,.takv-portal-nav-account) *{color:inherit!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.secondary-btn,.answer-btn,.option-btn,[data-opt],.choice-btn,.course-tab,[data-course],.word-puzzle-bank button,.word-puzzle-actions button,.german-letter,.letter-btn,[data-letter],.chip){background:var(--t-surface)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.secondary-btn){color:var(--t-accent-ink)!important;border:1.5px solid var(--t-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.answer-btn,[data-opt]):hover{border-color:var(--t-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.answer-btn.selected,[data-opt].selected,[data-opt][aria-pressed=true],[data-opt][aria-checked=true],.answer-btn[aria-pressed=true],[data-course][aria-pressed=true],[data-course].active,.course-tab.active,[aria-pressed=true].chip){background:var(--t-accent-soft)!important;border-color:var(--t-accent)!important;color:var(--t-ink)!important;box-shadow:inset 0 0 0 1px var(--t-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.answer-btn.correct,[data-opt].correct,.correct-answer,.is-correct){background:var(--t-good-bg)!important;border-color:var(--t-good)!important;color:var(--t-good-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.answer-btn.wrong,[data-opt].wrong,.answer-btn.incorrect,[data-opt].incorrect,.is-wrong){background:var(--t-bad-bg)!important;border-color:var(--t-bad)!important;color:var(--t-bad-ink)!important}

/* Feedback, hints, notes */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.feedback.good,.feedback.correct,.feedback-good,.answer-feedback.good,.streak-note,.lesson-progress.is-complete){background-color:var(--t-good-bg)!important;color:var(--t-good-ink)!important;border-color:var(--t-good)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.feedback.bad,.feedback.wrong,.feedback-bad,.answer-feedback.bad,.contrast-example){background-color:var(--t-bad-bg)!important;color:var(--t-bad-ink)!important;border-color:var(--t-bad)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.answer-hint,.hint-box,.notice.warn){background-color:var(--t-warn-bg)!important;color:var(--t-warn-ink)!important;border-color:var(--t-warn)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.feedback,.answer-feedback,.answer-hint) *{color:inherit!important}

/* Badges and labels */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.badge,.tag,.lesson-num,.lesson-badge,.question-count,.tak-section-eyebrow,.level-pill,.lesson-kicker){background-color:var(--t-surface2)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.updates-new-badge){background:var(--t-accent2)!important;color:var(--t-on-accent2)!important}

/* Progress bars */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.lesson-progress-track,.progress-track,.progress-bar,.quiz-progress){background:var(--t-surface2)!important;background-image:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.lesson-progress-track>i,.progress-track>i,.progress-bar>i,.progress-fill,.quiz-progress>i,.quiz-progress>span){background:var(--t-accent)!important;background-image:none!important}


/* Components found by the light-background inventory (tests/browser_themes.cjs INVENTORY=1) */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.q-counter,.task-context,.speak-btn,.takv-close,.takv-account-close,.account-registration-benefits,.learning-motion-status,.takv-slide-nav,.study-progress-level,.grammar-progress-summary,.takv-bubble,.takv-level,.learner-back-top,.takv-skip,#takvExpandModules,.tak-desktop-photo,.takv-media-frame,.takv-slideshow,.info-btn,[class*="info-toggle"]){background-color:var(--t-surface2)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.takv-bubble,.takv-level,.study-progress-level,.grammar-progress-summary,.learner-back-top,.takv-skip){background-color:var(--t-surface)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.info-chip,.update-latest-badge){background:var(--t-accent2)!important;color:var(--t-on-accent2)!important;border-color:transparent!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.info-chip,.update-latest-badge) *{color:inherit!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.stat,.studio-top,.admin-profile-metrics span,.admin-locale-row,.admin-locale-coverage-row,.admin-locale-confirm,.admin-account-language-access,.admin-account-language-grid label,.admin-profile-row,.admin-feedback-item,.admin-feedback-context,.studio-browser,.studio-workspace,.studio-item,.studio-context,.studio-context-panel,.studio-compare,.studio-history,.studio-history-values,.studio-preview,.studio-import,.studio-modal,.studio-publish-diff,.studio-editorial-notice,.studio-status,.studio-empty){background-color:var(--t-surface)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.studio-item,.admin-feedback-context,.admin-profile-row .stat,.admin-profile-metrics span,.admin-account-language-grid label,.studio-history-values){background-color:var(--t-surface2)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.studio-item.active,.studio-item[aria-current],.studio-item[aria-selected="true"],.studio-item[aria-pressed="true"]){background-color:var(--t-accent-soft)!important;border-color:var(--t-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.stat,.studio-top,.admin-locale-row,.admin-locale-coverage-row,.admin-locale-confirm,.admin-account-language-grid,.admin-profile-row,.admin-feedback-item,.admin-feedback-context,.studio-browser,.studio-workspace,.studio-item,.studio-context,.studio-compare,.studio-history,.studio-preview,.studio-empty) :where(b,strong,label,span:not([class*="feedback-category"]),p,h3,h4){color:var(--t-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.stat,.studio-top,.admin-locale-row,.admin-locale-coverage-row,.admin-locale-confirm,.admin-account-language-grid,.admin-profile-row,.admin-feedback-item,.studio-item,.studio-empty) :where(small,.muted){color:var(--t-muted)!important;opacity:1!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.feedback-category){background:var(--t-accent-soft)!important;color:var(--t-accent-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.word-puzzle){background:var(--t-surface)!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.word-puzzle .word-puzzle-example,.word-puzzle-slot){background:var(--t-surface2)!important;color:var(--t-ink)!important;border-color:var(--t-line)!important;box-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(button.word-puzzle-slot){background:var(--t-warn-bg)!important;color:var(--t-warn-ink)!important;border-color:var(--t-warn)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.word-puzzle-slot,.word-puzzle-word) :where(span){color:inherit!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.word-puzzle-number){color:inherit!important;opacity:.85}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.grammar-focus,.takv-icon){background:var(--t-accent-soft)!important;color:var(--t-accent-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.wrong-example){background:var(--t-bad-bg)!important;color:var(--t-bad-ink)!important;border-color:var(--t-bad)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.correct-example,.tak-moment,.quiz-next-success){background:var(--t-good-bg)!important;color:var(--t-good-ink)!important;border-color:var(--t-good)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(#checkBtn.quiz-next-success){background:var(--t-accent)!important;color:var(--t-on-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.tak-modern-menu,.takv-portal-nav-links){background:var(--t-top)!important;background-image:none!important;border-color:var(--t-line)!important;box-shadow:none!important}


:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.takv-quick,.takv-info,.reading-backgrounds button,.learning-guide summary,details>summary){background-color:var(--t-surface)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(details>summary){background-color:transparent!important;box-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.updates-icon){background:var(--t-accent-soft)!important;color:var(--t-accent-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.study-progress-badge){background:conic-gradient(var(--t-accent) var(--progress,0%),var(--t-surface2) 0)!important;color:var(--t-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.study-progress-badge)::before{background:var(--t-surface)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.reading-backgrounds button[aria-pressed=true]){background:var(--t-accent-soft)!important;border-color:var(--t-accent)!important}


:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.question-card .option){background:var(--t-surface)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.question-card .option.selected,.question-card .option[aria-pressed=true],.question-card .option[aria-checked=true]){background:var(--t-accent-soft)!important;border-color:var(--t-accent)!important;box-shadow:inset 0 0 0 1px var(--t-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.question-card .option.good){background:var(--t-good-bg)!important;border-color:var(--t-good)!important;color:var(--t-good-ink)!important;box-shadow:inset 0 0 0 1px var(--t-good)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.question-card .option.bad){background:var(--t-bad-bg)!important;border-color:var(--t-bad)!important;color:var(--t-bad-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.question-card .option.good,.question-card .option.bad) *{color:inherit!important}
/* Answer feedback, notes and status cards (2.211.1). The older stylesheets give these a fixed light
   background; without a theme colour here they kept it while the text took the night ink (about 1.1:1).
   Each card now takes the theme's good / bad / warn / neutral colours, so day and night both read well.
   Checked by tests/browser_themes.cjs (answer states, 4.5:1 for every text). */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.grammar-feedback.correct,.guided-example.correct,.tak-guest-shell .daily-word-options .correct,#siteUpdateNotice,#publicPhotoStatus:not(:empty),.studio-status.valid,.studio-status.published,.feedback-status.status-reviewed,.admin-photo-badge[data-status=approved]){background:var(--t-good-bg)!important;background-image:none!important;color:var(--t-good-ink)!important;border-color:var(--t-good)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.grammar-feedback.wrong,.guided-example.wrong,.studio-status.invalid,.feedback-status.status-closed,.admin-photo-badge[data-status=rejected]){background:var(--t-bad-bg)!important;background-image:none!important;color:var(--t-bad-ink)!important;border-color:var(--t-bad)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.mistake-reminder,.help-off-notice,.license-note,.onboarding-warning,.tak-home-guest-note,.tak-public-hero-note,.grammar-development-status,.studio-preview-banner,.studio-status.draft,.studio-status.unsaved,.feedback-status.status-new,#dailyWordReminderStatus,.alpha-status,.admin-photo-badge:not([data-status=approved]):not([data-status=rejected])){background:var(--t-warn-bg)!important;background-image:none!important;color:var(--t-warn-ink)!important;border-color:var(--t-warn)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.remediation-correct,.support-note,.private-note,.rtl-preview-note,.intensive-plan-note,.tak-intense-note,.donation-reminder-toast,.landing-message-row,.feedback-drop.dragging,.feedback-status:not([class*="status-"]),.feedback-status.status-planned,.onboarding-lock-badge,#siteUpdateNotice button,.locale-preview-banner .secondary-btn,#ilearnLoadProblem){background:var(--t-surface2)!important;background-image:none!important;color:var(--t-ink)!important;border-color:var(--t-line)!important}
/* The slow-loading notice (inline style in index.html) keeps its links in the theme accent (2.212.0). */
:root[data-ilg-skin]:not(#i):not(#i) #ilearnLoadProblem a{color:var(--t-accent)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.about-alert,.alpha-dialog-badge){background:var(--t-accent2)!important;color:var(--t-on-accent2)!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(.grammar-feedback.correct,.grammar-feedback.wrong,.guided-example.correct,.guided-example.wrong,.mistake-reminder,.about-alert,.alpha-dialog-badge,#siteUpdateNotice,.onboarding-warning) :where(*:not(button):not(a)){color:inherit!important}
:root[data-ilg-skin]:not(#i):not(#i) .takv-dialog::backdrop{background:color-mix(in srgb,var(--t-bg) 55%,rgba(0,0,0,.55))!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.onboarding-backdrop){background:color-mix(in srgb,var(--t-bg) 55%,rgba(0,0,0,.55))!important}
:root[data-ilg-skin]:not(#i):not(#i) :where(.onboarding-root:not([hidden])){background:color-mix(in srgb,var(--t-bg) 72%,transparent)!important}
:root[data-ilg-theme=journey][data-ilg-night=on]:not(#i):not(#i) :where(body) :where(.lesson-head)::after{filter:brightness(.8) saturate(.8)}

/* Reading-appearance colour/background choice is a setting of the current theme only. */
:root[data-ilg-theme]:not([data-ilg-theme=current]) .reading-settings{display:none!important}

/* ---------- 5. Learning map and 404 pages (body > main) ---------- */
:root[data-ilg-skin]:not(#i):not(#i) body>main{color:var(--t-ink)}
:root[data-ilg-skin]:not(#i):not(#i) body>main>article{background:var(--t-surface)!important;border-color:var(--t-line)!important;border-radius:var(--t-radius)!important;box-shadow:var(--t-shadow)}
:root[data-ilg-skin]:not(#i):not(#i) body>main a.button{background:var(--t-accent)!important;color:var(--t-on-accent)!important;border-radius:var(--t-radius-sm)}
:root[data-ilg-skin]:not(#i):not(#i) body>main :where(.example,.level-card,.scope){background:var(--t-surface2)!important;border-color:var(--t-line)!important;color:var(--t-ink)!important}
:root[data-ilg-skin]:not(#i):not(#i) body:not(.design-five){background:var(--t-page)!important;background-attachment:fixed!important;min-height:100vh}

/* ---------- 6. Theme switcher (settings) and shortcut ---------- */
.ilg-theme-settings{display:grid;gap:16px;margin:0 0 20px}
.ilg-theme-settings fieldset{border:1px solid var(--reading-line,#cfdcd4);border-radius:18px;padding:18px;margin:0;min-width:0;background:#fff}
.ilg-theme-settings legend{float:left;width:100%;font-size:1.15rem;font-weight:750;line-height:1.45;padding:0;margin:0 0 6px}
.ilg-theme-settings legend+p{clear:both;margin-top:0}
.ilg-theme-settings p{line-height:1.55;font-size:.9rem;margin:0 0 12px}
.ilg-theme-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ilg-theme-choice,.ilg-night-choice{position:relative;display:grid;gap:8px;min-width:0;padding:8px;border:2px solid var(--reading-line,#cfdcd4);border-radius:12px;cursor:pointer;font-size:.9rem;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.ilg-night-choices{display:grid;gap:8px}
.ilg-night-choice{grid-template-columns:auto 1fr;align-items:center;min-height:44px;padding:8px 12px}
.ilg-theme-choice input{position:absolute;top:12px;right:12px;width:20px;height:20px;margin:0;accent-color:var(--reading-accent,#24694f)}
.ilg-night-choice input{width:20px;height:20px;margin:0;accent-color:var(--reading-accent,#24694f)}
.ilg-theme-choice:has(input:checked),.ilg-night-choice:has(input:checked){border-color:var(--reading-accent,#24694f);background:var(--reading-soft,#eef6f0)}
.ilg-theme-choice:has(input:focus-visible),.ilg-night-choice:has(input:focus-visible){outline:3px solid var(--reading-accent,#24694f);outline-offset:2px}
.ilg-night-status{margin:12px 0 0!important;font-weight:650}
/* Tiny preview of each theme, drawn with CSS only */
.ilg-theme-preview{display:grid;grid-template-rows:10px 1fr;gap:5px;height:66px;padding:6px;border-radius:8px;border:1px solid rgba(0,0,0,.12);overflow:hidden}
.ilg-theme-preview i{display:block;border-radius:3px}
.ilg-theme-preview .bar{height:10px}
.ilg-theme-preview .card{display:grid;align-content:start;gap:4px;padding:5px;border-radius:5px;position:relative}
.ilg-theme-preview .card b{display:block;height:5px;border-radius:3px;width:70%}
.ilg-theme-preview .card b+b{width:45%}
.ilg-theme-preview .button{display:none}
.ilg-preview-current{background:#edf5ee url('/portal-botanical-paper.png') left center/160px auto}
.ilg-preview-current .bar{background:#fff}.ilg-preview-current .card{background:#fff;border-top:2px solid #24694f}.ilg-preview-current .card b{background:#20323b}.ilg-preview-current .card b+b{background:#24694f}
.ilg-preview-notebook{background:repeating-linear-gradient(180deg,#fbf5e6 0 7px,#e3d7bb 7px 8px);border-left:3px solid #e8a598}
.ilg-preview-notebook .bar{background:#f6edd5}.ilg-preview-notebook .card{background:#fffdf6;border:1px solid #e0d4b8;border-radius:2px;box-shadow:0 2px 0 #e7dcc0}.ilg-preview-notebook .card b{background:#2a2118}.ilg-preview-notebook .card b+b{background:#1f5a43}
.ilg-preview-journey{background:linear-gradient(180deg,#c6e9f7,#eaf7fb)}
.ilg-preview-journey .bar{background:#fff;border-bottom:2px solid #ffcf4a}.ilg-preview-journey .card{background:#fff;border-radius:9px;box-shadow:0 3px 0 #c3e1ea}.ilg-preview-journey .card b{background:#14323a}.ilg-preview-journey .card b+b{background:#0b6e5a}
.ilg-preview-journey .card::after{content:"";position:absolute;right:6px;bottom:5px;width:18px;height:8px;border-radius:3px;background:#e4573d}
.ilg-preview-clean{background:#fff}
.ilg-preview-clean .bar{background:#fff;border-bottom:1px solid #e3e8e5}.ilg-preview-clean .card{background:#0a6b45;border-radius:7px}.ilg-preview-clean .card b{background:#fff}.ilg-preview-clean .card b+b{background:#bfe5d1}
html[data-ilg-night=on] .ilg-preview-current{background:#0f1a16}html[data-ilg-night=on] .ilg-preview-current .bar,html[data-ilg-night=on] .ilg-preview-current .card{background:#1c2c26}html[data-ilg-night=on] .ilg-preview-current .card b{background:#e6eee9}html[data-ilg-night=on] .ilg-preview-current .card b+b{background:#7fd1a8}
html[data-ilg-night=on] .ilg-preview-notebook{background:repeating-linear-gradient(180deg,#1d1913 0 7px,#2c261d 7px 8px);border-left-color:#5a3a33}html[data-ilg-night=on] .ilg-preview-notebook .bar{background:#221d16}html[data-ilg-night=on] .ilg-preview-notebook .card{background:#262019;border-color:#433929;box-shadow:none}html[data-ilg-night=on] .ilg-preview-notebook .card b{background:#efe6d2}html[data-ilg-night=on] .ilg-preview-notebook .card b+b{background:#a3d6b8}
html[data-ilg-night=on] .ilg-preview-journey{background:linear-gradient(180deg,#13283a,#0f1d24)}html[data-ilg-night=on] .ilg-preview-journey .bar{background:#132229;border-bottom-color:#e6b93a}html[data-ilg-night=on] .ilg-preview-journey .card{background:#16272f;box-shadow:0 3px 0 #0a151a}html[data-ilg-night=on] .ilg-preview-journey .card b{background:#e3f1f5}html[data-ilg-night=on] .ilg-preview-journey .card b+b{background:#6fd6bd}
html[data-ilg-night=on] .ilg-preview-clean{background:#0c1511}html[data-ilg-night=on] .ilg-preview-clean .bar{background:#0c1511;border-bottom-color:#26352d}html[data-ilg-night=on] .ilg-preview-clean .card{background:#5fd39a}html[data-ilg-night=on] .ilg-preview-clean .card b{background:#06281a}html[data-ilg-night=on] .ilg-preview-clean .card b+b{background:#1d5a3b}
:root[data-ilg-skin]:not(#i):not(#i) .ilg-theme-settings fieldset{background:var(--t-surface)!important;box-shadow:none!important}
:root[data-ilg-skin]:not(#i):not(#i) :is(.ilg-theme-choice,.ilg-night-choice){border-color:var(--t-line)!important;background:var(--t-surface)!important}
:root[data-ilg-skin]:not(#i):not(#i) :is(.ilg-theme-choice,.ilg-night-choice):has(input:checked){border-color:var(--t-accent)!important;background:var(--t-accent-soft)!important}
:root[data-ilg-skin]:not(#i):not(#i) :is(.ilg-theme-choice,.ilg-night-choice) input{accent-color:var(--t-accent)}
.ilg-theme-shortcut{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 12px;border-radius:12px;border:1px solid var(--line,#d5e0da);background:transparent;color:inherit;font:inherit;font-size:.9rem;font-weight:700;cursor:pointer;white-space:nowrap}
:root:not([data-ilg-skin]) body.design-five button.ilg-theme-shortcut.ilg-theme-shortcut{background:#edf3ff!important;color:#244b83!important;border:1px solid #c4d5ef!important;border-radius:12px!important;font-size:12.8px!important;font-weight:800!important;box-shadow:none!important}
.ilg-theme-shortcut-icon{display:inline-block;width:16px;height:16px;border:2px solid currentColor;border-radius:50%;background:linear-gradient(90deg,currentColor 50%,transparent 50%);font-size:0;flex:none}
@media(max-width:1099px){.ilg-theme-shortcut-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.ilg-theme-shortcut{min-width:44px;min-height:44px;justify-content:center;padding:6px}}
@media(max-width:420px){.ilg-theme-settings fieldset{padding:14px}.ilg-theme-choices{gap:8px}}

/* ---------- 7. Theme character layers ---------- */
/* Headings use the theme font and weight */
:root[data-ilg-skin]:not(#i):not(#i) :where(body) :where(h1,h2,h3){font-weight:var(--t-head-weight)!important}

/* A — Calm notebook: paper cards with a strip of tape, serif German, notebook dividers for levels */
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where(.lesson-head,.question-card,.lesson-resume-card,.study-course-intro,.grammar-topic-header,.grammar-quiz,.takv-copy,.tak-readiness-card){background-image:linear-gradient(var(--t-tape),var(--t-tape))!important;background-repeat:no-repeat!important;background-size:84px 14px!important;background-position:28px 0!important}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where([lang=de]:not(input):not(textarea),.phrase strong,.question-text,.lesson-head h2){font-family:var(--t-head)!important}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where(.primary-btn,.secondary-btn,#practiceBtn,#checkBtn,.answer-btn,[data-opt]){border-radius:var(--t-radius-sm)!important}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where(.lesson-head h2,.grammar-topic-header h2){text-decoration:underline 3px var(--t-accent2);text-underline-offset:8px}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where(.lesson-resume-card h2)::before{content:"✎ " / "";color:var(--t-accent-ink)}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where(.course-level-nav [data-course],.takv-level,.study-progress-level){border-top:5px solid var(--lv,var(--t-accent))!important;border-radius:4px 4px var(--t-radius-sm) var(--t-radius-sm)!important}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(body) :where(.study-progress-level progress){accent-color:var(--lv)}
:root[data-ilg-theme=notebook] :is([data-course=A1],[data-progress-level=A1],#publicLevelA1){--lv:#1f5a43}
:root[data-ilg-theme=notebook] :is([data-course=A2],[data-progress-level=A2],#publicLevelA2){--lv:#2d7a8a}
:root[data-ilg-theme=notebook] :is([data-course=B1],[data-progress-level=B1],#publicLevelB1){--lv:#6b5bb0}
:root[data-ilg-theme=notebook] :is([data-course=B2],[data-progress-level=B2],#publicLevelB2){--lv:#b5532f}
:root[data-ilg-theme=notebook] :is([data-course=C1],[data-progress-level=C1],#publicLevelC1){--lv:#a1472b}
:root[data-ilg-theme=notebook] :is([data-course=C2],[data-progress-level=C2],#publicLevelC2){--lv:#8a6a14}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course],[data-progress-level],.takv-level){filter:none}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course=A1],[data-progress-level=A1],#publicLevelA1){--lv:#7fc4a2}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course=A2],[data-progress-level=A2],#publicLevelA2){--lv:#78bccb}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course=B1],[data-progress-level=B1],#publicLevelB1){--lv:#ab9ee6}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course=B2],[data-progress-level=B2],#publicLevelB2){--lv:#e39a7a}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course=C1],[data-progress-level=C1],#publicLevelC1){--lv:#e08f78}
:root[data-ilg-theme=notebook][data-ilg-night=on] :is([data-course=C2],[data-progress-level=C2],#publicLevelC2){--lv:#d6b45a}
:root[data-ilg-theme=notebook]:not(#i):not(#i) :where(.topbar,#topbar,.side-nav){border-bottom:1px solid var(--t-line)!important}

/* B — Journey through Germany: sky and hills, route stops with German cities, a train on the lesson strip */
:root[data-ilg-theme=journey]{--t-scene:url('/themes/journey-scene-day.svg?v=1')}
:root[data-ilg-theme=journey][data-ilg-night=on]{--t-scene:url('/themes/journey-scene-night.svg?v=1')}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(.topbar,#topbar,.takv-portal-nav){border-bottom:4px solid var(--t-accent2)!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.primary-btn,#practiceBtn,#checkBtn,#resumeLastLesson,.takv-portal-nav-account){border-radius:999px!important;box-shadow:0 4px 0 color-mix(in srgb,var(--t-accent) 60%,#000)!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.secondary-btn){border-radius:999px!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.study-course-intro,.grammar-hero,.takv-copy){background-image:var(--t-scene)!important;background-repeat:no-repeat!important;background-position:right 20px bottom 0!important;background-size:auto 88%!important;padding-right:min(46%,420px)!important;min-height:180px}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.study-course-intro>.study-progress-badge,.study-course-intro>[class*="badge"]){position:relative;z-index:1}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.takv-copy){padding-right:clamp(16px,2vw,28px)!important;background-size:auto 46%!important;background-position:right 12px bottom 0!important;padding-bottom:110px!important}
/* Lesson strip with a train: decorative, below the lesson heading */
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.lesson-head){position:relative;padding-bottom:64px!important;background-image:linear-gradient(90deg,var(--t-route) 50%,transparent 50%)!important;background-size:16px 3px!important;background-repeat:repeat-x!important;background-position:0 calc(100% - 26px)!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.lesson-head)::after{content:"";position:absolute;left:28px;bottom:16px;width:72px;height:28px;background:url('/themes/journey-train.svg?v=1') no-repeat center/contain;pointer-events:none}
@media (prefers-reduced-motion:no-preference){
 :root[data-ilg-theme=journey]:not(#i):not(#i) body.animations-on :where(.lesson-head)::after{animation:ilg-train 9s linear 1 both}
}
@keyframes ilg-train{from{transform:translateX(0)}to{transform:translateX(calc(min(60vw,560px)))}}
/* Route stops: level buttons become round stations joined by a dotted line, with the German city name */
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(.course-level-nav){position:relative;gap:10px!important;flex-wrap:wrap}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(.course-level-nav [data-course],.takv-level[id^="publicLevel"]){display:inline-flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:92px!important;height:auto!important;min-height:64px!important;padding:8px 12px!important;border-radius:22px!important;border-width:3px!important;border-style:solid!important;border-color:#9cc9d6!important;line-height:1.2!important;white-space:nowrap}
:root[data-ilg-theme=journey][data-ilg-night=on]:not(#i):not(#i) :where(.course-level-nav [data-course],.takv-level[id^="publicLevel"]){border-color:#3f6b78!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(.course-level-nav [data-course][aria-pressed=true]){background:var(--t-accent2)!important;color:var(--t-on-accent2)!important;border-color:var(--t-accent)!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(.course-level-nav [data-course][aria-pressed=true]) *{color:inherit!important}
.ilg-city{display:block;font-size:.8rem;font-weight:700;line-height:1.3;color:inherit;opacity:1}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(.study-progress-level) .ilg-city{order:-1;margin-bottom:2px;color:var(--t-muted)!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.study-progress-level){border-left:6px dotted var(--t-route)!important}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.study-progress-level progress){accent-color:var(--t-good)}
:root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.lesson-progress.is-complete) strong::before{content:""}

/* C — Clean learner: white space, very bold type, one strong green "continue" card, coloured level letters */
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(h1,h2){letter-spacing:-.02em}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.lesson-head h2,.study-course-intro h2,.grammar-topic-header h2,.question-card h2,.question-card h3){font-size:clamp(1.6rem,3vw,2.4rem)!important;line-height:1.15!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.card,.lesson-head,.question-card,.grammar-quiz,.explain-box,.phrase,.knowledge-card,.study-search,.takv-entry-card,.takv-quick,.takv-info,[class*="-card"]){border:1px solid var(--t-line)!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.lesson-resume-card){background:var(--t-accent)!important;color:var(--t-on-accent)!important;border-color:var(--t-accent)!important;padding:clamp(20px,3vw,36px)!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.lesson-resume-card) *{color:inherit!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.lesson-resume-card h2){font-size:clamp(1.5rem,2.6vw,2.1rem)!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.lesson-resume-card #resumeLastLesson){background:var(--t-on-accent)!important;color:var(--t-accent)!important;border-color:var(--t-on-accent)!important}
:root[data-ilg-theme=clean][data-ilg-night=on]:not(#i):not(#i) :where(body) :where(.lesson-resume-card #resumeLastLesson){background:var(--t-bg)!important;color:var(--t-accent-ink)!important;border-color:var(--t-bg)!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.course-level-nav [data-course],.takv-level[id^="publicLevel"]){border-top:5px solid var(--lv)!important;font-weight:900!important;font-size:1.15rem!important;min-width:64px}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.takv-level[id^="publicLevel"] strong,.study-progress-level strong){color:var(--lv)!important;font-weight:900!important;font-size:2rem!important;letter-spacing:-.03em}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.study-progress-level){border-top:5px solid var(--lv)!important}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.study-progress-level progress){accent-color:var(--lv)}
:root[data-ilg-theme=clean] :is([data-course=A1],[data-progress-level=A1],#publicLevelA1){--lv:#0a6b45}
:root[data-ilg-theme=clean] :is([data-course=A2],[data-progress-level=A2],#publicLevelA2){--lv:#0b6680}
:root[data-ilg-theme=clean] :is([data-course=B1],[data-progress-level=B1],#publicLevelB1){--lv:#3446b5}
:root[data-ilg-theme=clean] :is([data-course=B2],[data-progress-level=B2],#publicLevelB2){--lv:#7a3fb5}
:root[data-ilg-theme=clean] :is([data-course=C1],[data-progress-level=C1],#publicLevelC1){--lv:#b02a2a}
:root[data-ilg-theme=clean] :is([data-course=C2],[data-progress-level=C2],#publicLevelC2){--lv:#875400}
:root[data-ilg-theme=clean][data-ilg-night=on] :is([data-course=A1],[data-progress-level=A1],#publicLevelA1){--lv:#5fd39a}
:root[data-ilg-theme=clean][data-ilg-night=on] :is([data-course=A2],[data-progress-level=A2],#publicLevelA2){--lv:#5cc6e0}
:root[data-ilg-theme=clean][data-ilg-night=on] :is([data-course=B1],[data-progress-level=B1],#publicLevelB1){--lv:#9aa8ff}
:root[data-ilg-theme=clean][data-ilg-night=on] :is([data-course=B2],[data-progress-level=B2],#publicLevelB2){--lv:#c69bf0}
:root[data-ilg-theme=clean][data-ilg-night=on] :is([data-course=C1],[data-progress-level=C1],#publicLevelC1){--lv:#ff9c94}
:root[data-ilg-theme=clean][data-ilg-night=on] :is([data-course=C2],[data-progress-level=C2],#publicLevelC2){--lv:#e8b85a}
:root[data-ilg-theme=clean]:not(#i):not(#i) :where(body) :where(.primary-btn,#practiceBtn,#checkBtn){border-radius:var(--t-radius-sm)!important;font-weight:800!important}

/* Phone widths: keep decorations light */
@media(max-width:700px){
 :root[data-ilg-theme=journey]:not(#i):not(#i) :where(body) :where(.study-course-intro,.grammar-hero){padding-right:clamp(16px,4vw,24px)!important;padding-bottom:120px!important;background-size:auto 110px!important;background-position:right 8px bottom 0!important}
 :root[data-ilg-theme=journey]:not(#i):not(#i) :where(.course-level-nav [data-course]){min-width:0!important;padding:6px 8px!important;font-size:.9rem!important}
 :root[data-ilg-theme=journey] .course-level-nav .ilg-city{font-size:.72rem}
 :root[data-ilg-theme=notebook]{--t-page:repeating-linear-gradient(180deg,transparent 0 33px,var(--t-rule) 33px 34px),linear-gradient(90deg,transparent 0 10px,var(--t-margin) 10px 11px,transparent 11px),var(--t-bg)}
}

/* ---------- 8. Phone top bar: room for the Theme button ----------
   visual.css fixes the action column at 44px and lets extra buttons overflow to the left;
   with the support heart and the Theme button that overlapped "I Learn German" (390px and below). */
@media(max-width:899px){
  html[data-concept="new"] body.design-five:not([data-route="admin"]):not(.public-entry) #topbar.topbar:not(#i){grid-template-columns:44px minmax(0,1fr) auto!important}
  html[data-concept="new"] body.design-five:not([data-route="admin"]):not(.public-entry) #topbar .top-actions:not(#i){width:auto!important;gap:2px!important}
}
@media(max-width:379px){
  html[data-concept="new"] body.design-five:not([data-route="admin"]):not(.public-entry) #topbar .top-actions:not(#i)>button:not([hidden]){width:40px!important;min-width:40px!important;flex-basis:40px!important}
  html[data-concept="new"] body.design-five:not([data-route="admin"]):not(.public-entry) #topbar #courseTitle .takv-wordmark-copy>strong:not(#i){font-size:.9rem!important}
}

/* ---------- 9. Current theme, day colours: readable small texts (2.212.0) ----------
   Three texts of the original day design were below 4.5:1: the photo credit line on the start page
   (#687276, 4.44:1), the "01 · A1" section labels in Lessons (#8490a2, 2.97:1) and the orange GERMAN
   wordmark (#ca784b / #ed5519, about 3:1). Same look, darker shades (at least 4.8:1 on the page
   background). Only without a theme skin; the other themes and night colours have their own colours. */
:where(:root:not([data-ilg-skin])) body.design-five:not([data-route="admin"]) #takvContent.approved-portal .takv-media-caption{color:#5c666a!important}
:root:not([data-ilg-skin]) .tak-section-eyebrow:not(.study-course-intro .tak-section-eyebrow){color:#5f6b7d}
:root:not([data-ilg-skin]):not(#i):not(#i) .tak-live-title b{color:#b5470f!important}
