/* Shared personal navigation for Study and Wellbeing dashboards. */
.nav{position:sticky!important;top:0;z-index:50!important}
.nav-brand{flex:none}
.personal-nav{display:flex;align-items:center;gap:10px;position:relative;margin-left:auto}
.dash-switch{display:flex;align-items:center;gap:3px;padding:4px;border:1px solid rgba(255,255,255,.2);border-radius:999px;margin-right:4px}
.dash-switch a{padding:8px 13px;color:#e5e8e1;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}
.dash-switch a[aria-current=page]{background:var(--yellow,#f2d253);color:var(--ink,#172522)}
.personal-icon,.profile-trigger,.mobile-nav-trigger{min-width:40px;height:40px;border:1px solid rgba(255,255,255,.24);border-radius:50%;background:transparent;color:#fffdf7;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;position:relative;transition:background .18s,border-color .18s,transform .18s}
.personal-icon:hover,.profile-trigger:hover,.mobile-nav-trigger:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.55)}
.personal-icon svg,.mobile-nav-trigger svg{width:18px;height:18px}
.notification-badge{position:absolute;right:-2px;top:-2px;min-width:17px;height:17px;padding:0 4px;border-radius:99px;background:var(--clay,#c66f52);color:white;font-size:10px;font-weight:800;display:grid;place-items:center;border:2px solid var(--ink,#172522)}
.notification-badge[hidden]{display:none}
.profile-trigger{border-radius:999px;padding:3px 10px 3px 4px;gap:9px;max-width:220px}
.profile-avatar{width:32px;height:32px;background:var(--yellow,#f2d253);color:var(--ink,#172522);border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:900;flex:none}
.profile-first-name{font-size:12px;font-weight:800;max-width:84px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-chevron{width:14px;height:14px;transition:transform .2s}
.profile-trigger[aria-expanded=true] .profile-chevron{transform:rotate(180deg)}
.demo-badge{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;background:#f2eee6;color:#4e4940;border-radius:999px;padding:4px 6px}
.profile-menu,.notification-menu,.mobile-quick-menu{position:absolute;right:0;top:calc(100% + 12px);width:min(310px,calc(100vw - 28px));padding:9px;background:var(--white,#fffdf7);color:var(--ink,#172522);border:1px solid var(--line,#d8d7ce);border-radius:18px;box-shadow:0 18px 48px rgba(13,24,20,.22);opacity:0;transform:translateY(-7px) scale(.985);transform-origin:top right;visibility:hidden;pointer-events:none;transition:opacity .18s ease,transform .18s ease,visibility .18s;z-index:60;overflow:hidden}
.profile-menu.open,.notification-menu.open,.mobile-quick-menu.open{opacity:1;transform:translateY(0) scale(1);visibility:visible;pointer-events:auto}
.menu-heading{padding:10px 11px 12px;border-bottom:1px solid var(--line,#d8d7ce);margin-bottom:5px}
.menu-heading strong{display:block;font-size:14px}
.menu-heading small{display:block;color:var(--muted,#657068);font-size:11px;margin-top:3px;overflow:hidden;text-overflow:ellipsis}
.profile-menu a,.profile-menu button,.notification-menu a,.notification-menu button,.mobile-quick-menu a,.mobile-quick-menu button{width:100%;min-height:39px;padding:9px 11px;border:0;background:transparent;color:inherit;text-align:left;font-family:inherit;font-size:12px;font-weight:700;line-height:1.35;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer}
.profile-menu a:hover,.profile-menu button:hover,.notification-menu a:hover,.notification-menu button:hover,.mobile-quick-menu a:hover,.mobile-quick-menu button:hover{background:#f3f0e8}
.profile-menu .menu-danger{color:#a6382b;border-top:1px solid var(--line,#d8d7ce);margin-top:5px;padding-top:12px}
.profile-menu .make-account{background:var(--yellow,#f2d253);margin:6px 0;font-weight:900}
.menu-row-icon{width:17px;height:17px;flex:none}
.menu-link-content{display:flex;align-items:center;gap:10px}
.menu-toggle-state{font-size:10px;color:var(--muted,#657068)}
.notification-menu{width:min(390px,calc(100vw - 28px));padding:0;max-height:min(500px,75vh);overflow:auto;border-radius:20px}
.notification-top{position:sticky;top:0;background:var(--ink,#172522);color:var(--white,#fffdf7);padding:18px 18px 16px;border-bottom:1px solid rgba(255,255,255,.12);display:flex;justify-content:space-between;align-items:center;z-index:1}
.notification-top strong{font-size:16px;letter-spacing:-.025em}
.notification-top button{width:auto;min-height:auto;padding:7px 10px;border:1px solid rgba(255,255,255,.22);border-radius:999px;color:var(--yellow,#f2d253);font-size:11px}
.notification-item{display:block;position:relative;padding:15px 17px 15px 47px;border-bottom:1px solid var(--line,#d8d7ce);background:var(--white,#fffdf7);transition:background .15s}
.notification-item:before{content:"";position:absolute;left:18px;top:19px;width:10px;height:10px;border-radius:50%;background:var(--line,#d8d7ce)}
.notification-item:hover{background:#f3f0e8}
.notification-item strong{font-size:13px;display:block;line-height:1.4}
.notification-item small{display:block;color:var(--muted,#657068);font-size:12px;margin-top:5px;line-height:1.55}
.notification-item.unread{border-left:0;padding-left:47px;background:#faf6eb}
.notification-item.unread:before{background:var(--clay,#c66f52);box-shadow:0 0 0 4px rgba(198,111,82,.13)}
.notification-menu>a.notification-item{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:14px 17px 15px 47px;background:#f3f0e8;color:var(--ink,#172522);border-bottom:0}
.notification-menu>a.notification-item:before{top:19px}
.notification-menu>a.notification-item strong{font-size:13px;line-height:1.35}
.notification-menu>a.notification-item small{font-size:11px;line-height:1.4;margin-top:0}
.notification-empty{margin:12px;padding:20px 17px;border:1px dashed var(--line,#d8d7ce);border-radius:14px;background:#f3f0e8;color:var(--muted,#657068);font-size:13px;line-height:1.6}
.mobile-nav-trigger{display:none}
.mobile-quick-menu{display:none}
.search-layer{position:fixed;inset:0;background:rgba(16,25,21,.56);z-index:100;display:grid;place-items:start center;padding:10vh 16px 24px;opacity:0;visibility:hidden;transition:opacity .18s,visibility .18s;backdrop-filter:blur(3px)}
.search-layer.open{opacity:1;visibility:visible}
.search-box{width:min(740px,100%);max-height:80vh;overflow:hidden;background:var(--white,#fffdf7);color:var(--ink,#172522);border:1px solid var(--line,#d8d7ce);border-radius:24px;box-shadow:0 28px 90px rgba(0,0,0,.28);transform:translateY(-10px) scale(.99);transition:transform .22s cubic-bezier(.2,.8,.2,1)}
.search-layer.open .search-box{transform:translateY(0) scale(1)}
.search-heading{display:flex;align-items:center;justify-content:space-between;padding:17px 20px 0;font-size:12px;font-weight:800}
.search-heading span{color:var(--muted,#657068);font-size:11px;font-weight:600}
.search-form{height:72px;display:flex;align-items:center;gap:14px;margin:12px 16px 0;padding:0 17px;border:1px solid var(--line,#d8d7ce);border-radius:15px;background:#f7f4ed}
.search-form svg{width:20px;height:20px;flex:none}
.search-form input{width:100%;border:0;background:transparent;color:inherit;font-family:inherit;font-size:16px;font-weight:500;line-height:1.4;outline:none}
.search-form input::placeholder{color:var(--muted,#657068)}
.search-close{border:0;background:transparent;color:inherit;font-size:20px;cursor:pointer}
.search-results{max-height:calc(80vh - 125px);overflow:auto;padding:12px 16px 18px}
.search-result{display:grid;grid-template-columns:42px minmax(0,1fr) 18px;align-items:center;gap:13px;padding:12px;border:1px solid transparent;border-radius:14px;transition:background .15s,border-color .15s,transform .15s}
.search-result:hover,.search-result:focus-visible{background:#f3f0e8;border-color:var(--line,#d8d7ce);outline:none;transform:translateX(2px)}
.result-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#ece8dc;color:var(--ink,#172522);font-size:13px;font-weight:900}
.result-mark svg{width:18px;height:18px}
.result-copy strong{display:block;font-size:14px;line-height:1.35}
.result-copy small{display:block;color:var(--muted,#657068);font-size:12px;margin-top:3px;line-height:1.45}
.result-arrow{font-size:18px;color:var(--clay,#c66f52)}
.search-no-results{padding:18px;color:var(--muted,#657068);font-size:13px}
.dark-theme{--ink:#f0eee6!important;--paper:#151b18!important;--white:#202824!important;--muted:#b2bab2!important;--line:#3b4640!important;--sage:#34443a!important}
.dark-theme body,.dark-theme{background:var(--paper);color:var(--ink)}
.dark-theme .nav{background:#101815!important;color:#f0eee6!important}
.dark-theme .nav a,.dark-theme .nav button{color:#f0eee6}
.dark-theme .nav .dash-switch a[aria-current=page]{background:#f2d253!important;color:#172522!important}
.dark-theme .widget.next{background:#26332e!important;color:#f0eee6!important;border-color:#3b4640!important}
.dark-theme .widget.next h2,.dark-theme .widget.next p,.dark-theme .widget.next strong,.dark-theme .widget.next small,.dark-theme .widget.next span{color:inherit}
.dark-theme .widget.next .widget-kicker,.dark-theme .widget.next .meta{color:#c3cbc2!important}
.dark-theme .widget:not(.next),.dark-theme .combined,.dark-theme .combined>div,.dark-theme .stat,.dark-theme .streak,.dark-theme .empty,.dark-theme .hidden-list{background:#202824;color:var(--ink);border-color:#3b4640}
.dark-theme .checkin{background:#34443a}
.dark-theme .row{border-color:#3b4640}
.dark-theme .tag{background:#343a34;color:#f0eee6}
.dark-theme .quiet,.dark-theme .widget-control,.dark-theme .hidden-list button{color:var(--ink);border-color:#505950}
.dark-theme .profile-menu,.dark-theme .notification-menu,.dark-theme .mobile-quick-menu,.dark-theme .notification-top,.dark-theme .search-box{background:#202824;color:#f0eee6;border-color:#3b4640}
.dark-theme .profile-menu a:hover,.dark-theme .profile-menu button:hover,.dark-theme .notification-menu a:hover,.dark-theme .notification-menu button:hover,.dark-theme .mobile-quick-menu a:hover,.dark-theme .mobile-quick-menu button:hover,.dark-theme .search-result:hover,.dark-theme .search-result:focus-visible{background:#303a33}
.dark-theme .search-form{border-color:#3b4640}
.dark-theme .search-form{background:#171e1a}
.dark-theme .search-result{color:#f0eee6}
.dark-theme .result-mark{background:#34443a;color:#f0eee6}
.dark-theme .notification-top{background:#101815;color:#f0eee6}
.dark-theme .notification-item,.dark-theme .notification-item.unread,.dark-theme .notification-menu>a.notification-item{background:#202824;color:#f0eee6;border-color:#3b4640}
.dark-theme .notification-menu>a.notification-item{background:#171e1a}
.dark-theme .notification-empty{background:#171e1a;color:#c4ccc3;border-color:#3b4640}
.dark-theme .card,.dark-theme .phase-card,.dark-theme .calendar-main,.dark-theme .recap-preview,.dark-theme .panel,.dark-theme .journal-panel,.dark-theme .notifications,.dark-theme .settings-layout .panel{background:#202824;color:#f0eee6;border-color:#3b4640}
.dark-theme .week-day,.dark-theme .calendar-day,.dark-theme .agenda-day,.dark-theme .empty,.dark-theme .stat,.dark-theme .tool-inset,.dark-theme .modal,.dark-theme .task-dialog,.dark-theme .setup-dialog{background:#202824;color:#f0eee6;border-color:#3b4640}
.dark-theme .energy-card,.dark-theme .mood-panel,.dark-theme .checkin{background:#34443a;color:#f0eee6}
.dark-theme .nudge{background:#49362f;color:#f0eee6}
.dark-theme .pillars,.dark-theme .calendar-main{background:#202824;color:#f0eee6}
.dark-theme .calendar-day.lighter,.dark-theme .week-day.selected{background:#34443a}
.dark-theme .calendar-day.today,.dark-theme .agenda-day.selected{background:#f2d253;color:#172522}
.dark-theme .calendar-detail,.dark-theme .next-card,.dark-theme .reset-panel,.dark-theme .footer{background:#101815;color:#f0eee6}
.dark-theme .calendar-detail .cal-events,.dark-theme .calendar-detail .cal-block small,.dark-theme .reset-panel .panel-intro{color:#c3cbc2}
.dark-theme .mood-choice,.dark-theme .tag-chip,.dark-theme .editor textarea,.dark-theme .field input,.dark-theme .field select,.dark-theme .task-dialog input,.dark-theme .setup-dialog input,.dark-theme .setup-dialog select{background:#202824;color:#f0eee6;border-color:#505950}
.dark-theme .notice,.dark-theme .empty,.dark-theme .combined,.dark-theme .rowline{border-color:#3b4640}
.dark-theme .panel-intro,.dark-theme .journal-preview,.dark-theme .saved-note,.dark-theme .tiny-copy,.dark-theme .date-stamp,.dark-theme .session-note,.dark-theme .trend-legend,.dark-theme .day-name{color:#c3cbc2!important}
.dark-theme .mood-choice{background:#26332e;color:#f0eee6;border-color:#56645a}
.dark-theme .mood-choice[aria-pressed=true]{background:#34443a;border-color:#f2d253}
.dark-theme .day-face{background:#202824;color:#b2bab2;border-color:#56645a}
.dark-theme .journal-preview{border-color:#78866f}
.dark-theme .agenda-day.selected,.dark-theme .calendar-day.selected{background:#34443a;color:#f0eee6;border-color:#f2d253}
.dark-theme .setup-dialog,.dark-theme .task-dialog,.dark-theme .modal{background:#202824;color:#f0eee6;border-color:#3b4640}
.dark-theme .setup-dialog input,.dark-theme .setup-dialog select,.dark-theme .task-dialog input,.dark-theme .task-dialog select,.dark-theme .modal input,.dark-theme .modal select{background:#151b18;color:#f0eee6;border-color:#56645a}
@media(max-width:760px){
  .personal-nav{gap:7px}
  .dash-switch,.personal-icon,.profile-first-name,.profile-chevron,.demo-badge{display:none}
  .profile-trigger{min-width:40px;width:40px;height:40px;padding:3px;border-radius:50%;justify-content:center}
  .mobile-nav-trigger{display:inline-flex}
  .profile-menu,.notification-menu,.mobile-quick-menu{position:fixed;top:calc(var(--personal-nav-height,66px) + env(safe-area-inset-top) + 8px);right:12px;left:12px;width:auto;max-height:calc(100dvh - var(--personal-nav-height,66px) - env(safe-area-inset-top) - 20px);overflow-y:auto;overscroll-behavior:contain;border-radius:20px}
  .profile-menu{padding:10px}
  .notification-menu{padding:0}
  .mobile-quick-menu{display:block;padding:12px}
  .mobile-quick-menu>button,.mobile-quick-menu>a:not(.mobile-switch a){min-height:48px;padding:12px;border-radius:12px;font-size:14px}
  .mobile-quick-menu>button svg{width:19px;height:19px;flex:none}
  .mobile-quick-menu>button:focus-visible,.profile-menu a:focus-visible,.profile-menu button:focus-visible,.notification-menu a:focus-visible{outline:3px solid var(--yellow,#f2d253);outline-offset:1px}
  .mobile-quick-menu .mobile-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding-bottom:10px;border-bottom:1px solid var(--line,#d8d7ce)}
  .mobile-quick-menu .mobile-switch a{min-height:46px;justify-content:center;border:1px solid var(--line,#d8d7ce);border-radius:999px;font-size:13px}
  .mobile-quick-menu .mobile-switch a[aria-current=page]{background:var(--yellow,#f2d253);color:var(--ink,#172522)}
  .notification-top{padding:15px 16px}
  .notification-top button{min-height:40px}
  .notification-item{min-height:68px;padding-top:15px;padding-bottom:15px}
  .notification-menu .notification-all-link{min-height:72px}
  .search-layer{padding:calc(var(--personal-nav-height,66px) + env(safe-area-inset-top) + 12px) 12px 16px;place-items:start center}
  .search-box{width:100%;max-height:calc(100dvh - var(--personal-nav-height,66px) - env(safe-area-inset-top) - 28px);border-radius:20px}
  .search-form{height:58px}
}
@media(prefers-reduced-motion:reduce){.profile-menu,.notification-menu,.mobile-quick-menu,.search-layer,.search-box{transition:none!important}}

/* Keep the notification destination legible at every menu width. */
.notification-menu .notification-all-link{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 20px;align-items:center;gap:2px 12px;width:100%;min-height:72px;padding:15px 18px;background:#f3f0e8;color:var(--ink,#172522);border-top:1px solid var(--line,#d8d7ce);text-decoration:none}
.notification-menu .notification-all-link:before{display:none}
.notification-menu .notification-all-link strong{grid-column:1;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.notification-menu .notification-all-link small{grid-column:1;color:var(--muted,#657068);font-size:11px;line-height:1.45}
.notification-menu .notification-all-link>span{grid-column:2;grid-row:1/3;justify-self:end;font-size:17px}
.notification-menu .notification-all-link:hover{background:#ebe7dc}
.dark-theme .notification-menu .notification-all-link{background:#171e1a;color:#f0eee6;border-color:#3b4640}
.dark-theme .notification-menu .notification-all-link small{color:#c4ccc3}
.dark-theme .widget:not(.next),.dark-theme .combined,.dark-theme .combined>div,.dark-theme .stat,.dark-theme .streak,.dark-theme .empty,.dark-theme .hidden-list{background:#202824!important;color:#f0eee6!important;border-color:#3b4640!important}
.dark-theme .widget:not(.next) p,.dark-theme .widget:not(.next) small,.dark-theme .widget:not(.next) .quiet,.dark-theme .combined p,.dark-theme .combined small{color:#c3cbc2!important}
.dark-theme .nav{background:#101815!important;color:#f0eee6!important}
.dark-theme .nav .brand,.dark-theme .nav .account,.dark-theme .nav .nav-links a{color:#f0eee6!important}
.dark-theme .widget.next{background:#26332e!important;color:#f0eee6!important;border-color:#3b4640!important}
.dark-theme .widget.next p,.dark-theme .widget.next .eyebrow{color:#c3cbc2!important}

/* Warmer, higher-contrast surfaces for wellbeing in dark mode. */
.dark-theme .mood-panel{background:#2f4a43!important;border-color:#49665d!important;color:#fbfaf6!important}
.dark-theme .mood-panel .panel-kicker,.dark-theme .mood-panel .panel-intro,.dark-theme .mood-panel .tag-label{color:#e1e9df!important}
.dark-theme .mood-choice{background:#243b36!important;border-color:#698177!important;color:#fbfaf6!important}
.dark-theme .mood-choice[aria-pressed=true]{background:#f2d253!important;border-color:#f2d253!important;color:#172522!important}
.dark-theme .nudge{background:#633e34!important;color:#fff9f0!important}
.dark-theme .nudge .panel-kicker,.dark-theme .nudge h2{color:#fff9f0!important}
.dark-theme .nudge .panel-kicker:before{color:#f6c2a8!important}
.dark-theme .nudge p{color:#f3ddd1!important}
.dark-theme .nudge a{color:#fff9f0!important;border-color:#e7c1aa!important}
.dark-theme .dashboard-tools button{background:#243b36;color:#fbfaf6;border-color:#61796f}
.dark-theme .dashboard-tools [role=status]{color:#c9d5cc}
.dark-theme .pillars .energy-picks button{background:#253d37;color:#fbfaf6;border-color:#5e786e}
.dark-theme .pillars .energy-picks button:hover{background:#34534a}
.dark-theme .pillars .energy-picks button.selected{background:#f2d253;color:#172522;border-color:#f2d253}
.dark-theme .nav{background:rgba(8,16,14,.84)!important;border-bottom-color:rgba(255,255,255,.16)!important}

/* Use the Ryze palette to make the two dashboard destinations distinct. */
.dash-switch a[href*="study"]{background:rgba(183,195,168,.16);color:#dce5d5}
.dash-switch a[href*="wellbeing"]{background:rgba(198,111,82,.18);color:#f0c4b0}
.dash-switch a[href*="study"][aria-current="page"],.mobile-quick-menu .mobile-switch a[href*="study"][aria-current="page"]{background:#b7c3a8!important;color:#172522!important}
.dash-switch a[href*="wellbeing"][aria-current="page"],.mobile-quick-menu .mobile-switch a[href*="wellbeing"][aria-current="page"]{background:#e5b09b!important;color:#172522!important}
.mobile-quick-menu .mobile-switch a[href*="study"]{border-color:#b7c3a8;color:#52634d}
.mobile-quick-menu .mobile-switch a[href*="wellbeing"]{border-color:#c66f52;color:#99563f}
