/* Consistent card geometry: reserve the largest copy height without truncating. */
.persona-stage{touch-action:pan-y pinch-zoom}
.persona-text{display:grid;grid-template-rows:minmax(2.2em,auto) minmax(3.1em,auto);align-content:start}
.persona-text h3{min-height:2.2em}
.persona-text p{min-height:3.1em}
.theme-options{display:flex;gap:10px;margin:16px 0}.theme-options .chosen{box-shadow:inset 0 0 0 2px #899e33}
.help-options{display:grid;gap:12px;margin:20px 0}.suggest-help{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.passkey-login{margin-top:16px}.persona-photo{user-select:none}.persona-stage:focus-visible{outline:2px solid #829f24;outline-offset:6px}
/* Explicit application themes, including chat, forms and cards. */
html[data-theme=light]{color-scheme:light;--surface:#e9eae5;--surface-2:#f5f6ef;--text:#121315;--muted:#58634f;--border:#bfc7b6;--card:#f2f3eb;--anna-bg:#f4f3f0;--anna-panel:#ffffff;--anna-text:#25202a;--anna-muted:#615866;--anna-line:#c7bec9;--anna-accent:#a42760;--anna-bubble:#eee2eb}
html[data-theme=dark]{color-scheme:dark;--surface:#121315;--surface-2:#202225;--text:#edf0e7;--muted:#b7beaf;--border:#484d42;--card:#232820;--anna-bg:#0e141b;--anna-panel:#1b222c;--anna-text:#f1f2f7;--anna-muted:#bbc0cf;--anna-line:#485162;--anna-accent:#ff96c1;--anna-bubble:#282130;background:#0b0c0d}
html[data-theme] body,html[data-theme] .shell,html[data-theme] .workspace,html[data-theme] .auth,html[data-theme] .composer,html[data-theme] .bottom-nav,html[data-theme] dialog{background:var(--surface);color:var(--text)}
html[data-theme] .auth-panel,html[data-theme] .workspace-main,html[data-theme] .workspace-header,html[data-theme] .workspace-tabs{background:var(--surface);color:var(--text)}
html[data-theme] .muted,html[data-theme] .persona-text p,html[data-theme] .profile-page p,html[data-theme] .workflow-intro,html[data-theme] .workspace .workflow-intro,html[data-theme] .greeting p,html[data-theme] .chat-hint,html[data-theme] .context-line,html[data-theme] .empty p,html[data-theme] .project-card p,html[data-theme] .paper-profile p{color:var(--muted)}
html[data-theme] .context-line strong,html[data-theme] .auth-tabs button.selected,html[data-theme] .workspace-tabs button.selected,html[data-theme] .list-action,html[data-theme] .bottom-nav button.selected{color:var(--text)}
html[data-theme] .field input,html[data-theme] .field textarea,html[data-theme] .field select,html[data-theme] .composer textarea{background:var(--surface-2);color:var(--text);border-color:var(--border)}
html[data-theme] .task-row.task-card,html[data-theme] .report-card,html[data-theme] .paper-profile,html[data-theme] .project-card,html[data-theme] .source-card,html[data-theme] .suggestion,html[data-theme] .dossier-summary{background:var(--card);color:var(--text);border-color:var(--border)}
html[data-theme] .task-row.task-card p,html[data-theme] .report-card p,html[data-theme] .task-row.task-card .eyebrow,html[data-theme] .report-card .eyebrow,html[data-theme] .task-row.task-card .due,html[data-theme] .source-card small{color:var(--muted)}
html[data-theme] .task-criterion,html[data-theme] .report-target,html[data-theme] .task-note,html[data-theme] .report-feedback,html[data-theme] .note{background:var(--surface-2);color:var(--text);border-color:var(--border)}
html[data-theme] .report-feedback p,html[data-theme] .report-feedback .eyebrow,html[data-theme] .task-row.task-card .task-criterion .eyebrow,html[data-theme] .suggestion p{color:var(--muted)}
html[data-theme] .btn{color:#121315}html[data-theme] .btn.black{background:#121315;color:#f0f3e8;border:1px solid var(--border)}
html[data-theme] .btn.secondary{background:var(--surface-2);color:var(--text);border-color:var(--border)}
html[data-theme] .suggestion button{color:var(--text);border-color:var(--border)}
html[data-theme] .person-chip{background:var(--surface-2);color:var(--text)}html[data-theme] .person-chip.selected{background:var(--card);border-color:#899e33}
html[data-theme] .user-initial{background:var(--surface-2);color:var(--text)}
html[data-theme] .bottom-nav,html[data-theme] .list-action,html[data-theme] .profile-section,html[data-theme] .workspace-tabs,html[data-theme] .workspace-aside{border-color:var(--border)}
html[data-theme=light] .message .body{color:var(--text)}html[data-theme=light] .message.user .body{background:#dfe5d5;color:#263020}
html[data-theme=light] .message .sender,html[data-theme=light] .workspace-title p,html[data-theme=light] .workspace-tabs button,html[data-theme=light] .date-divider{color:#58634f}
html[data-theme=light] .form-error,html[data-theme=light] .inline-error{color:#a52b22}
html[data-theme=dark] .danger{color:#ffb4a5}
.auth-cover,.aside-portrait,.persona-photo{color:#e9eae5}
@media(max-width:760px){.persona-text{margin-bottom:0}.persona-text h3{min-height:2.2em}.persona-text p{min-height:3.1em}.theme-options .btn{min-width:0}}
html[data-theme] .project-strip{background:var(--surface-2);color:var(--text);border-color:var(--border)}
html[data-theme=light] .project-strip button{color:#526a24}
.reminder-schedule{margin:14px 0;font-size:12px;line-height:1.6;color:var(--muted)}

.persona-photo{touch-action:pinch-zoom;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:grab}.persona-photo:active{cursor:grabbing}
html[data-app-locked="true"] #app,html[data-app-locked="true"] #modal,html[data-app-locked="true"] #toast{visibility:hidden!important;pointer-events:none!important}html[data-app-locked="true"] #modal::backdrop{background:transparent}
#app-lock{position:fixed;inset:0;z-index:2147483647;background:var(--bg,#e9eae5);color:var(--text,#171819);overflow:auto;padding:calc(30px + env(safe-area-inset-top)) 24px calc(30px + env(safe-area-inset-bottom))}#app-lock[hidden]{display:none}.unlock-card{max-width:420px;margin:8vh auto}.unlock-card h1{font-size:36px;line-height:1.12;margin:32px 0 16px}.unlock-card .btn{width:100%;margin:12px 0}.unlock-card details{margin:20px 0}.unlock-card summary{cursor:pointer;padding:12px 0}.unlock-card #unlock-error{color:#c34b42}.notification-hours{margin:18px 0}.notification-hours summary{cursor:pointer;padding:10px 0}.character-example{padding:14px;border:1px solid var(--line,#b9bcb3);border-radius:14px}.timezone-select{width:100%;min-width:0}.timezone-search{margin-bottom:8px}.uncensored-consent[hidden]{display:none}
[data-theme="dark"] #app-lock{background:#121315;color:#eee}

html[data-theme] .modal-content>p,html[data-theme] .modal-content>.modal-head .eyebrow{color:var(--muted)}

/* Compact code screen. Native browser passkey sheets remain under OS control. */
.unlock-card.with-pin{max-width:340px;margin:1vh auto;text-align:center}.with-pin .brand{justify-content:center}.with-pin h1{font-size:24px;font-weight:600;margin:34px 0 20px}.pin-dots{display:flex;justify-content:center;gap:14px;margin:22px 0 30px}.pin-dots i{width:12px;height:12px;border-radius:50%;background:var(--line,#c8cbc3)}.pin-dots i.filled{background:var(--text,#171819)}.pin-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 20px;max-width:300px;margin:auto}.pin-keypad button{display:grid;place-items:center;aspect-ratio:1;border:0;border-radius:50%;font:500 30px/1 Manrope,sans-serif;color:inherit;background:rgba(100,110,100,.08);cursor:pointer;touch-action:manipulation}.pin-keypad button:active{background:rgba(100,110,100,.22)}.pin-keypad button:disabled{opacity:.45}.pin-keypad button:focus-visible{outline:2px solid currentColor;outline-offset:3px}.with-pin #unlock-error{min-height:22px;font-size:13px;margin:14px 0 0}.with-pin details{margin:0 0 12px}.with-pin summary{list-style:none;font-size:14px}.with-pin details[open]{text-align:left}.with-pin .small{font-size:12px;margin:10px 0}.unlock-card .btn svg{vertical-align:middle;margin-right:6px}[data-theme="dark"] .pin-keypad button{background:#232629}
@media(max-height:720px){.with-pin h1{margin-top:18px}.pin-dots{margin:16px 0 20px}.pin-keypad{max-width:230px;gap:8px 18px}.unlock-card.with-pin{margin:0 auto}#app-lock{padding-top:calc(16px + env(safe-area-inset-top))}}

html[data-app-locked="true"],html[data-app-locked="true"] body{height:100dvh;overflow:hidden}html[data-app-locked="true"] #app{max-height:100dvh;overflow:hidden}.pin-dots i{background:var(--border,#bfc7b6)}.pin-dots i.filled{background:var(--text,#121315)}.pin-keypad [data-action="app-unlock"] svg{width:28px;height:28px}
/* Goal-first journey. Existing workspace and persona geometry stay intact. */
.home-focus{max-width:1160px;margin:30px auto 0;padding:0 30px}.first-goal-intro,.next-action{padding:28px;border:1px solid var(--line,#ccd0c5);border-radius:14px;background:var(--paper,#f5f6ef);color:var(--ink,#121315);margin-bottom:24px}.first-goal-intro h2,.next-action h2{font-size:clamp(24px,3vw,36px);line-height:1.15;letter-spacing:-.04em;margin:10px 0 16px}.first-goal-intro p,.next-action p{line-height:1.65;max-width:760px}.next-action .eyebrow,.first-goal-intro .eyebrow{font-size:10px}.first-goal-intro .btn,.next-action .btn{margin-top:18px;width:auto;min-width:210px}.action-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.action-meta span{font-size:11px;border:1px solid #939888;border-radius:20px;padding:5px 10px}.journey-actions{display:flex;gap:18px;align-items:center;flex-wrap:wrap}.goal-options{display:grid;gap:8px;margin:20px 0}.goal-options .btn{white-space:normal;text-align:left;line-height:1.5;min-height:48px}.first-step-details{padding:14px 0}.first-step-details summary{font-weight:700;cursor:pointer}.first-step-details p{font-size:12px;line-height:1.6;color:var(--muted,#666)}.first-step-details .field{margin-top:12px}.achievement-card{background:#d6ff48;color:#121315;border-radius:12px;padding:25px;margin:24px 0}.achievement-card h3{font-size:30px;letter-spacing:-.045em;margin:25px 0 20px;line-height:1.15}.achievement-card p{font-size:15px;line-height:1.5}.achievement-card small{display:block;margin-top:35px}.dark .next-action,.dark .first-goal-intro{background:#24272a;color:#f5f6ef;border-color:#52594e}.dark .first-step-details p{color:#bac1b1}.workspace-body>.next-action{margin:18px 0 28px}.next-action h2,.next-action p{overflow-wrap:anywhere}.home-focus .btn{max-width:100%}.btn:focus-visible,.text-btn:focus-visible,summary:focus-visible{outline:3px solid #89a820;outline-offset:4px}
@media(max-width:700px){.home-focus{padding:0 18px;margin-top:20px}.first-goal-intro,.next-action{padding:20px}.journey-actions{gap:14px}.journey-actions .btn{width:100%;min-width:0}.first-goal-intro .btn{min-width:0;width:100%}.next-action h2{font-size:25px}.home-focus+.team-content{padding-top:15px}.goal-options .btn{font-size:13px}.achievement-card h3{font-size:26px}}

/* Remaining quota occupies the left side; depletion moves right edge left. */
.budget-meter{height:12px;width:100%;border-radius:999px;background:#34463a;overflow:hidden;direction:ltr;display:block}
.budget-meter-fill{display:block;height:100%;margin:0 auto 0 0;background:#d4ef92;border-radius:inherit;transition:width .25s ease}
[data-theme="dark"] .budget-meter{background:#425248}
@media(prefers-reduced-motion:reduce){.budget-meter-fill{transition:none}}

/* Portrait carousel: image surface owns dragging, text below still scrolls. */
.persona-carousel{position:relative;overflow:hidden;border-radius:9px;touch-action:pinch-zoom;isolation:isolate}
.persona-track{display:flex;width:100%;transform:translate3d(-100%,0,0);will-change:transform}
.persona-track>.persona-photo{display:block;flex:0 0 100%;width:100%;min-width:0;margin:0;padding:0;border:0;border-radius:0;text-align:left;touch-action:pinch-zoom;color:#fff;cursor:pointer}
.persona-track .persona-name{color:#fff;bottom:43px;pointer-events:none}
.persona-track .persona-top{pointer-events:none}
.portrait-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#121315a6;color:white;border:1px solid #ffffff66;backdrop-filter:blur(6px);touch-action:manipulation}
.portrait-prev{left:10px}.portrait-next{right:10px}.portrait-next svg{transform:rotate(180deg)}
.portrait-arrow:active{background:#121315de}.portrait-arrow:focus-visible{outline:3px solid #d6ff48;outline-offset:2px}
.portrait-hint{position:absolute;bottom:14px;left:0;right:0;text-align:center;font-size:11px;color:#fff;pointer-events:none;z-index:2;text-shadow:0 1px 4px #000}
@media(prefers-reduced-motion:reduce){.persona-track{transition:none!important}}

html[data-theme] .p-shell{--p-bg:var(--surface);--p-paper:var(--card);--p-ink:var(--text);--p-muted:var(--muted);--p-line:var(--border);--p-mint:var(--surface-2);color:var(--p-ink)}

.update-notice{position:fixed;z-index:99;right:20px;bottom:calc(100px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px);padding:14px 16px;border:1px solid #7e915c;border-radius:14px;background:#20291e;color:#f4f6ed;box-shadow:0 10px 30px #0004;display:grid;grid-template-columns:1fr auto;gap:10px 16px}.update-notice[hidden]{display:none}.update-notice p{margin:0;font-size:14px}.update-notice button{font:inherit;font-size:14px;min-height:44px;cursor:pointer;border:1px solid #869d60;border-radius:8px;padding:8px 12px;background:#d5ed9a;color:#17200d}.update-notice [data-update-open]{grid-column:1}.update-notice [data-update-dismiss]{grid-column:2;grid-row:1 / 3;align-self:start;background:transparent;color:#f4f6ed;min-width:44px}.update-notice button:focus-visible{outline:3px solid #fff;outline-offset:3px}#profile-updates:focus-visible{outline:3px solid #839e3b;outline-offset:4px}@media(max-width:650px){.update-notice{right:16px;left:16px;bottom:calc(100px + env(safe-area-inset-bottom))}}
