@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Spectral:wght@600&display=swap');
:root{font-family:Inter,sans-serif;color:#24231f;background:#f7f6f2;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:#f7f6f2}button,input,select,textarea{font:inherit}button{cursor:pointer}.svg-icon{display:block}.app-shell{min-height:100vh;padding-bottom:96px}.content{max-width:760px;margin:auto}.page{padding:30px 18px 36px;display:flex;flex-direction:column;gap:22px}.page-header,.row,.section-title,.toolbar,.category-row{display:flex;align-items:center}.page-header,.section-title,.between{justify-content:space-between}.page-header h1,h1,h2{font-family:Spectral,serif;margin:0}.page-header h1{font-size:30px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#8b897f;margin:0 0 5px}.muted,.empty{color:#77756d}.card{background:#fff;border:1px solid #e5e2d8;border-radius:16px;padding:16px;box-shadow:0 1px 2px rgba(0,0,0,.025)}.compact{padding:12px 14px}.stack{display:flex;flex-direction:column;gap:10px}.habit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.primary,.danger{border:0;border-radius:12px;padding:11px 16px;font-weight:700}.primary{background:#2f6f5e;color:white}.danger{background:#f3deda;color:#9c352b}.small{padding:8px 12px;display:flex;align-items:center;gap:6px}.icon-btn,.link{border:0;background:transparent;color:#77756d;padding:6px}.link{color:#2f6f5e;font-weight:600}.sync-bar{height:34px;padding:0 14px;background:#eeece5;color:#77756d;display:flex;justify-content:space-between;align-items:center;font-size:11px;position:sticky;top:0;z-index:20}.sync-bar button{border:0;background:transparent;color:#77756d}.bottom-nav{position:fixed;bottom:0;left:0;right:0;height:88px;background:rgba(255,255,255,.97);border-top:1px solid #e5e2d8;display:flex;justify-content:center;z-index:30;padding-bottom:env(safe-area-inset-bottom)}.bottom-nav button{width:min(20%,150px);border:0;background:transparent;color:#8c8a82;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:10px}.bottom-nav .nav-icon{display:grid;place-items:center}.bottom-nav button.active{color:#2f6f5e}.task-card{display:flex;gap:10px;align-items:center}.grow{flex:1}.meta{display:flex;gap:9px;flex-wrap:wrap;font-size:11px;color:#8c8a82;margin-top:4px}.overdue{background:#fbebe8}.strike{text-decoration:line-through;color:#999}.check{width:22px;height:22px;border-radius:7px;border:1px solid #ccc;background:#faf9f5;display:inline-flex;align-items:center;justify-content:center;flex:none}.check.done{background:#2f6f5e;color:white;border-color:#2f6f5e}.toolbar{gap:10px;justify-content:space-between;flex-wrap:wrap}.compact-toolbar{gap:8px}.segmented{display:flex;background:#eeece5;padding:3px;border-radius:12px;overflow:auto}.segmented button{border:0;background:transparent;padding:7px 10px;border-radius:9px;text-transform:capitalize;color:#6f6d66;white-space:nowrap}.segmented button.active{background:white;color:#2f6f5e;box-shadow:0 1px 3px rgba(0,0,0,.08)}.task-segments button{font-size:11px;padding:5px 8px}.segmented.small button{font-size:11px;padding:5px 8px}.compact-select{font-size:11px;padding:7px 9px}.category-row{gap:6px;overflow:auto;padding-bottom:3px}.compact-categories .chip{font-size:11px;padding:5px 9px}.chip-wrap{display:flex;align-items:center}.chip{border:1px solid #ddd9cf;background:#f3f1ea;border-radius:999px;padding:6px 10px;white-space:nowrap}.chip.active{background:#dfe9e5;color:#2f6f5e;border-color:#2f6f5e}.chip.dashed{border-style:dashed}.project-chip{background:#e9edf5;color:#53627e}.category-action,.category-trash{border:0;background:transparent;color:#9b998f;padding:4px;display:grid;place-items:center}.category-action{margin-left:-4px}.category-trash{border-left:1px solid #ddd9cf;margin-left:2px;padding-left:8px}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.day-cell{border:0;border-radius:10px;background:#f7f6f2;min-height:62px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.day-cell span{font-size:10px;color:#8c8a82}.day-cell b{background:#f3e4c8;color:#9b6a25;border-radius:999px;font-size:9px;padding:2px 5px}.progress{height:8px;flex:1;background:#eceae2;border-radius:999px;overflow:hidden}.progress div{height:100%;background:#2f6f5e}.habit-card{position:relative}.habit-card p{margin:7px 0}.habit-count{color:#2f6f5e;font-weight:700}.flame{display:flex;gap:5px;color:#c98a2e;align-items:center;font-size:12px}.top-right{position:absolute;top:8px;right:8px}.habit-table{display:grid;grid-template-columns:minmax(95px,1.5fr) repeat(7,minmax(30px,1fr));gap:8px;align-items:center;overflow-x:auto}.habit-table>span{text-align:center;font-size:10px;color:#777;display:flex;flex-direction:column;align-items:center;justify-content:center}.habit-table small{display:block}.habit-row{display:contents}.habit-row strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.habit-row .check{justify-self:center}.search{display:flex;gap:8px;align-items:center;background:white;border:1px solid #e5e2d8;border-radius:12px;padding:9px 12px}.search input{border:0;outline:0;flex:1}.journal-compose textarea,.journal-entry p,textarea{white-space:pre-wrap}.journal-compose{display:flex;flex-direction:column;gap:10px}.journal-entry time{font-size:11px;color:#777}.project-title{border:0;background:transparent;text-align:left;display:flex;flex-direction:column;gap:5px}.project-title span{font-size:11px;color:#777}.project-card>.row+.row{gap:10px;margin-top:12px}.project-progress-row{gap:10px}.subprojects{border-top:1px solid #ece9e0;margin-top:14px;padding-top:12px;display:flex;flex-direction:column;gap:14px}.subprojects h3{margin:0;font-size:14px}.subproject-card{background:#faf9f5;border:1px solid #ece9e0;border-radius:12px;padding:10px}.subtask{display:flex;align-items:center;gap:9px;padding:7px 0}.subtask span{flex:1;font-size:13px}.small-empty{font-size:12px;margin:8px 0}.heatmap-card{padding:14px;margin-bottom:12px}.heatmap{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}.heat-day{display:flex;flex-direction:column;align-items:center;gap:4px;color:#77756d;font-size:10px}.heat-square{width:100%;aspect-ratio:1;border-radius:9px;background:color-mix(in srgb,#2f6f5e calc(var(--heat)*100%),#f3e4c8);border:1px solid #e3dfd2}.project-home-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:12px}.project-home-tile{border:0;background:#fff;border:1px solid #e5e2d8;border-radius:16px;padding:14px;display:grid;place-items:center}.project-ring{--pct:0;width:110px;height:110px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#2f6f5e calc(var(--pct)*1%),#eceae2 0);position:relative}.project-ring:before{content:"";position:absolute;inset:8px;border-radius:50%;background:#fff}.project-ring>div{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:4px;padding:12px}.project-ring strong{font-size:12px;line-height:1.2}.project-ring span{font-size:11px;color:#2f6f5e;font-weight:700}.modal-backdrop{position:fixed;inset:0;background:rgba(32,31,28,.35);display:grid;place-items:end center;z-index:100;padding:16px}.modal{background:#fff;border-radius:20px 20px 14px 14px;padding:18px;width:min(100%,520px);max-height:90vh;overflow:auto}.modal-head{display:flex;justify-content:space-between;align-items:center}.form-grid{display:flex;flex-direction:column;gap:13px;margin-top:15px}.field{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#69675f}input,select,textarea{border:1px solid #dcd8ce;border-radius:10px;padding:10px;background:#faf9f5;color:#24231f;outline:none}textarea{resize:vertical}.auth-shell,.loading{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-card{width:min(100%,420px);background:#fff;border:1px solid #e5e2d8;border-radius:22px;padding:28px;display:flex;flex-direction:column;gap:15px}.auth-card label{display:flex;flex-direction:column;gap:5px;font-size:12px}.status{font-size:12px;color:#b4483a}
@media(max-width:560px){.habit-grid{grid-template-columns:1fr 1fr}.page{padding-left:14px;padding-right:14px}.calendar-card{padding:12px}.day-cell{min-height:55px}.habit-table{grid-template-columns:84px repeat(7,34px);gap:6px}.heatmap{gap:6px}.project-home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-ring{width:100px;height:100px}.bottom-nav{height:90px}.bottom-nav button{font-size:9px}}
/* Nexus v4 additions */
.header-actions{display:flex;gap:8px;align-items:center}.secondary{border:1px solid #d8d4c8;background:#fff;color:#4f625a;border-radius:12px;padding:10px 14px;font-weight:700}.quick-capture{position:fixed;right:18px;bottom:106px;width:54px;height:54px;border-radius:50%;border:0;background:#2f6f5e;color:#fff;display:grid;place-items:center;box-shadow:0 10px 25px rgba(47,111,94,.28);z-index:35}.bottom-nav.six-tabs button{width:min(16.666%,125px)}.inbox-head{position:relative;color:#2f6f5e}.inbox-head b{position:absolute;right:-1px;top:-1px;background:#b4483a;color:#fff;border-radius:99px;min-width:17px;height:17px;font:700 9px Inter;display:grid;place-items:center}.pill{display:inline-flex;align-items:center;background:#e9eee9;color:#2f6f5e;border-radius:99px;padding:4px 8px;font-size:10px;font-weight:700}.pill.alert{background:#f3deda;color:#9c352b}.priority{display:inline-flex;align-items:center;gap:3px;font-weight:700}.priority.high{color:#b4483a}.priority.low{color:#8d8a82}.top-tag{background:#f3e4c8;color:#9b6a25;border-radius:99px;padding:2px 6px;font-weight:700}.check-field{display:flex;align-items:center;gap:9px;color:#4f4d47;font-size:13px}.check-field input{width:17px;height:17px}.inbox-card{display:flex;gap:12px;align-items:center}.inbox-card p,.waiting-card p{margin:5px 0;color:#6e6c65;font-size:12px}.inbox-card small{color:#8b897f}.inbox-actions,.waiting-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}.inbox-actions>button:not(.icon-btn){border:1px solid #ddd9cf;background:#faf9f5;border-radius:9px;padding:5px 7px;color:#5f6f67;font-size:10px}.mode-switch{align-self:flex-start}.waiting-card{display:flex;gap:12px;align-items:center}.faded{opacity:.68}.study-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.metric{display:flex;flex-direction:column;gap:5px}.metric span{font-size:11px;color:#77756d}.metric strong{font-family:Spectral,serif;font-size:24px;color:#2f6f5e}.timer-card{text-align:center;display:flex;flex-direction:column;gap:14px}.timer-display{font:600 clamp(48px,15vw,76px) Inter;color:#2f6f5e;letter-spacing:-.05em}.timer-presets,.timer-controls{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.timer-presets button{border:1px solid #ddd9cf;background:#faf9f5;border-radius:99px;padding:7px 12px;color:#6e6c65}.timer-presets button.active{background:#dfe9e5;color:#2f6f5e;border-color:#2f6f5e}.timer-main{min-width:128px}.study-chart{margin-top:12px;padding:16px}.bars{height:150px;display:grid;grid-template-columns:repeat(7,1fr);gap:10px;align-items:end}.bar-col{height:100%;display:flex;flex-direction:column;align-items:center;gap:4px}.bar-track{height:112px;width:100%;max-width:36px;background:#f0eee7;border-radius:10px;overflow:hidden;display:flex;align-items:flex-end}.bar-fill{width:100%;background:linear-gradient(#5f8f7f,#2f6f5e);border-radius:10px 10px 4px 4px;min-height:4px}.bar-col span{font-size:10px;color:#77756d}.bar-col small{font-size:9px;color:#9a988f}.study-filters{display:grid;grid-template-columns:1fr auto;gap:10px;margin-bottom:12px}.topic-card{display:flex;align-items:center;gap:8px}.topic-head{gap:8px;flex-wrap:wrap}.status-chip{font-size:9px;background:#edf1ef;color:#48675d;border-radius:99px;padding:3px 7px}.session-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center}.session-row div{display:flex;flex-direction:column;gap:3px}.session-row span{font-size:10px;color:#77756d}.session-row b{color:#2f6f5e}.import-btn{display:inline-flex;align-items:center;border:1px solid #d8d4c8;background:#fff;color:#4f625a;border-radius:12px;padding:8px 11px;font-weight:700;font-size:12px;cursor:pointer}
@media(max-width:560px){.bottom-nav.six-tabs button{font-size:8px}.bottom-nav.six-tabs .nav-icon svg{width:26px;height:26px}.quick-capture{bottom:105px;right:14px}.header-actions{gap:5px}.header-actions .small,.import-btn{padding:7px 9px;font-size:10px}.study-filters{grid-template-columns:1fr}.waiting-card,.inbox-card{align-items:flex-start;flex-direction:column}.inbox-actions,.waiting-actions{justify-content:flex-start}.bars{gap:6px}.study-summary-grid{gap:8px}}

/* Nexus v6 refinements */
.page-header h1,h1,h2,.metric strong,.timer-display,.project-ring strong,.project-ring span{font-family:Inter,sans-serif}
.page-header h1{font-size:28px;font-weight:700;letter-spacing:-.025em}
h2{font-weight:650;letter-spacing:-.015em}
.metric strong{font-size:23px;font-weight:700;letter-spacing:-.02em}
.calendar-top{order:initial}
.calendar-clear{display:block;padding:3px 0 0;font-size:10px}
.day-cell.selected{outline:2px solid #2f6f5e;background:#edf4f1}
.day-cell b{min-width:19px;height:19px;padding:0 5px;display:grid;place-items:center;color:#fff;font-weight:700}
.day-cell b.load-low{background:#72a98f}
.day-cell b.load-mild{background:#a9b56f}
.day-cell b.load-medium{background:#d39a42}
.day-cell b.load-high{background:#c85c4f}
.category-end-actions{display:flex;align-items:center;margin-left:2px;position:sticky;right:0;background:#f7f6f2;border-radius:9px}
.category-action{margin-left:0}
.add-category{font-size:17px!important;line-height:1;padding:3px 10px!important}
.subtask-list{margin-top:9px;padding-top:7px;border-top:1px solid #eeeae2;display:flex;flex-direction:column;gap:6px}
.subtask-inline{display:flex;align-items:center;gap:8px;font-size:12px;color:#57554f}
.check.mini{width:17px;height:17px;border-radius:5px;font-size:10px}
.subtask-editor{border:1px solid #e4e0d6;background:#faf9f5;border-radius:12px;padding:11px;display:flex;flex-direction:column;gap:9px}
.subtask-editor-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center;margin-top:7px}
.subtask-editor-row input{background:#fff}
.date-choice{display:flex;flex-direction:column;gap:8px}
.timer-card{align-items:center}
.timer-ring{--timer-pct:100;width:min(56vw,260px);height:min(56vw,260px);border-radius:50%;padding:10px;background:conic-gradient(#2f6f5e calc(var(--timer-pct)*1%),#e8e5dc 0);display:grid;place-items:center;transition:background .2s linear}
.timer-ring-inner{width:100%;height:100%;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:inset 0 0 0 1px #ece8df}
.timer-display{font-size:clamp(54px,15vw,86px);font-weight:700;letter-spacing:-.055em}
.timer-main{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:132px}
.timer-button-icon{display:grid;place-items:center}
.timer-active-page .page-header,.timer-active-page>section:not(.timer-card){display:none}
.timer-card.timer-active{min-height:calc(100vh - 148px);width:100%;justify-content:center;border-radius:24px;padding:24px}
.timer-card.timer-active .timer-ring{width:min(72vw,480px);height:min(72vw,480px)}
.timer-card.timer-active .timer-display{font-size:clamp(72px,19vw,132px)}
.timer-card.timer-active .eyebrow{font-size:13px}
.modal-message{color:#55524b;line-height:1.5;margin:18px 0}
.modal-actions{justify-content:flex-end;gap:9px}
.full-width{width:100%}
@media(max-width:560px){
  .calendar-grid{gap:4px}.day-cell{min-height:60px}.day-cell span{font-size:9px}
  .timer-card.timer-active{min-height:calc(100vh - 128px);margin:-8px -2px 0}
  .timer-card.timer-active .timer-ring{width:min(78vw,360px);height:min(78vw,360px)}
  .page-header h1{font-size:26px}
}


/* Nexus v7: combined Log and Google Calendar */
.journal-log-section{margin-top:30px;padding-top:24px;border-top:1px solid #e4e1d8}
.journal-search{margin:12px 0}
.calendar-setup,.calendar-empty,.calendar-status{padding:18px}
.calendar-setup h2{margin:0 0 8px}.calendar-setup p,.calendar-empty p{margin:0;color:#6d6a62;line-height:1.55}
.calendar-status.error{background:#f8e7e4;color:#a54338;border-color:#e8c2bb}
.google-event{display:flex;align-items:center;gap:13px}
.calendar-event-time{width:112px;flex:0 0 112px;font-size:11px;font-weight:700;color:#2f6f5e;line-height:1.35}
.google-event .grow{display:flex;flex-direction:column;gap:4px}.google-event .grow span{font-size:11px;color:#77756d}
a.icon-btn{display:grid;place-items:center;text-decoration:none;color:#77756d}
.calendar-linked{color:#2f6f5e;background:#e6efeb}
.calendar-time-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.calendar-time-fields.is-hidden{display:none}
.bottom-nav.six-tabs button{min-width:0}
@media(max-width:560px){
  .calendar-event-time{width:90px;flex-basis:90px;font-size:10px}
  .calendar-time-fields{grid-template-columns:1fr}
  .bottom-nav.six-tabs button>span:last-child{font-size:7.5px}
}

/* Nexus v8: calendar creation and responsive dashboard layouts */
.home-calendar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.home-calendar-card{display:flex;align-items:center;justify-content:space-between;gap:14px}
.home-event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 18px;align-items:start}
.dashboard-grid>section{min-width:0}
.compact-home-habits{grid-template-columns:repeat(2,minmax(0,1fr))}
.calendar-layout-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:24px;align-items:start}
.calendar-layout-grid>section{min-width:0}
.calendar-page .page-header{align-items:flex-start}
.google-event.compact{padding:13px}
@media(min-width:860px){
  .content{max-width:1100px}
  .page{padding-left:24px;padding-right:24px}
  .habit-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .project-home-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:720px){
  .dashboard-grid,.calendar-layout-grid,.home-event-grid{grid-template-columns:1fr}
  .home-calendar-actions{justify-content:flex-start}
  .home-calendar-section .section-title{align-items:flex-start;flex-direction:column;gap:10px}
  .home-calendar-card{align-items:flex-start;flex-direction:column}
}

/* Nexus v8.1: live Sydney clock, persistent Google reconnect, ordered home columns */
.sync-bar{display:grid;grid-template-columns:1fr auto 1fr;gap:10px}
.sync-bar button{justify-self:end}
.live-clock{justify-self:center;font-weight:650;color:#4f625a;white-space:nowrap;font-variant-numeric:tabular-nums}
.home-primary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 20px;align-items:start}
.home-column{display:flex;flex-direction:column;gap:26px;min-width:0}
.home-column>section{min-width:0}
.secondary-dashboard-grid{margin-top:2px}
@media(max-width:720px){
  .home-primary-grid{grid-template-columns:1fr}
  .home-column{gap:22px}
  .sync-bar{grid-template-columns:1fr auto}
  .live-clock{grid-column:1/-1;grid-row:2;justify-self:center;padding-bottom:4px}
  .sync-bar{height:auto;min-height:42px;padding-top:5px;padding-bottom:5px}
}

/* Nexus v8.2: larger centred project rings and calendar day tiles */
.project-home-grid{grid-template-columns:repeat(auto-fit,minmax(190px,220px));justify-content:center;justify-items:center;gap:18px}
.project-home-tile{width:100%;min-height:210px;padding:18px}
.project-ring{width:165px;height:165px}
.project-ring:before{inset:11px}
.project-ring strong{font-size:15px;max-width:115px}
.project-ring span{font-size:13px}
.google-calendar-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px}
.google-day-tile{background:#fff;border:1px solid #e5e2d8;border-radius:16px;min-height:178px;padding:12px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px rgba(0,0,0,.025)}
.google-day-tile.today{border-color:#78a997;box-shadow:inset 0 0 0 1px #78a997}
.google-day-tile header{display:grid;grid-template-columns:1fr auto;align-items:end;gap:1px 8px;padding-bottom:8px;border-bottom:1px solid #ece9e0}
.google-day-tile header span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#77756d;font-weight:700}
.google-day-tile header strong{grid-row:1/3;grid-column:2;font-size:28px;line-height:1;color:#2f6f5e;font-variant-numeric:tabular-nums}
.google-day-tile header small{font-size:10px;color:#9a988f}
.google-day-events{display:flex;flex-direction:column;gap:6px;min-height:0}
.google-day-event{display:flex;flex-direction:column;gap:2px;text-decoration:none;background:#e8f0ed;border-left:3px solid #2f6f5e;border-radius:7px;padding:6px 7px;color:#24231f;min-width:0}
.google-day-event time{font-size:9px;font-weight:700;color:#2f6f5e}
.google-day-event span{font-size:11px;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.google-day-empty{font-size:10px;color:#aaa79e;padding:5px 1px}
.home-calendar-section .google-calendar-tiles{grid-template-columns:repeat(var(--home-calendar-cols,7),minmax(0,1fr))}
@media(max-width:720px){
  .project-home-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .project-home-tile{min-height:178px;padding:12px}
  .project-ring{width:min(38vw,145px);height:min(38vw,145px)}
  .project-ring strong{font-size:13px;max-width:95px}
  .google-calendar-tiles{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:4px}
  .google-day-tile{flex:0 0 min(72vw,230px);scroll-snap-align:start;min-height:165px}
}

/* Nexus v8.3: durable local-first saves and responsive calendar ranges */
.calendar-full-width{width:100%;min-width:0}
.calendar-view-heading{align-items:center;gap:12px;flex-wrap:wrap}
.google-calendar-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
.google-calendar-tiles{grid-template-columns:repeat(7,minmax(0,1fr));width:100%}
.google-calendar-tiles.multi-week{grid-template-columns:repeat(7,minmax(0,1fr))}
.google-day-head{width:100%;border:0;background:transparent;padding:0;display:grid;grid-template-columns:1fr auto;align-items:end;gap:1px 8px;text-align:left;color:inherit;cursor:pointer;border-bottom:1px solid #ece9e0;padding-bottom:8px}
.google-day-head span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#77756d;font-weight:700}
.google-day-head strong{grid-row:1/3;grid-column:2;font-size:28px;line-height:1;color:#2f6f5e;font-variant-numeric:tabular-nums}
.google-day-head small{font-size:10px;color:#9a988f}
.google-day-head b{grid-column:1/-1;justify-self:start;margin-top:4px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;display:grid;place-items:center;background:#d8a548;color:#fff;font-size:9px}
.google-day-tile.selected{box-shadow:inset 0 0 0 2px #2f6f5e;border-color:#2f6f5e}
.calendar-selected-detail{margin-top:16px}
.calendar-selected-detail h3{font-size:15px;margin:0}
.calendar-selected-detail .google-event{background:#fff}

@media(max-width:720px){
  .google-calendar-tiles,.google-calendar-tiles.multi-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;overflow:visible;padding:0;width:100%}
  .google-day-tile{min-width:0;min-height:72px;padding:5px;border-radius:10px;scroll-snap-align:none;gap:4px}
  .google-day-head{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:1px;border-bottom:0;padding:0;text-align:center}
  .google-day-head span{font-size:7px;letter-spacing:.04em}
  .google-day-head strong{font-size:17px;line-height:1.05}
  .google-day-head small{font-size:7px}
  .google-day-head b{margin-top:2px;min-width:15px;height:15px;padding:0 3px;font-size:7px;align-self:center}
  .google-day-events{display:none}
  .calendar-selected-detail{margin-top:12px}
  .calendar-selected-detail .google-event{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;padding:10px}
  .calendar-selected-detail .calendar-event-time{width:auto;min-width:0;font-size:9px}
  .calendar-page .header-actions{width:100%;justify-content:flex-start}
  .calendar-view-heading{align-items:flex-start;flex-direction:column}
  .calendar-view-heading .segmented{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}
  .calendar-view-heading .segmented button{min-width:0;padding-left:5px;padding-right:5px}
}
.task-notes{font-size:.76rem;font-style:italic;color:#77756d;margin:.3rem 0 .2rem;line-height:1.35}
.task-notes em{font-style:italic}
.task-progress-wrap{position:relative;margin:.65rem 0 .05rem;height:18px;display:flex;align-items:center}
.task-progress-wrap.compact-progress{margin:.5rem 0 0}
.task-progress-slider{-webkit-appearance:none;appearance:none;width:100%;height:8px;border:0;padding:0;border-radius:999px;background:linear-gradient(90deg,#2f6f5e 0 var(--task-progress),#e7e4db var(--task-progress) 100%);cursor:pointer;touch-action:pan-y;outline:none}
.task-progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;border:2px solid #2f6f5e;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.task-progress-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:2px solid #2f6f5e;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.task-card-actions{display:flex;align-items:center;align-self:flex-start;gap:1px;flex:none}
.add-top-three{color:#2f6f5e;border:1px solid #d8e4df;border-radius:9px;background:#f4f8f6}
.project-task-line small{margin-left:auto;color:var(--muted);font-size:.68rem;white-space:nowrap}
.flame.daily{margin-top:.25rem;color:#b66d22}
@media(max-width:640px){.task-card strong{font-size:.84rem}.task-card .meta{font-size:.66rem}.task-notes{font-size:.7rem}.project-task-line{align-items:flex-start;flex-wrap:wrap}.project-task-line small{width:100%;padding-left:30px}}

/* Nexus v8.6: project task metadata and compact mobile calendar header */
.project-task-line{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px}
.project-task-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
.project-task-title{min-width:0;overflow-wrap:anywhere}
.project-task-meta{display:block;color:#8c8a82;font-size:10px;line-height:1.25}
.project-task-actions{display:flex;align-items:center;gap:1px;flex:none}

@media(max-width:560px){
  .project-task-line{gap:7px;padding:7px 0}
  .project-task-actions{gap:0}
  .project-task-actions .icon-btn{width:26px;height:26px;padding:4px;display:grid;place-items:center;border-radius:7px}
  .project-task-actions .icon-btn svg{width:13px;height:13px}
  .project-task-title{font-size:12px;line-height:1.25}
  .project-task-meta{font-size:9px}

  .calendar-page .page-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
  .calendar-page .page-header h1{font-size:23px;line-height:1;min-width:0}
  .calendar-page .header-actions{width:auto;display:flex;justify-content:flex-end;gap:3px;flex-wrap:wrap}
  .calendar-page .header-actions .small{padding:5px 7px;font-size:9px;gap:3px;border-radius:8px;min-height:28px}
  .calendar-page .header-actions .small svg{width:12px;height:12px}
  .calendar-page .header-actions .link.small{padding:4px 5px;font-size:9px}
  .calendar-page .google-calendar-link{max-width:34px;overflow:hidden;white-space:nowrap;color:transparent;position:relative}
  .calendar-page .google-calendar-link svg{color:#77756d;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
}


/* Nexus v8.8: clearer project tasks and selective priority labels */
.project-task-title{
  font-weight:700;
  letter-spacing:-.01em;
  color:#2b2924;
  line-height:1.35;
}
.project-task-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.project-task-priority{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:2px 6px;
  font-size:9px;
  font-weight:800;
  line-height:1.1;
}
.project-task-priority.high{
  color:#a7352b;
  background:#f7e0dc;
}
.project-task-priority.low{
  color:#2f6f4f;
  background:#dfeee4;
}
@media(max-width:640px){
  .project-task-line{
    grid-template-columns:22px minmax(0,1fr) auto;
    gap:7px;
    padding:9px 0;
    border-bottom:1px solid #ece9e0;
  }
  .project-task-line:last-child{border-bottom:0}
  .project-task-title{
    font-size:13px;
    font-weight:750;
    line-height:1.3;
  }
  .project-task-meta{
    width:auto;
    padding-left:0;
    margin-left:0;
    font-size:9px;
    gap:5px;
  }
  .project-task-priority{
    font-size:8px;
    padding:2px 5px;
  }
  .project-task-actions .icon-btn{
    width:24px;
    height:24px;
    padding:4px;
    opacity:.72;
  }
  .project-task-actions .icon-btn:active{opacity:1}
}


/* Nexus v8.9: aligned project tasks, responsive typography and project sliders */
.project-task-line{
  align-items:start;
}
.project-task-line>.check{
  margin-top:2px;
}
.project-task-copy{
  gap:4px;
}
.project-task-title{
  font-weight:400;
  line-height:1.35;
}
.project-task-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  margin:0;
}
.project-task-due{
  display:block;
  color:#8c8a82;
  font-size:10px;
  line-height:1.25;
}
.project-task-priority{
  width:max-content;
}
.project-task-progress-wrap{
  width:100%;
  height:16px;
  display:flex;
  align-items:center;
  margin-top:3px;
}
.project-task-progress-slider{
  width:100%;
  height:6px;
  background:linear-gradient(90deg,#2f6f5e 0 var(--task-progress),#e7e4db var(--task-progress) 100%);
}
.project-task-progress-slider::-webkit-slider-thumb{
  width:15px;
  height:15px;
}
.project-task-progress-slider::-moz-range-thumb{
  width:13px;
  height:13px;
}
@media(max-width:640px){
  .project-task-line{
    grid-template-columns:22px minmax(0,1fr) auto;
    align-items:start;
  }
  .project-task-line>.check{margin-top:1px}
  .project-task-title{
    font-weight:700;
    font-size:13px;
    line-height:1.32;
  }
  .project-task-due{font-size:9px}
  .project-task-progress-wrap{height:15px;margin-top:2px}
}

/* v9.0 reliability controls */
.sync-now-btn{
  border:0;
  background:transparent;
  color:inherit;
  width:28px;
  height:28px;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  opacity:.72;
}
.sync-now-btn:hover,.sync-now-btn:focus-visible{background:rgba(255,255,255,.12);opacity:1;outline:none}

/* Nexus v9.1: contextual actions, compact sync header and project task metadata */
.task-notes-empty{opacity:.42}
.project-task-title-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.project-task-title-row .project-task-title{flex:1;min-width:0}
.project-task-title-row .project-task-meta{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;flex:none;white-space:nowrap}
.project-task-title-row .project-task-due{display:inline;font-size:10px}
@media(max-width:720px){
  .sync-bar{height:34px;min-height:34px;padding:0 8px;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:4px;font-size:9px;white-space:nowrap}
  .sync-bar [data-sync]{overflow:hidden;text-overflow:ellipsis}
  .sync-bar .live-clock{grid-column:auto;grid-row:auto;padding:0;justify-self:center;font-size:9px}
  .sync-bar button{font-size:9px;padding:3px 4px}
  .sync-now-btn{width:24px;height:24px}
  .project-task-title-row{gap:7px;align-items:flex-start}
  .project-task-title-row .project-task-meta{font-size:8px;gap:4px;padding-top:2px}
  .project-task-title-row .project-task-due{font-size:8px}
}

/* Nexus v9.3: foldable-inspired calendar, centred status bar and study views */
.sync-bar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  height:38px;
  padding:0 16px;
}
.sync-left{display:flex;align-items:center;gap:4px;min-width:0;justify-self:start}
.sync-left [data-sync]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sync-bar .live-clock{grid-column:2;justify-self:center;font-weight:650;color:#4f625a;white-space:nowrap}
.sync-bar .signout-btn{grid-column:3;justify-self:end;padding:5px 8px}

.event-dot{width:8px;height:8px;border-radius:50%;background:var(--event-colour,#2f6f5e);display:inline-block;flex:none}
.google-day-event{display:grid;grid-template-columns:8px auto minmax(0,1fr);align-items:start;column-gap:6px;background:color-mix(in srgb,var(--event-colour,#2f6f5e) 10%,#fff);border-left-color:var(--event-colour,#2f6f5e)}
.google-day-event .event-dot{margin-top:3px}
.google-day-event time{color:var(--event-colour,#2f6f5e)}
.google-event.compact{display:grid;grid-template-columns:10px 112px minmax(0,1fr) auto;align-items:center;gap:10px;border-left:3px solid var(--event-colour,#2f6f5e)}
.google-event.compact .event-dot{background:var(--event-colour,#2f6f5e)}
.google-event.compact strong{display:block;font-size:13px}
.google-event.compact .grow span{display:block;font-size:10px;color:#8c8a82;margin-top:3px}

.study-view-toggle{margin-left:auto}
.chart-scale-label{text-align:right;color:#8c8a82;font-size:10px;margin-bottom:8px}
.study-month-card{display:flex;flex-direction:column;gap:14px}
.study-month-grid{display:grid;grid-template-columns:repeat(10,minmax(24px,1fr));gap:8px}
.study-month-day{aspect-ratio:1;border-radius:7px;border:1px solid #e4e1d7;background:#f0eee7;display:grid;place-items:center}
.study-month-day small{font-size:9px;color:#77756d}
.study-month-day.level-1,.heat-level.l1{background:#dce9d8}
.study-month-day.level-2,.heat-level.l2{background:#b9d2b1}
.study-month-day.level-3,.heat-level.l3{background:#8eb684}
.study-month-day.level-4,.heat-level.l4{background:#5f9360}
.study-month-day.level-5,.heat-level.l5{background:#2f6f5e}
.study-month-day.level-4 small,.study-month-day.level-5 small{color:white}
.study-month-legend{display:flex;align-items:center;justify-content:flex-end;gap:5px;font-size:9px;color:#77756d}
.heat-level{width:15px;height:15px;border-radius:4px;border:1px solid #ddd9cf;display:inline-block}
.preset-edit{font-size:10px;white-space:nowrap}

@media(max-width:720px){
  .sync-bar{height:36px;min-height:36px;padding:0 7px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:4px;font-size:8px}
  .sync-left{gap:1px;max-width:100%}
  .sync-now-btn{width:22px;height:22px;font-size:15px}
  .sync-bar .live-clock{font-size:8px;text-align:center}
  .sync-bar .signout-btn{font-size:8px;padding:2px 3px;max-width:48px;overflow:hidden;text-overflow:ellipsis}
  .calendar-selected-detail .google-event.compact{grid-template-columns:8px 68px minmax(0,1fr) auto;gap:6px}
  .google-day-event{display:none}
  .study-month-grid{grid-template-columns:repeat(6,minmax(28px,1fr));gap:7px}
  .timer-presets{flex-wrap:wrap}
}

/* Nexus Focus companion extension */
.focus-link-row{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin-top:2px}
.focus-toggle{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:#52635b;cursor:pointer;user-select:none}
.focus-toggle input{width:17px;height:17px;accent-color:#2f6f5e}
.focus-status{display:inline-flex;align-items:center;gap:7px;border:1px solid #ddd9cf;background:#faf9f5;border-radius:99px;padding:6px 10px;font-size:10px;color:#77756d}
.focus-status-dot{width:7px;height:7px;border-radius:50%;background:#a8a59c}
.focus-status.connected .focus-status-dot{background:#5f8f7f}.focus-status.active{background:#e4efe9;color:#245847;border-color:#b7d0c5}.focus-status.active .focus-status-dot{background:#2f6f5e;box-shadow:0 0 0 4px rgba(47,111,94,.12)}
@media(max-width:620px){.focus-link-row{gap:8px}.focus-toggle{font-size:11px}.focus-status{font-size:9px}}


/* Nexus v9.5: readable mobile project tasks */
.project-task-title{overflow-wrap:normal!important;word-break:normal!important;hyphens:none;white-space:normal;min-width:0}
.project-task-copy{min-width:0;width:100%}
@media(max-width:720px){
  .project-task-line{grid-template-columns:22px minmax(0,1fr) auto!important;gap:8px!important;align-items:start!important}
  .project-task-title-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:3px!important;width:100%!important;min-width:0!important}
  .project-task-title-row .project-task-title{display:block!important;width:100%!important;min-width:0!important;font-size:13px!important;line-height:1.35!important;overflow-wrap:normal!important;word-break:normal!important;white-space:normal!important}
  .project-task-title-row .project-task-meta{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;width:100%!important;gap:6px!important;padding:0!important;white-space:normal!important}
  .project-task-title-row .project-task-due{font-size:9px!important}
  .project-task-actions{display:flex!important;flex-direction:row!important;align-items:flex-start!important;flex:none!important}
}

/* Nexus v9.9 — dark theme + two-column course study tracker */
:root{
  color-scheme:dark;
  color:#eaf1f4;
  background:#08111e;
  --dark-bg:#08111e;
  --dark-panel:#0e1a29;
  --dark-panel-2:#122235;
  --dark-border:#26394a;
  --dark-muted:#91a2af;
  --dark-text:#eaf1f4;
  --dark-accent:#39c8a5;
  --dark-accent-soft:#173c38;
}
html,body{background:var(--dark-bg)!important;color:var(--dark-text)!important}
.app-shell,.content,.page{background:transparent!important}
h1,h2,h3,strong,.project-task-title,.task-card strong,.tracker-lecture{color:var(--dark-text)!important}
.muted,.empty,.meta,.eyebrow,.project-title span,.journal-entry time,.google-event .grow span,.chart-scale-label,.study-month-legend,.focus-toggle{color:var(--dark-muted)!important}
.card,.auth-card,.modal,.project-home-tile,.google-day-tile,.calendar-selected-detail .google-event,.search,.secondary,.subproject-card{
  background:var(--dark-panel)!important;
  border-color:var(--dark-border)!important;
  color:var(--dark-text)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.12)!important;
}
.sync-bar{background:#0a1624!important;color:#9eb0bd!important;border-bottom:1px solid var(--dark-border)!important}
.sync-bar button,.sync-bar .live-clock{color:#a9bac5!important}
.bottom-nav{background:rgba(9,18,31,.97)!important;border-color:var(--dark-border)!important;backdrop-filter:blur(14px)}
.bottom-nav button{color:#8194a2!important}.bottom-nav button.active{color:var(--dark-accent)!important}
.primary,.quick-capture{background:#1fa985!important;color:#fff!important}.primary:hover{background:#27b994!important}
.secondary{color:#c7d4db!important}.link{color:var(--dark-accent)!important}.icon-btn{color:#99abb7!important}
.segmented{background:#0a1725!important;border:1px solid #203344!important}.segmented button{color:#94a5b0!important}.segmented button.active{background:#173044!important;color:#5fe2c1!important;box-shadow:none!important}
.chip{background:#112133!important;border-color:#2a3d4e!important;color:#b9c7cf!important}.chip.active{background:#153a38!important;color:#54d7b7!important;border-color:#36b798!important}.project-chip{background:#151f35!important;color:#a9bde7!important}
input,select,textarea{background:#0a1725!important;color:#e7eef2!important;border-color:#2b3d4d!important}input::placeholder,textarea::placeholder{color:#6f8290!important}
.search input{background:transparent!important;border:0!important}.check{background:#0b1725!important;border-color:#496070!important;color:white!important}.check.done{background:#1fa985!important;border-color:#1fa985!important}
.task-card.overdue,.overdue{background:#2b1820!important}.task-notes{color:#94a5b0!important}.progress,.bar-track{background:#1e3040!important}.progress div,.bar-fill{background:#36c39f!important}
.day-cell{background:#101f30!important;color:#dce6eb!important}.day-cell span{color:#8fa0ac!important}.day-cell.selected{outline:2px solid #35b998!important}
.google-day-head{border-color:#26394a!important}.google-day-event{background:#122a34!important;color:#e6eff2!important}.google-day-empty{color:#6f8290!important}
.project-ring{background:conic-gradient(#32bea0 calc(var(--pct)*1%),#1d3141 0)!important}.project-ring:before{background:#0e1a29!important}.project-ring span{color:#54d7b7!important}
.subprojects,.journal-log-section{border-color:#26394a!important}.project-task-due{color:#8496a3!important}.project-task-progress-slider,.task-progress-slider{background:linear-gradient(90deg,#2fc09d 0 var(--task-progress),#213545 var(--task-progress) 100%)!important}
.task-progress-slider::-webkit-slider-thumb{background:#0c1826!important;border-color:#46d2af!important}.task-progress-slider::-moz-range-thumb{background:#0c1826!important;border-color:#46d2af!important}
.focus-status{background:#0b1826!important;border-color:#2b3d4d!important;color:#9cafba!important}.focus-status.connected,.focus-status.active{background:#13332f!important;color:#7be6c9!important;border-color:#285c51!important}
.study-month-day{background:#142333!important;border-color:#293d4e!important}.study-month-day small{color:#92a4af!important}.study-month-day.level-1,.heat-level.l1{background:#183d38!important}.study-month-day.level-2,.heat-level.l2{background:#1d554a!important}.study-month-day.level-3,.heat-level.l3{background:#26705d!important}.study-month-day.level-4,.heat-level.l4{background:#2c9175!important}.study-month-day.level-5,.heat-level.l5{background:#35b995!important}.heat-level{border-color:#304656!important}
.calendar-status.error{background:#351b20!important;color:#f0a19b!important;border-color:#63333a!important}.calendar-linked{background:#123a34!important;color:#60dfbf!important}
.modal-backdrop{background:rgba(0,4,10,.72)!important}
.pill{background:#15332f!important;color:#63dfc0!important}.pill.alert{background:#391e25!important;color:#f09b92!important}
.top-tag{background:#3b2d17!important;color:#e7bc70!important}.priority.high{color:#f28f86!important}.priority.low{color:#84b9a8!important}
.heat-square{border-color:#293d4e!important;background:color-mix(in srgb,#2fc09d calc(var(--heat)*100%),#172536)!important}

.study-tracker-launch .section-title{margin-bottom:10px}
.tracker-launch-card{width:100%;border:1px solid var(--dark-border);text-align:left;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;cursor:pointer}
.tracker-launch-card>div{display:flex;flex-direction:column;gap:5px}.tracker-launch-card strong{font-size:15px}.tracker-launch-card span{font-size:12px;color:var(--dark-muted)}.tracker-launch-arrow{font-size:25px!important;color:var(--dark-accent)!important}
.study-tracker-page{max-width:1100px;margin:0 auto}.tracker-page-header{align-items:flex-start}.tracker-back{padding:0 0 8px}
.tracker-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:720px;margin:0 auto;width:100%}
.tracker-progress-card{background:linear-gradient(145deg,#0f1e2e,#0b1725);border:1px solid var(--dark-border);border-radius:20px;padding:20px;display:grid;place-items:center}
.tracker-progress-ring{--tracker-pct:0;width:180px;height:180px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(#39c8a5 calc(var(--tracker-pct)*1%),#1d3242 0)}
.tracker-progress-card.questions .tracker-progress-ring{background:conic-gradient(#63d7c6 calc(var(--tracker-pct)*1%),#1d3242 0)}
.tracker-progress-ring:before{content:"";position:absolute;inset:12px;border-radius:50%;background:#0c1928}
.tracker-progress-ring>div{position:relative;z-index:1;text-align:center;display:flex;flex-direction:column;gap:5px;align-items:center}.tracker-progress-ring strong{font:700 30px Inter,sans-serif!important}.tracker-progress-ring span{font-size:12px;color:#c1cfd6}.tracker-progress-ring small{font-size:11px;color:#7f93a1}
.tracker-days{display:flex;flex-direction:column;gap:14px}.tracker-day{padding:0!important;overflow:hidden}.tracker-day-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 16px;background:#12283a;border-bottom:1px solid #2a4152}.tracker-day-head>div{display:flex;align-items:baseline;gap:9px}.tracker-day-head strong{font-size:14px}.tracker-day-head span{font-size:10px;color:#8fa3af}.tracker-day-progress{color:#56d9b8!important;font-weight:700}
.tracker-table{width:100%}.tracker-table-head,.tracker-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 110px;align-items:center}.tracker-table-head{padding:9px 14px;background:#0a1725;color:#8195a2;font-size:10px;text-transform:uppercase;letter-spacing:.06em}.tracker-table-head span:not(:first-child){text-align:center}.tracker-row{min-height:48px;padding:0 14px;border-top:1px solid #203344}.tracker-row:first-of-type{border-top:0}.tracker-lecture{font-size:13px;line-height:1.35;padding:10px 12px 10px 0}
.tracker-check{display:grid;place-items:center;height:100%;cursor:pointer}.tracker-check input{position:absolute;opacity:0;pointer-events:none}.tracker-check span{width:24px;height:24px;border-radius:7px;border:1px solid #4a6170;background:#0a1725;color:transparent;display:grid;place-items:center;font-size:13px;font-weight:800;transition:.15s ease}.tracker-check input:checked+span{background:#31c29e;border-color:#31c29e;color:#061511;box-shadow:0 0 0 4px rgba(49,194,158,.10)}

@media(max-width:640px){
  .tracker-summary{grid-template-columns:1fr 1fr;gap:10px}.tracker-progress-card{padding:13px 8px}.tracker-progress-ring{width:min(39vw,150px);height:min(39vw,150px)}.tracker-progress-ring strong{font-size:24px!important}.tracker-progress-ring span{font-size:10px}.tracker-progress-ring small{font-size:9px}
  .tracker-day-head{align-items:flex-start;flex-direction:column;gap:5px}.tracker-day-head>div{display:flex;flex-direction:column;gap:2px}.tracker-table-head,.tracker-row{grid-template-columns:minmax(0,1fr) 62px 70px}.tracker-table-head{padding:8px 9px;font-size:8px}.tracker-row{padding:0 9px;min-height:52px}.tracker-lecture{font-size:12px;padding-right:8px}.tracker-check span{width:23px;height:23px}.study-tracker-page .page-header h1{font-size:27px}
}
.tracker-help{margin:8px 0 0;color:#9aabb6;font-size:12px;line-height:1.5;max-width:680px}
.timer-ring-inner{background:#0d1a28!important;box-shadow:inset 0 0 0 1px #2b3e4e!important}
.subtask-editor-row input,.import-btn{background:#0a1725!important;color:#dbe6eb!important;border-color:#2b3d4d!important}
.status-chip{background:#18342f!important;color:#70dfc2!important}
.inbox-actions>button:not(.icon-btn){background:#0c1a28!important;color:#aebdc6!important;border-color:#2b3d4d!important}
.check-field{color:#c1ced5!important}.field{color:#9cadb8!important}.modal-message{color:#b4c2ca!important}
.danger{background:#3a1c23!important;color:#f29a92!important}.flame{color:#e3ad61!important}.habit-count,.metric strong,.timer-display,.session-row b{color:#4bd2ae!important}

/* Nexus v10.0 — dark-theme polish + total question counter */
/* Overdue cards: retain urgency without the old red panel. */
.task-card.overdue,.waiting-card.overdue,.card.compact.overdue{
  background:linear-gradient(135deg,#101f2d,#0d1a27)!important;
  border-color:#315063!important;
  box-shadow:inset 3px 0 0 #b99b64,0 8px 24px rgba(0,0,0,.14)!important;
}
.pill.alert{background:#2b2a22!important;color:#d9bb7a!important;border:1px solid #514a37!important}
.priority.high{color:#d6b46f!important}

/* Add-to-Top-Three action: black rounded square with white plus. */
.add-top-three{
  width:34px!important;height:34px!important;min-width:34px!important;
  border-radius:10px!important;background:#02060a!important;
  border:1px solid #293b49!important;color:#fff!important;
  display:grid!important;place-items:center!important;padding:0!important;
  box-shadow:0 5px 14px rgba(0,0,0,.28)!important;
}
.add-top-three svg{stroke:#fff!important;color:#fff!important}
.add-top-three:hover{background:#09131c!important;border-color:#3a5365!important}

/* Pomodoro presets: remove remaining white pills and match Nexus dark theme. */
.timer-presets button{
  background:#0a1725!important;color:#aebec8!important;
  border:1px solid #2a3d4e!important;border-radius:12px!important;
  box-shadow:none!important;
}
.timer-presets button:hover{background:#102437!important;color:#e9f2f4!important}
.timer-presets button.active{background:#173c38!important;color:#63e1c2!important;border-color:#35bd9c!important}
.timer-presets .preset-edit{background:#08121d!important;color:#70d9bd!important}

/* Three study-tracker summary tiles. */
.tracker-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:1040px!important}
.tracker-progress-card.total-questions{
  appearance:none;width:100%;font:inherit;color:inherit;cursor:pointer;
  align-content:center;gap:13px;text-align:center;
}
.tracker-progress-card.total-questions:hover{border-color:#3d6a66!important;background:linear-gradient(145deg,#112536,#0d1c2b)!important}
.tracker-question-total{display:flex;flex-direction:column;align-items:center;gap:5px;width:100%}
.tracker-question-total strong{font:700 38px Inter,sans-serif!important;color:#eaf1f4!important}
.tracker-question-total span{font-size:12px;color:#c1cfd6}
.tracker-question-total small{font-size:11px;color:#7f93a1}
.tracker-question-bar{width:min(220px,90%);height:12px;border-radius:999px;background:#1d3242;overflow:hidden;border:1px solid #294354}
.tracker-question-bar>div{height:100%;background:#39c8a5;border-radius:inherit;transition:width .2s ease}
.tracker-progress-card.total-questions em{font-style:normal;font-size:10px;color:#65d9bd}

@media(max-width:760px){
  .tracker-summary{grid-template-columns:1fr 1fr!important}
  .tracker-progress-card.total-questions{grid-column:1/-1;min-height:150px}
}

/* Nexus v10.1 — Study page / Pomodoro cycle / 7-column month tracker */
.study-month-grid{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:8px!important}
.study-month-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;color:#7f93a1;font-size:9px;font-weight:800;text-align:center;text-transform:uppercase;letter-spacing:.08em}
.study-month-day{aspect-ratio:1!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;min-width:0}
.study-month-day strong{font:800 clamp(8px,1.8vw,11px) Inter,sans-serif;color:#fff!important;line-height:1}
.study-month-day small{font:700 9px Inter,sans-serif!important;color:#d7e2e7!important;line-height:1}
.timer-phase{display:block;margin-top:3px;color:#70d9bd;font-size:9px;font-weight:900;letter-spacing:.14em}
.rest-picker{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap}
.rest-picker>span{font-size:10px;color:#7f93a1;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin-right:2px}
.rest-picker button{background:#0a1725;color:#aebec8;border:1px solid #2a3d4e;border-radius:12px;padding:7px 11px;font-weight:700}
.rest-picker button.active{background:#173c38;color:#63e1c2;border-color:#35bd9c}
@media(max-width:720px){.study-month-grid,.study-month-weekdays{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:5px!important}.study-month-day strong{font-size:8px}.study-month-day small{font-size:8px!important}}

/* Nexus Study standalone app */
:root{
  --study-bg:#070d18;--study-panel:#101827;--study-panel-2:#141d2e;--study-border:#28344a;
  --study-text:#f5f7fb;--study-muted:#96a3b8;--study-purple:#8b5cf6;--study-blue:#49a7ff;--study-teal:#35e0c1;
}
html,body{background:var(--study-bg)!important;color:var(--study-text)!important}
body{min-height:100vh}.study-only-shell{display:grid;grid-template-columns:170px 1fr;min-height:100vh;padding-bottom:0!important;background:radial-gradient(circle at 70% 10%,rgba(90,69,165,.12),transparent 34%),linear-gradient(180deg,#080d18,#060b14)}
.study-main{min-width:0}.study-content{max-width:1180px!important;margin:0 auto;padding:0 26px}.study-sidebar{position:sticky;top:0;height:100vh;padding:22px 14px;border-right:1px solid #1f2939;background:rgba(7,12,23,.94);display:flex;flex-direction:column;gap:26px;z-index:40}.study-brand{display:flex;gap:10px;align-items:center}.study-brand-mark{font-size:42px;line-height:1;font-weight:800;background:linear-gradient(90deg,var(--study-purple),var(--study-blue));-webkit-background-clip:text;color:transparent}.study-brand strong{display:block;font-size:17px}.study-brand span{display:block;font-size:9px;color:var(--study-muted);margin-top:2px}.study-sidebar nav{display:flex;flex-direction:column;gap:5px}.study-sidebar nav button,.study-sidebar-signout{border:0;background:transparent;color:#b7c0cf;border-radius:10px;padding:10px 12px;display:flex;gap:10px;align-items:center;text-align:left}.study-sidebar nav button.active{background:linear-gradient(90deg,rgba(139,92,246,.32),rgba(139,92,246,.16));color:#fff}.study-sidebar-signout{margin-top:auto;color:#8490a3}.study-bottom-nav{display:none!important}.study-only-shell .sync-bar{background:rgba(8,14,26,.9)!important;border-bottom:1px solid #1d2737;color:#8490a3!important}.study-only-shell .page{padding:28px 0 40px;gap:18px}.study-only-shell .card{background:linear-gradient(180deg,rgba(20,29,46,.98),rgba(14,22,36,.98))!important;border:1px solid var(--study-border)!important;box-shadow:0 14px 40px rgba(0,0,0,.14)!important}.study-only-shell .muted,.study-only-shell .empty{color:var(--study-muted)!important}.study-only-shell .primary{background:linear-gradient(90deg,#7446e8,#925cff)!important}.study-only-shell .secondary{background:#111a29!important;border-color:#303b51!important;color:#d8deea!important}.study-only-shell .link{color:#a785ff!important}.study-only-shell .progress{background:#273247!important}.study-only-shell .progress div{background:linear-gradient(90deg,var(--study-purple),var(--study-blue))!important}.study-only-shell input,.study-only-shell select,.study-only-shell textarea{background:#0c1422!important;border-color:#2b374b!important;color:#f5f7fb!important}.study-only-shell .modal{background:#0d1523!important;border:1px solid var(--study-border)!important}.study-only-shell .field{color:#aeb8c9!important}
.study-today-header{display:flex;justify-content:space-between;align-items:flex-start}.study-today-header h1{font-size:36px;margin:0}.study-today-header p{margin:4px 0 0;color:var(--study-muted)}.study-date-pill{display:flex;gap:8px;align-items:center;border:1px solid var(--study-border);background:#111827;border-radius:12px;padding:10px 13px;color:#cfd6e3}.exam-banner{min-height:135px;border:1px solid #40345e;border-radius:18px;padding:20px 28px;background:linear-gradient(105deg,rgba(94,61,155,.72),rgba(38,34,68,.82)),radial-gradient(circle at 72% 60%,rgba(91,161,255,.3),transparent 32%);display:flex;align-items:center;overflow:hidden}.exam-banner>div{display:flex;flex-direction:column;gap:4px}.exam-banner span{display:flex;gap:8px;align-items:center;font-weight:700}.exam-banner strong{font-size:40px}.exam-banner small{color:#c8c0da}.study-metrics-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.study-metric-card{border:1px solid var(--study-border);background:linear-gradient(180deg,#141d2e,#101827);border-radius:16px;padding:15px;display:flex;align-items:center;justify-content:space-between;gap:12px}.study-metric-card>div:first-child{display:flex;flex-direction:column;gap:5px}.study-metric-card span{font-size:11px;color:#bcc6d5}.study-metric-card strong{font-size:24px}.study-metric-card small{color:var(--study-muted)}.mini-ring{--metric-pct:0;width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--study-purple) calc(var(--metric-pct)*1%),#2b3548 0);position:relative;flex:none}.study-metric-card.blue .mini-ring{background:conic-gradient(var(--study-blue) calc(var(--metric-pct)*1%),#2b3548 0)}.mini-ring:before{content:"";position:absolute;inset:7px;background:#111a2a;border-radius:50%}.mini-ring b{position:relative;font-size:12px}.dashboard-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dashboard-pomodoro{text-align:center}.dashboard-pomodoro .section-title{text-align:left}.dashboard-timer{font-size:56px;font-weight:700;letter-spacing:-.05em;margin:12px 0}.dashboard-start{min-width:250px;margin:0 auto;display:flex;gap:8px;align-items:center;justify-content:center}.dashboard-timer-meta{display:flex;justify-content:center;gap:10px;margin-top:12px}.dashboard-timer-meta span{background:#0c1422;border:1px solid #2c374b;border-radius:999px;padding:7px 11px;font-size:11px;color:#c7d0de}.month-mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin-top:10px}.month-mini-day{aspect-ratio:1;border-radius:8px;border:1px solid rgba(140,111,255,.18);background:color-mix(in srgb,var(--study-purple) calc(var(--heat)*70%),#151d2c);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0}.month-mini-day span{font-size:8px;color:#fff}.month-mini-day b{font-size:10px;color:#cfd5e1}.recent-study-row{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #222d40}.recent-study-row:last-child{border-bottom:0}.recent-study-row div{display:flex;flex-direction:column}.recent-study-row small{color:var(--study-muted);margin-top:2px}.recent-ok{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;border:1px solid #2bd6a7;color:#2bd6a7}.targets-card{display:flex;flex-direction:column;gap:12px}.targets-card label{display:flex;justify-content:space-between;color:#dce2eb;font-size:12px}.targets-card label span{color:var(--study-muted)}.question-hero{display:grid;grid-template-columns:auto 1fr;gap:26px;align-items:center}.question-log-row div{display:flex;justify-content:space-between;gap:10px;align-items:center}.question-log-row small{color:var(--study-muted)}.next-study-row{display:grid;grid-template-columns:34px 1fr auto;gap:12px;align-items:center}.next-study-row>b{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#242e43;color:#d7deea}.next-study-row div{display:flex;flex-direction:column;gap:3px}.next-study-row small{color:var(--study-muted)}.analytics-heatmap{max-width:560px}.dedicated-timer-page .timer-card{max-width:760px;margin:0 auto;width:100%}
@media(max-width:900px){.study-only-shell{display:block;padding-bottom:94px!important}.study-sidebar{display:none}.study-bottom-nav{display:flex!important;background:rgba(7,12,23,.98)!important;border-color:#202a3a!important;height:86px}.study-bottom-nav button{width:16.666%!important;min-width:0;color:#7f8da3!important}.study-bottom-nav button.active{color:#b28aff!important}.study-bottom-nav button>span:last-child{font-size:8px}.study-content{padding:0 14px}.study-metrics-row{grid-template-columns:1fr 1fr}.dashboard-two-col{grid-template-columns:1fr}.exam-banner{min-height:120px}.study-today-header h1{font-size:30px}}
@media(max-width:520px){.study-only-shell .page{padding-top:18px}.study-today-header{align-items:center}.study-date-pill{font-size:10px;padding:8px}.exam-banner{padding:16px 18px;min-height:112px}.exam-banner strong{font-size:34px}.study-metric-card{padding:12px}.study-metric-card strong{font-size:21px}.mini-ring{width:52px;height:52px}.dashboard-timer{font-size:48px}.dashboard-start{min-width:220px}.month-mini-grid{gap:5px}.question-hero{grid-template-columns:1fr;text-align:center;justify-items:center}.next-study-row{grid-template-columns:30px 1fr}.next-study-row .secondary{grid-column:2}.study-bottom-nav button>span:last-child{font-size:7px}}

/* Nexus Study v1.1 — unified black + purple theme and editable study goals */
.study-only-shell{
  --study-teal:#8b5cf6;
  --dark-accent:#8b5cf6;
  --dark-accent-bright:#a78bfa;
  --dark-accent-soft:#251a3e;
}
/* Remove remaining green/teal accents throughout Timer, Tracker, Questions and Analytics. */
.study-only-shell .timer-ring{background:conic-gradient(#8b5cf6 calc(var(--timer-pct)*1%),#272f42 0)!important}
.study-only-shell .timer-ring-inner{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;background:#0d1422!important}
.study-only-shell .timer-display{color:#f5f7fb!important;text-align:center!important;line-height:1!important;margin:0!important;transform:none!important}
.study-only-shell .timer-phase{color:#b79aff!important;text-align:center!important}
.study-only-shell .timer-presets button.active,.study-only-shell .rest-picker button.active{background:#2a1c49!important;color:#c7b2ff!important;border-color:#8b5cf6!important}
.study-only-shell .timer-presets .preset-edit{color:#b79aff!important}
.study-only-shell .focus-status.connected,.study-only-shell .focus-status.active{background:#251a3e!important;color:#c7b2ff!important;border-color:#5d4292!important}
.study-only-shell .focus-toggle input:checked{accent-color:#8b5cf6!important}
.study-only-shell .tracker-progress-ring,.study-only-shell .tracker-progress-card.questions .tracker-progress-ring{background:conic-gradient(#8b5cf6 calc(var(--tracker-pct)*1%),#283147 0)!important}
.study-only-shell .tracker-day-head{background:#17182b!important;border-color:#342b52!important}
.study-only-shell .tracker-day-progress{color:#b79aff!important}
.study-only-shell .tracker-check input:checked+span{background:#8b5cf6!important;border-color:#8b5cf6!important;color:#fff!important;box-shadow:0 0 0 4px rgba(139,92,246,.13)!important}
.study-only-shell .tracker-question-bar>div{background:linear-gradient(90deg,#7446e8,#9d6cff)!important}
.study-only-shell .tracker-progress-card.total-questions em{color:#b79aff!important}
.study-only-shell .tracker-progress-card.total-questions:hover{border-color:#6d50a9!important;background:linear-gradient(145deg,#171a2d,#111625)!important}
.study-only-shell .status-chip,.study-only-shell .pill{background:#251a3e!important;color:#c7b2ff!important}
.study-only-shell .recent-ok{border-color:#8b5cf6!important;color:#a78bfa!important}
.study-only-shell .metric strong,.study-only-shell .session-row b,.study-only-shell .habit-count{color:#b79aff!important}
.study-only-shell .bar-fill{background:linear-gradient(#9d6cff,#7446e8)!important}
.study-only-shell .study-month-day.level-1,.study-only-shell .heat-level.l1{background:#211735!important}
.study-only-shell .study-month-day.level-2,.study-only-shell .heat-level.l2{background:#352257!important}
.study-only-shell .study-month-day.level-3,.study-only-shell .heat-level.l3{background:#4c2f7d!important}
.study-only-shell .study-month-day.level-4,.study-only-shell .heat-level.l4{background:#6943aa!important}
.study-only-shell .study-month-day.level-5,.study-only-shell .heat-level.l5{background:#8b5cf6!important}
.study-only-shell .heat-square{background:color-mix(in srgb,#8b5cf6 calc(var(--heat)*100%),#171d2c)!important}
.study-only-shell .check.done{background:#8b5cf6!important;border-color:#8b5cf6!important}
.study-only-shell .progress div{background:linear-gradient(90deg,#7446e8,#9d6cff)!important}
.study-only-shell .mini-ring,.study-only-shell .study-metric-card.blue .mini-ring{background:conic-gradient(#8b5cf6 calc(var(--metric-pct)*1%),#2b3548 0)!important}
.metric-label-row{display:flex;align-items:center;gap:6px;min-height:20px}
.metric-edit{width:25px;height:25px;min-width:25px;border-radius:8px;border:1px solid #3b3156;background:#0b101c;color:#b79aff;display:grid;place-items:center;padding:0;cursor:pointer}
.metric-edit:hover{background:#24183f;border-color:#7655b6;color:#fff}
.target-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}
.target-row label{margin:0}
@media(max-width:520px){.metric-edit{width:23px;height:23px;min-width:23px}.metric-label-row{gap:4px}}
