/* MOMENTUM 3.3 — iOS 27-inspired web design system. Native Liquid Glass is not used. */
:root,html[data-theme="light"]{
 color-scheme:light;--bg:#F5F8FC;--surface:#FFFFFF;--surface-2:#EDF2F8;--border:#DAE3EF;
 --text:#102A49;--muted:#566780;--lime:#0968C8;--dark:#102A49;--mint:#117B58;
 --brand-blue:#0968C8;--brand-green:#117B58;--brand-navy:#102A49;
 --interactive:#0968C8;--success:#117B58;--soft-mint:#DDF5E9;--blue-wash:#E7F2FF;
 --elevated:#FFFFFF;--field:#F0F5FB;--line:#DAE3EF;--ink:#102A49;--secondary:#566780;
 --nav-glass:rgba(250,252,255,.77);--nav-stroke:rgba(255,255,255,.87);--shadow-color:rgba(26,62,107,.09);
 --focus-ring:#0968C8;--hero-end:#092C56;
}
html{scroll-padding-bottom:115px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{background:var(--bg);color:var(--ink);font-size:16px;line-height:1.48}
button,input,select,textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif}
button,select,input{touch-action:manipulation}
:focus-visible{outline:3px solid var(--focus-ring)!important;outline-offset:3px!important}
::selection{background:#b8defb;color:#102A49}
.app-shell{background:var(--bg)}
.main-area{max-width:1380px}
.sidebar{background:var(--elevated);color:var(--text);border-color:var(--line);box-shadow:2px 0 22px var(--shadow-color)}
.sidebar .brandmark{background:linear-gradient(165deg,#F5FBFF,#E8F3FD);border:1px solid #D9E7F4;border-radius:15px;width:47px;height:47px;overflow:hidden}
.momentum-mark{display:block;max-width:90%;max-height:90%;width:100%;height:100%;object-fit:contain}
.brandname{font-size:17px;letter-spacing:.035em;color:var(--brand-navy);font-weight:820}
.brandsub{color:#627C9A;letter-spacing:.11em}
.nav-item{color:var(--muted);transition:background-color .18s,color .18s;min-height:48px;font-size:14px}
.nav-item:hover:not(.active){background:var(--surface-2);color:var(--text)}
.nav-item.active{background:#E7F2FF;color:#065CAB;box-shadow:inset 3px 0 0 var(--brand-blue)}
.nav-item.active .icon{stroke-width:2.35}
.sidefoot{border-color:var(--line);color:var(--muted)}
.sidefoot strong{color:var(--text)}.sidefoot span{color:var(--muted)}
.topbar{min-height:91px;align-items:center}
.topbar .eyebrow{color:var(--muted);letter-spacing:.01em;text-transform:none;font-size:12px}
.header-brand{display:flex;align-items:center;gap:8px!important;font-size:17px!important;letter-spacing:.02em!important;font-weight:840!important}
.header-mark{width:28px;height:28px;object-fit:contain;display:inline-block}
.icon-btn,.round-icon{background:var(--surface);border:1px solid var(--line);color:var(--text);border-radius:15px;box-shadow:0 2px 8px var(--shadow-color);min-width:44px;min-height:44px}
.icon-btn:hover,.round-icon:hover{background:var(--surface-2)}
.welcome h2,.page-head h2{color:var(--text);font-weight:800;letter-spacing:-.052em}
.welcome p,.page-head p,.muted-small{color:var(--muted)}
.section-kicker{color:var(--brand-blue);letter-spacing:.095em;font-size:11px}
.action{border-radius:15px;min-height:48px;background:var(--brand-blue);color:white;font-size:14px;font-weight:710;box-shadow:0 2px 4px rgba(9,104,200,.08)}
.action:hover{background:#085CA9;color:white}
.action.secondary{background:var(--surface-2);border:1px solid var(--line);color:var(--text);box-shadow:none}
.action.secondary:hover{background:#DFEAF6;color:var(--text)}
.action.ghost{background:var(--surface);border:1px solid var(--line);color:var(--brand-blue)}
.action.danger{background:#FFF2F2;border:1px solid #F0CED3;color:#A02C42}
.action.small{min-height:44px;font-size:13px;padding:9px 13px}
.panel,.project,.report-tile,.focus-card{background:var(--surface);border-color:var(--line);box-shadow:0 4px 18px var(--shadow-color);border-radius:20px}
.panel-title{color:var(--text);font-size:16px}
.inline-link{color:var(--brand-blue);font-weight:700}
.section-kicker + h2{margin-top:5px}
.experience-hero{background:linear-gradient(130deg,#0E457C 0%,#0B3669 42%,#0D2C4D 100%);color:#fff;box-shadow:0 10px 30px rgba(13,65,123,.12);border-radius:28px;isolation:isolate}
.experience-hero:before{width:270px;height:270px;border:1px solid rgba(137,229,191,.17);top:-133px;right:-75px;box-shadow:0 0 0 60px rgba(79,153,229,.07),0 0 0 120px rgba(58,220,162,.035)}
.experience-hero .hero-first{color:#D0E4F5;font-size:14px}
.experience-hero .hero-topline{color:#F4FAFF}
.experience-hero .hero-count{color:#fff;font-variant-numeric:tabular-nums}
.live-pill{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.28);color:#F5FBFF}
.live-pill i{background:#60DFA3}
.hero-time-range{color:#C0D9F0}
.hero-primary{background:#FFFFFF;color:#0A4B92;font-weight:780;box-shadow:none}
.hero-primary:hover{background:#E6F4FE;color:#0A4B92}
.hero-outline{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.3);color:white;box-shadow:none;backdrop-filter:blur(12px)}
.hero-outline:hover{background:rgba(255,255,255,.19);color:white}
.empty-hero{background:linear-gradient(135deg,#0B4478,#092F52)}
.empty-hero .hero-info{color:#D2E7FF}
.overview-tile{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 3px 12px var(--shadow-color)}
.overview-tile .ov-icon,.ov-icon{background:var(--blue-wash);color:var(--brand-blue)}
.overview-tile strong,.report-tile strong{color:var(--text);font-variant-numeric:tabular-nums}
.overview-tile small,.overview-tile>span,.report-tile span{color:var(--muted)}
.upcoming-row{border-color:var(--line)}
.upcoming-row strong,.task-title,.routine-name{color:var(--text)}
.upcoming-row small{color:var(--muted)}
.tag-done{background:var(--soft-mint);color:var(--success)}
.priority-panel .action{margin-top:10px}
.momentum-coach{background:linear-gradient(138deg,#F1F8FF,#E8F6F1);border-color:#D8E9ED}
.momentum-coach h3{color:var(--text)}.momentum-coach p{color:var(--muted)}
.coach-icon{background:#DAF1E6;color:#117B58}
.soft-note,.notice,.focus-prompt{background:var(--surface-2);border:1px solid var(--line);color:var(--muted)}
.notice{font-size:13px;line-height:1.58}
.tab{min-height:44px;border-radius:13px;background:var(--surface);border:1px solid var(--line);color:var(--muted);font-size:13px}
.tab.active{background:var(--brand-blue)!important;color:#fff!important;border-color:var(--brand-blue)!important}
.segmented{background:var(--surface-2);border:1px solid var(--line);border-radius:15px;padding:4px}
.segment{color:var(--muted);border-radius:11px;min-height:43px;font-size:13px}
.segment.active{background:var(--surface);color:var(--text);box-shadow:0 2px 8px var(--shadow-color)}
.tick-box{border-color:var(--line);background:var(--field)}
.tick-box.checked,.habit-check.yes,.small-round.is-done{background:var(--soft-mint);color:var(--success);border-color:#9BD7BD}
.task,.habit,.history-item{border-color:var(--line);background:var(--surface)}
.task-meta,.habit small{color:var(--muted)}
.more-btn,.small-round{background:var(--surface);color:var(--text);border:1px solid var(--line);min-width:44px;min-height:44px}
.project-icon{background:var(--blue-wash);color:var(--brand-blue)}
.ring{background:conic-gradient(var(--brand-blue) var(--progress,0%),var(--surface-2) 0)}
.ring-inner{background:var(--surface);color:var(--text)}
.ring-time{color:var(--text);font-variant-numeric:tabular-nums}
.first-step{background:var(--surface-2);border-color:var(--line);color:var(--text)}
.first-step strong{color:var(--text)}
.mini-pill{background:var(--blue-wash);color:#075AAA}
.date-strip{background:var(--surface);border:1px solid var(--line);border-radius:18px}
.date-strip strong{color:var(--text)}
.date-strip small{color:var(--muted)}
.agenda-status{color:var(--text);border-color:var(--line)}
.agenda-status span,.agenda-group-title span{color:var(--muted)}
.agenda-group-title h3{color:var(--text)}
.routine-card{border-color:var(--line);background:var(--surface);border-radius:17px;box-shadow:0 2px 10px var(--shadow-color)}
.routine-card.active-now{border-color:#83B7E9;background:#EBF5FF;box-shadow:inset 3px 0 0 var(--brand-blue)}
.routine-card.done,.routine-card.skip{background:var(--surface-2);opacity:.85}
.routine-hour strong{color:var(--text)}.routine-hour small,.routine-kind{color:var(--muted)}
.now-pill{color:#095B9F;background:var(--blue-wash)}
.past-blocks summary{color:var(--muted);border-color:var(--line)}
.report-lead{background:linear-gradient(145deg,#102C52,#0B456A);border-color:transparent;color:white}
.report-lead .section-kicker{color:#A8D6F3}
.report-lead h3,.report-lead p{color:white}
.report-tile span{font-size:13px}
.score-circle{border-color:#DCECF9;color:var(--brand-blue)}
.score-circle small{color:var(--muted)}
.report-detail-row{border-color:var(--line)}
.report-detail-row span{color:var(--muted)}
.report-detail-row strong{color:var(--text)}
.report-badge{background:var(--blue-wash);color:var(--brand-blue)}
.alert-status,.alert-controls{background:var(--surface);color:var(--text)}
.alert-icon{background:var(--blue-wash);color:var(--brand-blue)}
.alert-status h3{color:var(--text)}.alert-status p{color:var(--muted)}
.setting-row{border-color:var(--line)}
.setting-row strong{color:var(--text)}.setting-row small{color:var(--muted)}
.goal-select,.appearance-select,.alert-controls select{background:var(--field)!important;border:1px solid var(--line)!important;color:var(--text)!important;min-height:44px;padding:10px 12px;border-radius:12px;max-width:180px}
.sheet{background:var(--surface);color:var(--text);border:1px solid var(--line);box-shadow:0 25px 80px rgba(12,32,59,.2)}
.sheet::backdrop{background:rgba(11,28,47,.58);backdrop-filter:blur(6px)}
.sheet-head h2{color:var(--text)}
.field label{color:var(--text);font-size:14px;font-weight:650}
.field input,.field select,.field textarea{background:var(--field);color:var(--text);border:1px solid var(--line);border-radius:12px;min-height:47px;font-size:16px}
.field input::placeholder,.field textarea::placeholder{color:var(--muted);opacity:.85}
.field-hint{color:var(--muted)}
.day-option span{background:var(--surface-2);color:var(--text);border:1px solid var(--line)}
.day-option input:checked+span{background:var(--blue-wash);color:var(--brand-blue);border-color:#7FB9E6}
.toast{background:var(--brand-navy);color:white;border-radius:16px}
.switch input:checked+span{background:var(--brand-blue)}
:where(.action,.icon-btn,.round-icon,.mobile-link,.tab,.segment,.nav-item,.small-round,.more-btn):active{transform:scale(.98)}
/* Layered navigation only, not content cards. */
@media(max-width:690px){
 .topbar{padding:calc(12px + env(safe-area-inset-top,0px)) 18px 7px;min-height:80px}
 .topbar .eyebrow{font-size:11px}
 .header-brand{font-size:16px!important}
 .header-mark{width:26px;height:26px}
 .head-actions .icon-btn{width:44px;height:44px;min-width:44px;min-height:44px}
 .content-area{padding:8px 18px calc(132px + env(safe-area-inset-bottom,0px))}
 .welcome{margin:7px 0 20px}
 .welcome h2{font-size:clamp(29px,8vw,36px)}
 .welcome p{font-size:14px;line-height:1.55}
 .section-kicker{font-size:11px}
 .experience-hero{min-height:288px;padding:24px 22px 24px;margin-bottom:16px;border-radius:27px}
 .experience-hero h2{font-size:clamp(28px,7.1vw,35px);line-height:1.14}
 .hero-count{font-size:35px;font-variant-numeric:tabular-nums}
 .hero-buttons>.action{min-height:48px;font-size:13px}
 .overview-tile{min-height:116px;border-radius:18px}
 .overview-tile small{font-size:12px}
 .overview-tile>span{font-size:11px}
 .panel{padding:19px;border-radius:20px}
 .routine-card{padding:12px 10px;min-height:82px}
 .routine-name{font-size:14px}
 .routine-kind{font-size:12px}
 .mobile-nav{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom,0px));background:var(--nav-glass);border:1px solid var(--nav-stroke);border-radius:25px;padding:7px 6px;box-shadow:0 8px 28px rgba(9,42,82,.16),inset 0 1px 0 rgba(255,255,255,.45);-webkit-backdrop-filter:blur(30px) saturate(1.4);backdrop-filter:blur(30px) saturate(1.4);isolation:isolate}
 .mobile-link{color:var(--muted);min-height:55px;gap:5px;border-radius:18px;font-size:11px;font-weight:680;padding:7px 2px}
 .mobile-link.active{color:var(--brand-blue);background:rgba(9,104,200,.12)}
 .mobile-link .icon{width:22px;height:22px}
 .sheet{width:min(100%,calc(100% - 12px));max-height:calc(92dvh - env(safe-area-inset-bottom,0px));border-radius:27px}
 .sheet-content{padding:23px;padding-bottom:calc(25px + env(safe-area-inset-bottom,0px))}
 .report-tile span{font-size:12px}
 .setting-row{flex-wrap:wrap;gap:12px}
 .theme-row .appearance-select{width:100%;max-width:100%}
}
@media(min-width:691px){
 .sidebar{padding-top:30px;gap:26px}
 .topbar{padding-top:25px}
 .content-area{padding-top:13px}
 .experience-hero{max-width:none}
}
@media(prefers-contrast:more){
 :root{--line:#889CB5;--border:#889CB5}
 .panel,.routine-card,.overview-tile,.report-tile,.project{border-width:2px}
 .mobile-nav{border-width:2px}
}
@media(prefers-reduced-transparency:reduce){
 .mobile-nav,.hero-outline{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:var(--surface)!important}
 .hero-outline{background:#204976!important}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important;transform:none!important}}

/* Manually selected dark appearance */
html[data-theme="dark"]{color-scheme:dark;
--bg:#0D1726;--surface:#142235;--surface-2:#1D3046;--border:#29415D;--text:#F1F6FF;--muted:#ACBED3;
--lime:#80BEFF;--dark:#0D1726;--mint:#48D49C;--interactive:#80BEFF;--success:#48D49C;
--soft-mint:#193B38;--blue-wash:#193955;--elevated:#142235;--field:#1D3046;--line:#29415D;--ink:#F1F6FF;--secondary:#ACBED3;
--nav-glass:rgba(19,35,57,.79);--nav-stroke:rgba(154,192,223,.22);--shadow-color:rgba(0,0,0,.16);
--focus-ring:#80BEFF;
}
html[data-theme="dark"] body,.app-shell{background:var(--bg);color:var(--text)}
html[data-theme="dark"] .sidebar{background:#112034;border-color:var(--line);color:var(--text);box-shadow:2px 0 24px #030C1840}
html[data-theme="dark"] .sidebar .brandmark{background:#E6F5FF;border-color:#8EB6DA}
html[data-theme="dark"] .brandname{color:var(--text)}.brandsub,.sidefoot,.sidefoot span{color:var(--muted)}
html[data-theme="dark"] .nav-item{color:var(--muted)}.nav-item.active{background:#1E4569;color:#A4D3FF;box-shadow:inset 3px 0 0 #80BEFF}
html[data-theme="dark"] .nav-item:hover:not(.active){background:var(--surface-2);color:var(--text)}
html[data-theme="dark"] .sidefoot{border-color:var(--line)}.sidefoot strong{color:var(--text)}
html[data-theme="dark"] .topbar .eyebrow,.welcome p,.page-head p,.muted-small{color:var(--muted)}
html[data-theme="dark"] .welcome h2,.page-head h2,.panel-title,.section-kicker + h2{color:var(--text)}
html[data-theme="dark"] .section-kicker{color:#A5D5FF}
html[data-theme="dark"] .icon-btn,.round-icon{background:var(--surface);border-color:var(--line);color:var(--text);box-shadow:none}
html[data-theme="dark"] .icon-btn:hover,.round-icon:hover{background:var(--surface-2)}
html[data-theme="dark"] .action{background:#2376C8;color:white}.action:hover{background:#3188DA;color:white}
html[data-theme="dark"] .action.secondary{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .action.secondary:hover{background:#294665;color:var(--text)}
html[data-theme="dark"] .action.ghost{background:var(--surface);border-color:var(--line);color:#A8D6FF}
html[data-theme="dark"] .action.danger{background:#452734;border-color:#824353;color:#FFDCE4}
html[data-theme="dark"] .panel,.project,.report-tile,.focus-card,.overview-tile{background:var(--surface);border-color:var(--line);color:var(--text);box-shadow:0 5px 20px var(--shadow-color)}
html[data-theme="dark"] .inline-link{color:#9ACBFA}.overview-tile .ov-icon,.ov-icon,.alert-icon{background:#254561;color:#98CBFC}
html[data-theme="dark"] .overview-tile strong,.report-tile strong,.upcoming-row strong,.task-title,.routine-name,.setting-row strong{color:var(--text)}
html[data-theme="dark"] .overview-tile small,.overview-tile>span,.report-tile span,.upcoming-row small,.task-meta,.habit small,.setting-row small{color:var(--muted)}
html[data-theme="dark"] .upcoming-row,.task,.habit,.history-item{border-color:var(--line)}
html[data-theme="dark"] .tag-done{background:var(--soft-mint);color:var(--success)}
html[data-theme="dark"] .momentum-coach{background:linear-gradient(145deg,#193453,#193E40);border-color:#2D525D}
html[data-theme="dark"] .momentum-coach h3{color:var(--text)}.momentum-coach p{color:var(--muted)}
html[data-theme="dark"] .coach-icon{background:#244B44;color:var(--success)}
html[data-theme="dark"] .soft-note,.notice,.focus-prompt{background:var(--surface-2);border-color:var(--line);color:var(--muted)}
html[data-theme="dark"] .tab{background:var(--surface);border-color:var(--line);color:var(--muted)}
html[data-theme="dark"] .tab.active{background:#2472BE!important;border-color:#2472BE!important;color:white!important}
html[data-theme="dark"] .segmented{background:var(--surface-2);border-color:var(--line)}
html[data-theme="dark"] .segment{background:transparent;color:var(--muted)}.segment.active{background:#36536F;color:var(--text)}
html[data-theme="dark"] .tick-box,.more-btn,.small-round{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .tick-box.checked,.habit-check.yes,.small-round.is-done{background:var(--soft-mint);color:var(--success);border-color:#396B5C}
html[data-theme="dark"] .project-icon{background:var(--blue-wash);color:#A1CFF6}
html[data-theme="dark"] .ring{background:conic-gradient(#80BEFF var(--progress,0%),var(--surface-2) 0)}
html[data-theme="dark"] .ring-inner{background:var(--surface)}.ring-time{color:var(--text)}
html[data-theme="dark"] .first-step,.mini-pill{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .date-strip{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .date-strip strong,.routine-hour strong,.agenda-group-title h3{color:var(--text)}
html[data-theme="dark"] .date-strip small,.agenda-status span,.agenda-group-title span,.routine-hour small,.routine-kind{color:var(--muted)}
html[data-theme="dark"] .agenda-status{border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .routine-card{background:var(--surface);border-color:var(--line);box-shadow:0 3px 13px #0002}
html[data-theme="dark"] .routine-card.active-now{background:#173751;border-color:#457CA8;box-shadow:inset 3px 0 0 #80BEFF}
html[data-theme="dark"] .routine-card.done,.routine-card.skip{background:#152535;opacity:.85}
html[data-theme="dark"] .now-pill,.report-badge{background:#214869;color:#A8D8FF}
html[data-theme="dark"] .past-blocks summary{color:var(--muted);border-color:var(--line)}
html[data-theme="dark"] .report-tile span,.report-detail-row span{color:var(--muted)}
html[data-theme="dark"] .score-circle{color:#B3D9FF;border-color:#284C6A}
html[data-theme="dark"] .score-circle small{color:var(--muted)}
html[data-theme="dark"] .report-detail-row{border-color:var(--line)}.report-detail-row strong{color:var(--text)}
html[data-theme="dark"] .alert-status,.alert-controls{background:var(--surface);color:var(--text)}
html[data-theme="dark"] .alert-status h3{color:var(--text)}.alert-status p{color:var(--muted)}
html[data-theme="dark"] .setting-row{border-color:var(--line)}
html[data-theme="dark"] .sheet{background:#17283E;color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .sheet-head h2,.field label{color:var(--text)}
html[data-theme="dark"] .field input,.field select,.field textarea{background:var(--field);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .day-option span{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .day-option input:checked+span{background:#21496D;color:#B8DFFF;border-color:#668FAB}
html[data-theme="dark"] .toast{background:#DCEAFF;color:#0F2B49}
html[data-theme="dark"] .switch input:checked+span{background:#2472BE}
html[data-theme="dark"] .mobile-nav{background:var(--nav-glass);border-color:var(--nav-stroke);box-shadow:0 10px 30px #0007,inset 0 1px 0 #FFFFFF15}
html[data-theme="dark"] .mobile-link{color:var(--muted)}.mobile-link.active{color:#A5D6FF;background:rgba(93,163,223,.17)}

@media(prefers-color-scheme:dark){
html:not([data-theme="light"]){color-scheme:dark;
--bg:#0D1726;--surface:#142235;--surface-2:#1D3046;--border:#29415D;--text:#F1F6FF;--muted:#ACBED3;
--lime:#80BEFF;--dark:#0D1726;--mint:#48D49C;--interactive:#80BEFF;--success:#48D49C;
--soft-mint:#193B38;--blue-wash:#193955;--elevated:#142235;--field:#1D3046;--line:#29415D;--ink:#F1F6FF;--secondary:#ACBED3;
--nav-glass:rgba(19,35,57,.79);--nav-stroke:rgba(154,192,223,.22);--shadow-color:rgba(0,0,0,.16);
--focus-ring:#80BEFF;
}
html:not([data-theme="light"]) body,.app-shell{background:var(--bg);color:var(--text)}
html:not([data-theme="light"]) .sidebar{background:#112034;border-color:var(--line);color:var(--text);box-shadow:2px 0 24px #030C1840}
html:not([data-theme="light"]) .sidebar .brandmark{background:#E6F5FF;border-color:#8EB6DA}
html:not([data-theme="light"]) .brandname{color:var(--text)}.brandsub,.sidefoot,.sidefoot span{color:var(--muted)}
html:not([data-theme="light"]) .nav-item{color:var(--muted)}.nav-item.active{background:#1E4569;color:#A4D3FF;box-shadow:inset 3px 0 0 #80BEFF}
html:not([data-theme="light"]) .nav-item:hover:not(.active){background:var(--surface-2);color:var(--text)}
html:not([data-theme="light"]) .sidefoot{border-color:var(--line)}.sidefoot strong{color:var(--text)}
html:not([data-theme="light"]) .topbar .eyebrow,.welcome p,.page-head p,.muted-small{color:var(--muted)}
html:not([data-theme="light"]) .welcome h2,.page-head h2,.panel-title,.section-kicker + h2{color:var(--text)}
html:not([data-theme="light"]) .section-kicker{color:#A5D5FF}
html:not([data-theme="light"]) .icon-btn,.round-icon{background:var(--surface);border-color:var(--line);color:var(--text);box-shadow:none}
html:not([data-theme="light"]) .icon-btn:hover,.round-icon:hover{background:var(--surface-2)}
html:not([data-theme="light"]) .action{background:#2376C8;color:white}.action:hover{background:#3188DA;color:white}
html:not([data-theme="light"]) .action.secondary{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html:not([data-theme="light"]) .action.secondary:hover{background:#294665;color:var(--text)}
html:not([data-theme="light"]) .action.ghost{background:var(--surface);border-color:var(--line);color:#A8D6FF}
html:not([data-theme="light"]) .action.danger{background:#452734;border-color:#824353;color:#FFDCE4}
html:not([data-theme="light"]) .panel,.project,.report-tile,.focus-card,.overview-tile{background:var(--surface);border-color:var(--line);color:var(--text);box-shadow:0 5px 20px var(--shadow-color)}
html:not([data-theme="light"]) .inline-link{color:#9ACBFA}.overview-tile .ov-icon,.ov-icon,.alert-icon{background:#254561;color:#98CBFC}
html:not([data-theme="light"]) .overview-tile strong,.report-tile strong,.upcoming-row strong,.task-title,.routine-name,.setting-row strong{color:var(--text)}
html:not([data-theme="light"]) .overview-tile small,.overview-tile>span,.report-tile span,.upcoming-row small,.task-meta,.habit small,.setting-row small{color:var(--muted)}
html:not([data-theme="light"]) .upcoming-row,.task,.habit,.history-item{border-color:var(--line)}
html:not([data-theme="light"]) .tag-done{background:var(--soft-mint);color:var(--success)}
html:not([data-theme="light"]) .momentum-coach{background:linear-gradient(145deg,#193453,#193E40);border-color:#2D525D}
html:not([data-theme="light"]) .momentum-coach h3{color:var(--text)}.momentum-coach p{color:var(--muted)}
html:not([data-theme="light"]) .coach-icon{background:#244B44;color:var(--success)}
html:not([data-theme="light"]) .soft-note,.notice,.focus-prompt{background:var(--surface-2);border-color:var(--line);color:var(--muted)}
html:not([data-theme="light"]) .tab{background:var(--surface);border-color:var(--line);color:var(--muted)}
html:not([data-theme="light"]) .tab.active{background:#2472BE!important;border-color:#2472BE!important;color:white!important}
html:not([data-theme="light"]) .segmented{background:var(--surface-2);border-color:var(--line)}
html:not([data-theme="light"]) .segment{background:transparent;color:var(--muted)}.segment.active{background:#36536F;color:var(--text)}
html:not([data-theme="light"]) .tick-box,.more-btn,.small-round{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html:not([data-theme="light"]) .tick-box.checked,.habit-check.yes,.small-round.is-done{background:var(--soft-mint);color:var(--success);border-color:#396B5C}
html:not([data-theme="light"]) .project-icon{background:var(--blue-wash);color:#A1CFF6}
html:not([data-theme="light"]) .ring{background:conic-gradient(#80BEFF var(--progress,0%),var(--surface-2) 0)}
html:not([data-theme="light"]) .ring-inner{background:var(--surface)}.ring-time{color:var(--text)}
html:not([data-theme="light"]) .first-step,.mini-pill{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html:not([data-theme="light"]) .date-strip{background:var(--surface);border-color:var(--line)}
html:not([data-theme="light"]) .date-strip strong,.routine-hour strong,.agenda-group-title h3{color:var(--text)}
html:not([data-theme="light"]) .date-strip small,.agenda-status span,.agenda-group-title span,.routine-hour small,.routine-kind{color:var(--muted)}
html:not([data-theme="light"]) .agenda-status{border-color:var(--line);color:var(--text)}
html:not([data-theme="light"]) .routine-card{background:var(--surface);border-color:var(--line);box-shadow:0 3px 13px #0002}
html:not([data-theme="light"]) .routine-card.active-now{background:#173751;border-color:#457CA8;box-shadow:inset 3px 0 0 #80BEFF}
html:not([data-theme="light"]) .routine-card.done,.routine-card.skip{background:#152535;opacity:.85}
html:not([data-theme="light"]) .now-pill,.report-badge{background:#214869;color:#A8D8FF}
html:not([data-theme="light"]) .past-blocks summary{color:var(--muted);border-color:var(--line)}
html:not([data-theme="light"]) .report-tile span,.report-detail-row span{color:var(--muted)}
html:not([data-theme="light"]) .score-circle{color:#B3D9FF;border-color:#284C6A}
html:not([data-theme="light"]) .score-circle small{color:var(--muted)}
html:not([data-theme="light"]) .report-detail-row{border-color:var(--line)}.report-detail-row strong{color:var(--text)}
html:not([data-theme="light"]) .alert-status,.alert-controls{background:var(--surface);color:var(--text)}
html:not([data-theme="light"]) .alert-status h3{color:var(--text)}.alert-status p{color:var(--muted)}
html:not([data-theme="light"]) .setting-row{border-color:var(--line)}
html:not([data-theme="light"]) .sheet{background:#17283E;color:var(--text);border-color:var(--line)}
html:not([data-theme="light"]) .sheet-head h2,.field label{color:var(--text)}
html:not([data-theme="light"]) .field input,.field select,.field textarea{background:var(--field);border-color:var(--line);color:var(--text)}
html:not([data-theme="light"]) .day-option span{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html:not([data-theme="light"]) .day-option input:checked+span{background:#21496D;color:#B8DFFF;border-color:#668FAB}
html:not([data-theme="light"]) .toast{background:#DCEAFF;color:#0F2B49}
html:not([data-theme="light"]) .switch input:checked+span{background:#2472BE}
html:not([data-theme="light"]) .mobile-nav{background:var(--nav-glass);border-color:var(--nav-stroke);box-shadow:0 10px 30px #0007,inset 0 1px 0 #FFFFFF15}
html:not([data-theme="light"]) .mobile-link{color:var(--muted)}.mobile-link.active{color:#A5D6FF;background:rgba(93,163,223,.17)}
}

/* Accessible selected-segment contrast regardless of historical style overrides */
.segment.active{background:#FFFFFF!important;color:#102A49!important;box-shadow:0 2px 8px rgba(23,48,89,.14)!important}
html[data-theme="dark"] .segment.active{background:#365B7C!important;color:#FFFFFF!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .segment.active{background:#365B7C!important;color:#FFFFFF!important}}
