/* Adaptive ordinary workspace. Root variables describe context; study stays independent. */
html[data-up-theme=adaptive] {
  --ae-bg:#eef5f5; --ae-card:#fbfdfd; --ae-inset:#e5efef; --ae-input:#f7fbfb;
  --ae-ink:#203943; --ae-muted:#4b626d; --ae-brand:#216b72; --ae-on-brand:#fff;
  --ae-line:#c8dcdf; --ae-strong-line:#9cbfc4; --ae-selected:#d4e8e8;
  --ae-hero-start:#d5edeb; --ae-hero-end:#dce8f1; --ae-glow:#adcfd65c;
  --ae-weather-glow:#a6d9db52; --ae-weather-hue:#b9d6d9;
  --ae-decoration:54%; --ae-radius:22px; --ae-shadow:0 6px 20px #263f5009;
  --ae-backdrop:#14273580; --ae-scheme:light;
  --ae-danger:#a04439; --ae-warning:#856027; --ae-success:#2f7055;
  --ae-violet:#725288; --ae-violet-bg:#eee7f1;
  --ae-rose:#985254; --ae-rose-bg:#f6e9e8;
  --ae-green:#2f7055; --ae-green-bg:#e4f1e9;
  --ae-gold:#856027; --ae-gold-bg:#f4eddc;
  --ae-blue:#386b8d; --ae-blue-bg:#e4eef5;
}
html[data-up-theme=adaptive][data-up-adaptive-period=morning] {
  --ae-bg:#f7f4ec; --ae-card:#fffdf7; --ae-inset:#f0ebe0; --ae-input:#fffcf5;
  --ae-ink:#41392d; --ae-muted:#6c604d; --ae-brand:#855b29;
  --ae-line:#dfd5c2; --ae-strong-line:#c2ad88; --ae-selected:#f0e4ca;
  --ae-hero-start:#f4e5c3; --ae-hero-end:#e6eee4; --ae-glow:#edd59c63;
}
html[data-up-theme=adaptive][data-up-adaptive-period=evening] {
  --ae-bg:#f5eef2; --ae-card:#fffafb; --ae-inset:#eee5ed; --ae-input:#fff8fb;
  --ae-ink:#423447; --ae-muted:#6c5872; --ae-brand:#77548c;
  --ae-line:#ddcedf; --ae-strong-line:#b99abe; --ae-selected:#e9ddec;
  --ae-hero-start:#f2ded5; --ae-hero-end:#e1dcef; --ae-glow:#d4b2d75c;
}
html[data-up-theme=adaptive][data-up-adaptive-period=night] {
  --ae-bg:#14212e; --ae-card:#203344; --ae-inset:#263d4f; --ae-input:#192b3b;
  --ae-ink:#e4eef4; --ae-muted:#b4c6d3; --ae-brand:#90bdc8; --ae-on-brand:#14212e;
  --ae-line:#405869; --ae-strong-line:#718e9d; --ae-selected:#2b4b5b;
  --ae-hero-start:#263f50; --ae-hero-end:#2d3852; --ae-glow:#607aa820;
  --ae-shadow:0 6px 20px #050c1425; --ae-backdrop:#060e19b3; --ae-scheme:dark;
  --ae-danger:#ffb4a8; --ae-warning:#e7c58b; --ae-success:#9cd2b5;
  --ae-violet:#c5b4dd; --ae-violet-bg:#3a3851;
  --ae-rose:#e1b4bb; --ae-rose-bg:#493844;
  --ae-green:#a9d2bc; --ae-green-bg:#29493f;
  --ae-gold:#e0c49b; --ae-gold-bg:#454237;
  --ae-blue:#a9cce1; --ae-blue-bg:#2c4559;
}
/* Weather adds quiet colour to scenery and cards, without changing text contrast. */
html[data-up-theme=adaptive][data-up-adaptive-weather=clear] { --ae-weather-glow:#f1d79866; --ae-weather-hue:#efd9a9; }
html[data-up-theme=adaptive][data-up-adaptive-weather=cloudy] { --ae-weather-glow:#bac5d754; --ae-weather-hue:#bfcad9; }
html[data-up-theme=adaptive][data-up-adaptive-weather=rain] { --ae-weather-glow:#829fb854; --ae-weather-hue:#a5b9ce; }
html[data-up-theme=adaptive][data-up-adaptive-weather=snow] { --ae-weather-glow:#c5e8f573; --ae-weather-hue:#cae3eb; }
html[data-up-theme=adaptive][data-up-adaptive-weather=storm] { --ae-weather-glow:#a0abc23d; --ae-weather-hue:#b6bfd0; }
html[data-up-theme=adaptive][data-up-adaptive-weather=unknown] { --ae-weather-glow:transparent; --ae-weather-hue:var(--ae-hero-end); }
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-weather=clear] { --ae-weather-glow:#a08a4e26; }
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-weather=cloudy] { --ae-weather-glow:#6f819b26; }
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-weather=rain] { --ae-weather-glow:#51739126; }
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-weather=snow] { --ae-weather-glow:#87b6ce26; }
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-weather=storm] { --ae-weather-glow:#78829c20; }
html[data-up-theme=adaptive][data-up-adaptive-focus=focused] { --ae-decoration:15%; --ae-radius:18px; --ae-shadow:0 2px 10px #12252f06; }
html[data-up-theme=adaptive][data-up-adaptive-focus=gentle] { --ae-decoration:28%; --ae-radius:24px; --ae-shadow:0 3px 14px #12252f06; }
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-focus=focused],
html[data-up-theme=adaptive][data-up-adaptive-period=night][data-up-adaptive-focus=gentle] { --ae-shadow:0 3px 14px #040c141c; }

html[data-up-theme=adaptive] body:not(.desk-mode) {
  --forest:var(--ae-card); --forest-ink:var(--ae-ink); --forest-muted:var(--ae-muted);
  --forest-paper:var(--ae-card); --forest-line:var(--ae-line);
  --brand:var(--ae-brand); --ink:var(--ae-ink); --muted:var(--ae-muted);
  --line:var(--ae-line); --paper:var(--ae-bg); --cream:var(--ae-card); --shadow:var(--ae-shadow);
  color:var(--ink); color-scheme:var(--ae-scheme);
  background:radial-gradient(ellipse at 88% 0,var(--ae-glow),transparent 55%),var(--ae-bg);
}
html[data-up-theme=adaptive] body:not(.desk-mode) :is(h1,h2,h3,h4) { font-family:var(--sans,sans-serif); color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(a,button,input,textarea,select,summary):focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(input,textarea)::placeholder { color:var(--muted); opacity:1; }
html[data-up-theme=adaptive] body:not(.desk-mode) ::selection { color:var(--ae-on-brand); background:var(--brand); }

/* Navigation, identity and all controls use the same palette as the page. */
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header { color:var(--ink); background:var(--ae-card); border-right:1px solid var(--line); box-shadow:3px 0 18px #14273509; }
html[data-up-theme=adaptive] body:not(.desk-mode) .brand { padding:12px 2px; color:var(--ink); background:transparent; border:0; outline:0; box-shadow:none; border-radius:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .brand img { background:#fff; }
html[data-up-theme=adaptive] body:not(.desk-mode) .brand small { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header nav a { color:var(--muted); border-radius:13px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header nav a .ui-icon { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header nav a:is(.active,[aria-current=page]) { color:var(--brand); background:var(--ae-selected); font-weight:700; box-shadow:inset 3px 0 var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header nav a:is(.active,[aria-current=page]) .ui-icon { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header nav a:hover { color:var(--ink); background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-header nav a:is(.active,[aria-current=page]):hover { color:var(--brand); background:var(--ae-selected); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-nav-label { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-sidebar-note { background:var(--ae-inset); border-color:var(--line); border-radius:var(--ae-radius); box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-sidebar-note :is(small,strong,span) { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-sidebar-note strong { font:650 14px/1.9 var(--sans,sans-serif); color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-note-art { height:54px; background:radial-gradient(ellipse at 25% 5%,var(--ae-weather-glow),transparent 55%),linear-gradient(120deg,var(--ae-hero-start),var(--ae-hero-end)); opacity:.7; }
html[data-up-theme=adaptive] body:not(.desk-mode) .header-actions { color:var(--ink); background:var(--ae-card); border-color:var(--line); border-radius:15px; box-shadow:var(--shadow); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.account-button,.page-fullscreen-button,.up-theme-button) { color:var(--brand); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.page-fullscreen-button,.up-theme-button):hover { color:var(--brand); background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .account-avatar { color:var(--brand)!important; background:var(--ae-selected)!important; border-color:var(--line); box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .account-popover { color:var(--ink); background:var(--ae-card); border-color:var(--line); box-shadow:0 12px 28px #14273530; }
html[data-up-theme=adaptive] body:not(.desk-mode) .account-popover :is(a,button):hover { color:var(--brand); background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-footer { color:var(--muted); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .site-footer strong { color:var(--ink); }

/* Full ordinary-page coverage, including notes and discovery detail panels. */
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.panel,.y-disclosure,.y-discover-card,.y-space-card,.up-welcome-plan,.up-entry-grid a,.y-learning-stats,.y-learning-columns>section,.y-followups,.y-writing-prompt,.y-journal-entry,.y-card-identity,.forest-overview-card,.fp-planner,.fp-reading,.forest-scenery,.fp-launch,.fp-shortcuts,.wb-grades.panel,.wb-bottom-grid>.panel,.wb-tool,.gj-action-panel,.gj-reflection,.gj-empty,.sn-card,.university-card,.career-card,.person-card,.person-inspiration,.people-footnote,.university-lenses,.category-note) {
  color:var(--ink); background:var(--ae-card); border:1px solid var(--line); border-radius:var(--ae-radius);
  box-shadow:var(--shadow); backdrop-filter:none; -webkit-backdrop-filter:none;
}
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-discover-card,.y-space-card,.wb-tool,.sn-card,.person-card):hover { background:var(--ae-card); border-color:var(--ae-strong-line); box-shadow:var(--shadow); transform:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-growth-action,.y-next-step,.university-filters,.y-search,.y-empty,.fp-reading .y-empty,.company-examples,.university-intro,.career-route,.y-card-word,.review-selection,.sn-conflict) { color:var(--ink); background:var(--ae-inset); border-color:var(--line); border-radius:14px; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-icon-tile,.y-icon-button,.forest-note-icon,.fp-launch-icon,.people-total,.person-detail-symbol,.school-monogram,.y-avatar) { color:var(--brand); background:var(--ae-selected); border-color:var(--line); border-radius:14px; box-shadow:none; transform:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-text-link,.y-kicker,.eyebrow,.university-lenses>summary,.source-links a,.inline-link,.person-detail-symbol span,.inspiration-star) { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.forest-card-heading,.fp-section-head,.y-section-heading,.fp-shortcuts) h2 { font-family:var(--sans,sans-serif); color:var(--ink); font-weight:700; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.forest-card-heading,.fp-section-head,.y-section-heading,.fp-shortcuts) h2 .ui-icon { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-discover-card,.y-space-card,.up-welcome,.up-entry-grid,.y-reading-card,.y-journal-entry,.company-examples) p { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.university-intro span,.company-examples small,.person-inspiration small,.person-en,.sn-count,.sn-preview,.sn-chapter,.sn-meta time,.sn-reader-meta small) { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-card-identity-main span:not(.y-avatar),.y-card-identity p,.y-card-word>span,.up-welcome-plan small) { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-card-tabs { color:var(--ink); background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-experience-entry,.y-journal-entry)>summary:hover { color:var(--ink); background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-record-type { color:var(--brand); background:var(--ae-selected); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-record-type.award { color:var(--ae-gold); background:var(--ae-gold-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-record-type.science { color:var(--ae-green); background:var(--ae-green-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-record-type.practice { color:var(--ae-violet); background:var(--ae-violet-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-skeleton { background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-skeleton i { background:var(--line); animation:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .person-poster { color:var(--ink); background:var(--ae-selected); }
html[data-up-theme=adaptive] body:not(.desk-mode) .person-poster:has(img) { color:#fff; background:#17232e; }
html[data-up-theme=adaptive] body:not(.desk-mode) .person-poster h2 { color:inherit; }
html[data-up-theme=adaptive] body:not(.desk-mode) .profile-hero :is(h1,p,small) { color:#f4f8fb; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.company-examples>div+div,.y-learning-event,.y-journal-entry,.person-bottom,.person-detail-hero,.person-section,.people-toolbar,.education-trail,.university-knowledge,.school-meta,.wb-project-list li,.wb-grade-record,.gj-today,.gj-entry-list,.sn-actions,.sn-body) { border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .career-number { color:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .people-hero h1 .serif { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.tag,.tag.green,.sn-tag,.school-tags span,.skill-tags span,.chip) { color:var(--brand); background:var(--ae-inset); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .chip.active { color:var(--brand); background:var(--ae-selected); border-color:var(--ae-strong-line); font-weight:700; }
html[data-up-theme=adaptive] body:not(.desk-mode) .discovery-nav { border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .discovery-nav a.active { color:var(--ae-on-brand); background:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats { padding:18px 22px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats>div { padding:4px 16px; min-width:0; gap:8px; flex-wrap:wrap; }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats>div:first-child { padding-left:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats strong { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats span { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-learning-event .ui-icon,.y-entry-chevron .ui-icon) { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .button { color:var(--brand); background:var(--ae-input); border-color:var(--line); border-radius:12px; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .button:not(:disabled):hover { color:var(--brand); background:var(--ae-selected); border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .button:is(.primary,.dark,.red-bg),
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-quick-focus .button { color:var(--ae-on-brand); background:var(--brand); border-color:var(--brand); box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .button:is(.primary,.dark,.red-bg):not(:disabled):hover,
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-quick-focus .button:not(:disabled):hover { color:var(--ae-on-brand); background:var(--brand); border-color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) .button:disabled { opacity:.55; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(input:not([type=checkbox]):not([type=radio]),textarea,select) { color:var(--ink); background-color:var(--ae-input); border-color:var(--line); border-radius:12px; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(input[type=checkbox],input[type=radio]) { accent-color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) dialog { color:var(--ink); background:var(--ae-card); border-color:var(--line); border-radius:24px; box-shadow:0 24px 70px #07172540; }
html[data-up-theme=adaptive] body:not(.desk-mode) dialog::backdrop { background:var(--ae-backdrop); backdrop-filter:blur(3px); }
/* The shared modal has older ID rules; keep every task/grade/note/journal label readable. */
html[data-up-theme=adaptive] body:not(.desk-mode) #modal :is(label,legend) { color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) #modal .modal-close { color:var(--brand); background:var(--ae-input); border:1px solid var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) #modal .modal-close:hover { color:var(--brand); background:var(--ae-selected); border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) #modal .error,
html[data-up-theme=adaptive] body:not(.desk-mode) #focus-task-form .fp-required { color:var(--ae-danger); }
html[data-up-theme=adaptive] body:not(.desk-mode) #focus-task-form .fp-optional { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) #focus-task-form .fp-subject-fields { background:var(--ae-inset); border-color:var(--line); border-radius:14px; }
html[data-up-theme=adaptive] body:not(.desk-mode) #focus-task-form .fp-subject-fields legend { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) #focus-task-form .fp-subject-fields p { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.fp-form-heading p,.fp-quadrant-options small,.fp-quadrant-hint,.fp-empty,.fp-loading,.fp-load-error) { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) #toast { color:var(--ae-on-brand); background:var(--brand); }

/* Weather and time are present as still gradients, never moving scenery. */
html[data-up-theme=adaptive] body[data-page=me]:not(.desk-mode):has(.fp-space-wallpaper) { background:var(--ae-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-dashboard::before { background:linear-gradient(180deg,transparent,var(--ae-bg) 480px); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .fp-space-wallpaper[src$="forest-study-retreat-r1.png"] { opacity:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .fp-space-wallpaper:not([src$="forest-study-retreat-r1.png"]) { opacity:.14; filter:saturate(.5); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .forest-hero {
  position:relative; min-height:210px; padding:28px; margin-bottom:22px; border:1px solid var(--line); border-radius:var(--ae-radius);
  background:radial-gradient(ellipse at 90% 0,var(--ae-weather-glow),transparent 58%),linear-gradient(115deg,var(--ae-hero-start),var(--ae-hero-end));
  box-shadow:var(--shadow); overflow:hidden;
}
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .forest-hero::after { content:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.fp-page-heading h1,.forest-eyebrow,.forest-hero-tools time) { color:var(--ink); text-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-page-heading h1 { font-family:var(--sans,sans-serif); font-weight:750; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-page-heading p,
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-dashboard:has(.fp-space-wallpaper)>.fp-page-heading p { color:var(--muted); text-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-hero-tools time { background:var(--ae-card); border:1px solid var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-hero-tools .button { color:var(--brand); background:var(--ae-card); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-dashboard:has(.fp-space-wallpaper) :is(.fp-planner,.fp-reading,.fp-shortcuts) { background:var(--ae-card); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview { gap:15px; background:transparent; overflow:visible; margin:0 0 24px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:is(div,a) { padding:22px; border:1px solid var(--line); border-radius:var(--ae-radius); background:var(--ae-card); box-shadow:var(--shadow); color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:nth-child(2) { background:color-mix(in srgb,var(--ae-violet-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:nth-child(3) { background:color-mix(in srgb,var(--ae-green-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:nth-child(4) { background:color-mix(in srgb,var(--ae-gold-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview strong { margin:12px 0 6px; color:var(--brand); font-size:32px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:is(div,a)>span { color:var(--ink); font-size:14px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview small { color:var(--muted); font-size:12px; line-height:1.7; }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-quick-focus.fp-launch { background:var(--ae-selected); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-quick-focus :is(h2,p,small) { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-quick-focus h3 { color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.wb-learning-links>*,.wb-personal-links>*,.wb-project-apps a) { color:var(--brand); background:var(--ae-inset); border-color:var(--line); border-radius:12px; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.wb-learning-links>*,.wb-personal-links>*,.wb-project-apps a):hover { background:var(--ae-selected); border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-view-switch { background:var(--ae-inset); border:1px solid var(--line); border-radius:12px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-view-switch button { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-view-switch button[aria-pressed=true] { color:var(--brand); background:var(--ae-card); font-weight:750; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.fp-plan-summary,.fp-task-subject,.fp-task-meta,.fp-task-progress small,.fp-task-bottom,.fp-task .fp-edit,.fp-footnote,.fp-footnote p,.fp-private-note,.fp-private-note p,.fp-shortcuts small,.forest-goal-note p) { color:var(--muted); font-size:11px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-plan-summary b { color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-due.is-late { color:var(--ae-danger); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-due.is-today { color:var(--ae-warning); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.error,.sn-conflict [role=alert]) { color:var(--ae-danger); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-delete { color:var(--ae-danger)!important; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-save-notice { color:var(--ae-warning); background:var(--ae-gold-bg); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.fp-task,.fp-list .fp-task) { background:var(--ae-input); border-color:var(--line); border-radius:14px; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.fp-task h3,.fp-task h3 button,.fp-shortcuts b,.forest-goal-note b) { color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-task.is-done h3 button { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-complete { color:var(--ae-on-brand); background:var(--ae-card); border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-complete[aria-pressed=true] { background:var(--brand); border-color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-task-progress>div { background:var(--ae-inset); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-task-progress i { background:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-task-bottom button { color:var(--brand); background:var(--ae-selected); border:1px solid var(--line); border-radius:10px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-task-bottom button:hover { background:var(--ae-inset); border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .q1 { --fp-bg:var(--ae-rose-bg); --fp-border:var(--ae-line); --fp-color:var(--ae-rose); }
html[data-up-theme=adaptive] body:not(.desk-mode) .q2 { --fp-bg:var(--ae-green-bg); --fp-border:var(--ae-line); --fp-color:var(--ae-green); }
html[data-up-theme=adaptive] body:not(.desk-mode) .q3 { --fp-bg:var(--ae-gold-bg); --fp-border:var(--ae-line); --fp-color:var(--ae-gold); }
html[data-up-theme=adaptive] body:not(.desk-mode) .q4 { --fp-bg:var(--ae-violet-bg); --fp-border:var(--ae-line); --fp-color:var(--ae-violet); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-quadrant header h3 small,
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-quadrant header .y-icon-button { color:var(--fp-color); background:var(--ae-card); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-reading-card,.fp-reading .y-reading-card,.fp-shortcuts .forest-notes-grid>a,.forest-goal-note) { color:var(--ink); background:var(--ae-inset); border-color:var(--line); border-radius:14px; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-book-cover,.fp-reading .y-book-cover) { color:var(--ae-on-brand); background:var(--brand); box-shadow:inset 5px 0 #122a3922,2px 4px 7px #122a3915; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-book-cover,.fp-reading .y-book-cover) small { color:var(--ae-on-brand)!important; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-reading .y-reading-card h3 { color:var(--ink); }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-reading .y-reading-card :is(p,small) { color:var(--muted); font-size:11px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .fp-reading .y-reading-card>div>span { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-chart-line { stroke:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-chart circle { fill:var(--brand); stroke:var(--ae-card); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-grid-line { stroke:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-calendar { border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.forest-calendar-heading,.forest-calendar-day,.forest-calendar-key,.forest-calendar-heading>span,.forest-calendar-heading button,.forest-calendar-week) { color:var(--muted); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-calendar-day.is-today { color:var(--ae-on-brand); background:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-calendar-day.has-due:not(.is-today) { color:var(--ink); background:var(--ae-selected); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.forest-calendar-day i,.forest-calendar-key i) { background:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .forest-calendar-day.is-today i { background:var(--ae-on-brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .y-focus-mini { color:var(--brand); background:var(--ae-card); border-color:var(--ae-strong-line); box-shadow:var(--shadow); }

html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a { color:var(--ae-violet); background:color-mix(in srgb,var(--ae-violet-bg) var(--ae-decoration),var(--ae-card)); border-color:var(--line); border-radius:14px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a:nth-child(2) { color:var(--ae-rose); background:color-mix(in srgb,var(--ae-rose-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a:nth-child(3) { color:var(--ae-green); background:color-mix(in srgb,var(--ae-green-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a:nth-child(4) { color:var(--ae-gold); background:color-mix(in srgb,var(--ae-gold-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a:nth-child(5) { color:var(--ae-blue); background:color-mix(in srgb,var(--ae-blue-bg) var(--ae-decoration),var(--ae-card)); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a:hover { border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-tool:nth-child(2) .y-icon-tile { color:var(--ae-violet); background:var(--ae-violet-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-tool:nth-child(3) .y-icon-tile { color:var(--ae-rose); background:var(--ae-rose-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-tool:nth-child(4) .y-icon-tile { color:var(--ae-green); background:var(--ae-green-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .wb-tool:nth-child(5) .y-icon-tile { color:var(--ae-gold); background:var(--ae-gold-bg); }
html[data-up-theme=adaptive] body:not(.desk-mode) .gj-directions>a { color:var(--muted); background:var(--ae-card); border-color:var(--line); border-radius:14px; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .gj-directions>a[aria-current=page] { color:var(--ae-on-brand); background:var(--brand); border-color:var(--brand); font-weight:750; box-shadow:none; }
html[data-up-theme=adaptive] body:not(.desk-mode) .gj-directions>a:hover { border-color:var(--ae-strong-line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .gj-reflection { background:var(--ae-inset); border-color:var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.gj-direction-label,.gj-resources>a,.gj-reflection>div>.ui-icon) { color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.y-directions>a[aria-current=page],.y-card-tabs button[aria-selected=true]) { color:var(--brand); background:var(--ae-selected); border-color:var(--ae-strong-line); font-weight:750; }

/* Focus trims ornament; gentle keeps neighbouring surfaces close in tone. */
html[data-up-theme=adaptive][data-up-adaptive-focus=focused] body:not(.desk-mode) .forest-note-art { display:none; }
html[data-up-theme=adaptive][data-up-adaptive-focus=focused] body:not(.desk-mode) .wb-dashboard .forest-hero,
html[data-up-theme=adaptive][data-up-adaptive-focus=gentle] body:not(.desk-mode) .wb-dashboard .forest-hero { background:linear-gradient(115deg,color-mix(in srgb,var(--ae-hero-start) var(--ae-decoration),var(--ae-card)),color-mix(in srgb,var(--ae-weather-hue) 10%,var(--ae-card))); min-height:190px; }
html[data-up-theme=adaptive][data-up-adaptive-focus=focused] body:not(.desk-mode) .wb-tool .y-icon-tile { color:var(--brand); background:var(--ae-inset); }
html[data-up-theme=adaptive][data-up-adaptive-focus=gentle] body:not(.desk-mode) :is(.wb-quick-focus.fp-launch,.gj-reflection) { background:color-mix(in srgb,var(--ae-selected) 35%,var(--ae-card)); }

/* Environment settings inside the appearance chooser, usable at 320 px. */
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.up-theme-option,.up-theme-close) { color:var(--ink); background:var(--ae-input); }
html[data-up-theme=adaptive] body:not(.desk-mode) .up-theme-option:has(input:checked) { background:var(--ae-selected); border-color:var(--brand); }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-panel { margin-top:20px; padding:20px; border:1px solid var(--line); border-radius:18px; color:var(--ink); background:var(--ae-inset); min-width:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-head { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:0 0 12px; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-head :is(h3,h4) { margin:0; font-size:17px; line-height:1.6; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-summary { color:var(--ink); font-size:14px; line-height:1.8; margin:0 0 12px; overflow-wrap:anywhere; }
html[data-up-theme=adaptive] body:not(.desk-mode) :is(.ae-reason,.ae-live-status) { color:var(--muted); font-size:12px; line-height:1.8; margin:10px 0 0; overflow-wrap:anywhere; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-controls { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-controls button { min-height:40px; padding:9px 12px; border:1px solid var(--line); border-radius:10px; color:var(--brand); background:var(--ae-card); font:inherit; font-size:12px; cursor:pointer; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-controls button[aria-pressed=true] { color:var(--ae-on-brand); background:var(--brand); border-color:var(--brand); font-weight:700; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-form { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin:14px 0 0; min-width:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-form label { flex:1 1 220px; min-width:0; font-size:12px; color:var(--muted); margin:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-form input { width:100%; min-width:0; margin:6px 0 0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-form button { flex:0 0 auto; max-width:100%; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-results { display:grid; gap:6px; margin:10px 0 0; padding:0; list-style:none; max-height:200px; overflow:auto; min-width:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-results button { display:block; width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--ae-card); text-align:left; font:inherit; font-size:12px; cursor:pointer; white-space:normal; overflow-wrap:anywhere; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-results button:hover { border-color:var(--ae-strong-line); background:var(--ae-selected); }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-settings { display:grid; gap:12px; margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-settings label { display:flex; align-items:flex-start; gap:9px; color:var(--ink); font-size:12px; line-height:1.8; margin:0; min-width:0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-settings input[type=checkbox] { width:16px; height:16px; min-width:16px; flex:none; margin:3px 0 0; }
html[data-up-theme=adaptive] body:not(.desk-mode) .ae-reset { color:var(--muted); font-size:12px; background:transparent; border:0; padding:8px 0; text-decoration:underline; text-underline-offset:3px; cursor:pointer; max-width:100%; white-space:normal; }

@media(max-width:850px) {
  html[data-up-theme=adaptive] body:not(.desk-mode) .site-header { background:var(--ae-card); border-color:var(--line); box-shadow:0 3px 12px #14273509; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .brand { padding:0; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .header-actions { background:transparent; border:0; box-shadow:none; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .site-header>nav:not(.forest-short-nav) { background:var(--ae-card); border-color:var(--line); box-shadow:0 -3px 12px #14273509; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .site-header>nav:not(.forest-short-nav) a { color:var(--muted); }
  html[data-up-theme=adaptive] body:not(.desk-mode) .site-header>nav:not(.forest-short-nav) a:is(.active,[aria-current=page]) { color:var(--brand); background:var(--ae-selected); box-shadow:inset 0 -2px var(--brand); }
  html[data-up-theme=adaptive] body:not(.desk-mode) .site-header>nav:not(.forest-short-nav) .ui-icon { color:inherit; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .forest-hero { padding:24px; min-height:160px; }
}
@media(max-width:600px) {
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .forest-hero { padding:22px 18px; border-radius:18px; min-height:0; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-dashboard .fp-page-heading h1 { font-size:24px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview { gap:10px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:is(div,a) { padding:16px 13px; border-radius:16px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview strong { font-size:28px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview>:is(div,a)>span { font-size:12px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-overview.fp-overview small { font-size:11px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .wb-growth-links a { border-radius:12px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats { padding:14px 16px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .y-learning-stats>div { padding:6px 8px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .ae-panel { margin-top:16px; padding:14px; border-radius:14px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .ae-head :is(h3,h4) { font-size:15px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .ae-summary { font-size:13px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .ae-controls button { flex:1 1 auto; padding:8px; }
  html[data-up-theme=adaptive] body:not(.desk-mode) .ae-city-form label { flex-basis:100%; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-up-theme=adaptive] body:not(.desk-mode) *,
  html[data-up-theme=adaptive] body:not(.desk-mode) *::before,
  html[data-up-theme=adaptive] body:not(.desk-mode) *::after { animation:none; transition:none; scroll-behavior:auto; }
}
